Analysis of Mean Access Delay in Variable-Window CSMA

Similar documents
Prediction Efficiency in Predictive p-csma/cd

Delivery Delay Analysis of Network Coded Wireless Broadcast Schemes

Efficient Importance Sampling for Monte Carlo Simulation of Multicast Networks

University of Twente

EXPERIMENT 6 CLOSED-LOOP TEMPERATURE CONTROL OF AN ELECTRICAL HEATER

Performance Analysis of Battery Power Management Schemes in Wireless Mobile. Devices

LAB IX. LOW FREQUENCY CHARACTERISTICS OF JFETS

Properties of Mobile Tactical Radio Networks on VHF Bands

Optimal p-persistent MAC algorithm for event-driven Wireless Sensor Networks

FOUNTAIN codes [1], [2] have been introduced to achieve

Optimization of an Evaluation Function of the 4-sided Dominoes Game Using a Genetic Algorithm

Lab 4: The transformer

Chapter 7 Local Navigation: Obstacle Avoidance

Economics of Strategy (ECON 4550) Maymester 2015 Foundations of Game Theory

Random Access Compressed Sensing in Underwater Sensor Networks

Servo Mechanism Technique based Anti-Reset Windup PI Controller for Pressure Process Station

Evolutionary Circuit Design: Information Theory Perspective on Signal Propagation

Application Note D. Dynamic Torque Measurement

and assigned priority levels in accordance with the QoS requirements of their applications.

EE 462: Laboratory Assignment 5 Biasing N- channel MOSFET Transistor

Performance Analysis of MIMO System using Space Division Multiplexing Algorithms

There are two basic types of FET s: The junction field effect transistor or JFET the metal oxide FET or MOSFET.

Computational Complexity of Generalized Push Fight

Adaptive Switching between Spatial Diversity and Multiplexing: a Cross-layer Approach

Design of PID Controller Based on an Expert System

The online muon identification with the ATLAS experiment at the LHC

Circular Dynamic Stereo and Its Image Processing

A toy-model for the regulation of cognitive radios

Dynamic Gambling under Loss Aversion

CHAPTER 5 INTERNAL MODEL CONTROL STRATEGY. The Internal Model Control (IMC) based approach for PID controller

A Multi-View Nonlinear Active Shape Model Using Kernel PCA

Application of Notch Filtering under Low Sampling Rate for Broken Rotor Bar Detection with DTFT and AR based Spectrum Methods

Postprocessed time-delay interferometry for LISA

Uplink Scheduling in Wireless Networks with Successive Interference Cancellation

Modeling of power autotransformer

Reliability and Criticality Analysis of Communication Networks by Stochastic Computation

Mathematical and Computer Modelling. On the characterization of Aloha in underwater wireless networks

A Novel, Robust DSP-Based Indirect Rotor Position Estimation for Permanent Magnet AC Motors Without Rotor Saliency

A Pricing-Based Cooperative Spectrum Sharing Stackelberg Game

Investigation on Channel Estimation techniques for MIMO- OFDM System for QAM/QPSK Modulation

INTERNET PID CONTROLLER DESIGN: M. Schlegel, M. Čech

Multi-period Channel Assignment

Full Bridge Single Stage Electronic Ballast for a 250 W High Pressure Sodium Lamp

Self-Driven Phase Shifted Full Bridge Converter for Telecom Applications

The Impact of Random Waypoint Mobility on Infrastructure Wireless Networks

Origins of Stator Current Spectra in DFIGs with Winding Faults and Excitation Asymmetries

Performance of Chaos-Based Communication Systems Under the Influence of Coexisting Conventional Spread-Spectrum Systems

Approximated fast estimator for the shape parameter of generalized Gaussian distribution for a small sample size

Chapter 7: Passive Filters

Control of Grid Integrated Voltage Source Converters under Unbalanced Conditions

802.11b White Paper. Table of Contents. VOCAL Technologies, Ltd. Home page

The Optimization Model and Algorithm for Train Connection at Transfer Stations in Urban Rail Transit Network

Multi-TOA Based Position Estimation for IR-UWB

A Genetic Algorithm Approach for Sensorless Speed Estimation by using Rotor Slot Harmonics

Influence of Earth Conductivity and Permittivity Frequency Dependence in Electromagnetic Transient Phenomena

SPACE-FREQUENCY CODED OFDM FOR UNDERWATER ACOUSTIC COMMUNICATIONS

High resolution radar signal detection based on feature analysis

Transmitter Antenna Diversity and Adaptive Signaling Using Long Range Prediction for Fast Fading DS/CDMA Mobile Radio Channels 1

An Overview of Substrate Noise Reduction Techniques

The Gini Coefficient: An Application to Greece

An Efficient VLSI Architecture Parallel Prefix Counting With Domino Logic Λ

Dynamic Range Enhancement Algorithms for CMOS Sensors With Non-Destructive Readout

THE USE OF INSULATED WIRES MILLIKEN CONDUCTORS IN HIGH VOLTAGE POWER TRANSMISSION UNDERGROUND AC LINES. x y s ABSTRACT

Initial Ranging for WiMAX (802.16e) OFDMA

An Overview of PAPR Reduction Optimization Algorithm for MC-CDMA System

Analysis of Electronic Circuits with the Signal Flow Graph Method

UNDERWATER ACOUSTIC CHANNEL ESTIMATION USING STRUCTURED SPARSITY

Series PID Pitch Controller of Large Wind Turbines Generator

Revisiting Weighted Stego-Image Steganalysis

A Novel Image Component Transmission Approach to Improve Image Quality and Energy Efficiency in Wireless Sensor Networks

Electronic Ballast with Wide Dimming Range: Matlab-Simulink Implementation of a Double Exponential Fluorescent-Lamp Model

Primary User Enters the Game: Performance of Dynamic Spectrum Leasing in Cognitive Radio Networks

SQUARING THE MAGIC SQUARES OF ORDER 4

Figure 1 7-chip Barker Coded Waveform

DESIGN AND FABRICATION OF A DEEP DRAWING MACHINE: EXPERIMENTAL STUDY OF DRAWING FORCE VS DRAWING STROKE

LDPC-Coded MIMO Receiver Design Over Unknown Fading Channels

EE 462: Laboratory Assignment 6 Biasing of Transistors: N- channel MOSFET

Professor Fearing EECS150/Problem Set 10 Solution Fall 2013 Released December 13, 2013

Antenna Selection Scheme for Wireless Channels Utilizing Differential Space-Time Modulation

Ground Clutter Canceling with a Regression Filter

The Use of Helmholtz Resonance for Measuring the Volume of Liquids and Solids

Hydro-turbine governor control: theory, techniques and limitations

Performance Analysis of SR-ARQ Based on Geom/G/1/ Queue over Wireless Link

An Alternative Single Parameter Functional Form for Lorenz Curve

Is 1 a Square Modulo p? Is 2?

Decorrelation distance characterization of long term fading of CW MIMO channels in urban multicell environment

A New Method for Design of Robust Digital Circuits

IMPROVED POLYNOMIAL TRANSITION REGIONS ALGORITHM FOR ALIAS-SUPPRESSED SIGNAL SYNTHESIS

A new approach to bit error rate reduction and its impact on telecom performance

Computational Complexity of Generalized Push Fight

Computational Complexity of Generalized Push Fight

Improvements of Bayesian Matting

Random Access Compressed Sensing for Energy-Efficient Underwater Sensor Networks

Detecting Content Adaptive Scaling of Images for Forensic Applications

Matching Book-Spine Images for Library Shelf-Reading Process Automation

FEATURE EXTRACTION FOR SPEECH RECOGNITON

RECOMMENDATION ITU-R SF

Laboratory Essay with Online Back-calculation Anti-windup Scheme for a MTG System

Research and concepts Inertial tolerancing

Computer Networks 56 (2012) Contents lists available at SciVerse ScienceDirect. Computer Networks

Transcription:

Sensors 007, 7, 3535-3559 sensors ISSN 44-80 007 by MDPI www.mdi.org/sensors Full Research Paer Analysis of Mean Access Delay in Variable-Window CSMA Marek Miśkowicz AGH University of Science and Technology, Deartment of Electronics, al. Mickiewicza 30, 30-059 Kraków, Poland. E-mail: miskow@agh.edu.l Received: 0 October 007 / Acceted: December 007 / Published: December 007 Abstract: The aer addresses the roblem of the mean access delay characteristics in term of the channel load for networked sensor/control systems in LonWorks/EIA-709 technology. The system modelling is focused on the Media Access Control rotocol that rovides the load rediction and determines the key network characteristics. The network model assumes the consistency of load rediction between the nodes, and that the Transaction Control Sublayer does not introduce limitations on the data transmission. The latter means that the numbers of concurrent outgoing transactions being in rogress are unlimited. Furthermore, it is assumed that the destination addresses of transmitted messages are distributed rather than concentrated on articular nodes. The analytical aroach based on Markov chains is alied. The calculation of transition robabilities of the Markov chain is exemlified by the load scenario where all the transactions are acknowledged, unicast, and the otional ision detection is enabled. On the basis of the stochastic analysis, the robabilities of a essful transmission and ision, resectively, are comuted. Furthermore, the numerical results of the mean access delay are reorted. The simulative validation of analytical results is rovided. Keywords: Carrier Sense Multile Access (CSMA) rotocols, Markov models, erformance evaluation, Local Oerating Networks (LonWorks), EIA-709. Introduction One of generic algorithms for random access control in networked systems is the -ersistent CSMA rotocol. A node, contending for the shared channel according to the -CSMA algorithm, transmits with the robability, if the channel is idle, and defers a transmission with the robability (-) [].

Sensors 007, 7 3536 The channel utilization in the -ersistent CSMA is strongly affected by the value which reresents the ersistence level of the rotocol. In articular, large values cause excessive isions, while small values degrade the bandwidth utilization forcing the channel to be idle. A tradeoff between large and small values is thus necessary to rovide the bandwidth utilization at the satisfactory level. However, a given ersistence level,, maximizes the throughut only for a reselected number of contending nodes which significantly restricts the usefulness of the ure - CSMA in ractice. If a number of contenders is unknown a riori or varies in time, the value cannot be set otimally, and consequently the erformance of -ersistent CSMA may be considerably degraded. Therefore, the CSMA-based rotocols with ision avoidance try to adat to the number of contending nodes. In the class of variable-window CSMA rotocols, the ersistence level, maintained by each node, is modified basing on the feedback information from the network. The modification of value is usually accomlished by decreasing in case of isions, and by an increase of after each essful transmission. The generic olicies consist in additive or multilicative tuning of as a resonse to a result of a transmission attemt in the revious acket cycle. For examle, most rotocols halve the value after isions (e.g. 80., Ethernet) using the truncated exonential backoff. The redictive -ersistent CSMA is an adative, variable-window version of the ure -CSMA develoed for systems of intelligent sensors and actuators. The robability is variable and dynamically adjusted to the exected traffic load using the additive increase/additive decrease scheme []. This rotocol has been designed for sensor/control networking [,] where the traffic roduced by sensing devices might be bursty, esecially if the alication architecture is event-triggered, and data are transmitted in resonse to external events [8,,]. The redictive -ersistent CSMA is commercially imlemented in MAC sublayer of LonTalk rotocol [] registered as ANSI/EIA 709. and ENV 354- standards and exloited in Local Oerating Networks (LonWorks) technology for communication between intelligent sensors and actuators []. The resent aer deals with the analytical evaluation of the mean access delay characteristic for the redictive -ersistent CSMA. In our aroach, the analysis for the classical fixed-window - CSMA is introduced firstly, and further the extension for the variable-window system is develoed. We derive the analytical formulas for the medium access delay in term of the network load. A delay in accessing the channel is one of the rincial measures of real-time sensor/control networks. Undoubtedly, the medium access delay increases with the growing number of contending nodes. Due to the randomization of the access latency, a node that tries to send data according to the classical -ersistent CSMA defers a transmission even if only a single node wants to transmit. If more than one node tries to send their ackets, the access delay increases due to isions, and because of sharing the channel bandwidth among the contenders. As the maximum access delay in CSMA is generally unbounded, the mean access delay is chosen usually to evaluate the network access latency. The method that we aly consists in an analytical evaluation of the exected number of trails in accessing the channel before a essful transmission, and the mean length of a acket cycle. The analytical method utilizing discrete-time Markov chains is alied. The results are reorted first for the 0.065-ersistent CSMA which aroximates the redictive -ersistent CSMA erformance for light channel load. Next, the mean access delay for the redictive CSMA is resented.

Sensors 007, 7 3537 The evaluation of the random MAC erformance is a comlex task since an analytical model has to follow random rotocol behavior. Therefore, the stochastic analysis resented in this study is carefully exlained and includes all the necessary analytical derivations of analytical stes. This feature facilitates the adatation of the analytical rocedure develoed in the aer to the other adative random access MAC rotocols. Several aers deal with erformance analysis of the redictive -ersistent CSMA rotocol. Main benefits of the redictive -CSMA scheme have been dislayed in LonWorks Engineering Bulletin [3]. The simulation analyses are carried out in [7, 9]. The analytical aroaches are reorted in [4,0]. The latter follows the classical aroach develoed for -CSMA by Kleinrock and Tobagi in the seventies []. The former is based on the queuing theory where the offered load is modelled by a number of stochastically distributed indeendent stimuli characterized by the corresonding acket arrival rates. The analysis develoed in [4] includes the evaluation of the mean access delay and belongs to the node-centric aroaches. In the resent study, we have develoed a channel-centric analysis with a model of an offered load different than that used in [4]. Namely, we define the offered load by a number of active nodes contending for the medium access. Such a model is widely used in CSMA erformance analyses, e.g. in [5,6]. The motivation to use such a workload model is clear, since the urose of the rediction built into the variable-window CSMA with ision avoidance is to reduce the contention among the nodes and to adat the size of the contention window to the channel load, the number of nodes contending for the medium access is a more useful definition of the offered load for analyzing the rotocol behavior. Roughly seaking, in order to recognize ability of the rotocol to coe with congestion, we assume that a channel is heavily loaded since under light traffic workload the rediction mechanism is inactive. Furthermore, the backlog counting algorithm that we use in the rotocol secification is slightly different than that analyzed in [4]. The aer is structured as follows. In Section, we resent the redictive -CSMA secification and the backlog counting algorithm. Section 3 describes the network model. The definition and the analytical derivation of the mean access delay characteristics is resented in Section 4. In Section 5, the analysis of a fixed window -CSMA using the stochastic analysis, is carried out. The Markovbased extension of the analytical aroach for the redictive -CSMA is introduced in Section 6. The numerical results are reorted in Section 7. The validation of the develoed analytical aroach by simulation with the comarison of samle results are reorted in Section 8. Finally, the conclusions are drawn.. Protocol Secification.. Packet Cycle The redictive -ersistent CSMA belongs to slotted-csma rotocols. The algorithm oerates in the following way. A node (an intelligent sensor or actuator) attemting to transmit monitors the state of the channel. If the channel is busy, the node continues sensing. When the node detects no transmission during the minimum interacket sace of β eriod, it delays a random number of contention slots of β duration.

Sensors 007, 7 3538 If the channel is still idle when the random delay exires, the node transmits. Otherwise, the node receives incoming acket and cometes for the channel access again. If more than one node choose the same slot number, and when that slot has the lowest number selected by any node with a acket to send, then a ision haens. All the ackets involved in a ision are corruted. The backoff time is exressed as a seudorandom number of contention slots drawn from the uniform distribution between 0 and W, where W is the size of the contention window. The redictive - CSMA is an adative version of -CSMA, where a window size is dynamically adjusted to the current channel load. If the channel is idle, the contention window consists of 6 time slots. When the channel load increases, the number of slots grows by factor BL, called the estimated backlog. The backlog BL can range from to 63 and the size of the window varies from 6 to 008 slots, since W = BL, () W base where W base is the size of the basic contention window (6 slots). Thus, the level of the ersistence of -CSMA equals /(6BL), is variable, and has either the lower (/6=0.065), or the uer bound (/008=0.0009). In the redictive -CSMA, the otional ision detection can be introduced. The aim of the ision detection in the control networked systems is that the sender does not have to wait for timeout before attemting to resend the messages. By comarison, a goal of the ision detection in data networks is to imrove the total channel utilization by interruting the transmission of ackets involved in a ision. It is because the acket lengths in networked control systems are short and usually range from ten to twenty bytes... Backlog Counting Algorithm The backlog estimation is based on the calculation of the number of ackets exected in a cometition for the channel during the next acket cycle. The current value of the backlog counter BL varies from one to the next acket cycle and relies on the accumulation of consecutive backlog increments and decrements [,]. Backlog counting built in the node firmware, relies on the following rinciles []: - essive backlog increments are based on the information included in the header of each acket that is sent or essfully received by a articular node; this information is encoded in the 6-bit long field Delta_BL; - essive backlog decrements by one occurring at the end of essful or idle acket cycles. Both backlog modifications are indeendent of each other and occur in every cycle. Otionally, the backlog counter might be incremented by one in case of ision if the nodes are equied with the ision detection [,]. Dedicated hardware in the transceiver is needed to detect isions. A number encoded in the Delta_BL data field reresents the number of acknowledgements that will be generated by receiver(s) as a result of acket recetion. This number equals one for unicast messages. Similarly, for multicast messages the number encoded in the Delta_BL is greater than one, but does not exceed 63, so the maximum size of a grou of receiving nodes addressed by a single message equals 63. In the redictive -CSMA, acknowledgement ackets are not rivileged in the channel access, and comete for the channel jointly with messages.

Sensors 007, 7 3539 Link Layer Header Packet Body x x 0 0 0 0 0 x x x x x x Delta BL Figure. Delta _ BL is the 6-bit long data field in the 8-bit Link Layer header.note that Delta _ BL = is set in the figure, which corresonds to the unicast acknowledged message. On the basis of the backlog counting algorithm we can conclude that after a essful transmission of a message the backlog BL is incremented by a number of (Delta_BL - ). It is a resultant of the increment by a number of Delta_BL, and the decrement by one at the end of a acket cycle. Comaring to the other congestion avoidance network rotocols, the redictive -CSMA uses a kind of additive increase/additive decrease window scheme (AIAD) [8], whereas IEEE 80. takes advantage of the truncated exonential backoff [7]..3. Backlog Consistency Each node calculates the channel backlog autonomously based on the backlog counter imlemented in LonWorks node firmware. To kee the consistency of backlog states, all the nodes in the network should modify their backlog counters in the same way. The consistency is ket if each node is able to detect unessful transmissions in the channel because all the reciients can increment their backlog counters by Delta_BL only if a received acket has correct CRC. Note that reciients mean all the nodes in a network segment where a acket is broadcasted, not only message destination nodes addressed by a sender. If transceivers, for examle, enable only senders to detect ossible acket isions and increment their backlog counters, the backlog can lose its global character and becomes a local node-secific arameter. Any inconsistency in backlog counting among nodes causes unfairness in channel access. 3. Network Model To recognize the redictive CSMA erformance, we introduce some simlifications to the real network model. Below, we list the assumed simlifications in LonTalk/EIA-709. secification, and discuss how these simlifications may influence the obtained results. 3.. Saturation Network Status In our aroach, we suose that the network is at the saturation status where each node has a acket to send. To be recise, we assume that the network consists of n, a fixed number of nodes, and each node after the comletion of a essful transmission immediately has a new acket available for sending. Thus, idle acket cycles do not occur in a saturated network. If an acknowledged message has been received by its reciient, this node generates an acknowledgement acket and laces it in the

Sensors 007, 7 3540 outut queue before messages waiting for a transmission. Throughout this aer the articular load scenario is considered, where the nodes are able to detect isions, the acknowledged message service is used and all the transactions are unicast. The validity of saturation erformance analysis can be extended and treated more generally. Namely, the results derived for saturation workload are valid also for the network that is at nonsaturated status but the number of transmitting nodes is constant. 3.. Network Model Unlike the classical -CSMA, the redictive -CSMA behavior is forced not only by the traffic rate but also by the structure of the traffic transmitted in the channel. In order to make the analysis tractable, we assume that each node is a source of messages unless it receives an acknowledged message. Then, it generates an acknowledgement acket and switches its status to the source of acknowledgements (i.e. schedules acknowledgement acket as the next acket for a transmission). According to the assumed load scenario all the messages are acknowledged and addressed to a single reciient (unicast). A key assumtion we make is that the destination address(es) of transmitted messages are uniformly distributed in such a way that each message is sent to the node that currently ossesses a status of a source of messages. The rotocol erformance analysis deals with the steady state of the network when the mean size of the contention window reaches asymtotically a constant value. The roortion between the number of sources of messages and the number of sources of acknowledgements in the steady state of the network determines the transition robabilities between backlog stages which are evaluated in Sect. 6.3. This roortion, however, does not influence the erformance of the ure -ersistent CSMA because its behavior does not deend on the network traffic structure. 3.3. Network Segment We assume that a network consists of a single segment that does not contain store-and-forward routers. The transceivers available on the market limit the segment size usually to 64 devices, although the LonTalk/EIA-709. can oerate with segments containing hundreds of nodes []. 3.4. Backlog as the Global Measure of Channel We assume that either Physical Layer, or Link Layer of the rotocol do not introduce the backlog inconsistency, i.e. either the transmitting node, or the receiver(s) modify their backlog counter(s) in the same way. It is achieved if the channel can be assumed to be noise-free and all the transceivers are able to detect isions even if they are not senders of iding ackets. Then, backlog might be considered as a global channel measure. The similar assumtion is adoted in [4]. 3.5. The Number of Outgoing Transactions We assume that the number of concurrent outgoing transactions being in rogress is unlimited (i.e. each node tries to send a new acket even if acknowledgement(s) of reviously sent ackets have not

Sensors 007, 7 354 been essfully received yet). As a result of this assumtion, the number of contenders in each acket cycle equals the number of nodes in the network. In the LonTalk/EIA-709. rotocol, the number of active outgoing non-riority transactions is limited by the Transort Layer imlemented on the to of the redictive CSMA and equals one. As a result, a node awaiting the acknowledgement acket after the essful message transmission does not try to send the next message until this acknowledgement is received. Consequently, in the saturated status of the real LON network the mean number of contenders is lower than the number of nodes in the network since some nodes do not comete for the channel due to awaiting the acknowledgement. 3.6. CPU Processing Power vs. Channel Bit Rate We suose that the rocessing seed of the node is infinite. In other words, we assume that the communication channel is not too fast for the node CPU. The limitation of transmitted ackets due to finite CPU seed does not aear for relatively low channel bit rates or long ackets [5]. 3.7. Collision Detection In LonTalk/EIA-709., the ision might be detected at the end of the acket reamble, or at the end of the acket transmission []. We assume that the ision is detected at the end of the acket transmission and the reamble receding the acket transmission is assumed to be of zero length. Note that as a result of this assumtion, the whole ackets are in fact transmitted either in essful, or in unessful acket cycles. 4. Mean Access Delay Evaluation 4.. Mean Access Delay Definition The mean access delay is defined as an average time from the instant the node starts trying to send a acket until the beginning of its essful transmission [4]. The channel access delay consists of the following comonents (see Fig. ): - deferring transmission when the channel is busy as detected by carrier sense hardware, - delaying transmission by the fixed interval called the minimum interacket ga (β ) following any transmission in the channel to ensure that all the nodes can sense an idle channel, - deferring transmission for the random delay (from 0 to 007 β contention slots) to reduce the robability of acket ision during the contention, - deferring transmission before any of the transmission attemts if a acket is involved in ision(s).

Sensors 007, 7 354 Δ mean Mean access delay A selected node transmits Other node transmits Collision Other node transmits A selected node transmits β β From 0 u to 007 PktLength contention slots Figure. A acket access delay definition. 4. Method of Evaluating Mean Access Delay We evaluate the mean access delay for the slotted CSMA basing on the estimation of an average time interval Δ mean between consecutive essful channel access attemts undertaken by a given node that always has ackets to send. The time interval Δ mean can be found as: Δ mean = E(X )τ () where E (X ) denotes the exected number of attemts in accessing the channel made by a selected node in order to transmit a acket essfully, and τ reresents the mean length of a acket cycle in the channel access. By the simlicity, we assume that the length of ackets (i.e. messages and acknowledgements) sent via the channel is constant. This assumtion is reliable if the alication data field in the message is short comaring to the rotocol overhead. This is the case when the brief exlicit messages or network variable udates are exchanged between the nodes (see the alication messages secification in [6] for details). Denote by PktLength the acket length in bits. As follows from the definition resented in Sect. 3., the mean access delay t mean might be simly calculated as: t mean = Δ PktLength (3) mean since t mean defines the access latency until the beginning of the essful transmission so it does not cover the time devoted to the transmission of a acket after winning the contention (Fig. ). The time interval Δ mean and the mean access delay t mean are exressed in the formula (3) in bits which corresonds to the aroriate measures defined in time units multilied by the channel bit rate.

Sensors 007, 7 3543 As follows from (3) and (), in order to evaluate the mean access delay t mean, both the exected number of transmission attemts E (X ) and the mean length of a acket cycle τ have to be found. 4.3. Mean Number of Transmission Attemts Let us suose there are a number of n contenders. First, we will calculate the mean number of transmission attemts before winning the contention E (X ) made by a selected node. Following the notation, X reresents a number of trials before a acket essful transmission is obtained. Denote by () the robability that a certain node eeds at any trial. The robability of the essful transmission of any acket in the channel with a number of n contenders,, is given by: = n () (4) because each node may win the contention. Since the robability of failing during the first (i-) tries is eeding at the ith attemt equals: ( i ( ) ), the robability of i ( X i) = ( ( ) ) () =. (5) The formula (5) defines the robability mass function of X. The mean number of transmission attemts E (X ) is defined by the aroriate exectation: i= i ( ) ) E ( X ) = i( (6) () Multilying both sides of the equation (6) by ), we have: ( ( ) i ( ) ) E( X ) = i( () ) i= ( (7) () Subtracting (7) from (6) gives: ( ) = () () () + E( X ) [ + ( ) + ( )...] (8) Note that the right side of the (7) includes the infinity sum of a geometric series that equals one so: E = (9) ( X ) () For examle, if the robability () that a given node transmits essfully equals 0., then a number of 0 essful acket cycles is needed on the average in order to transmit a acket with

Sensors 007, 7 3544 ess. This result is not surrising since the transmission attemts are indeendent and may be modelled by the geometric distribution where the exected number of trials until the first ess is the inverse of the robability of a ess at any trial. The formula (9) defines the mean access delay as the average number of trials needed to win the channel contention. To exress the mean access delay in bits or seconds, the mean length of a acket cycle τ has to be estimated. 4.4. Mean Length of Packet Cycle The access to the shared channel is organized in acket cycles. Each acket cycle is an attemt of a acket transmission undertaken by node(s) that has data ready for sending. A acket cycle begins with an interacket ga and a random number of contention slots followed by a acket transmission. The result of each transmission attemt is a essful transmission of a acket or a ision. The mean length of a acket cycle, τ, is defined as a weigthed sum of the lengths of essful and unessful acket cycles: τ = τ + τ (0) where τ, τ denote the mean lengths of essful and unessful acket cycles, resectively, reresents the robability of a essful transmission in the channel, and denotes the robability that ackets are involved in isions. All the measures,, τ, τ are function of the number of contending nodes, n. The mean lengths of the aroriate acket cycles, τ, τ are given by the formulas: τ β + [ d β PktLength () = ] + τ β + [ d β PktLength () = ] + where d denotes the mean slot number, at which a node winning the cometition starts the transmission, d is the mean slot number at which a ision occurs, β is the duration of the minimum interacket ga, and β is the contention slot width. All the arameters τ, τ, β, β, PktLength in the formulas () and () are secified in [bits]. Substituting (9), (0), (), () and () in (3): t mean = τ + τ () () PktLength (3) Taking into account that = and setting (4) into (3): t mean = n + n PktLength τ τ (4)

Sensors 007, 7 3545 The formula (4) is valid for any slotted-csma rotocol where the size of the contention window maintained by each node is the same and the number of contenders is constant. This formula is essential for the content of the resent study. The evaluation of the mean access delay given by (4) is consistent (exceting some differences in network models) with the corresonding formula included in [4] although both analytical derivations are obtained in different ways. Under some constraints, the formula (4) can be further simlified. As will be shown in Sect. 5. and 7., both d and d aroach asymtotically one if the number of contending nodes is large since: lim d = limd = n n (5) The asymtotic limit defined by the formula (5) is exemlified in subsequent Fig. 3b for the 0.065-ersistent CSMA and in Fig. 7 for the redictive -CSMA. As a result: τ τ β + PktLength PktLength (6) since the interacket sace is negligible comaring with the acket length. Consequently, the mean access delay for large number of contenders can be aroximated by the closed-form formula: PktLength t mean n (7) 4.5. Inut Parameters Required for Network Performance Evaluation Summing u, in order to estimate the mean access delay t mean, the following measures have to be calculated (see formulas (4), (), ()): - the robability of a essful transmission, or the robability of ision, - the mean slot number when the essful transmission starts d, and the mean slot number when the ision occurs d. All these measures might be evaluated using the standard robability calculus if the size of the contention window is constant, e.g. 6 slots for BL =. If the randomizing window changes during the network oeration, the analytical aroach have to involve Markov chains to estimate the distribution of the window size in the network steady state. In Section 5, the stochastic analysis for the fixedwindow -ersistent CSMA is resented. Next, the Markov-based model for the variable-window redictive -ersistent CSMA will be shown in Section 6. 5. Stochastic Analysis of [/(6k)]-Persistent CSMA As stated, the backlog counter BL is resonsible for dynamic adjustment of the contention window size to the current channel load. If the backlog equals k at some acket cycle, then the instantaneous ersistence level of the redictive -CSMA amounts to /(6k). Moreover, for some load scenarios the

Sensors 007, 7 3546 channel backlog BL ermanently equals one or is closed to one. It is the case if the ision detection is absent, and no multicast messages are sent via the channel, or if the traffic rate is light regardless of the load scenario. 5.. Probability of Successful/Unessful Transmission for [/(6k)]-Persistent CSMA Now we will calculate the robability of essful transmission and the robability of ision for [/(6k)]-ersistent CSMA rotocol. ( ) Let k ( ) denote the robability that a certain node wins a cometition for the channel if a window contains 6k slots, and the number of n nodes have data ready for a transmission. In each acket cycle, contending nodes select the corresonding slot numbers from a set of integers,,6k. A node that chooses the earlier slot wins the channel contention. ( ) The robability k ( ) is exressed as the sum of the following robabilities calculated for each one from,...,6k slots: - robability that a winner selects a certain slot s, s =,..., 6k, which equals to (6k), and - robability that all the other ( n ) nodes draw one from ( 6k s) later slots, which equals to n ((6 s) 6k) k. ( ) Finally, k ( ) is given by the following formula: n 6k 6k s () = (8) s= 6k 6k ( ) According to the formula (4), the robability k that a transmission is essful with a number of n contenders is as follows: 6k 6k s = n() = n (9) s= 6k 6k n ( ) Consequently, the robability k that a transmission in the channel exeriences a ision: 6k 6k s = = n (0) s= 6k 6k n 5.. Mean Slot Numbers When Successful/Unessful Transmissions Start for [/(6k)]-CSMA Define as the conditional robability that a certain node wins a channel contention drawing a, i slot i, i =,..., 6k rovided that this acket cycle is essful. Because the robability that a given ( ) node essfully transmits is k ( ), therefore (see (8)):

Sensors 007, 7 3547 n 6k i 6k 6k (6k i), i = = 6k () (6k s) s= n n () ( ) The exected number of a slot, d k, which is chosen by winning nodes in the essful acket cycles is by the definition: d 6k = i () i=, i Taking into account the formula (): 6k n (6k s) s ( (3) n (6k s) s= d n) = 6k s= Similarly, the exected slot number, where a ision occurs is given by the formula: d 6k n = n s (4) (6k) s= 5.3. Numerical Results for 0.065-Persistent CSMA Setting k = to the aroriate formulas (9), (0), (3) and (4), we can calculate all the required () () () measures for 0.065-ersistent CSMA. Namely, Fig. 3 shows,, d, d, resectively. Futhermore, in Fig. 4 the mean access delay versus the number of nodes, n, for 0.065- ersistent CSMA is resented. As follows from Fig. 3 and Fig. 4, the 0.065-ersistent CSMA rotocol resents a satisfactory erformance if a network does not exceed a few nodes. For 0 active nodes, the robability of a essful transmission nearly equals the robability of a ision so only about half of the bandwidth () is used for essful transmissions (Fig. 3a). For large networks is degraded due to excessive isions. The strong decrease of the robability of essful transmission (Fig. 3a) causes the exonential lengthening of the mean access delay t mean versus the network size according to the equation (7) as is seen in Fig. 4. ()

Sensors 007, 7 3548 (a) Probability of essful transmission/ision [%] Probability of essful transmission/ision for 0.065-ersistent CSMA 00 90 80 70 60 50 40 30 0 0 0 0 0 0 30 40 50 60 70 80 90 00 Collisions Successful transsmision Number of nodes 0 Mean slot number when the essful transmission starts and ision occurs for 0.065-ersistent CSMA (b) Mean slot number where the essful transmission starts and ision occurs 8 6 4 0 0 0 0 30 40 50 60 70 80 90 00 Successful transsmision Collisions Number of nodes () () Figure 3. Probabilities of essful transmission and a ision (a); the mean slot () () numbers where the essful transmission starts d, and the ision occurs d (b) versus the number of nodes. e+6 Mean access delay for 0.065-ersistent CSMA e+5 Mean access delay [bits] e+4 e+3 e+ e+ e+0 0 0 0 30 40 50 60 70 80 90 00 Number of nodes Figure 4. The mean access delay versus the number of nodes for 0.065-ersistent CSMA.

Sensors 007, 7 3549 6. Stochastic Analysis of Predictive CSMA Now the analytical aroach for the fixed-window -CSMA will be extended for the variable contention window in the redictive -ersistent CSMA. The analytical aroach based on Markov chains is alied. 6.. Probability of Successful/Unessful Transmission for Predictive -CSMA As follows from the redictive -ersistent CSMA secification, the contention window size varies from one to the next acket cycle following the random rotocol behavior. Let us assume that the backlog BL equals k with the robability π k in the network steady state. The mean channel backlog BL, defined as an exected backlog in the long-term rosect, is calculated as follows: BL max BL = E[ BL( l )] = kπ (5) where E [ ] is the exectation oerator. The mean size of a randomizing window in the saturation steady state: k= k W = 6BL (6) The corresonding erformance metrics for the variable-window CSMA can be found as aroriate exectations: BL = max π (7) k= BL = max k = k d π d (8) BL = max where π = π ], k =,..., 63 is the stationary distribution of the backlog. [ k k= k d π d (9) k Substituting the formula (9) into (7) we obtain the robability of a essful transmission: BL max 6k n 6k s = = = n π k (30) k s 6k 6k

Sensors 007, 7 3550 and the robability of a ision: BL max 6k n 6k s = = = n π k (3) k s 6k 6k Next, the mean slot numbers when the essful/unessful transmission starts for the redictive -ersistent CSMA are found by setting the exression (3) to (8) and (4) into (9), resectively: 6k n BL (6k s) s = = max s d π (3) k 6k k = n (6k s) s= BL = max 6k n d π k s (33) n k= (6k) s= 6.. Analytical Model of Channel Backlog In order to evaluate the erformance measures given by the formulas (7), (3), (33), the stationary distribution of backlog π = [ π k ], k =,..., 63 has to be calculated. Denote BL (l) as a stochastic rocess reresenting the backlog stage at the lth acket cycle in the network consisting of n nodes, where BL ( l) =,..., 63. We assume that the rocess BL (l) is a global measure of the channel (see Section.6). BL (l) is a discrete Markov chain with transition robabilities, ; i, j =,..., 63. i j The current backlog counter is tuned by the traffic transmitted in the channel and isions. In the assumed load scenario where all the messages are acknowledged and unicast and the ision detection is enabled (ACK/unicast/CD) we distinguish three tyes of acket cycles (see Sect..3): () an unessful transmission due to a ision, which causes the channel backlog BL to increment by one in the next acket cycle: BL ( l + ) = BL( l) +, () a essful transmission of the message, when the channel backlog BL does not change in the next acket cycle: BL ( l + ) = BL( l), (3) a essful transmission of the acknowledgement acket, which decreases the channel backlog BL by one in the next acket cycle: BL ( l + ) = BL( l). Modelling the imact of backlog limitations, two additional conditions for the backlog minimum BL ( l) = and the backlog maximum BL ( l) = 63 have to be included: (4) if the backlog has reached the last stage BL ( l) = BLmax = 63, remains at it even after an unessful transmission, (5) if the backlog has entered the first stage BL ( l ) = BL = min, remains at it even after essful transmission of an acknowledgement.

Sensors 007, 7 355 6.3. Transition Probabilities The key aroximation in our model is that the robability of a essful transmission of an acknowledgement is the same as the robability of the essful transmission of a message. The validity of this aroximation will be checked in Sect. 8.. According to this aroximation, if the robability of a ision at a certain backlog stage BL ( l) = k with n cometing nodes amounts to ( ) k, then both the robability of a essful transmission of a message and of an (k ) acknowledgement are equal to ( ). Suose that the backlog enters the stage k at the lth acket cycle, that is, BL ( l) = k. Let Pr{ BL ( l + ) = k + s BL( l) = k} be the transition robability that the backlog enters the stage BL ( l + ) = k + s in the (l+)th acket cycle from the stage BL ( l) = k in the lth cycle. Let us denote the transition robabilities in short: Pr{ (34) BL ( l + ) = k + s BL( l) = k} = k, k + s Taking a secification of acket cycle tyes ()-(5) into account, we can comute the robabilities of switching between the backlog stages: k, k+ =, k =,..., 6 k = BL min = k, k = ( ), k =,...6 ( + ) k = BLmax = 63 = ( ), k =,..., 63 k, k, = 0, s >, k =,..., 63 k k+s (35) Note that BL (l) is a random walk for ACK/unicast/CD load scenario since 0 for s > k, k+s = only transitions between consecutive backlog stages are ossible. The state transition diagram of Markov chain for a given scenario is deicted in Fig. 5., i.e. () ( () ) ( () (3) ) (6) (6)... 6 63 ( ) ( ) (6) (63) () ( () ) ( (6) ) ( + (63) ) Figure 5. The state transition diagram of the Markov chain for ACK/unicast scenario.

Sensors 007, 7 355 6.4. Mean Backlog and Stationary Distribution As is well-known, the stationary distribution of a Markov chain is an eigenvector of the transition matrix P, associated with the eigenvalue. The vector π = π ] includes the long-term robabilities π k that the channel backlog will be at the stage k in the steady state, that is: [ k π = limpr{ BL( l) k} (36) = k l The robability π k is the relative frequency that a channel enters the backlog stage k in the steady state. See [3] for the numerical methods of the stationary distribution comutation. Here we calculate the stationary distribution directly as the aroriate eigenvector of the transition matrix. Namely, to comute the steady-state vector π of a Markov chain, the following linear system has to be solved: T [ G e] π = b (37) where P = [ i, j ] is a transition matrix 63 x 63; the elements i, j of the matrix P are given by (35), G = P I, where I is an identity matrix 63 x 63, e = [ e i ] is a vector, where e i = ; i =,..., 63, [ G e] is a matrix 63 x 64, where the last column of this matrix is the vector e, b = [ b i ] is a vector, where bi = 0, bi + = ; i =,..., 63. According to (35), the transition matrix P for ACK/unicast/CD scenario is comosed as follows: P = 0 0 () () () () 0 () 0 0 0 (6) (6) (63) 0 0 (6) + (63) Note that the elements of a matrix P are functions of the number of nodes n. The only inut (k ) arameters necessary to comose the transition matrix are the robabilities, k =,... 63 that might be comuted using formula (0). 7. Numerical Results for Predictive CSMA Using the analytical aroach resented in Section 6 we have obtained the following numerical results.

Sensors 007, 7 3553 7.. Mean Backlog and Probability of Successful/Unessful Transmission The lots resenting the mean channel backlog BL and the robability of ision versus the number of nodes n for a secified load scenario (ACK/unicast/CD) are shown in Fig. 6. Each oint on the saturation backlog grah is found as a solution of the linear equation (37) for a articular number of nodes and the saturation backlog basing on the equation (6). The saturation robability of ision is comuted according to the equation (3). Since we want to recognize the comlete rotocol behavior, the saturation backlog versus the wide range of a network size (from to 500 nodes) is resented. A tyical network segment contains a few dozens of nodes although LonTalk rotocol can oerate with segments that consist of hundreds of devices []. The analysis of the results shows that the mean channel backlog is, as exected, a non-decreasing function of the network size. At the lower range the mean backlog increases linearly as the number of nodes grows and the sloe of the curve is about 0.06 er node. It means in articular that adding a new node to the existing network causes the increase of the mean size of a cometition window of about 0.06*6 time slot of β duration in saturation conditions. The linear relationshi between the saturation backlog and the network size is valid u to about 700 nodes. For larger networks the influence of the uer bound of the channel backlog revents a further extension of the cometition window. If a network contains more than 000 nodes, then the saturation backlog is close to its maximum value 63, and the redictive CSMA is reduced to the 0.0009-ersistent CSMA. Summing u, the rediction is effective for the network sizes u to 700 nodes. 00 Mean channel backlog and ision robability 70 Mean channel backlog 80 60 40 0 60 50 40 30 0 0 Collision robability [%] 0 0 0 500 000 500 000 500 Collision robability Channel backlog Number of nodes Figure 6. Mean channel backlog and the robability of a ision for ACK/unicast/CD load scenario. Three regions might be distinguished on the lot of the ision robability (Fig. 6). The robability grows in roortion to the number of nodes for a network containing dozens of devices. If the network segment contains less than 7 nodes (i.e. makes u a single LonWorks subnet) the robability of a essful transmission ranges from a 90% to about 70%. For the network sizes larger than 00 nodes, is established at 0.333. Consequently, is ket at 0.667. Note that the sustained robabilities = 0. 67 and = 0. 33 are established at the equilibrium oint, when the robabilities of the backlog increase ( ) and decrease ( ) are equal. Finally, for networks

Sensors 007, 7 3554 greater than 700 nodes, the influence of maximum size of a cometition window aears, and the shae of both measures is close to that of the 0.0009-ersistent CSMA. 7.. Mean Slot Numbers Where the Successful/Unessful Transmission Starts The relationshis between the mean slot numbers d, d and the number of nodes n according to (3), (33) for ACK/unicast/CD load scenario are shown in Fig. 7. The analysis of d versus the number of nodes allows to rely to the question how much the network bandwidth is wasted during the channel contention, that is, how many time slots β are wasted in the average essful acket cycle in order to avoid the ision. As follows from Fig. 7, in the network containing 0 nodes about the third slot is drawn by the winning nodes in average, and for 00 nodes, about the second one. The next conclusion taken from Fig. 7 is that d < d. It is intuitively clear since ision is more robable in later slots, when none of cometing nodes draws some early slot. As follows from Fig. 7, d d for n > 50 nodes. Moreover, assuming tyical settings (i.e. β = 4[bits ] bits and β = [bits ] ), according to the formula (6) we might aroximate τ τ PktLength for n > 50 nodes with a few ercent accuracy for tyical acket lengths (e.g. bytes). Thus, we can conclude that the fraction of bandwidth wasted due to a randomization of the channel access is insignificant if the contention is high. This is the imortant advantage of the redictive - ersistent CSMA. 0 Mean slot number where transmission/ision occurs 8 Mean slot number 6 4 0 0 00 000 Mean slot number at which ision occurs Number of nodes Mean slot number at which trasmission starts Figure 7. Mean slot number, at which the transmisson d and the ision d occurs for the redictive -CSMA 7.3. Mean Access Delay Fig. 8 shows the mean access delay versus the network size for the redictive -CSMA found according to the equation (4) taking into account formulas (30), (3) and (33). The latency in accessing the channel increases nearly linearly with a growing number of contending devices u to about 700 nodes. This is the imortant qualitative difference comared with the mean access delay for

Sensors 007, 7 3555 the fixed window -CSMA (see Fig. 4) where the network latency grows exonentially. However, the exlanation of this difference is clear: since is ket at sustained value 0.667, then according to the simlified formula (7) the mean access delay has to increase linearly. In articular, adding a new active node to the existing network causes the increase of the mean access delay of about PktLength 0.667.5PktLength[bits] in ACK/unicast/CD scenario. For networks greater than 700 nodes, the shae of mean access delay lot starts to be nearly exonential since it is close to that of 0.0009-ersistent CSMA. 7e+5 Mean access delay for the redictive -ersistent CSMA 6e+5 Mean access delay [bits] 5e+5 4e+5 3e+5 e+5 e+5 0 500 000 500 000 Number of nodes Figure 8. Mean access delay versus the number of nodes for the redictive -ersistent CSMA. On the basis of the analytical formulas, the following conclusions can be drawn u: - if the channel is lightly loaded, the rimary comonent of the latency is deferring transmission due to randomization of the channel access; the delay is then not greater than a few contention slots in average as is seen in Fig. 3b and Fig. 4 for the 0.065-ersistent CSMA, - if the channel is heavily loaded, the dominant comonent of the access delay is the robability of a essful transmission of a single node; this robability decreases due to two factors: first, because of decreasing the total channel bandwidth utilization as a result of isions; second, since the channel bandwidth er a single node decreases because it is divided out among the growing number of contenders. Furthermore, since the asymtotic robability of a ision is bounded in the redictive -ersistent CSMA, the mean access delay grows almost linearly with the number of contending nodes. It is worthy to emhasize that linear characteristic of the average access delay is the otimal delay relationshi that can be achieved for heavy workload in MAC rotocols based on the best-effort strategy and aears only for the range of workload where the channel throughut does not decrease with growing number of contenders. The linear access delay increase with the network load is the effect of dividing the bandwidth out among the increasing number of active nodes.

Sensors 007, 7 3556 8. Simulative Validation of Analytical Aroach In order to verify the analytical aroach we have run the simulations for the network containing selected number of nodes. The simulation model imlemented in LabView corresonds to the analytical model secified in Section 3. The simulation starts when the channel is idle. Next, the transient zone aears, when the nodes ermanently try to access the channel and the mean channel backlog grows, but does not reach the steady-state value. Since the simulation model belongs to non-terminating systems and the steady state theoretically is never reached, we detect it with a finite accuracy. The detection relies on the search of the constant value of the mean backlog, rather than of the constant value of the current backlog. Therefore, we used the moving averages defined over a window of observations (i.e. a certain number of acket cycles, increasing with the number of nodes). Moving averages filter the higher frequency comonents in the mean backlog, arisen from the random behavior of the CSMA algorithm on the one hand, and remove also the influence of the transient zone on the estimation of saturation backlog on the other. The saturation backlog is found under quasi steady-state conditions when the moving average of the channel backlog is ket inside of 5% wide confidence interval. Simulation oututs are the saturation channel backlog, the relative frequencies of essful/unessful transmissions (as the exerimental equivalents of the aroriate robabilities), and the mean access delay. 8.. Validation of Transition Probabilities The transition robabilities in Markov model have been derived basing on the equality of the robabilities of the essful transmission of a message and an acknowledgement (see Sections 6.3). This assumtion is true if the mean number of nodes having a message waiting for a transmission (i.e. message sources) equals the mean number of nodes that ossesses an acknowledgement ready for sending (i.e. acknowledgement sources). A uniform distribution of destination addresses has been imlemented in the simulation model as stated in Sect. 3.. The assignment of reciient addresses is controlled by the simulator. First, the simulator tries to assign a reciient that is a source of messages to every message sender. In case of the lack of sufficient number of message sources, the sender sends a message to itself (by the way such transmissions occur sometimes in real LON systems during turnaround network variable udates, see [5]). Fig. 9 resents simulation results showing the mean number of message and acknowledgement sources in the network steady state. It is clear that both numbers are equal to 50% with finite simulation accuracy. It was checked that these results are indeendent of initial conditions, i.e. the roortion between the number of message and acknowledgement sources at the simulation beginning.

Sensors 007, 7 3557 54 Relative mean number of sources of message/acknowledgement 5 Percentage of acknowledgement and message sources [%] 50 48 46 44 4 40 38 36 34 3 30 0 00 000 Sources of messages Sources of acknowledgements Number of nodes Figure 9. Simulation results of the mean number of message/acknowledgement sources in the saturation network steady state 8. Simulation versus Numerical Results The comarison of simulation and numerical results for the saturation backlog, the robability of ision and its exerimental measure (i.e. ision ercentage ' ), and the mean access delay, are resented in Table. Since both results are very close to each other and the corresonding grahs overla, they are not shown on the lots together. The comarison shows a good conformity of simulation and Markov chain-based analytical aroach. The difference between the results obtained in both aroaches stems from: - the finite accuracy of backlog estimation and the steady state detection in the simulation, - the inaccuracy (non-uniformity) of the seudorandom generator in the simulation, - the finite recision of comlex analytical comutations. Table. The comarison of analytical and simulation results for ACK/unicast/CD load scenario. BL ' [%] Mean access delay Mean access delay n BL (simulation [%] (simulation t mean [bits] t' mean [bits] (Markov model) ) (Markov model) ) (Markov model) (simulation),8,4 5,56 5,77 37 43 6,390,387 3, 3,675 54 56 0,663,66 7,49 7,98 35 56 40 3,9476 4,08 8,48 8,96 556 5695 00 8,8567 8,889 3,5 3,97 55 543 500 4,634 4,60 3,89 33,3 75758 74987 000 6,94 6,48 4,53 4,7 7485 75679