• No results found

WOK : A Simulation Model for DFS and Link Adaptation in IEEE 802.11a WLAN

N/A
N/A
Protected

Academic year: 2021

Share "WOK : A Simulation Model for DFS and Link Adaptation in IEEE 802.11a WLAN"

Copied!
130
0
0

Loading.... (view fulltext now)

Full text

(1)

WOK - A SIMULATION MODEL FOR

DFS AND LINK ADAPTATION IN

IEEE 802.11A WLAN

Magnus Janson

Magnus Karlsson

LiTH-ISY-EX-3460-2004 Linköping 2004-01-30

(2)
(3)

WOK - A SIMULATION MODEL FOR

DFS AND LINK ADAPTATION IN

IEEE 802.11A WLAN

Master Thesis in Data Transmission Department of Electrical Engineering,

Linköping University by

Magnus Janson

Magnus Karlsson

LiTH-ISY-EX-3460-2004

Supervisor: Mikael Rudberg Examiner: Ulf Henriksson Linköping, 30 January 2004.

(4)
(5)

Avdelning, Institution Division, Department

Institutionen för systemteknik

581 83 LINKÖPING

Datum Date 2004-01-30 Språk

Language Rapporttyp Report category ISBN Svenska/Swedish

X Engelska/English Licentiatavhandling X Examensarbete ISRN LITH-ISY-EX-3460-2004

C-uppsats

D-uppsats Serietitel och serienummer Title of series, numbering ISSN Övrig rapport

____

URL för elektronisk version

http://www.ep.liu.se/exjobb/isy/2004/3460/

Titel

Title WOK - en simuleringsmodell för DFS och länkadaption i IEEE 802.11a WLAN WOK - A Simulation Model for DFS and Link Adaptation in IEEE 802.11a WLAN

Författare

Author Magnus Janson and Magnus Karlsson

Sammanfattning

Abstract

With the 1999 introduction of IEEE 802.11b, the 2.4 GHz Wireless Local Area Network (WLAN) standard, the WLAN market finally began to experience the growth levels that had been expected for so long. Now, 5 GHz solutions, with the IEEE 802.11a standard leading the way, offer higher throughput and more efficient use of the spectrum. Just as the 2.4 GHz band, the 5 GHz band is unlicensed. A common concern to all unlicensed bands is interference between devices using the spectrum. Furthermore, in the 5 GHz band, WLAN cells can interfere with radar systems

operating at the same frequencies.

This report describes a software model, WOK, suitable for simulations of IEEE 802.11a WLANs operating in various environments and under various ambient conditions. The WOK model can be configured extensively with respect to topology, traffic behavior, channel models, signal

attenuation, interference sources and radar systems.

Further, the concepts of Dynamic Frequency Selection (DFS) and link adaptation are explored in the context of the IEEE 802.11a standard. DFS aims to avoid channels occupied by radar systems and link adaptation aims to maximize the throughput based on current ambient conditions. A DFS algorithm and a link adaptation algorithm are implemented at the Medium Access Control (MAC) layer and evaluated using the WOK model.

Nyckelord

Keyword

simulation, model, DFS, Dynamic Frequency Selection, link adaptation, algorithm, WLAN, wireless, MAC, PHY, IEEE 802.11a, IEEE 802.11h, access point, transmission rate, radar, noise, interference, SNR, OMNeT++

(6)

TABLE OF CONTENTS

1

Abbreviations and Ackronyms

1

2

Introduction

3

2.1 Purpose. . . 3 2.2 Company Description . . . 3 2.3 Background . . . 4 2.3.1 IEEE 802.11 WLAN . . . 4 2.3.2 IEEE 802.11 Layers. . . 5 2.3.3 WLAN Market. . . 8

2.3.4 DFS and Link Adaptation . . . 9

2.4 Problem Description . . . 10

2.4.1 MAC . . . 10

2.4.2 PHY . . . 10

2.4.3 The Wireless Medium . . . 10

2.4.4 Limitations . . . 12

3

Method

13

3.1 Phases. . . 13 3.2 Important Decisions . . . 14 3.3 Important Tools . . . 14 3.4 OMNeT++ . . . 14 3.4.1 General Information. . . 15 3.4.2 Modules . . . 15

3.4.3 Communication and Timing . . . 16

3.4.4 Parameters . . . 16

4

The WOK Model

17

4.1 General Description . . . 17

4.2 The Wireless Medium . . . 19

4.2.1 Implementation in the WOK Model . . . 19

4.3 PHY . . . 27

4.3.1 Implementation of Traffic Handling . . . 28

4.3.2 Implementation of Measurements . . . 30

4.4 MAC . . . 33

(7)

4.4.3 MAC Frame Implementation. . . 41

4.4.4 MAC Module Overview . . . 44

4.4.5 MAC Module Implementation . . . 45

4.5 Traffic Generation . . . 48

4.6 Improvements . . . 50

4.7 Comments . . . 50

5

Dynamic Frequency Selection

51

5.1 Introduction . . . 51

5.1.1 Problem Description . . . 51

5.1.2 Objectives . . . 53

5.1.3 Limitations . . . 53

5.2 Regulatory Requirements. . . 54

5.3 Prerequisites for DFS in the MAC. . . 55

5.3.1 Local Measurements . . . 55

5.3.2 Measurement Requesting and Reporting. . . . 55

5.3.3 Quiet Periods . . . 56

5.3.4 Channel Switching. . . 57

5.4 DFS Support in the IEEE 802.11h Draft . . . 57

5.4.1 Spectrum Management Frames . . . 57

5.4.2 Measurement Data Handling . . . 58

5.5 Integration in the IEEE 802.11a. . . 58

5.5.1 Location of DFS Extensions . . . 59

5.5.2 IEEE 802.11h Interface Extensions . . . 60

5.5.3 Further Interface Extensions . . . 62

5.5.4 Overview of DFS Primitives . . . 63

5.6 Implementation of DFS Procedures. . . 64

5.6.1 Measurement Requesting and Reporting. . . . 64

5.6.2 Quiet Periods . . . 65

5.6.3 Quiet Measurements . . . 66

5.6.4 Channel Switching. . . 67

5.6.5 STA Rescue Operation . . . 68

5.7 A DFS Algorithm. . . 69

5.7.1 General Structure . . . 69

5.7.2 The Start-Up Phase . . . 69

5.7.3 The Normal Operation Phase. . . 71

5.7.4 The Channel Quality Measure . . . 77

5.7.5 Late Additions . . . 78

5.8 Evalutation of the Algorithm . . . 79

5.8.1 Scenarios and Topologies . . . 79

5.8.2 Performance Measures. . . 81

(8)

5.8.5 ETSI Requirements . . . 90 5.9 Conclusion . . . 93 5.10 Comments . . . 94

6

Link Adaptation

95

6.1 Introduction . . . 95 6.1.1 Purpose . . . 95 6.1.2 Problem Description . . . 95 6.1.3 Limitations . . . 98

6.2 Integration in the WOK Model . . . 99

6.2.1 A Link Adaptation Algorithm . . . 100

6.3 Simulations . . . 103 6.3.1 Environments . . . 103 6.3.2 General Settings. . . 105 6.3.3 Results . . . 107 6.4 Conclusion . . . 115 6.5 Comments . . . 116

7

Final Comments

117

References

118

(9)
(10)

1

ABBREVIATIONS AND ACKRONYMS

ACK Acknowledgement frame

AP Access Point

AWGN Additive White Gaussian Noise BPSK Binary Phase Shift Keying

BSS Basic Service Set

CCA Clear Channel Assessment

CEPT European Conference of Postal and Telecommunications Administrations

CRC Cyclic Redundancy Check

CSMA/CA Carrier Sense Multiple Access with Collision Avoidance

CTS Clear To Send

CW Contention Window

DCF Distributed Coordination Function DFS Dynamic Frequency Selection DIFS Distributed Interframe Space DPLE Distance Power Law Exponent

DS Distribution System

EIFS Extended Interframe Space

ESS Extended Service Set

ETSI European Telecommunications Standards Institute FAF Floor Attenuation Factor

FCS Frame Check Sequence

FSM Finite State Machine

IEEE Institute of Electrical and Electronic Engineers

(11)

JPEG Joint Photographic Experts Group

LLC Logical Link Control

MAC Medium Access Control

MIB Management Information Base MLME MAC Layer Management Entity MMPDU MAC Management Protocol Data Unit MPDU MAC Protocol Data Unit

MSDU MAC Service Data Unit NAV Network Allocation Vector NIC Network Interface Card

OFDM Orthogonal Frequency Division Multiplexing OSI Open System Interconnection

PAF Partition Attenuation Factor

PHY Physical layer

PLCP PHY Layer Convergence Procedure PLME PHY Layer Management Entity PRF Pulse Repetition Frequency QAM Quadrature Amplitude Modulation QPSK Quaternary Phase Shift Keying RSS Received Signal Strength

RSSRI Received Signal Strength Relative Indication

RTS Request To Send

SAP Service Access Point

SDL Specification and Description Language SIFS Short Interframe Space

SME Station Management Entity SNR Signal-to-Noise Ratio

STA Mobile station

TBTT Target Beacon Transmission Time TCP Transmission Control Protocol TPC Transmit Power Control

TU Time Unit

UML Unified Modeling Language WLAN Wireless Local Area Network

WM WirelessMedium module

WOK (Optional interpretation)

(12)

2

INTRODUCTION

2.1 PURPOSE

The main goal with this master thesis is to build a software model based on a Wireless Local Area Network (WLAN) standard, that is ratified by the Insti-tute of Electrical and Electronic Engineers (IEEE), called IEEE 802.11a. Like other general network nodes, the architecture of a node defined by this standard can be described by certain abstract layers. One such layer is the Medium Access Control Layer (MAC). The software model in this master thesis should be appropriate for simulation of two different methods used on MAC level, namely Dynamic Frequency Selection (DFS) and link adaptation. Thus, a realistic representation of nodes, communication and surrounding environment is of great concern. In order to confirm that the goal is reached a DFS algorithm and a link adaptation algorithm are implemented and evalu-ated.

This master thesis is an assignment on behalf of Infineon Technologies Wire-less Solutions Sweden AB.

2.2 COMPANY DESCRIPTION

Infineon Technologies Wireless Solutions Sweden AB in Linköping is part of Infineon Technologies AG. The company is spread world wide, but has its head office in Munich, Germany. Infineon Technologies Wireless Solutions Sweden AB in Linköping was previously a part of Ericsson Microelectronics

(13)

AB, but was bought by Infineon Technologies AG and is now a part of their Research and Development unit.

Infineon Technologies Wireless Solutions Sweden AB in Linköping has today 12 employees. Their expertise area is processor-based integrated cir-cuits and advanced mixed signal circir-cuits. All of their employees have a Mas-ter of Science in Engineering Degree and some of them have a Doctor Degree.

2.3 BACKGROUND

This chapter provides the background of this report. First, some theoretical background is given, introducing the concepts and terminology of WLANs in general and the IEEE 802.11 standards in particular. Then, an overview of the current WLAN market is provided, justifying the emphasis on the IEEE 802.11a standard [7]. Finally, the concepts of DFS and link adaptation are introduced.

2.3.1 IEEE 802.11 WLAN

Wireless networking is a rapidly evolving technology for connecting comput-ers. WLANs are designed for use in a limited geographical area (homes, office buildings, campuses), and its primary challenge is to mediate access to a shared communication medium - in this case, the radio channel.

The WLAN technology considered in this report is based on the standards proposed and ratified by IEEE. The original standard, IEEE 802.11 [1], was proposed in 1997. Since then, a number of variants and extensions have been added. Such standards include IEEE 802.11b and IEEE 802.11a, providing higher data transmission rates. Aspects discussed in this chapter are general and apply on all standards within the IEEE 802.11 family.

An IEEE 802.11 WLAN is based on a cellular architecture, i.e., the system is divided into cells. Each cell, or Basic Service Set (BSS), is controlled by an Access Point (AP). Access points can be connected through a Distribution System (DS), typically an Ethernet LAN. The whole interconnected WLAN including different cells, their respective access points, and the distribution system is called an Extended Service Set (ESS). A mobile station (STA) com-municates with other nodes within the ESS via its access point. Figure 2.1

(14)

shows a typical IEEE 802.11 WLAN, with the components described above.

Figure 2.1: An IEEE 802.11 WLAN

Within an IEEE 802.11 WLAN, mobile stations can move from one cell to another without loosing connection. This process is called roaming.

2.3.2 IEEE 802.11 LAYERS

The architecture of a general network node can be described using the Open System Interconnection (OSI) reference model, depicted in figure 2.2 [23]. The OSI model partitions network functionality into seven layers. Layer functionality is implemented by one or more protocols, utilizing the services provided by lower layers.

AP AP STA STA STA STA STA

DS

BSS

BSS

ESS

(15)

Figure 2.2: The OSI reference model

A WLAN technology is defined by the two lowest layers in the OSI model, i.e., the data link layer and the physical layer.

The data link layer provides the transport of data across the physical link. In doing so, the data link layer is concerned with physical addressing, network access, error notification, flow control, etc. The data entity handled at this layer is a collection of bits called a frame. In standards within the IEEE 802 project1, the data link layer is divided into two sublayers, namely the Medium Access Control (MAC) layer and the Logical Link Control (LLC) layer. In IEEE 802.11 standards, the MAC layer coordinates the access to the shared radio channel among IEEE 802.11 devices, utilizing protocols that enhance communications over the unreliable wireless medium. All IEEE 802 LANs use the same LLC layer, as specified by the IEEE 802.2 standard. This makes the MAC layer implementation transparent for layers above the data

1. The IEEE 802 standards committee has developed a family of standards for LANs. The most known are the standards for Ethernet (IEEE 802.3), Token Ring (IEEE 802.5), and WLAN (IEEE 802.11).

Node Physical Data link Network Transport Session Presentation Application Medium LLC (802.2) MAC (802.11) PHY (802.11)

(16)

link layer.

The physical layer, also called the PHY layer, handles the transmission of raw bits over the wireless medium. In IEEE 802.11 standards, the PHY layer defines physical aspects such as the signal modulation technique and fre-quency spectrum used.

Figure 2.3 illustrates the general architecture of an IEEE 802.11 station and its interfaces.

Both MAC and PHY layers conceptually include management entities, namely the MAC Layer Management Entity (MLME) and PHY Layer Man-agement Entity (PLME). These entities provide services related to manage-ment, i.e., activities that are not directly related to the transmission and reception of data. For example, the MLME handles the roaming process. Interaction between layers and entities is specified by the IEEE 802.11 stand-ards, via Service Access Points (SAPs) across which defined logical primi-tives are exchanged.

The Station Management Entity (SME) is layer-independent, i.e., it is consid-ered residing in a separate management plane. The exact functions of the SME is not specified by the standard but would typically implement high-level management protocols based on services provided by the MLME and the PLME.

Figure 2.3: An IEEE 802.11 station architecture

MAC SAP PHY SAP

MAC

PHY

LLC

SME

MLME SAP PLME SAP PLME SAP MLME PLME

(17)

2.3.3 WLAN MARKET

The WLAN market has increased dramatically the last couple of years. When the IEEE introduced the IEEE 802.11b standard in 1999, the WLAN market finally began to experience the growth levels that had been expected for so long.

The IEEE 802.11a standard was proposed and ratified at the same time as the IEEE 802.11b standard. The two differentiate greatly in the PHY layer and are thus not compatible. The IEEE 802.11b standard uses the unlicensed 2.4 GHz frequency band and IEEE 802.11a uses the unlicensed 5 GHz frequency band.

Until now, the IEEE 802.11b standard has been dominating the market, because of its certified interoperability and declining development costs. The mass adoption of the IEEE 802.11a standard has been delayed by several fac-tors, such as its “cutting edge” as a new and leading technology. Further, while the IEEE 802.11b standard and its operating channels have been accepted globally and are supported by many global networking companies, 5 GHz band allocations and regulations have been a subject of disputes in and between several countries. This has been an important consideration for mul-tinational companies and international travelers considering a WLAN pur-chase. [21]

Nevertheless, the IEEE 802.11a standard is expected to dominate the WLAN market in the near future. This is because of a number of reasons.

First, the users of an IEEE 802.11a network are provided a raw data rate of up to 54 Mbps, in comparison with up to 11 Mbps in an IEEE 802.11b network. Secondly, because of more efficient use of the spectrum, IEEE 802.11a sup-ports up to 19 non-overlapping channels1. The IEEE 802.11b standard pro-vides only three such channels. This significantly increases the throughput the WLAN can deliver in a certain area. Ideally, the total data rate provided by the IEEE 802.11a standard in a single area is 1026 Mbps (54 Mbps * 19 networks). The corresponding figure for the IEEE 802.11b standard is 33 Mbps (11 Mbps * 3 networks).

Further, the global spectrum unification problem seems to have come to a solution. At the World Radio Conference (WRC) 2003 in Geneva, the US and Europe became united about a global increase of the spectrum allocated to

1. Presently, 19 channels are supported in Europe while 12 channels are supported in the US.

(18)

WLAN. Specifically, this means that the 5 GHz band will be allocated 450 MHz of spectrum (compared to 83.5 MHz for the 2.4 GHz band) and pro-vided with global regulations, making the use of the same equipment in the whole world possible. Previously, this process has been held back mainly by the Pentagon, wanting to protect their military radar systems against interfer-ence. In the agreements discussed at present, i.e., in June 2003, this problem is addressed by introducing regulatory requirements for transmit power limi-tations and Dynamic Frequency Selection (DFS) in WLAN technologies operating in the 5 GHz band. [16]

2.3.4 DFS AND LINK ADAPTATION

In the context of WLAN, an implementation of DFS is expected to detect and avoid frequencies occupied by so called primary users, notably radar sys-tems. DFS has never been introduced on such large scale for a public service as it will be now because of the WRC agreement. This implies the need for the exploration of DFS algorithms in the context of the IEEE 802.11a stand-ard. IEEE has initiated the work with an enhancement to the IEEE 802.11a standard, namely the IEEE 802.11h draft supplement, introducing some sup-port for DFS. The DFS-related work of this resup-port is based on this draft. A common concern to all unlicensed bands is interference between devices using the spectrum. This is a valid concern and has historically affected all unlicensed bands; 49 MHz, 330 MHz, 900 MHz, 2.4 GHz, etc. Hence, there will never be an unlicensed band that is indefinitely free from interference. Given the cost of licensed spectrum free spectrum is, and always will be, very attractive. Therefore, the claim that a technology utilizes “un-crowded” spec-trum is not relevant. [21]

This implies the need for exploration of link adaptation algorithms in the IEEE 802.11a standard. Link adaptation algorithms are used to adapt the transmissions to present ambient conditions, e.g., by decreasing the rate when interference increases. The purpose is to maximize throughput and minimize the number of erroneous transmissions.

In order to enable the exploration of both DFS and link adaptation techniques in IEEE 802.11a networks, a simulation model is needed. Therefore, the WOK model has been developed.

(19)

2.4 PROBLEM DESCRIPTION

As with any model in general, one of the primary goals with the WOK model is to make it realistic. Further, it should be extendable. A major problem is to find a suitable level of abstraction and to identify aspects significant for DFS and link adaptation.

Modeling traffic over a wireless medium is also a basic concern. The mode-ling problem may be decomposed into several sub-issues by describing the problems for each layer in IEEE 802.11 and the wireless medium itself.

2.4.1 MAC

On MAC level the ultimate problem is to find and implement the functional-ity, according to the IEEE 802.11 standard [1], required to model normal WLAN traffic, DFS and link adaptation. What is meant by normal WLAN traffic has to be defined.

2.4.2 PHY

On PHY level traffic synchronization is the ultimate problem. It is important to figure out how frames should be taken care of at reception from the wire-less medium, before forwarding to MAC and vice versa. Timing is important in order to have realistic simulations. For how long will reception and trans-mission of a certain frame proceed? If one or more frames arrive before the reception of a previous frame has ended a collision occurs. A problem is to handle collisions in an appropriate and realistic way. It is important for MAC to know whether the wireless medium is busy or idle. This is a task for PHY to find out, but how?

2.4.3 THE WIRELESS MEDIUM

There are certain important issues concerning the wireless medium that have to be modeled. These issues are presented below.

SIGNAL LOSS

(20)

receiver, due to the distance between the transmitter and the receiver as well as intermediate obstacles1. This is called signal loss or attenuation of the transmitted frame.

The task is to find out how the signal loss of a transmitted frame is modeled.

HIDDEN NODES

There is a problem known as the hidden node problem. Figure 2.4 demon-strates this problem. Node C is hidden to node A, because it is situated too far away from node A and won’t hear the transmission from node A. A collision may occur at node B if node C begins to transmit a frame before the transmis-sion from node A has ended.

How could we decide that a node is hidden in the WOK model?

Figure 2.4: Hidden node problem

NOISE

Noise could be present both at the transmitter and at the receiver. When the noise level is too high the receiver might do incorrect detections of some bits

1. Furniture, walls etc. are examples of intermediate obstacles.

C

A

B

hidden node

(21)

in a transmitted frame. Bit errors are generally more likely to occur if the frames are sent at high data transmission rate.

There is a phenomenon known as multipath interference. A direct transmitted signal may be weakened in two different ways. One way is due to multipath fading, when the signal is mixed with reflecting signals. Another way is due to intersymbol interference, when the signal is mixed with echoes of a previ-ous signal.

A problem is to find out how to generate noise and how noise affects the frames by introducing bit errors. Another problem is to find out how to model multipath interference and its consequences.

2.4.4 LIMITATIONS

At Infineon a WLAN is defined by the IEEE standards 802.11a/b/g/e/f/h/i. The WOK model focuses on the IEEE 802.11a standard. Further, the WOK model:

doesn’t include a distribution system, i.e. communication between two access points is not supported.

• consists of stationary access points and stations. • doesn’t support roaming.

(22)

3

METHOD

This chapter aims at describing the process of our work, important decisions we take and important tools we use. The most important tool is briefly described in a separate sub-chapter at the end.

3.1 PHASES

Our work is informally divided into several phases. These are presented in chronological order below:

Table 3.1. Phases in chronological order

Phase Brief description

Pre study Theoretical studies and other research needed are performed. Definition A requirement specification is written.

Design A design specification is written. Implementation The WOK model is implemented.

Evaluation and completion

DFS and link adaptation algorithms are simulated and evaluated. Major parts of this report are written.

(23)

3.2 IMPORTANT DECISIONS

The most important decision we take is when we decide which tool we are going to use for implementation. We decide to use the OMNeT++ tool, because it is a powerful and a quite unique non-commercial tool for modeling computer networks. Lots of useful built-in functions with huge extendable capabilities are provided. One of its basic concepts as being a discrete event simulator is well-known. Furthermore, it is used with the well known C++ language. Other similar non-commercial tools are PARSEC, SMURPH, NS, Ptolemy, NetSim++, C++SIM and CLASS. Other similar commercial tools are OPNET and COMNET III.

Another important decision we take is when we choose to follow the Specifi-cation and Description Language (SDL) formal description, provided in the IEEE 802.11 standard [1], for implementation of MAC functionality. Details about the SDL description and the reason for choosing this description are provided in chapter “MAC” on page 33.

3.3 IMPORTANT TOOLS

A table of the most important tools we use is presented below:

Table 3.2. Important tools

3.4 OMNET++

This chapter is a brief description of the tool we use for implementation and simulation of the WOK model.

Tool Usage

OMNeT++ 2.2 It is used for implementation and simulation of the WOK model. Matlab 6.0 It is used for DFS and link adaptation evaluation purposes and

for being able to implement parts of the WOK model. FrameMaker 6.0 It is used for writing this report.

(24)

3.4.1 GENERAL INFORMATION

OMNeT++ is a non-commercial object-oriented discrete event simulation tool, powerful for modeling computer networks. It is based on and works with C++. As in most non-commercial tools, the source code in OMNeT++ is available to the user. This makes it possible for a user to examine the simula-tion kernel. Simulasimula-tion models in OMNeT++ are built up by modules. In order to make the inside of a model visible to the user and facilitate debug-ging a graphical user interface is provided.

3.4.2 MODULES

Modules in OMNeT++ may be hierarchically nested. An advantage of hierar-chically nested modules is that a top-down design is directly applicable. The top level in the hierarchy, the system module, contains several sub-modules. The lowest level in a nested module is called a simple module and contains the algorithm of the module. There might be several algorithms running in parallel for each module. Figure 3.1 shows an example of the modular struc-ture property. An algorithm is implemented by the user in C++, by using the OMNeT++ simulation class library, see [8] for details. A simple module may be implemented using the built-in support for Finite State Machines (FSMs), which work very much like SDLs.

Figure 3.1: Module hierarchy in OMNeT++

SYSTEM MODULE

COMPOUND MODULE

(25)

3.4.3 COMMUNICATION AND TIMING

Communication between modules is performed via message passing. When a message is received by a module an event occurs and the local simulation time of that module advances. A message sent from a certain module may be addressed to itself. Such a message is called a self message and is used to implement a timer.

3.4.4 PARAMETERS

A useful feature in OMNeT++ is parameters. Parameters are used for several purposes, e.g.: • for module communication

• to parameterize module topology • to customize simple module behaviour

Parameters may serve as shared variables, as information carriers in messages or as interconnection characteristics. A module topology parameter might for example denote the number of stations present in a simulation. The algorithm in a simple module may need other information than from messages being received. An example of that could be when logging should start and stop for a certain module during a simulation.

(26)

4

THE WOK MODEL

This chapter will describe the WOK model implemented. It is introduced with a general description. After that, descriptions of the larger functional blocks of the WOK model are provided in separate sub-chapters.

4.1 GENERAL DESCRIPTION

The WOK model is implemented in OMNeT++, see chapter “OMNeT++” on page 14. An overview of the WOK model is presented in figure 4.1.

Functionality is integrated within modules, communicating with each other by message passing. Both access points and stations, denoted ap[] and sta[] in figure 4.1, are provided. Message passing between each pair of nodes will go via the WirelessMedium module, denoted WM in figure 4.1. The purpose of this form of distribution is to imitate reality. A radar generator, implemented for DFS purposes, and an interference generator are separate modules con-nected to the WirelessMedium module. Further details about them are given in chapter “The Wireless Medium” on page 19.

(27)

Figure 4.1: Overview of the WOK model

Access points and stations are based on the IEEE 802.11a standard [7]. Their internal structure is depicted in figure 4.2.

Figure 4.2: Structure within a station / access point

A user manual of the WOK model is supplied in [22]. WM

...

...

ap[0] ap[m] sta[0] sta[n] WOK Radar Inter-ference

Station / Access point

MAC

PHY

SME TrafficHandler

(28)

4.2 THE WIRELESS MEDIUM

The WirelessMedium module is implemented in order to establish unique links1 between each pair of nodes in the WOK model. It includes handling and distribution of frames, noise, interference and radar signals at different frequency channels as well as decisions of how sent frames are affected at the receiver.

4.2.1 IMPLEMENTATION IN THE WOK MODEL

DISTANCE AND ATTENUATION DETERMINATION

All nodes have fixed positions and fixed transmit power levels during a simu-lation in the WOK model. Cartesian coordinates and transmit power levels are represented by configurable parameters.

Distance between a pair of nodes in the WOK model is computed using the cartesian coordinates for each node respectively. This measure is used for attenuation computations. Attenuation is neccessary to model as it affects the signal strength of a received frame. If the signal strength of a frame is too faint the frame is perhaps not detected at the receiver. The receiver has then become a hidden node, see chapter “PHY” on page 27.

The attenuation formula that is used in the WOK model is taken from a study by Pop, Croitorum and Antohi [5] and is applicable for indoor as well as for outdoor environments. It is a function of frequency, distance and some other elements called distance power law exponent, partition attenuation factor and floor attenuation factor. Default values for these elements are represented by parameters in the WOK model, according to table 4.1. It is also possible to configure links individually regarding attenuation, using a separate input file.

1. The number of links is if n is the sum of the number of STAs and APs.

n

2

   

(29)

Table 4.1. Attenuation parameters

The WOK model attenuation formula:

A : attenuation [dB] f : frequency [MHz] d : distance [meters]

DPLE : Distance Power Law Exponent [dB] PAF : Partition Attenuation Factor [dB] FAF : Floor Attenuation Factor [dB]

This implementation makes it possible to simulate conceivable obstructions between two nodes. Two links with the same distances may have different attenuations. It makes them unique.

LINK BUDGET

Assume that the transmit power is 1and that we have an attenuation of . The antenna is assumed to be isotropic, i.e. the antenna spreads energy in every direction with the same power density. Let us denote the received power . The received power computation is implemented as . Also assume that the power of the noise has been

esti-mated to .

Parameter Description

defaultDistancePowerLawExponent Affects the weight of distance between two

stations in the attenuation formula. [dB]

defaultPartitionAttenuationFactor Sum of partition losses of a signal due to

e.g. construction materials of the walls and other partitions within a building. [dB]

defaultFloorAttenuationFactor Sum of multifloor path losses. [dB]

1. The dBm unit is used instead of the mW unit, because it is more practi-cal. The relationship between these two units is:

.

A = –27.56+20⋅log( )f +10 DPLE⋅ ⋅log( )d +PAF+FAF

PTX dBm [dBm] = 10⋅log([mW ]) A dB PRX dBm PRX = PTXA N dBm

(30)

The computation of 1 at the receiver is implemented as , see [6]. This link budget implementation is simplified for our purpose. Focus is laid on the most important fact, that SNR at the receiver varies due to changing noise levels and attenuation between transmit-ter and receiver.

PROBABILITY OF FRAME ERROR

The following discussion makes an assumption of noise as white and gaus-sian. All bit errors in a frame are independent.

The frame error rate (probability of frame error), , is easily com-puted given the bit error rate, , and the length of the frame, . The formula used in the WOK model is given below.

is given as the number of octets2 sent from MAC to PHY prior to transmission to the wireless medium, see chapter “PHY” on page 27. How

is determined is explained below.

CHANNEL MODELS

Implementation of frame error generation in the WOK model is based on simulation results from a confidential internal document3 at Infineon. This document shows packet error rates4from simulations with five different chan-nel models, see table 4.2. A chanchan-nel model is used in order to model a certain environment regarding multipath interference.

1. Signal-to-Noise Ratio (SNR) is a measure of the strength of the received signal compared to the current noise level. It is defined as:

. 2. One octet is defined as one byte.

3. Diagrams of packet error rates vs. SNR values are plotted for given data transmission rates and channel models.

4. A packet in this context represents a frame with a static length of 1000 bytes.

SNR

SNR [dB] = 10⋅log(signal power noise power⁄ )

SNR = PTXNA

Pe frame,

Pe bit, Lframe

Pe frame, = 1–(1–Pe bit, )(8 Lframe) Lframe

(31)

Table 4.2. WOK channel models1

In order to generate a certain packet error rate in the WOK model, one of the linearly interpolated functions stored in a table is used. Which function is used depends on channel model, data transmission rate and SNR value. Using the formula for computing probability of frame error, is determined and a re-computation gives the real frame error rate for a frame of length bytes, as previously described.

NOISE AND INTERFERENCE MODELING

The ideas behind modeling noise in the WOK model are to let • the wireless medium be considered busy due to high noise levels. • SNR vary in time at different frequency channels, due to interference. The noise levels in the WOK model are equal at all nodes at the same time. If the noise level is higher than a certain threshold value, the wireless medium is considered busy, see chapter “PHY” on page 27 for details.

No channels are indefinitely free from noise, thus a constant background noise affecting all channels simultaneously is implemented in the WOK model. The background noise level is represented by a parameter noise-Level.

Interference signals are generated in the Interference module and distributed

Channel Model Description

AWGN Additive White Gaussian Noise channel

A ETSI channel model representing a typical office environment C ETSI channel model representing an open office environment

(greater delay spread than channel model A) E ETSI channel model representing an open office environment

(greater delay spread than channel model C) RAYLEIGH Rayleigh fading channel

1. Some of the channel models are defined by the European Telecommuni-cations Standards Intitute (ETSI).

Pe bit, Pe frame, Lframe

(32)

to the WirelessMedium module via message passing, see figure 4.1. Such messages hold the following parameters:

• Bandwidth [MHz] • Duration [ms]

• Center frequency [MHz] • Power level [dBm]

When these messages are distributed and which parameter values they hold are deterministically or randomly determined by means of parameters tied to the Interference module, see table 4.3.

In real life noise and interference are of more complex nature. The main idea behind the WOK model representation is based on the fact that even though a certain channel is affected by interference, adjacent channels do not necessar-ily have to be affected.

When a certain interference signal occurs is determined from a uniform dis-tribution of the interval bounded by the parameters intervalLower-LimitandintervalUpperLimit. This representation makes it possible to let the noise level switch more or less often. Parameters determining inter-ference signal characteristics are drawn from a normal distribution, princi-pally in order to let certain values be more likely than others.

(33)

Table 4.3. Interference generator parameters

Parameter Description

interferenceON Interference generation is switched on/off.

{true/false}

deterministicON Deterministic interference according to settings in file

interferenceFile (see below) is switched on/off. {true/false}

randomON Random interference is switched on/off.

{true/false}

bandwidthMean Mean value in a normal distribution of the interference

signal bandwidth. [MHz]

bandwidthDeviation Deviation value in a normal distribution of the

interference signal bandwidth. [MHz]

durationMean Mean value in a normal distribution of the interference

signal duration. [ms]

durationDeviation Deviation value in a normal distribution of the

interference signal duration. [ms]

powerMean Mean value in a normal distribution of the interference

signal power. [dBm]

powerDeviation Deviation value in a normal distribution of the

interference signal power. [dBm]

frequencyMean Mean value in a normal distribution of the center

frequency of the interference signal. [MHz]

frequencyDeviation Deviation value in a normal distribution of the center

frequency of the interference signal. [MHz]

intervalLowerLimit Lower limit in a uniform distribution of the interval

between generation of interference signals. [ms]

intervalUpperLimit Upper limit in a uniform distribution of the interval

between generation of interference signals. [ms]

changeFrequencyInterval Interval when the center frequency is changed to another

uniformly distributed frequency. [s]

interferenceStart Time when interference generation should start. [s] interferenceStop Time when interference generation has to be stopped. [s] interferenceFile File that defines deterministic noise generation. [string]

(34)

A radar signal or an interference signal that comes into the WirelessMedium module may change the noise level on a certain frequency channel. The high-est signal strength of a present radar signal or interference signal on a certain channel is the noise level of that channel, see figure 4.3. If a channel is neither affected by a radar signal nor an interference signal the noise level on that channel is the background noise level. Current noise levels are stored in a table and timeout indications for radar and interference signals are imple-mented by OMNeT++ self messages.

Figure 4.3: Switching noise levels on a certain channel

EXAMPLE 4.1

The background noise level is -100 dBm. No radar or interference is present on any frequency channel. There are two stations (sta[0] and sta[1]) associ-ated to an access point (ap[0]), see figure 4.4.

An interference signal with power -80 dBm is sent out from the Interference module. The WirelessMedium module, denoted WM in figure 4.4, detects the signal as having a duration of 5 seconds affecting the frequency channels 44 and 45. To inform all nodes about the change of the noise level on these chan-nels messages holding new noise levels are sent out to each node.

Two seconds later a frame of size 500 bytes from sta[0] is coming in to the WirelessMedium module. It is sent with the data rate 54 Mbps on the highest power level on frequency channel 44. Distance and attenuation to sta[1] and ap[0] respectively as well as received power at sta[1] and ap[0] are computed. SNR is determined from the received power and the noise power

(-80 dBm) on frequency channel 44. Depending on the channel model used for each link the probability of frame error is easily given knowing SNR, data rate (54 Mbps) and frame length (500 bytes). A random function determines

noise

time level

background noise level

(35)

from the frame error rate whether the frame to sta[1] and ap[0] should be affected by errors or not.

The WirelessMedium module sends the processed message from sta[0] fur-ther to sta[1] and ap[0].

Figure 4.4: Example 4.1

RADAR SIGNAL MODELING

Radar signals modeled in the WOK model are assumed originating from pulse radar systems. Such radar systems generate pulses with a certain Pulse Repetition Frequency (PRF). Pulses typically have durations between 0.05 and 100 us. In real life, radar detection is performed by detecting such pulses. As will be described in chapter “Implementation of Measurements” on page 30, the radar detection mechanism of the WOK model detects bursts of radar pulses instead of single pulses. Therefore, the radar signal generator

sta[0] ap[0] sta[1] WM Inter-ference 2 3 1 2 4 2 4 time -100 dBm -80 dBm noise level 1 2 3 4

(36)

implemented by the Radar module models radar signals at burst level. The radar burst length represents the time the radar signal is seen by the WLAN. The burst period represents the time between successive scans of the radar beam. The WOK model supports the three radar signal types proposed as DFS test signals by ETSI [13]. These are specified by table 4.4.

Table 4.4. Parameters of radar signals

The Radar module generates new radar sources according to a Poisson proc-ess. This is to achieve an independence between the arrivals of new radar sources on the medium. Radar type and channel are chosen randomly at gen-eration. Only one radar source can be present at a channel at a given time. Individual radar bursts are “injected” into the WirelessMedium module, at intervals corresponding to the burst period, via message passing. Such a mes-sage holds the following parameters:

• Bandwidth [MHz] • Burst length [ms] • Center frequency [MHz] • Power level [dBm]

4.3 PHY

The PHY module constitutes parts of the PLCP sublayer1 in IEEE 802.11a OFDM2 PHY.

Radar signal type Burst length L [ms] Burst period B [s]

1 26 10

2 5 2

3 210 60

1. The Physical Layer Convergence Procedure (PLCP) sublayer is one of two sublayers in PHY.

2. Orthogonal Frequency Division Multiplexing (OFDM) is the modulation technique in IEEE 802.11a, used to modulate digital signals to radio sig-nals.

(37)

Measurements and ordinary traffic handling are implemented in separate sub-modules within the PHY module.

4.3.1 IMPLEMENTATION OF TRAFFIC HANDLING

CCA AND HIDDEN NODE DETECTION

In practice, an end user’s radio Network Interface Card (NIC) senses the wireless medium. It is the physical carrier-sense mechanism and the Clear Channel Assessment (CCA) operation in the physical layer that determines whether the wireless medium is busy or idle. If the signal detected is strong enough, the wireless medium appears as busy.

In order to take care of a signal detection in the WOK model two separate thresholds are implemented for interference and frame transmissions respec-tively. The receiver is considered as a hidden node to the transmitter if the signal strength of an incoming frame is below its threshold value. There are several mechanisms provided in order to keep track of activities on the wire-less medium. Two internal states {busy, idle}, a variable holding interference activity and timers set with the transmission duration of each incoming frame are used. When the last timer time-out occurs and there is no interference activity indicated, the internal state switches from busy to idle and MAC is informed, according to the IEEE 802.11 standard [1].

COMMUNICATION

In reality there is a propagation delay for a transmission between a transmitter and a receiver. The propagation delay in the WOK model is zero. Addition-ally, the transmission of a frame from the PHY module at the transmitter to the PHY module at the receiver takes no time. Time passes afterwards within each PHY module with the aid of implemented timers.

Communication between the PHY module and the MAC module follows the interface described in the IEEE 802.11 standard [1] to a great extent. All implemented primitives in PHY-SAP are put together in table 4.5. An optimi-zation is done in order to speed up the simulations. Instead of sending octets of data to MAC, only messages with indication of when reception of a frame starts and stops are sent. For example, if a frame of length 1024 bytes is going to be sent to MAC there are 2 messages instead of 1026 (1024 + 2) messages

(38)

sent. These messages are sufficient and necessary, because a collision may occur during the frame reception, see chapter “Collision Handling” on page 29. Two timers are implemented in the WOK model in order to synchro-nize the transfer of these messages to the MAC module. The way of sending octets of data from the MAC module to the PHY module is optimized simi-larly.

Table 4.5. PHY-SAP primitives implemented

COLLISION HANDLING

The internal state is tied to two different actions {sending, receiving}. The idea is to let the PHY module act as an antenna set in either sending or receiv-ing mode. It is assumed that an antenna cannot be in two modes at the same time.

In reality a collision occurs when the PHY layer receives a frame from the wireless medium and it is still busy receiving another frame from the wireless medium. If a collision occurs the frame being received is considered as lost. A collision in the WOK model is detected in the PHY module when a frame is received from the WirelessMedium module and the internal state is busy receiving. The timer indicating when the reception should have ended if no collision had occured is cancelled. An indication to the MAC module is sent,

Primitive Description

PHY-RXSTART.indication Indication to the MAC of incoming frame from the

wireless medium.

PHY-RXEND.indication Indication to the MAC of ended reception of frame

from the wireless medium.

PHY-CCA.indication Indication to the MAC of the status of the channel. PHY-TXSTART.request Request from the MAC of transmission of a frame to

the PHY.

PHY-TXSTART.confirm Confirmation to the MAC of transmission request. PHY-TXEND.request Request from the MAC of ending frame transmission

to the PHY.

PHY-TXEND.confirm Confirmation to the MAC of request of ending frame

(39)

according to the IEEE 802.11 standard [1], indicating that the frame is lost. In reality there are two transmitters still sending and the wireless medium must not be considered idle before the two of them stop transmitting. How this is taken care of in the WOK model was described in chapter “CCA and Hidden Node Detection” on page 28.

If the PHY module receives a frame from the WirelessMedium module and the internal state is busy sending nothing will happen. In reality the antenna is set in sending mode and incoming frames are therefore neglected.

4.3.2 IMPLEMENTATION OF MEASUREMENTS

In order to implement DFS, the ability of performing measurements on the medium is required in APs and STAs of the WOK model. Measurement mechanisms modeled are based on the IEEE 802.11h draft [12].

In the WOK model, the actual sensing of the medium is performed through the arrival of data and interference messages from the WirelessMedium mod-ule. The sense mechanism is perfect, i.e., it senses the status of all channels at all times. This (unrealistic) approach is required since then, the interference situation is known at the start of a measurement, independent of which chan-nel is measured. As described in chapter “The Wireless Medium” on page 19, APs and STAs receive interference messages only upon changes of interfer-ence levels.

Three measurement types are specified by [12]. These are: • Basic

• CCA

• RSSRI

According to [12], the basic measurement type is mandatory while the CCA and the RSSRI measurement types are optional. All three measurement types are supported in the WOK model, and the resulting reports are implemented by corresponding OMNeT++ classes. A report is passed to the local MAC entity following a measurement, possibly to be included as a subfield in an outgoing measurement report frame.

(40)

BASIC

In the WOK model, a basic report is defined by the channel number measured and the boolean attributes of table 4.6. This definition agrees with the specifi-cation in [12].

Table 4.6. Basic report contents

The basic measurement is based on advanced measuring mechanisms that has been simplified in the WOK model. In a WOK basic measurement, the BSS flag is set if the arrival of a frame occurs during the measurement period. It is not set by a reception in progress at measurement start. This approach agrees with the assumption that PHY considers a frame valid if it detects its PLCP header, i.e., at reception start.

Foreign WLAN signals, such as HiperLAN/2 frames, are not modeled. Hence, the Foreign PLCP Header flag is always false.

In the WOK model, a radar signal is considered detected if the radar signal burst overlaps with the measurement period at any time. The radar signal burst power level must exceed both other present signals and the value set by a configurable parameter dfsDetectionThreshold1. The radar detec-tion mechanism is perfect considering that the false detecdetec-tion probability is zero. This is why radar signals are modeled at burst level instead of pulse level, as described in chapter “Radar Signal Modeling” on page 26. Note that a radar signal may be “hidden” by other stronger signals, and thus may avoid

Attribute Description

BSS Indicates that at least one valid frame was decoded in the channel during the measurement period. Foreign PLCP Header Indicates that at least one foreign PLCP header was

detected in the channel during the measurement period. Unknown Indicates that transmissions were detected in the channel

during the measurement period, that cannot be character-ized as primary users.

Primary User Indicates that a primary user was detected operating in this channel during the measurement period. Unmeasured Indicates that this channel has not been measured.

(41)

detection.

The unmeasured flag is set, i.e., the measurement is considered failed, if an outgoing transmission is in progress at any time during the measurement period.

CCA

A CCA report is defined by the channel number measured and the CCA busy fraction. The CCA busy fraction is the fractional period over which CCA indicated the channel was busy during the measurement period. In the WOK implementation it is represented as a real number in the interval [0, 1]. In [12]

it is represented as .

RSSRI

The Received Signal Strength Relative Indication (RSSRI) measurement report is defined by the channel number measured and eight RSSRI densities. An RSSRI density for interval i is defined as the fractional period over which the RSS value was within interval i during the measurement period. In the WOK implementation it is represented as a real number in the interval [0, 1]. In [12] it is represented similar to the CCA busy fraction described above. [12] defines the RSSRI intervals according to table 4.7.

Table 4.7. Definitions for an RSSRI report

RSSRI Power observed at the antenna [dBm] 0 1 2 3 4 5 6 7

255×(Busy duration ⁄ Measurement duration)

Power≤–87 87 – <Power≤–82 82 – <Power≤–77 77 – <Power≤–72 72 – <Power≤–67 67 – <Power≤–62 62 – <Power≤–57 57 – <Power

(42)

4.4 MAC

The MAC implementation of the WOK model constitutes a subset of the MAC layer, as specified by the IEEE 802.11 standard [1]. This chapter describes the collection of MAC operations and mechanisms implemented in the WOK model. Furthermore, the actual implementation of the MAC, i.e., the MAC module, is described.

4.4.1 MAC FUNCTIONS IN THE WOK MODEL

A primary goal with the MAC of the WOK model is to implement MAC operations sufficient for studying DFS and link adaptation. Specifically, MAC functions enabling normal WLAN traffic are required, i.e., the transmission and reception of MAC frames within a BSS. The most important MAC oper-ations and mechanisms implemented for this purpose are presented below. • Basic medium access method:

- The Distributed Coordination Function (DCF) • Reliable data delivery:

- Frame exchange protocol between stations - Fragmentation and defragmentation of frames • Channel state notion:

- The physical carrier-sense mechanism - The virtual carrier-sense mechanism • Frames

• Management: - Synchronization - Scanning

• Management Information Base (MIB) • Interfaces:

- IEEE 802.11 SAPs

BASIC MEDIUM ACCESS METHOD

The Distributed Coordination Function (DCF) implements the basic access method to the wireless medium through the use of Carrier Sense Multiple

(43)

Access with Collision Avoidance (CSMA/CA) and a random backoff time fol-lowing a busy medium. According to the DCF, a station must sense the medium before initiating the transmission of a frame. If the medium is sensed idle for a time interval greater than a Distributed Interframe Space (DIFS) period, the station transmits. Otherwise, the transmission is deferred and the backoff procedure is started. Specifically, the station computes a random backoff time interval, uniformly distributed between zero and a maximum value called the Contention Window (CW). This backoff interval is used to initialize the backoff timer. Each time the medium becomes idle, the station again waits for DIFS and then periodically decrements the backoff timer. The decrementing period is referred to as a slot time. As soon as the backoff timer expires, the MAC is authorized to transmit. [11]

FRAME EXCHANGE PROTOCOL

The frame exchange protocol is used to provide a reliable data delivery serv-ice to MAC users. Unlike in wired networks, it is not sufficient to simply transmit a frame and expect that the destination has received it. In its minimal form, the frame exchange protocol includes two frames. A data frame is sent from the source to the destination and a corresponding acknowledgement frame (ACK) is sent from the destination to the source indicating that the data frame was received correctly. After a successful reception of a frame requir-ing an acknowledgement, transmission of the ACK commences after a Short Interframe Space (SIFS) period, without regard to the state of the medium. Since SIFS is shorter than DIFS, other stations cannot access the medium until the frame exchange is complete. If the source does not receive an acknowledgement within a certain duration of time, it tries to retransmit the frame, according to the rules of the basic access method. MAC-level acknowledgements (and retransmissions) concern unicast frames only. [11]

FRAGMENTATION AND DEFRAGMENTATION

The process of partitioning a MAC Service Data Unit (MSDU)1or a MAC Management Protocol Data Unit (MMPDU)2into smaller MAC level frames,

1. An MSDU is the data unit arriving from the layer above the MAC, i.e., the LLC layer.

2. An MMPDU is a management-related frame generated internally by the MLME.

(44)

MAC Protocol Data Units (MPDUs), is called fragmentation. Fragmentation is performed in order to increase the probability of a successful transmission in cases where a noisy environment limits reception reliability for longer frames. The reverse process of reassembling MPDUs into a single MSDU or MMPDU is called defragmentation. Fragmentation is accomplished at the immediate transmitter and defragmentation is performed at each immediate receiver. Only unicast frames longer than a certain fragmentation threshold are fragmented. [1, 11]

A sequence of fragments originating from the same MSDU or MMPDU is called a fragment burst. Subsequent fragments of such a burst are transmitted a SIFS period after the acknowledgement of the previous fragment, without needing to compete for the medium. This is to minimize the total amount of time that is taken to deliver a single frame that has been fragmented. [1, 11] Since fragmentation can be used as a mean in link adaptation algorithms, it is of significance for the WOK model.

CHANNEL STATE NOTION

In the DCF, both physical and virtual carrier-sense functions are used to determine the state of the medium. When either function indicates a busy medium, the medium is considered busy. The physical carrier-sense mecha-nism is provided by the PHY and was described in chapter “PHY” on page 27.

The virtual carrier-sense mechanism is also referred to as the Network Alloca-tion Vector (NAV). The NAV is a value that indicates the amount of time that remains before the medium will become available. A station that receives a frame not addressed to it updates its NAV with the duration information included in the frame header. By examining the NAV, a station may avoid transmitting, even though the physical carrier-sense mechanism indicates an idle medium. This mechanism prevents some situations where collisions oth-erwise would occur due to the hidden node problem. [11]

FRAMES

A MAC frame consists of three basic components; a MAC header, a variable length frame body, and a Frame Check Sequence (FCS). Figure 4.5 depicts the format of a general MAC frame. It comprises a set of fields that occur in

(45)

most frames. The length of each field is given in bytes. [1]

Figure 4.5: A general MAC frame

The MAC header subfields include information needed for data delivery mechanisms, such as addressing, NAV updating, and fragmentation. Hence, a MAC frame representation is required in the WOK model. The FCS field contains a 32-bit Cyclic Redundancy Check (CRC) used to detect bit errors. [11]

Table 4.8 shows the specific frame formats implemented in the WOK model.

Table 4.8. Frame formats

A management frame body generally includes so called fixed fields and infor-mation elements, relevant for the specific management task. Table 4.9 shows which are supported in the WOK model. All management frames of subtype action are introduced in the IEEE 802.11h draft [12]. These frames and their frame body contents are related to DFS.

Frame format Type Subtype Data Data Data ACK Control Acknowledgement Beacon Management Beacon Channel switch announcement Management Action Measurement request Management Action Measurement report Management Action

Frame control

Duration/

ID Address 1 Address 2 Address 3 Address 4

Sequence control Frame body FCS MAC header 2 2 6 6 6 2 6 0-2312 4

(46)

Table 4.9. Frame body contents

MANAGEMENT

Unlike other IEEE 802 LAN standards, the IEEE 802.11 includes significant management capabilities. This is because of the complexity of the environ-ment the WLAN must deal with. Such manageenviron-ment functions include: • Authentification:

The identification procedure between stations through the exchange of authentification management frames.

• Association:

The procedure of “connecting” STAs to APs through the exchange of association management frames. Through this procedure, IEEE 802.11 provides transparent mobility to STAs, i.e., roaming.

• Power management:

The procedure of allowing a STA to go into sleep mode, while data des-tined to it is buffered at the associated APs for delivery at wake-up time. • Synchronization:

The procedure of synchronizing all STAs of the BSS with the AP. • Scanning:

The procedure a STA performs in order to find a suitable BSS to join. • BSS start:

The procedure an AP performs in order to start a new BSS.

Both authentication and association are required in order to deliver data between peer MAC entities within a BSS. However, in the WOK model it is assumed at simulation start that all STAs are already appropriately

authenti-Frame format Fixed field(s) Information element Beacon Beacon interval

Timestamp

Quiet

Channel switch announcement Action descriptor Channel switch announcement Measurement request Action descriptor Measurement request

(47)

cated and associated. Since roaming is not modeled, this approach is enough. The composition of WLAN cells in a WOK simulation is preconfigured. Power management is not considered significant in the context of DFS and link adaptation, and is thus not supported in the WOK model.

Synchronization is performed through so called beaconing. The AP is responsible for periodically transmitting beacon frames broadcast to announce the presence of the BSS. The time between subsequent beacon frames is called the beacon interval. The AP will try to transmit the beacon frame at Target Beacon Transmission Times (TBTTs). However, the beacon must compete for the medium as any other frame. Thus, the beacon may be delayed beyond the TBTT.

In a BSS, the beaconing procedure is mandatory and consequently, beacon transmissions are a natural part of normal traffic flow. Further, beacon frames can be used to facilitate the synchronization of DFS procedures. Therefore, beaconing is implemented in the WOK model.

Since BSS compositions in the WOK model are static and preconfigured, scanning and BSS start procedures are not required. However, a simplified “directed” passive scan procedure is implemented in WOK stations, enabling a station to find its access point in cases where the channel is not known in advance. This procedure is needed when studying DFS.

The IEEE 802.11h draft [12] introduces some additional management mecha-nisms related to DFS. These will be treated in chapter “IEEE 802.11h Inter-face Extensions” on page 60.

MANAGEMENT INFORMATION BASE (MIB)

The IEEE 802.11 MAC includes a Management Information Base (MIB), holding MAC parameters. The parameters implemented in the WOK model are specified by table 4.10 and table 4.11. Time periods are often specified in Time Units (TUs) in the IEEE 802.11 MAC. One TU equals 1024 us.

(48)

Table 4.10. MIB parameters

Table 4.11. MIB counter parameters

Parameter Description

dot11BeaconPeriod Specifies the beacon interval. [TUs] dot11FragmentationThreshold MSDUs and MMPDUs longer than this threshold will

be fragmented. [Bytes]

dot11MacAddress The MAC address

dot11MaxReceiveLifetime MSDUs or MMPDUs not completely received (due to

fragmentation) within this time will be discarded at the receiver. [TUs]

dot11MaxTransmitMSDULifetime Attempts to transmit an MSDU will stop when this

time has elapsed since the first transmission attempt. [TUs]

dot11ShortRetryLimit The number of transmission attempts before a

trans-mission is considered failed.

Parameter Description

dot11ACKFailureCount Incremented at an ACK timeout. dot11FailedCount Incremented at a failed transmission. dot11FcsErrorCount Incremented at the reception of a frame with

bit error.

dot11MulticastReceivedFrameCount Incremented at the reception of a

multicast frame.

dot11MulticastTransmittedFrameCount Incremented following the

transmission of a multicast frame.

dot11ReceivedFragmentCount Incremented at the reception of an MPDU. dot11TransmittedFragmentCount Incremented following a transmission of an

MPDU.

dot11TransmittedFrameCount Incremented following a transmission of an

MSDU or an MMPDU.

dot11FrameDuplicateCount Incremented at the reception of a duplicate

(49)

INTERFACES

The MAC within the WOK model supports the interfaces, or SAPs, specified by the IEEE 802.11 standard [1]. These could be seen in figure 2.3:

• MAC SAP provides data services to the LLC layer.

• PHY SAP provides services that support MAC peer-to-peer interactions, i.e., transmission and reception of MPDUs. See chapter “PHY” on page 27.

• MLME SAP provides MAC-level management services to the Station Management Entity (SME). See chapter 5.

• PLME SAP provides PHY-level management services to MLME and SME. See chapter “PHY” on page 27.

Somewhat simplified versions of these SAPs are supported in the WOK model. For example, only MLME and PLME SAP primitives associated with management procedures actually implemented are supported in the WOK model.

The MAC SAP is defined by the primitives described briefly in table 4.12 below. The notation used agrees with the notation used in [1].

Table 4.12. MAC SAP primitives

4.4.2 MODELING APPROACH

The modeling of the MAC is almost entirely based on the Specification and Description Language (SDL) formal description provided by the IEEE

Primitive Parameter Usage

MA-UNITDATA.request source

destination (data)

The LLC requests the transmission of some data (MSDU) to a destination MAC address.

MA-UNITDATA.indication source destination

(data)

The MAC passes incoming data (MSDU) to the LLC.

MA-UNITDATA-STATUS.indication source destination

status

The MAC reports the status of a corresponding request following a

(50)

802.11 standard [1], defining the operation of the MAC protocol. This approach is convenient for several reasons.

The SDL description defines the MAC as a set of logically separated blocks. Each block’s functionality is described as a state machine process. Events that force state transitions are either generated by incoming signals from other blocks or by the expirations of internal timers. This corresponds well to the design paradigm of OMNeT++, which is based on modules (blocks) and message-passing (events) between and within modules. OMNeT++ also sup-ports the concept of Finite State Machines (FSMs). [1, 8]

By using the SDL description as a template, future improvements of the MAC model are facilitated. Further, since the SDL description is formal, it is assumed to be a correct and a complete description of the MAC protocol.

4.4.3 MAC FRAME IMPLEMENTATION

As already mentioned, all events in the WOK model are generated by the arrivals of messages. This is a direct consequence of using OMNeT++ and the messages used are OMNeT++cMessageobjects. In the WOK model, a distinction is made between “regular” messages (events) and data messages that represent actual information, i.e., frames. Regular messages are imple-mented using thecMessageclass. In order to model frames the DataMes-sageclass has been designed. It provides the means for modeling the MAC frame header and body. Figure 4.6 shows a class diagram1of the DataMes-sage implementation.

1. Class diagrams in this chapter uses the Unified Modeling Language (UML). UML is often used for describing object oriented design.

(51)

Figure 4.6: TheDataMessage class

A number of attributes represents the MAC frame header subfields. The reader is referred to [1] for detailed descriptions of these fields.

For convenience, the unicast MAC address is modeled as a string on the form “sta[2]” instead of a 48-bit sequence as in [1]. Broadcast frames are des-tined to the “broadcast” address. Multicast addresses that are not broad-cast addresses are not supported.

No actual data is included in the data frame representation of the WOK model, i.e., the frame body is not modeled as a sequence of bits. This is due to the fact that the information itself is not important, in the context of DFS and link adaptation. Consequently, the FCS field is not modeled either since there is no bit pattern to perform the CRC algorithm upon. Bit errors are instead indicated by acMessageboolean attribute provided by OMNeT++ for this purpose.

In management frames, the frame body includes one or more fixed fields and information elements. The frame body is implemented by theFrameBody

class, holding two dynamic-length arrays representing the sets of fixed fields

DataMessage cMessage FrameBody InfoElement FixedField 0..* 1 1 1 0..* type : string subtype : string toDs : bool fromDs : bool moreFragments : bool retry : bool durationID : int address1 : string address2 : string address3 : string address4 : string sequenceNumber : int fragmentNumber : int Get/Set methods DataMessage frameBodyLength : int frameBody : FrameBody

(52)

and information elements. This implementation enables flexible management frame creation.

The fixed field and information element classes are derived from the abstract classesFixedFieldandInfoElement, respectively. This is depicted in figure 4.7 and figure 4.8.

Figure 4.7: TheFixedField class

Specific fixed field classes and information element classes are simple repre-sentations of the corresponding fields specified by [1] and [12]. By represent-ing frame fields and subfields as OMNeT++ classes, future improvements and additions are facilitated.

FixedField

Measurement BeaconInterval Timestamp Action

Offset Descriptor

References

Related documents

This thesis is to explore and identify the methods for high data rate and data transmission issue with the help of two different techniques, IEEE 802.11a and IEEE 802.11g and to make

Totalt har Sverige deltagit i tio studier av elevers läsande. Fem av dessa har varit organiserade av IEA och fem av OECD. Här följer en sammanfattning av svenska elevers resultat i

We show that image contrast at mixing frequencies can be larger than at drive frequencies, and we use Fisher’s linear discriminant analysis 15 on the collective multifrequency

Dock är det flera av kvinnorna som bekräftar männens ånger men samtidigt inte förminskar våldet eller sätter männen i offerpositionen istället för sig själva,

When the mobile client has been associated with an access point, beacon frames from all access points that are in range during the one second time frame are

Die Aussage, dass sein Werk von exemplarischer Bedeutung sei, ist nicht kontrovers und wird in dieser Arbeit weder bezweifelt noch kritisiert, doch dass es sich bei den anderen

During one-photon absorption (OPA) process, the energy and momentum differences between the initial ground and final excited states are conserved by the

Results showed that, due to this moisture stress cycle a severe damage occurred within these composites with frequent interfacial cracks between the wood components and