simulation analysis of rlc/mac for umts in network ... analysis of rlc/mac for umts in network...

50
Simulation analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem av Anders Björsson LITH-EX-3399-2003 Linköping 2003

Upload: dangminh

Post on 14-Mar-2018

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

Simulation analysis of RLC/MAC for UMTSin Network Simulator version 2

Examensarbete utfört iKommunikationssystem

av

Anders Björsson

LITH-EX-3399-2003

Linköping 2003

Page 2: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

Simulation analysis of RLC/MAC for UMTSin Network Simulator version 2

Examensarbete utfört iKommunikationssystem

vid Linköpings tekniska högskola

av

Anders Björsson

LITH-EX-3399-2003

Linköping 2003

Handledare: Frida Gunnarsson

Examinator: Fredrik Gunnarsson

Linköping 2003-12-19

Page 3: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

Avdelning, InstitutionDivision, Department

Institutionen för systemteknik581 83 LINKÖPING

DatumDate

2003-12-19

SpråkLanguage

RapporttypReport category

ISBN

Svenska/Swedish

X Engelska/English

Licentiatavhandling

X Examensarbete ISRN LITH-ISY-EX-3399-2003

C-uppsats

D-uppsats

Övrig rapport

____

Serietitel och serienummerTitle of series, numbering

ISSN

URL för elektronisk versionhttp://www.ep.liu.se/exjobb/isy/2003/3399/

TitelTitle

Simulering av RLC/MAC för UMTS i Network Simulator version 2

Simulation analysis of RLC/MAC for UMTS in Network Simulator version 2

FörfattareAuthor

Anders Björsson

SammanfattningAbstract

The Internet has mainly been interconnecting stationary computers by wired links, but an

increasing number of mobile clients require wireless communication. One way to connect these

clients is to use the Universal Mobile Telecommunication System, UMTS. UMTS is a third gener-

ation mobile system.

A network can be seen as nodes interconnected by links. The functionality of the nodes can be

described as a layered hierarchy. A reference model for this hierarchy was developed by OSI. In

this model the second lowest layer is called data link layer. The data link layer is responsible for

making the raw transmission appear error free to upper layers.

The focus for this thesis is the data link layer in the UMTS. Compared to the data link layer in a

wired scenario it contains more control and error correction mechanisms. These mechanisms use

a lot of timers and triggers, which makes it very difficult to analyze them mathematically. There-

fore simulation is the preferred method.

For the simulations the network simulator version 2 was used. This is an open source discrete

event simulator. It has a modularized wireless stack already implemented. This can not be used

to simulate UMTS though. Some modules in this stack were replaced by a new implementation

to make simulations on UMTS possible.

Tests were performed on the new implementation and the results were what could be expected.

The results were also consistent with previous research in the area.

NyckelordKeyword

network, simulation, 3G, UMTS, MAC, RLC

Page 4: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

.1

7

3

1

Table of contents

CHAPTER 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3 Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4 Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5 Reading Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.6 Abbreviations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

CHAPTER 2 Network Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.1 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 Design and Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3 Elements of Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3.1 Error Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4 Protocol Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.5 Wireless Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

CHAPTER 3 Radio Link Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

3.1 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.3 Transport Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.3.1 Transparent Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3.2 Unacknowledged Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3.3 Acknowledged Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.4 Retransmission. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.4.1 Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.4.2 Status Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

CHAPTER 4 Medium Access Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

4.1 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.4 Multiplexing Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.4.1 Time Division Duplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.4.2 Frequency Division Duplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.5 Channels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.6 High Speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.7 Packet Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Page 5: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

5

7

1

37

39

41

CHAPTER 5 Physical Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

5.1 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.2 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

CHAPTER 6 Implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

6.1 General Design Decisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.2 Radio Link Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.2.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.3 Medium Access Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.3.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.4 Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

CHAPTER 7 Tests and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

7.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

7.2 A Packet Loss and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

7.3 Impact of Error Model Choice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

7.4 Impact of Poll Prohibit Timer Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7.5 Impact of Poll Timer Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

CHAPTER 8 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8.1 Future Work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

CHAPTER 9 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

APPENDIX A User guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A.1 Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

A.2 Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

A.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Page 6: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

List of figuresFigure 1-1. The OSI reference model can be used to describe a network node................................2Figure 1-2. The OSI reference model can be used to describe the UMTS protocols. ......................3Figure 2-1. Shared object design uses the best features of two languages. ......................................8Figure 2-2. A general markov chain has several states with different drop probabilities. ................9Figure 2-3. The simplest Markov chain has only two states...........................................................10Figure 2-4. The already implemented wireless protocol stack in ns contains several layers..........11Figure 3-1. Segmentation means dividing a large packet into several smaller. ..............................13Figure 3-2. Filling unused space in a packet with data from the next is called concatenation. ......14Figure 3-3. Transparent mode is the simplest mode. ......................................................................15Figure 3-4. In unacknowledged mode a header is added to each packet. .......................................15Figure 3-5. Unacknowledged mode uses some complex functions. ...............................................16Figure 3-6. The acknowledged mode model is quite complex. ......................................................17Figure 3-7. In acknowledged mode a header is added to each packet. ...........................................18Figure 4-1. The packet format for non-high-speed contains a header and an SDU........................24Figure 4-2. The packet format for high-speed mode contains a header and several SDUs. ...........24Figure 6-1. The new RLC module inherits from LL and it uses one or several RLCFlows. ..........28Figure 7-1. A packet loss and its recovery......................................................................................32Figure 7-2. The left figure shows 0% error rate and the right 1% rate based error rate..................33Figure 7-3. The left figure shows 10% rate based error rate and the right 20%. ............................33Figure 7-4. Markov chains are used to simulate error bursts. .........................................................34Figure 7-5. These are the results of the burst error tests. ................................................................34Figure 7-6. The delay for the tests can be compared. .....................................................................35Figure 7-7. The mean delay increases when the poll prohibit timer value is increased. ................36Figure 7-8. The delay increases when the poll timer value is increased.........................................36

Page 7: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

andal isome

tart ofput-

uni-til this

to usetion

part-

Insideopen, see

nel.ives it

tagetion is

icalvidedytes.ecialccess-layer

1Introduction

This chapter gives an introduction to the subject. In section 1.1 the work is motivatedthere is also a description of where in the network the focus for this thesis is. The godescribed in section 1.4 and finally there is a reading guide in section 1.5 and scommon abbreviations in section 1.6.

1.1 BackgroundPerformance of communication networks have been an interesting issue since the sthe Internet in the 1960’s. The Internet has mainly been interconnecting stationary comers by wired links, but an increasing number of mobile clients require wireless commcation. The areas of wired and wireless communications have been separated unpoint. The research in one is not necessarily compatible with research in the other.

There are several ways to interconnect the mobile clients to the Internet. One way isthe Universal Mobile Telecommunication System, UMTS. UMTS is a third generamobile system. The standards for this are maintained by 3GPP, the third generationnership program [1]. These standards have an important role in this thesis.

To understand a network, it can be useful to see it as nodes interconnected by links.a node a layered hierarchy can be used to describe the functionality of the node. Thesystem interconnection, OSI, has developed a reference model for this hierarchyfigure 1-1. Each layer in this model is described below [19].

The physical layeris concerned with transmitting raw bits over a communication chanThe key issue is to make sure that when one side transmits a 1 bit the other side receas a 1 bit and not a 0 bit. Typical questions for this layer are for example which vollevel represents a 1 bit, how many nanoseconds a bit last and how the initial connecmade.

The data link layeris responsible for transforming the raw transmission of the physlayer into a line that appears free from transmission errors. To do this the data is diinto frames. A frame typically contains between a few hundred and a few thousand bThe frames received without errors are normally acknowledged by sending a spacknowledgement frame back. Broadcast networks introduce some problems when aing a channel which is concurrently used by several users. This is dealt with in a subin the data link layer called medium access control or MAC.

1

Page 8: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

inetables

packet.jitter.

on-bors.ervicectionout of

m. Antrol.sameans-

Figure 1-1.The OSI reference model can be used to describe a network node.

The network layercontrols the operation of the subnet. The key issue here is to determhow packets are routed from source to destination. The routes can be based on staticthat are rarely changed or they can be dynamic, either set up per session or set up perThis layer is also responsible for congestion issues such as delay, transmit time andThis is called quality of service or QoS.

The transport layeris a true end-to-end layer all the way from source to destination, in ctrast to the earlier mentioned layers that communicate only with their immediate neighThe transport connection can have different characteristics depending on the type of sthe higher layers request. The most common type is an error free point-to-point connethat delivers messages in sequence, but others include broadcasting and deliverysequence.

The session layerallows users on different machines to establish sessions between thesession can help to keep track on whose turn it is to transmit. This is called dialog coIt provides token management, useful when two parties not are allowed to attempt thecritical operation at the same time. It also provides synchronization, allowing long trmissions to continue where they were interrupted.

Application

Presentation

Session

Transport

Network

Data link

Physical

2

Page 9: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

. Itllows

omefor

e cor-nciescessoneherel levels

ayeris isecha-ath-yer.

damen-orkand

other

The presentation layeris concerned with the syntax and semantics of the informationmakes it possible for machines with different data representation to communicate. It ahigh-level abstract data structures to be defined and exchanged.

The application layercontains a lot of protocols that are commonly needed by users. Sexamples are HTTP for transferring web pages, FTP for transferring files and IMAPtransferring mail.

The OSI reference model can be used to understand the protocol stack of UMTS. Threspondence is depicted in figure 1-2. The physical layer is the radio signals, frequeand channels. The data link layer is divided into radio link control, RLC and medium accontrol, MAC. The network layer is the internet protocol, IP. The transport protocol isof the transport control protocol, TCP or the user datagram protocol, UDP. In UMTS tis also a radio resource control entity, RRC. It manages the radio resources on severain the hierarchy. It has no corresponding entity in the OSI model.

Figure 1-2.The OSI reference model can be used to describe the UMTS protocols.

The focus of this thesis is the data link layer of the UMTS. Compared to the data link lin a wired scenario it contains more control and error correction mechanisms. Thbecause of the many and different errors introduced by the wireless link. These mnisms use a lot of timers and triggers, which makes it very difficult to analyze them mematically. Instead, the common approach is to use a simulator to analyze the link la

1.2 Previous workSome research has already been done in this area. In this research there are two funtally different ways to simulate a wireless link in a larger network. One is to see the netwas a traffic generator. The structure of the network outside the wireless link is ignoredthe focus is on making the wireless communication as close to reality as possible. The

Transport

Network

Data link

Physical Radio

MAC

RLC

IP

TCP/UDP

OSI UMTS

RRC

3

Page 10: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ere is

orod-

end set-

la-e wire-and

scov-

thatlarge

et-yer.

efinedin a

eforelators

t isialability

rcexcep-

s free

gle,as the

sim-, this

is to see the wireless link as nothing but a delay with certain properties. The focus hthe network around the wireless link and how the different type of links interacts.

Some of the previous work in this area is described below.

• “Improving 3G performance for the mobile internet” [13]. In this report the simulatns is used. This simulator is further described in section 1.3. The wireless link is meled using only a delay. The focus is how to utilize the wireless link maximally whchanging tcp-algorithms. The results are some suggestions on algorithm choice antings of some parameters of the algorithms.

• “Simulation analysis of RLC timers in UMTS systems” [20]. In this report the simutor used is what later is described as an in house testbed. The network outside thless link is modeled only as a traffic generator. The focus is on the settings of timerstriggers in the data link layer. Some relations between the different settings are diered.

The ambition of this thesis is to simulate the details of the wireless link in a simulatoralso supports simulations of the entire network. This makes it possible to simulate thenetwork as well as the details of the wireless link.

Concurrent with this work another project on simultion of rate control in UMTS radio nwork controller [12] was done. This means simulations of layers above the data link laThe implementations are compatible with each other and an interface has been dbetween them. A joint effort from both these theses and their supervisors resultedreport [11] with some of the results from both theses.

1.3 SimulatorsAs mentioned above a mathematical analysis of some network layers is difficult. Thera simulation is preferred. For the purpose of comparison three different types of simuare described below.

Commercial tools. Opnet [15] is one of the commonly used commercial tools. Opneshort for optimized network engineering tool. It is distributed by “MIL3 Inc”. Commerctools are favoured by the industry, probably because of support agreements and reliissues.

Open source software.Network simulator version 2 [14] is an example of an open sousoftware. Open source software is often developed by user contributions and ns is no etion. Open source software is favored by the academic world, probably because it iand because it is easier to develop new modules.

In house testbeds.There are also a lot of in house testbeds with limited, or even just a sinsimulation task. These simulators cannot easily be modified and are not as commontwo previous mentioned.

Since the work in this thesis is made in the academic world, an open source softwareulator is used for the simulations. The distribution in use is called ns-allinone-2.1b9ais further discussed in chapter 2.

4

Page 11: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

net-pec-

timearts

be thedeci-he tests8 the

e

r.

r.

e.

1.4 GoalThe goal of this thesis is to implement and test the RLC and MAC layers for UMTS inwork simulator version 2. The implementation shall be compliant with the standards sified by 3GPP. Implementing these standards in full could not be done within theframe of this thesis and therefore parts were left out. A closer specification of which pare included and which are excluded can be found in chapter 6.

1.5 Reading GuideIn chapter 2 the simulator used for this work is described. Chapters 3, 4 and 5 descristandards for RLC, MAC and the physical layer respectively. In chapter 6 the designsions and general implementation issues are described. The tests and the results of tthat were performed on the implementation are described in chapter 7. In chapterresults are analyzed and discussed.

1.6 AbbreviationsSome of the abbreviations used in this thesis are explained below.

3GPP Third Generation Partnership Program. An organization formed around ththird generation mobile systems.

FDD Frequency Division Duplex. A multiplexing mode that uses separatefrequencies in each direction.

IP Internet protocol. A network protocol commonly used on the Internet.

MAC Medium Access Control. A part of the data link layer in UMTS.

ns Network Simulator. The simulator used for this work.

OSI Open systems interconnection. Standards developed by the internationalstandardization organization.

OTcl Object Tool Control Language. An interpreted programming language.

PDU Protocol Data Unit. Packets that are sent to or received from a lower laye

RLC Radio Link Control. A part of the data link layer in UMTS.

RRC Radio Resource Control. Manages radio resources on several layers.

SDU Service Data Unit. Packets that are sent to or received from a higher laye

SUFI Super Field. Building blocks for status packets used in acknowleged mod

STL Standard Template Library. Implementations of data structures in C++.

TCP Transport Control Protocol. A transport protocol commonly used on theInternet.

TDD Time Division Duplex. A multiplexing mode that uses time slots.

TTI Transmission Time Interval. One timeslot in TDD.

UE User equipment. Often a mobile phone.

5

Page 12: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

UMTS Universal Mobile Telecommunication System.

UTRAN UMTS Radio Access Network.

6

Page 13: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

is dis-n con-

. It is1989utionsMU

and

systemThere. Theter-

f C++

l-times thet an

r. Thethingpacket

ed in af the

2Network Simulator

This chapter describes the network simulator version 2 [14]. The design and structurecussed on a general level. The wireless stack is shown, because the implementatiotains new modules for this stack.

2.1 GeneralThe network simulator, ns, is a discrete event simulator targeted at network researchan open source software. It began as a variant of the REAL network simulator [17] inand has evolved substantially over the past years. Ns has always included contribfrom different resarch projects, including wireless code from the UCB Daedelus and CMonarch projects and Sun Microsystems.

Ns provides support for simulation of TCP, routing, and multicast protocols over wiredwireless networks.

2.2 Design and ImplementationThe design of ns uses a paradigm called shared object design. This means that theis programmed in two languages, but the objects in one are accessible in the other.are also objects accessible to only one part of the system. This is depicted in figure 2-1main part of the simulation engine is written in C++ [10] and the main part of the user inface is written in OTcl [16]. The reason for this is that the system can use the speed obut at the same time the flexibility of OTcl.

There are two different types of event schedulers implemented in ns. These are reaand non-real-time schedulers. The real-time scheduler is for emulation, which allowsimulator to interact with a real network. Currently, emulation is under development buexperimental version is available. The non-real-time scheduler is the default schedulescheduler is used to keep track of simulation time and fire events. To make somehappen at a certain time an event or timer is needed. An event can for example be aarrival. A timer can be created using theTimerHandler class.

To use the simulator a scenario has to be created. The network can be freely designscenario and it is written in OTcl. The scenario contains descriptions for some or all oelements of simulation described below.

7

Page 14: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

same

is annd the

n be

rher

areagentsdlesed for

atorsttern.rate.made

Figure 2-1.Shared object design uses the best features of two languages.

2.3 Elements of SimulationIn this section the elements of simulation in ns are described.

Nodesin ns handle packet forwarding and can be both receivers and routers at thetime. There are both unicast and multicast nodes.

Links interconnect two nodes.

Packetsworks as events in the event driven simulation. Receiving or sending a packetevent. There are functions for creating, accessing and changing both the packets aheaders of the packets.

Queuescan be connected to links. The type of dropping (or forwarding) procedure cachosen from several different types.

Error modelsare used to introduce packet losses in the simulation. These are fudescribed in section 2.3.1.

Agentsrepresent the endpoints for network layer packets in the simulation. Theyresponsible for creation and destruction of these types of packets. There are severalalready implemented, but only two are of interest for this work; the TCP-agent that hanTCP-packets and the null-agent that simply discards all packets. The TCP-agent is usthe traffic in the simulations and the null-agent is used as drop target.

Applicationsare above the agents. There are two types of applications; traffic generand simulated applications. The traffic generators generate traffic in a predefined paThe pattern can be on/off cycles with certain characteristics or simply a constant bitSimulated applications are for example FTP and telnet where the generated traffic isas similar to the real applications traffic as possible.

OTclC++

8

Page 15: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

link-wire-yte orin theity tos are

tes 0

.

rkovchangeS istates.

for-

2.3.1 Error ModelsError models are used to introduce packet losses in the simulation. An error model is alevel packet loss that can be attached to any link in wired topologies and any node inless topologies. The size of the error can be selected by means of corrupting a bit, a bthe whole packet. The erroneous packet is then either marked by setting the error flagheader or by sending it to a drop target instead of the original destination. Which entcorrupt can be selected in a variety of ways, some of the already implemented onedescribed below.

• Rate based is a simple model with a configurable rate at which the entities are cor-rupted.

• Deterministic has a predefined list of which entities to corrupt.

• Timer based uses timers to determine which entities to corrupt.

• Twostateis a more complex model that uses a two state automata with dropping raand 1 for the two states and configurable state change probabilities.

• Multistate is the most flexible and sophisticated model with a multi state automata

A commonly used error model that can be derived from the multistate model is the machain. In a markov chain each state is a rate based error model and states can onlyup or down the chain. A general markov chain is depicted in figure 2-2. In this figurethe states and P, Q and R are state change probabilities. Pi+Qi+Ri=1 must hold for all s

Figure 2-2.A general markov chain has several states with different drop probabilities.

The most simple markov chain has only two states, this is depicted in figure 2-3. Themula for the total drop rate for this error model is shown in equation 2-1.

S1

P1

S2

P2

Q1

R2

Q2

R3

Sn

Pn

Qn-1

Rn

...

Total S1

1 P2–

2 P1– P2–--------------------------- S2

1 P1–

2 P1– P2–---------------------------⋅+⋅= (2-1)

9

Page 16: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

asily

A bit

lopedelessd forsig-

e LLel iny thesicalation

e

Figure 2-3.The simplest Markov chain has only two states.

2.4 Protocol StackThe packet flow in ns goes through a protocol stack. Each protocol is a module that ecan be replaced. The modules implement an interface with the single functionrecv .Through this function all incoming packets from upper and lower layers are received.in the common headers describe whether the packet is going up or down the stack.

2.5 Wireless ModelsSome functionality exists in ns for modeling of wireless scenarios. This has been devewith the same purpose as this study to enable combined simulations for fixed and wirnetworks. The focus is on the standard for wireless local area networks, WLANs, andifferent mobility simulations with radio propagation delays. Such links, however, arenificantly different from the wireless links in UTRAN.

The wireless protocol stack already implemented is depicted in figure 2-4. In this figuris the link layer and MAC is the media access control as described in the OSI modsection 1.1. ARP is the address resolution protocol. The interface queue is used bMAC to buffer packets. The network interface and channel corresponds to the phylayer in the OSI model. It contains models for antenna type, channel type and propagproperties.

Each of the modules implement therecv function described in section 2.4 and can breplaced by another module that also implements this function.

S1

P1

S2

P2

1-P1

1-P2

10

Page 17: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

Figure 2-4.The already implemented wireless protocol stack in ns contains several layers.

LL

Interface Queue

MAC

ARP

Network Interface

Channel

11

Page 18: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

12

Page 19: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

tion-oes

etails.

introlucesely tosion

lledvedter

tion 3.3bed

nta-eas-e.

theiving

3Radio Link Control

This chapter contains a description of the radio link control, RLC. The described funcality is compliant with the 3GPP standard “3GPP TS 25.322” [7]. The implementation dnot contain everything described in this chapter, see section 6.2 for implementation d

3.1 GeneralThe radio link control, RLC is found in the link layer in the OSI architecture describedsection 1.1. The link layer in a wireless network contains more functionality and conmechanisms than in a wired network. The reason for this is that a wireless link introdmore and different errors than a wired one. In a wired scenario the errors are most likbe buffer overflows while in the wireless case the errors are more likely to be transmiserrors.

A packet sent to a higher layer from RLC or received from a higher layer to RLC is caRLC service data unit, or RLC SDU. A packet sent to a lower layer from RLC or receifrom a lower layer to RLC is called RLC protocol data unit, or RLC PDU. In this chapPDU means RLC PDU and SDU means RLC SDU, unless explicitly stated.

3.2 FunctionsThe services provided to upper layers depend on the transport mode in use, see secbelow. In order to provide all three transport modes in full the functionality describelow needs to be implemented. The specifications for these can be found in [7].

Segmentation and reassemblyis used to send SDUs that are larger than a PDU. Segmetion means dividing a large packet into several smaller. This is depicted in figure 3-1. Rsembly is the reverse of segmentation, i.e. merging the small packets into the big on

Figure 3-1.Segmentation means dividing a large packet into several smaller.

Concatenationis used when a PDU not is filled by the last part of an SDU. Data fromnext SDU is then used to fill the empty space. This is depicted in figure 3-2. The rece

13

Page 20: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ermine

art ofy the

rged

d in

ers.s these

ersorder

f the

othpper

cess

r issize.kets

d ande all

side uses a length indicator in the headers when reassembling the packets to detwhere the second packet starts.

Figure 3-2.Filling unused space in a packet with data from the next is called concatenation.

Paddingis used in the same way as concatenation, but instead of data the remaining pthe PDU is filled with pad. The pad can have any content and shall be disregarded breceiver. The length of the pad is determined by the packet size.

Sequence number controlis used when reassembling packets to make sure they get mein the correct order and in error correction to determine which packets were lost.

Error correction is done by retransmission of lost packets. This is further describesection 3.4.

Duplicate detectionis used to make sure that no SDU is delivered twice to upper layEach packet is assigned a sequence number. To detect duplicates, the RLC checksequence numbers.

In-sequence delivery of upper layer PDUsmeans that the packets arrive to the upper layin the same order as they were sent. This service can be disabled by upper layers if theof the packets is unimportant or if the order is restored in higher layers.

Transfer of user datais the service provided to upper layers. The transfer uses one othree transport modes described in section 3.3.

SDU discardmeans that if the RLC is unable to transfer a SDU it can be discarded. Bupper layers and the receiver shall be notified of the discard, if this is configured by ulayers.

Cipheringis used to prevent unauthorized acquisition of data. The actual ciphering prois out of the scope of this thesis.

Sliding windowis a control mechanism that limits the number of packets the sendeallowed to send before receiving acknowledgement. This amount is called the windowWhen positive acknowledgements arrive the window moves forward allowing new pacto be sent, therefore the name sliding window. The RLC uses this mechanism.

3.3 Transport ModesRLC can operate in three different transport modes; transparent, unacknowledgeacknowledged. Each adds new functionality compared to the previous. They ardescribed below.

14

Page 21: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

s, seeion is

seg-t. Theion and

LCurther

3.3.1 Transparent ModeRLC operating in transparent mode, TM, transfers data without adding any headerfigure 3-3. Segmentation is optional, and is configured by upper layers. If segmentatnot configured each SDU is a PDU. If segmentation is configured, oversized SDUs aremented into PDUs and the segments from one SDU are sent in the same timesloreceiver reassembles the SDUs. RLC operating in transparent mode uses segmentatreassembly, transfer of user data and SDU discard as described in section 3.2. [7]

Figure 3-3.Transparent mode is the simplest mode.

3.3.2 Unacknowledged ModeRLC operating in unacknowledged mode, UM, is depicted in figure 3-5. In this mode Radds a header to each sent PDU. The packet format is depicted in figure 3-4 and is fdescribed below.

Figure 3-4.In unacknowledged mode a header is added to each packet.

Transmission Buffer

Segmentation

Reassembly

Reception Buffer

Receiving sideTransmitting side

Length indicator

Sequence number

Length indicator

Data

Pad

E

E

E (optional)

(optional)

(optional)

15

Page 22: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

in

ator

terns

quenced in

onfig-ble for

The fields of the packet are:

• Sequence number is used in segmentation/concatenation and reassembly to maintathe order of the packets. This field is 7 bits.

• E is the extension bit. This is used to indicate whether the next byte is a length indicor if it is data.

• Length indicator is used to determine the length of the data. There are also bit patwith special meanings. The length indicator is 7 or 15 bits.

• Data is the data to be transferred.

• Pad is used to fill undersized packets.

Figure 3-5.Unacknowledged mode uses some complex functions.

In this mode RLC uses segmentation and reassembly, concatenation, padding, senumber control, transfer of user data, ciphering and SDU discard as describesection 3.2. Each SDU is segmented and concatenated into PDUs. If ciphering was cured by upper layers and started, the PDU is ciphered. The receiving side is responsideciphering and reassembly.

Transmission Buffer

Segmentation &

Reassembly

Reception Buffer

Receiving sideTransmitting side

Concatenation

Add RLC header

Ciphering Deciphering

Remove RLC header

16

Page 23: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

s inmodeleftlier. Ae able

to thesmit-

unit ifgative

t into assageslayers.

3.3.3 Acknowledged ModeAcknowledged mode, or AM, is the most complex mode. In addition to the functionunacknowledged mode it does error correction by retransmission. The acknowledgedmodel is depicted in figure 3-6. In this figure an incoming SDU arrive at the top on theside. The SDU is then segmented and concatenated into PDUs as described earheader is added to each PDU in the next step. Each packet is then put into buffers to bto retransmit them later if needed. Packets are then moved from these buffers inretransmission buffer, where the control unit also may add status packets. Before tranting the packet the headers are set up as described later and the data is ciphered.

The receiving side checks if it is a status packet, and reports the status to the controlit is. Otherwise the packet sequence number is reported so the correct positive and neacknowledgements can be transferred later. The packet is then deciphered and pureception buffer. In the next step the header is removed and piggybacked status meare extracted. Finally the PDUs are reassembled to an SDU and delivered to upper

Figure 3-6.The acknowledged mode model is quite complex.

Transmission Buffer

Segmentation &

Reassembly

Reception Buffer

Receiving sideTransmitting side

Concatenation

Add header

Ciphering

Deciphering

Remove header &

Retransmissionbuffer&management

Header setup

extract information

Demux

Controlunit

17

Page 24: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

trol

his

r or

ndsate-

the

s are

Figure 3-7.In acknowledged mode a header is added to each packet.

The headers are depicted in figure 3-7, and each field is further described below.

• D/C is the data/control bit. It is used to differentiate between data packets and conpackets.

• Sequence numberis used to identify the packets in retransmission and reassembly. Tfield is 12 bits.

• P is the poll bit. This is used to request a status report, see section 3.4.1 below.

• HE is the header extension. It is used to tell if this packet contains a length indicatonot. This field is two bits.

• Length indicatoris used to determine the length of the data. It tells where the data eand the padding begins or where the next SDU begins if the packet contains concnated SDUs, see section 3.2. The length indicator is 7 or 15 bits.

• E is the extension bit, used to determine if the next octet contains another part of length indicator or if it is data.

• Data is the data to be transferred.

• Pad or piggybacked status is used when needed, see section 3.2.

3.4 RetransmissionTo retransmit packets RLC uses polling to request status reports. These functiondescribed below.

Length indicator

Sequence number

Length indicator

Data

Pad or piggybacked status

D/C

E

E

(optional)

(optional)

Sequence numberP HE

(optional)

18

Page 25: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

sidehichre areow.

sent

of

quest

se are

-

-

t con-l pro-er iswhileThis

thepoll-

. TheIs are

rs

ofent

3.4.1 PollingThe polling function is used to request a status report from the RLC entity on the otherof the communication, the peer RLC entity. There are several ways to trigger a poll. Wto use is configured by upper layers. Often several triggers are used concurrently. Thetwo sorts of triggers, periodic and non-periodic. The periodic ones are described bel

• Poll every n:th PDUmeans that after a configurable number, n, of PDUs have beensince the last poll request this mechanism triggers.

• Poll every n:th SDU works in the same way as the one above but on SDUs insteadPDUs.

• Timer basedmeans that after a configurable time has passed since the last poll rethis mechanism triggers.

The non-periodic triggers are deployed in special cases or in case of emergency. Thedescribed below.

• Poll onlast PDU in transmission buffer means that the last packet to be sent triggersthis mechanism.

• Poll on last PDU in retransmission buffer works like the one above but on the retransmission buffer.

• Window based polling means that if the window is configurable near full this mechanism triggers.

Since there often are several triggers active and the polling results in status reports thasume bandwidth, there are also ways to prohibit polling. This mechanism is called polhibit and is basically a timer that is used when configured by upper layers. The timstarted when a PDU with a poll request is sent. If one or more mechanisms triggersthe timer is running, only one poll request is sent directly after the timer has run out.way the overhead consumed by status reports can be kept down.

If a configured mechanism triggers and the poll prohibit timer is inactive or not runningnext outgoing PDU will contain a poll request. The request is indicated by setting thebit in the header, see section 3.3.3.

3.4.2 Status ReportWhen an incoming PDU contains a poll request, the RLC compiles a status packetstatus packet consists of smaller parts called super fields, or SUFIs. The possible SUFdescribed below.

• Acknowledgement is a SUFI that contains the sequence number of the last PDUreceived in sequence without error.

• List of negative acknowledgementsis a SUFI that contains a list of sequence numbeand burst length of PDUs received with error or not received at all.

• Bitmap of negative acknowledgementsis a SUFI that contains the sequence number the first missing PDU and a bitmap describing positive and negative acknowledgemfor the following PDUs. The bitmap may be up to 128 bits long.

19

Page 26: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

izecon-

toencee

this

• Relative list of negative acknowledgements is a more complex data structure thatdescribes the missing PDUs. This is not further elaborated here.

• Window sizeis a SUFI that contains a new window size. RLC may change window swhen receiving this SUFI, but the maximum and minimum values is still the ones figured by upper layers.

• Move receiving windowis a SUFI that requests a move of the receiving window anddiscard the SDUs affected. Which SDUs to discard is described by giving the sequnumber of the last PDU from that SDU. Up to 16 such numbers can be sent in onSUFI.

• Move receiving window acknowledgement is a SUFI used to acknowledge the movereceiving window SUFI described above.

• No more datais a SUFI that indicates that there are no more SUFIs after this one instatus report.

20

Page 27: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ribeden-tation

ed init on is

.

er-higher

trol,

RC

tions

yer.

en

weened on

nel.

4Medium Access Control

This chapter contains a description of the medium access control, MAC. The descfunctionality is compliant with the 3GPP standard “3GPP TS 25.321” [6]. The implemtation does not contain everything described here, see section 6.3 for implemendetails.

4.1 GeneralThe medium access control is found in the link layer of the OSI architecture describsection 1.1. The need for medium access control arises when the channel to transmshared. This is the case in UMTS where the medium is the air.

4.2 ServicesThe services provided by the MAC layer are specified in [4] and are described below

Data transferis provided in unacknowledged mode between two MAC entities. This svice does not provide segmentation or reassembly. That should be taken care of inlayers. There are exceptions though, these are explained below.

Allocation of radio resourcesis changed when requested by the radio resource conRRC. This means for example change of transport format set or channel type.

Measurement reportssuch as traffic volume and quality indications are reported to Rupon request. This means the MAC needs to keep track of such measurements.

4.3 FunctionsTo be able to provide the services in section 4.2 the MAC layer needs the funcdescribed below. [4]

Mappingof logical channels on transport channels is information stored in the MAC la

Selection of transport formatfor each transport channel is managed in the MAC layer givthe transport format set assigned by the RRC.

Priority handlingneeds to be considered, both between data flows on one UE and betUEs by means of dynamic scheduling. Priorities can for example be calculated basRLC buffer status.

Identification of UEsis used on common channels to keep track of the UEs on the chan

21

Page 28: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

an-several

s.

is is

d in

er

these

xing

These areipro-

r use. One

rentare:

chan-

Multiplexing and demultiplexingon transport channels is used on common transport chnels when there are several users at once and on transport channels that are used byRLC instances.

Traffic volume measurementis needed by the RRC to make channel switching decision

Channel type switchingmeans switching between common and dedicated channel. Thdone upon request by RRC.

Ciphering is used to prevent unauthorized acquisition of data. Ciphering is performethis layer when RLC is operating in transparent mode.

Hybrid automatic request, HARQ, is needed for the high speed mode. This is furthdescribed in section 4.6.

Assembly and disassembly of high speed mode packetsis done in this layer. The packeformat is described in section 4.7. The MAC also has mechanisms for delivering tpackets in sequence.

4.4 Multiplexing ModesMAC can operate in two fundamentally different modes depending on the multiplemode in use.

4.4.1 Time Division DuplexTime division duplex, TDD, is a multiplexing mode that uses only one frequency [3].sender and receiver use different time intervals, or time slots, when sending data. Thecalled transmission time interval, TTI. The sender and receiver transmit their data reccally.

4.4.2 Frequency Division DuplexFrequency division duplex, FDD, is a multiplexing mode where the sender and receivetwo separated frequencies [2]. Pairs of frequencies have been specified for this modefrequency is used for uplink and the other for downlink.

4.5 ChannelsThe MAC is responsible for handling a lot of logical channels. These are used in diffecombinations to transfer data. The channels used for transfer of control information

• broadcast control channel

• paging control channel

• dedicated control channel

• common control channel

• and shared channel control channel.

There are also two types of traffic channels for transfer of user data; dedicated trafficnel and common traffic channel.

22

Page 29: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

uest,highdown-

andfor

n arevor-

bene-rencein the

e sev-here.

insen-ues.rate

rmats

SDU.

l.

bits

on

n-chan-

4.6 High SpeedThe MAC can operate in a special high speed mode. It uses hybrid automatic reqHARQ, and adaptive modulation and coding, AMC, to reduce delays and achievethroughput and peak rates. It relies on a special transport channel called high speedlink shared channel, HS-DSCH.

The principle of adaptive modulation and coding, AMC, is to change the modulationcoding format with variations in the channel conditions. The channel conditions canexample be estimated based on feedback from the receiver.

In a system with AMC, users in favorable positions e.g. users close to the base statiotypically assigned higher order modulation with higher code rates, while users in unfaable positions are assigned lower order modulation with lower code rates. The mainfits of this are that the average throughput of the cell is increased and the interfevariation is reduced. The latter because the link adaptation is based on variationsmodulation and coding scheme instead of variations in transmit power.

The HARQ uses link layer acknowledgements for retransmission decisions. There areral ways to implement the HARQ, but no closer descriptions of these will be given

Because HARQ autonomously and instantly adapts to the channel conditions and issitive to the measurement error, combining it with AMC uses the best of both techniqAMC provides the coarse data rate selection, while HARQ provides for fine dataadjustment based on channel conditions.

4.7 Packet FormatsThe packet formats for the MAC layer depends on the settings in use. The packet fofor both non-high-speed and high-speed mode are described below [6].

The packet format for non-high-speed communication consists of a header and anThis is depicted in figure 4-1. The fields are described below.

• TCTF is the target channel type field. This field identifies the target logical channeThis field is 1 to 8 bits long.

• UE-id type describes the type of user equipment identification that is in use. It is 2long.

• UE-id is the user equipment identification field. It serves as identification on commtransport channels. Depending on the UE-id type this field is 16 or 32 bits.

• TheC/T-field provides identification of the logical channel when multiple logical chanels are carried over the same transport channel. There may be at most 15 logicalnels on one transport channel, therefore this field is 4 bits.

23

Page 30: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ains ar are

bits

nce

ssi-

size

Figure 4-1.The packet format for non-high-speed contains a header and an SDU.

When operating in high-speed mode the packet format is different. Each packet contheader and several SDUs. This is depicted in figure 4-2. The fields of the headedescribed below.

• Queue ID is the queue identifier used for multiple reordering queues. The field is 3long.

• TSN is the transmission sequence number. It is used for reordering and in-sequedelivery on the receiving side. This field is 6 bits long.

• SID is the size index identifier. This is used to identify the size of the SDUs. The poble sizes are configured by upper layers. The field is 3 bits long.

• N is the number of consecutive SDUs with the size specified by the SID-field. Theof this field is 7 bits.

• F is a flag indicating if there are more SID-fields or if this was the last one.

Figure 4-2.The packet format for high-speed mode contains a header and several SDUs.

TCTF UE-id type UE-id C/T MAC SDU

Header

Hs-header Hs-SDU Hs-SDU Padding (optional)

Queue ID TSN SID1 N1 F1 SIDk Nk Fk

24

Page 31: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

tion-oes

etails.

n 1.1.g andsure-

es are

below

dutingy, soft

yers.

teding of

bitsysical

d to

sical

5Physical Layer

This chapter contains a description of the physical layer of UMTS. The described funcality is compliant with the 3GPP standard “3GPP TS 25.302” [5]. The implementation dnot contain everything described in this chapter, see section 6.4 for implementation d

5.1 GeneralThe physical layer is the lowest layer in the OSI reference model described in sectioIn this layer the access to the actual medium, the air, is controlled by means of sendinrecieving radio signals. The forming of signals on different frequencies and radio meament are typical tasks for this layer.

5.2 ServicesThe physical layer offers only data transport services to higher layers. These servicaccessed through the transport channels of the MAC layer described in Chapter 4.

5.3 FunctionsTo provide the data transport services the physical layer has the functions described[5].

Macrodiversity handling and soft handoverare related to the possibility of being connecteto more than one base station at once. This means functions for combining and distribdata transfers between the stations and to change stations without loosing connectivithandovers.

Error detectionis performed on transport channels and errors are indicated to higher la

Forward error correctionor FER is a technique that makes it possible to correct a liminumber of errors in a data stream. There are functions for FER encoding and decodtransport channels.

Rate matchingis used when the number of bits between different TTIs is changed. Theare then repeated to ensure that the bit rate fills the total bit rate of the allocated phchannel.

Multiplexing and demultiplexingof transport channels to the physical channels are usecombine transport channels into physical channels and vice versa.

Mappingof transport channels on physical channels is information stored in the phylayer.

25

Page 32: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

tputt sit-

oare

.

re-re used

Power controlis used to control the power usage. There are algorithms to adjust oupower to minimize errors while using as little power as possible applicable in differenuations. Examples of such algorithms are inner loop and outer loop power control.

Modulation, spreading, demodulation and despreadingon physical channels are related tthe wideband code division multiple access, WCDMA, technology. These functionsalso part of the physical layer.

Frequency and time synchronization are used to synchronize the bits, slots and frames

Radio characteristics measurementsare recorded in this layer. Examples of such measuments are the frame error rate and signal to interference ratio. These characteristics ain the power control algorithms mentioned earlier.

26

Page 33: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

s wellrts ofed can

were+ andfastable

therlready

tocolfromers are

fors are

ce this

of the.

ealityg theset to

6Implementation

This chapter describes the implementation. It contains the general design decisions aas more specific design issues for each part of the system. Information on which pathe standards described in earlier chapters that are included and which are excludalso be found here.

6.1 General Design DecisionsSince the implementation is a module in the large system, ns, the design decisionsrestricted by this fact. As described in chapter 2, ns uses a shared object design in C+OTcl. The new module is mainly written in C++ since it has the desired speed andmemory handling wanted for the buffers. Hooks to OTcl was also implemented to beto change settings directly from scenarios.

There were two main choices for the implementation of the RLC and MAC layers; eithey could be implemented as a link, as described in section 2.3, that represents an aestablished data flow or they could inherit from the already implemented wireless prostack, described in section 2.5. The former is simpler since the data flow is definedthe start, but it is also less flexible since extensions such as interference and handovvery difficult to implement. The latter is more flexible since it has replaceable moduleschannels, antennas and propagation, but it is also more difficult since the data flowharder to define. The decision was to use the already implemented protocol stack sinwould be more flexible and more extendable.

For the data structures the standard template library, or STL [18], was used. Somemodules in ns already use it and it saves a lot of work when building data structures

Since the simulator is event driven no time is consumed by processing data. In rthough, this is a delay that effects performance. The delay is simulated by sendinpacket to the next layer after a delay, the simulated processing delay. This delay was15 ms were applicable, in accordance with [8].

27

Page 34: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ssclass.

classple-

ans-ext to

status

egmen-from. Withle topacket

eaderder is

ets tod from

echa-

ticeer of, wereger.

ions.

6.2 Radio Link Control DesignThe new radio link control module inherits from the link layer module LL in the wireleprotocol stack. To be able to maintain several data flows in one RLC module theRLCFlow was created which represents one data flow. This is depicted in figure 6-1

Figure 6-1.The new RLC module inherits from LL and it uses one or several RLCFlows.

The RLCFlow class contains the buffers and timers related to one data flow. In thisall functionality described in section 3.2, except ciphering and SDU-discard is immented.

The out-buffer is an STL list. A pointer in the list refers to the next packet to send. Retrmissions and status reports are added directly after this pointer, so that they are the nbe sent. Acknowledged packets are removed from the out buffer upon reception of apacket.

When a packet going down the protocol stack arrives through therecv function, the firststep is to check whether segmentation should be done, see section 3.2. The actual station could not be carried out in the same way as in a real application. This comesthe fact that when a packet is created in ns it allocates space for all possible headersthe standard configuration it consumes about 3 kb of memory. This made it impossibjust segment the packet with all headers and data into new packets. Instead the sameis copied and sent several times, with changes in the headers. All fields in the RLC hare set according to section 3.3 and the length field in the ns-specific common heachanged.

The in-buffer is also an STL list. The list is sorted and when there are enough packreassemble an SDU this is sent upwards and the corresponding packets are removethe buffer. Control mechanisms make sure that duplicates are not allowed.

The poll mechanisms that have time or delay as parameters uses theTimerHandler classdescribed in section 2.2. The ones that count packets simply use integers. All poll mnisms described in section 3.4.1, except window based polling, are implemented.

6.2.1 LimitationsThe main limitation of the implementation is that there is no sliding window. In practhis means that the window size is infinite, the sender is allowed to have any numbunacked packets. Because of this the SUFIs related to the window, see section 3.4.2not implemented. It also made it impossible to implement the window based poll trig

The ciphering function is not implemented, since privacy is not an issue in the simulat

LL

RLC RLCFlow1..n1

28

Page 35: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

allysameeter-t size,

e madegin-

rflow

s-spe-target,

ed up

ut notnted.the

plexmode.

ationeanstions

6.3 Medium Access Control DesignThe implementation of the MAC layer is quite simple. The multiplexing mode is basicfrequency division, FDD. This means that the sender and receiver can transmit at thetime. The transmission is divided into time slots and in each slot a number of packets dmined by the send speed is transmitted. The speed is simulated by setting the packethe length of the time slots and the number of packets sent in each. These settings arfrom the RLC layer. All packets sent in the same time slot is sent concurrently in the bening of the slot because if they where sent sequentially there would be a risk of oveinto the next time slot.

To find the target it uses a virtual address resolution table. On the receiving side the ncific common header is checked for errors and erroneous packets are sent to the dropwhich often is a null-agent that just discards the packet. All other packets are forwardthe protocol stack after a simulated processing delay.

6.3.1 LimitationsThe implementation provides the service of data transfer as specified in chapter 4, bmuch more. The different logical channels and transport channels were not implemeThis means that the allocation of radio resources is simply changing the TTI andnumber of packets sent in each TTI as mentioned above. Also the time division dumode, TDD, was excluded as well as the measurement reports and the high-speed

6.4 Physical LayerThe already implemented physical layer contains functions for antennas, propagdelays and topologies. No additional functions were implemented in this layer. This mthat the layer provides the data transfer service, but none of the UMTS specific funcdescribed in section 5.2.

29

Page 36: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

30

Page 37: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ults of

re used

, usingtantde has

is wasckets,its ors not

modee thisom a

con-trans-

7Tests and Results

This chapter describes the tests that were performed on the implementation. The resthe tests are also presented in this chapter.

7.1 SetupThe tests were conducted using ns version 2.1b9a. The same setup of parameters wein all scenarios, only the parameters subject to the test are changed.

Each scenario contains two nodes, a sender and a receiver. Both are wireless nodesthe new implementations of the RLC and MAC layers. A traffic generator with the consbit rate 2 kb/s is attached to the sender and a sink is attached to the receiver. Each noan error model attached to the incoming flow of packets.

The tests are using a rate based error model. The dropping rate is set to 10%. Thselected because it was commonly used in [20]. The error model was set to corrupt pabecause the actual data transmitted is ignored in the simulations and corruption of bbytes would be undetected. It is possible to send real data in ns, but this function ineeded in these tests.

The RLC is set to operate in acknowledged mode, because this is the most complexand therefore the most interesting. The MAC is set to operate in TDD mode, becausis the only implemented mode. The settings for other parameters were taken frcommon test environment setup in [9] and are described in table 7-1.

The transmission times for the SDUs are logged during the simulation and are thenverted to matlab for analysis. Differencies in delays arise when packets have to be remitted.

Table 7-1.The test setup uses parameters from a common test environment setup.

Parameter Value

RLC mode Acknowledged

PDU size 40 bytes

Poll mode Timer based

Poll time 200 ms

Poll prohibit time 200 ms

Multiplexing mode TDD

TTI 20 ms

31

Page 38: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

stud-

a deter-t and

d in

econdn the

-bit iswhenontainset isd, andd the

hesee tests

7.2 A Packet Loss and RecoveryTo show the effects of a packet loss in detail, two nodes and their communication areied.

One of the nodes is set up as sender and the other as receiver. The receiver is usingministic error model, as described in section 2.3. It is set to drop the second packenothing else. The sender uses the poll mode “poll every n:th PDU” describesection 3.4.1, with n set to 3. The result of the simulation is depicted in figure 7-1.

Figure 7-1.A packet loss and its recovery

The first packet is transmitted without errors and the receiver updates its ackno. The spacket is marked as erroneous and is dropped by the MAC layer in the receiver. Whesender is about to send the third packet the polling mechanism triggers and the pollset in the headers of the third packet. This packet is transmitted without errors andthe receiver detects the poll request it compiles a status packet. The status packet cin this case an ACK for packet 1 and a NACK for packet 2. When the status packreceived at the sender it deletes packet 1 from the buffers, since it was acknowledgeit fetches packet 2 for retransmission. This time packet 2 is successfully transmitted anreceiver can update its ackno.

7.3 Impact of Error Model ChoiceIn reality the errors introduced by the wireless link can have different characteristics. Tfirst tests show the effect of an increasing error rate. The parameter changed during this the dropping rate of the rate based error model.

Packet 1

Ackno 1Packet 2

PollPacket 3 (poll)

Status: ACK 1, NACK 2

Packet 2 retransmitted

Ackno 3

Sender Receiver

Ackno 1

32

Page 39: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

encementcause

found

e left. Theimilar

Figure 7-2.The left figure shows 0% error rate and the right 1% rate based error rate.

The first test, shown to the left in figure 7-2, is using 0% error rate. This is used as referand comparison with the other results. The left bar in the graph is the acknowledgepackets and the right is the data packets. The latter takes a little longer to transmit beof the larger size.

The next test is using a rate based error model with 1% error rate, the results can beto the right in figure 7-2. This shows that a few packets are somewhat delayed.

Figure 7-3.The left figure shows 10% rate based error rate and the right 20%.

With the increasing error rate the delay increases. This is shown in figure 7-3 where thfigure shows 10% error rate and the right 20%. Overall this is the expected behaviorpeaks around 0.5 s and 1.1 s come from the fact that the delay for retransmission is sto every packet and the total delay depends on this when packets are dropped.

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

33

Page 40: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

cted.n 7-1ate of

sultsding

Figure 7-4.Markov chains are used to simulate error bursts.

To test how the implementation reacts to error bursts two markov chains were construThese are depicted in figure 7-4. The total error rate for each is calculated in equatioand equation 7-2 respectively. The probabilities were selected so that a total error r10% was achieved in both cases.

Figure 7-5.These are the results of the burst error tests.

The results for the markov chains are shown in figure 7-5. The left figure shows the recorresponding to the left chain in figure 7-4 and the right figure the results correspon

0%

95%

20%

95%

5%

5%

0%

90%

40%

70%

10%

30%

Total 0 1 0.95–2 0.95– 0.95–------------------------------------ 0.20

1 0.95–2 0.95– 0.95–------------------------------------⋅+⋅ 0.1= = (7-1)

Total 0 1 0.70–2 0.90– 0.70–------------------------------------ 0.40

1 0.90–2 0.90– 0.70–------------------------------------⋅+⋅ 0.1= = (7-2)

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

0 1 2 30

10

20

30

40

50

Delay [s]

Pac

kets

[%]

34

Page 41: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

eachh rate

. Thisuld bein [20]

r thedelayme in

asll trig-

eand thee fact

to the right chain in figure 7-4. The results have similar characteristics compared toother and there is no significant difference in characteristics compared to the tests witbased error models.

Figure 7-6.The delay for the tests can be compared.

The mean delays for each of the rate based tests are depicted to the left in figure 7-6shows that an increasing error rate gives an increasing mean delay. This is what coexpected. The values for the delays have the same characteristics as the results foundwith the same setup.

The right image in figure 7-6 shows a comparison between the mean delay times fotest with 10% rate based error and the tests with markov chains. This shows that thetimes are almost the same regardless if the errors are evenly distributed or if they cobursts.

7.4 Impact of Poll Prohibit Timer ValueThe poll prohibit timer is useful to avoid flooding the receiver with poll requests,described in section 3.4.1. This is especially useful when there are several active pogers. Tests were performed with the poll prohibit timer set to 0.2, 1.0 and 2.0 s. The mdelay was calculated using matlab. The results are shown in figure 7-7. As expectemean delay increases when the poll prohibit value is increased. This comes from th

0% 1% 10% 20%0

0.2

0.4

0.6

0.8

Dea

ly [s

]

Error rate 10% Markov1 Markov20

0.2

0.4

0.6

0.8

De

aly

[s]

35

Page 42: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

curs is

ereusinge polleldomto the

that status packets are sent more seldom and the time before the retransmission ocincreased. The results are similar to the results on poll triggers in [20].

Figure 7-7.The mean delay increases when the poll prohibit timer value is increased.

7.5 Impact of Poll Timer ValueThe poll timer value is the main poll trigger when using timer based polling. Tests wperformed with the poll timer set to 0.1, 0.5 and 1.0 s. The mean delay was calculatedmatlab. The results are shown in figure 7-8. As expected the delay increases when thtimer value increases. This comes from the fact that status packets are sent more sand the time before the retransmission occurs is increased. The results are similarresults on poll triggers in [20].

Figure 7-8.The delay increases when the poll timer value is increased.

0.2 s 1.0 s 2.0 s0

0.5

1

1.5

2

2.5

3

Poll prohibit time

Del

ay [s

]

0.1 s 0.5 s 1.0 s0

0.2

0.4

0.6

0.8

1

Poll timer value

Del

ay [s

]

36

Page 43: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

mple-stan-very

er the

d whenrms ofere

und in

d byereot be

uld be

late.

8Conclusions

The simulator ns is built to be easily extendable and has replaceable modules, but imenting the radio link control and the media access control according to the UMTSdard was not as trivial as is seemed. A subset of the radio link control layer as well as asimple media access control layer was successfully implemented. For the physical layalready implemented modules were used.

Tests on the modules showed that the retransmission mechanism worked as expectepackets were dropped. The performance tests also showed the expected results in techanges in delay times as different timing settings in the radio link control layer wchanged. The delay times in the performance tests were also similar to the results fo[20].

8.1 Future WorkThe implementation is far from a complete implementation of the standards specifie3GPP. The main limitation is that there is no window in the radio link control layer. Thare also some triggers and status packets concerned with the window that could nimplemented.

The high-speed mode in the media access control layer is not implemented. This coan interesting part to implement as the behavior in this mode is quite different.

There is also a lot of functionality in the physical layer that could be interesting to simu

37

Page 44: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

38

Page 45: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

.2,

sion

Radiohni-r-

9References

[1] 3GPP. Third generation partnership program.Available via http://www.3gpp.org [2003-01-10]

[2] 3GPP TS 25.212. Multiplexing and channel coding (FDD), version 5.2, 2002.Available via http://www.3gpp.org [2003-01-10]

[3] 3GPP TS 25.222. Multiplexing and channel coding (TDD), version 5.2, 2002.Available via http://www.3gpp.org [2003-01-10]

[4] 3GPP TS 25.301 Radio Interface Protocol Architecture, version 5.2, 2002.Available via http://www.3gpp.org [2003-01-10]

[5] 3GPP TS 25.302 Services provided by the physical layer, version 5.2, 2002.Available via http://www.3gpp.org [2003-01-10]

[6] 3GPP TS 25.321. MAC protocol specification, version 5.2, 2002.Available via http://www.3gpp.org [2003-01-10]

[7] 3GPP TS 25.322. Radio Link Control (RLC) protocol specification, version 52002. Available via www.3gpp.org [2003-01-10]

[8] 3GPP TR 25.853. Delay Budget within the Access Stratum, version 4.0, 2001.Available via http://www.3gpp.org [2003-01-10]

[9] 3GPP TS 34.108. Common test environments for User Equipment (UE), ver4.6, 2003. Available via http://www.3gpp.org [2003-03-30]

[10] The C++ resources network.Available via http://www.cplusplus.com [2003-01-10]

[11] F. Gunnarsson, A. Björsson, B. Knutsson, F. Gunnarsson and F. Gustafsson.access network (UTRAN) modeling for heterogenous network simulations. Teccal Report LiTH-ISY-R-2533, Dept. of Electrical Engineering, Linköpings univesitet, 2003.Avaliable via http://www.control.isy.liu.se/publications [2003-10-01]

39

Page 46: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

ddle

rs

[12] B. Knutsson. Simulation of rate control in UMTS radio network controller. Unpublished master of science thesis, Linköpings universitet.

[13] E. Lundsten. Improving 3G performance for the mobile internet.Master of science thesis, Kungliga tekniska högskolan, 2002.

[14] NS UCB/LBNL/VINT Network Simulator.Available via http://www.isi.edu/nsnam/ns/ [2003-01-10]

[15] OPNET Technologies Inc.Available via http://www.opnet.com [2003-01-10]

[16] OTcl. MIT Object Tool Control Language.Available via http://otcl-tclcl.sourceforge.net/otcl/ [2003-01-10]

[17] REAL network simulatorAvaliable via http://minnie.tuhs.org/REAL/ [2003-01-10]

[18] Standard Template LibraryAvailable via http://www.sgi.com/tech/stl/ [2003-01-10]

[19] A. Tanenbaum. Computer networks (fourth edition). Prentice Hall, Upper SaRiver, NJ, 2003

[20] X. Xu, Y-C. Chen, H. Xu, E. Gonen and P. Liu. Simulation analysis of RLC timein UMTS systems. In Winter simultaion Conference, 2002.

40

Page 47: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

and..

ant to

m-

ula-

AUser guide

A.1 InstallationDownload all the files from http://www.rt.isy.liu.se/~frida/nsmodules and store *.cc*.h in RLCMAC_CC_LIB and *.tcl in RLCMAC_TCL_LIB under your main ns directoryFor all files ’file.cc’ add RLCMAC_CC_LIB/file.o to the OBJ_CC macro in the MakefileAlso add RLCMAC_TCL_LIB/file.tcl to the NS_TCL_LIB macro for all .tcl-files.

After downloading all files and adding the necessary changes for the modules you winstall runmake depend and thenmake the main ns directory.

RLC/MAC works best with NOAH, a wireless routing agent that only supports direct comunication between base stations and mobile nodes. It is avaliable at:http://www.icsi.berkeley.edu/~widmer/mnav/ns-extension/

A.2 UsageUse the RLC and MAC-3G as replacements for the LL and MAC-layer in wireless simtions. This is set up using the node-config command. It could look like this:

$ns node-config \ -adhocRouting NOAH \ -llType LL/RLC \ -macType Mac/3G \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 300 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channel $channel \ -topoInstance $topo \ -wiredRouting OFF \ -addressType hierarchical

A.3 ExampleA simple example of two nodes, a sender and a receiver using the implementation.

#Setup global optionsset ns [new Simulator]set tracefd [open twonodes.tr w]$ns trace-all $tracefdcreate-god 2

41

Page 48: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

#Setup topography and channelset topo [new Topography]$topo load_flatgrid 500 500set channel [new Channel/WirelessChannel]

#Create the error procedureproc ErrorProc {} {set rng [new RNG]$rng seed 0

set ranvar [new RandomVariable/Uniform]$ranvar use-rng $rng

set errormodel [new ErrorModel]$errormodel ranvar $ranvar$errormodel unit packet$errormodel set rate_ 0.01

return $errormodel}

#Configure node$ns node-config \ -adhocRouting NOAH \ -llType LL/RLC \ -macType Mac/3G \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 300 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channel $channel \ -topoInstance $topo \ -wiredRouting OFF \ -addressType hierarchical \ -IncomingErrProc ErrorProc

#Create the senderset sender [$ns node 0.0.1]$sender set X_ 5.0$sender set Y_ 2.0$sender set Z_ 0.0$sender random-motion 0

#Create the receiverset receiver [$ns node 0.0.2]$receiver set X_ 6.0$receiver set Y_ 1.0$receiver set Z_ 0.0

42

Page 49: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

$receiver random-motion 0

#Create TCP agentsset tcp [new Agent/TCP]$tcp set class_ 2$ns attach-agent $sender $tcp

set sink [new Agent/TCPSink]$ns attach-agent $receiver $sink$ns connect $tcp $sink

#Create an applicationset ftp [new Application/FTP]$ftp attach-agent $tcp

#Setup events$ns at 1.0 "$ftp start"$ns at 60.0 "$sender reset"$ns at 60.0 "$receiver reset"$ns at 60.0 "stop"$ns at 60.1 "$ns halt"

proc stop {} { global ns tracefd $ns flush-trace close $tracefd}

#Start simulation$ns run

43

Page 50: Simulation analysis of RLC/MAC for UMTS in Network ... analysis of RLC/MAC for UMTS in Network Simulator version 2 Examensarbete utfört i Kommunikationssystem vid Linköpings tekniska

På svenska

Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –under en längre tid från publiceringsdatum under förutsättning att inga extra-ordinära omständigheter uppstår.

Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ick-ekommersiell forskning och för undervisning. Överföring av upphovsrätten viden senare tidpunkt kan inte upphäva detta tillstånd. All annan användning avdokumentet kräver upphovsmannens medgivande. För att garantera äktheten,säkerheten och tillgängligheten finns det lösningar av teknisk och administrativart.Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i denomfattning som god sed kräver vid användning av dokumentet på ovan beskrivnasätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller isådant sammanhang som är kränkande för upphovsmannens litterära eller konst-närliga anseende eller egenart.För ytterligare information om Linköping University Electronic Press se förlag-ets hemsidahttp://www.ep.liu.se/

In English

The publishers will keep this document online on the Internet - or its possiblereplacement - for a considerable time from the date of publication barring excep-tional circumstances.

The online availability of the document implies a permanent permission foranyone to read, to download, to print out single copies for your own use and touse it unchanged for any non-commercial research and educational purpose. Sub-sequent transfers of copyright cannot revoke this permission. All other uses ofthe document are conditional on the consent of the copyright owner. The pub-lisher has taken technical and administrative measures to assure authenticity,security and accessibility.

According to intellectual property law the author has the right to be men-tioned when his/her work is accessed as described above and to be protectedagainst infringement.

For additional information about the Linköping University Electronic Pressand its procedures for publication and for assurance of document integrity, pleaserefer to its WWW home page:http://www.ep.liu.se/

© Anders Björsson