An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an...

14
Journal of Electronic Testing (2019) 35:45–58 https://doi.org/10.1007/s10836-018-5769-y An Optimized NS2 Module for UHF Passive RFID Systems Rahma Benfraj 1,2 · Vincent Beroulle 1,2 · Nicolas Fourty 1,2 · Aref Meddeb 3 Received: 21 July 2018 / Accepted: 15 November 2018 / Published online: 12 December 2018 © Springer Science+Business Media, LLC, part of Springer Nature 2018 Abstract Radio Frequency Identification (RFID) technology has the potential to dramatically improve numerous industrial practices. However, it still faces many challenges, including tag collisions and reliability, which may limit its use in many application scenarios. In UHF RFID systems, many collisions happen due to the numerous tag responses generated by the inventory process. Also, given the low cost and low performance of UHF RFID tags combined with harsh environments, RFID communications must deal with high Bit-Error-Rate (BER). As a matter of fact, the extra identification delays added by these collisions and communication errors can bring to a waste of bandwidth and more time inventory. The efficiency of tag identification is related to the performance of the anti-collision algorithm. To evaluate this performance, an UHF RFID module has already been developed in the NS2 simulator. This NS2 RFID module implements an RFID system based on the anti-collision Q-Algorithm (Q-Algo) of the EPC Global Protocol Class-1 Generation-2 Standard. In this paper, first, we propose an optimization of this NS2 RFID module by implementing and validating a more realistic version of the Q-Algo. Secondly, we add to this module some fault injection capabilities to evaluate with NS2 the UHF RFID system robustness in presence of communication errors. Finally, we show how this NS2 UHF RFID module is much more realistic for the timing evaluation in presence of communication errors. Keywords UHF RFID · Q-algorithm · Fault injection · NS2 1 Introduction Radio Frequency Identification (RFID) systems are composed of simple radio frequency communicating labels allowing Responsible Editor: T. Xia Rahma Benfraj [email protected] Vincent Beroulle [email protected] Nicolas Fourty [email protected] Aref Meddeb [email protected] 1 Institute of Engineering, University Grenoble Alpes, Grenoble INP LCIS, F-26000 Valence, France 2 National Engineering School of Tunis, University of Tunis EL-Manar, Tunis, Tunisia 3 National Engineering School of Sousse, University of Sousse, NOCCS, Sousse, Tunisia radio frequency identification without any contact or direct line of sight. The use of RFID tags is already widespread not only in industry but also in every day-life. Despite of the tag simplicity and the low cost, RFID systems capacities are more and more increasingly making them real smart networks interacting with information technology systems. RFID is basically an emerging technology which provides a mean to identify objects without physical or visual contact, to simultaneously read multiple objects, and to store information in much larger quantities than those recorded in the barcodes. Data in RFID systems are exchanged between tags and readers over many ranges which are High Frequencies (HF), Low Frequencies (LF) and Ultra High Frequencies (UHF). For small ranges, less than 10 cm, HF (13.56 MHz) is used. For ranges less than 3 m, UHF technology (800 to 900 MHz or 2.4 GHz (ISM Bands)) is used [8]. RFID devices consist of a small microchip connected to an antenna and an RFID reader also known as a base-station which will power the tags in order to identify them and read their digital information. The reader is generally connected to a back-end. The use of RFID tags is already widespread not only in industry but also in every day life.

Transcript of An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an...

Page 1: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

Journal of Electronic Testing (2019) 35:45–58https://doi.org/10.1007/s10836-018-5769-y

An Optimized NS2 Module for UHF Passive RFID Systems

Rahma Benfraj1,2 · Vincent Beroulle1,2 ·Nicolas Fourty1,2 · Aref Meddeb3

Received: 21 July 2018 / Accepted: 15 November 2018 / Published online: 12 December 2018© Springer Science+Business Media, LLC, part of Springer Nature 2018

AbstractRadio Frequency Identification (RFID) technology has the potential to dramatically improve numerous industrial practices.However, it still faces many challenges, including tag collisions and reliability, which may limit its use in many applicationscenarios. In UHF RFID systems, many collisions happen due to the numerous tag responses generated by the inventoryprocess. Also, given the low cost and low performance of UHF RFID tags combined with harsh environments, RFIDcommunications must deal with high Bit-Error-Rate (BER). As a matter of fact, the extra identification delays added bythese collisions and communication errors can bring to a waste of bandwidth and more time inventory. The efficiency oftag identification is related to the performance of the anti-collision algorithm. To evaluate this performance, an UHF RFIDmodule has already been developed in the NS2 simulator. This NS2 RFID module implements an RFID system based onthe anti-collision Q-Algorithm (Q-Algo) of the EPC Global Protocol Class-1 Generation-2 Standard. In this paper, first, wepropose an optimization of this NS2 RFID module by implementing and validating a more realistic version of the Q-Algo.Secondly, we add to this module some fault injection capabilities to evaluate with NS2 the UHF RFID system robustness inpresence of communication errors. Finally, we show how this NS2 UHF RFID module is much more realistic for the timingevaluation in presence of communication errors.

Keywords UHF RFID · Q-algorithm · Fault injection · NS2

1 Introduction

Radio Frequency Identification (RFID) systems are composedof simple radio frequency communicating labels allowing

Responsible Editor: T. Xia

� Rahma [email protected]

Vincent [email protected]

Nicolas [email protected]

Aref [email protected]

1 Institute of Engineering, University Grenoble Alpes,Grenoble INP LCIS, F-26000 Valence, France

2 National Engineering School of Tunis, University of TunisEL-Manar, Tunis, Tunisia

3 National Engineering School of Sousse, University of Sousse,NOCCS, Sousse, Tunisia

radio frequency identification without any contact or directline of sight. The use of RFID tags is already widespreadnot only in industry but also in every day-life. Despite ofthe tag simplicity and the low cost, RFID systems capacitiesare more and more increasingly making them real smartnetworks interacting with information technology systems.RFID is basically an emerging technology which providesa mean to identify objects without physical or visualcontact, to simultaneously read multiple objects, and to storeinformation in much larger quantities than those recordedin the barcodes. Data in RFID systems are exchangedbetween tags and readers over many ranges which are HighFrequencies (HF), Low Frequencies (LF) and Ultra HighFrequencies (UHF). For small ranges, less than 10 cm,HF (13.56 MHz) is used. For ranges less than 3 m, UHFtechnology (800 to 900 MHz or 2.4 GHz (ISM Bands))is used [8]. RFID devices consist of a small microchipconnected to an antenna and an RFID reader also known asa base-station which will power the tags in order to identifythem and read their digital information. The reader isgenerally connected to a back-end. The use of RFID tags isalready widespread not only in industry but also in every daylife.

Page 2: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

46 J Electron Test (2019) 35:45–58

The UHF RFID technology, compared to the HF andLF ones, allows the improvement of the communicationranges (from a few centimeters to few meters) and of thecommunication throughputs. These enhancements involveat the same time collision problems, and communicationerrors [2].

From a first point of view, today, UHF RFID systemsare often deployed in scenarios where a large number oftagged objects have to be identified in a very short periodof time. These objects have led to large and dense RFIDsystems. When several RFID tags attempt to establish acommunication with the reader simultaneously, this leads tocontention over the physical medium resulting in collisions.Thus, it is essential to use an effective anti-collisionprotocol to manage the communication of multiple RFIDtags simultaneously. In order to meet the performancerequirements for reading a dense population of tags, theEPC Global, a standard organization commercializing theuse of electronic product code (EPC), developed the EPCGlobal Radio Frequency Identification Protocols Class1Generation2 (EPC C1 Gen2) for passive UHF RFID. Thisstandard describes the air interface and logic requirementsfor a passive-tag, interrogator-talks-first RFID systemoperating in the 860 MHz - 960 MHz frequency range. EPCC1 Gen2 introduced the Q-Algorithm which deals with theproblem of collision.

To evaluate UHF RFID anti-collision protocols, protocolsimulation is more practical than the protocol implemen-tation with test-bed experiments. For that, several propos-als for simulating RFID networks are available in litera-ture. These simulators use both programming languages asC.NET [5] or MATLAB [20] and discrete event simulatorsas NS2 [1] or JiST [9]. NS2 is one of the most used discreteevent simulators. An NS2 RFID module based on the EPCC1 Gen2 standard has already been developed [17]. Usingthis module, the performance of the EPC C1 Gen2 stan-dard and its network layer mechanisms have been evaluated.Thanks to this NS2 RFID module, we can thus evaluate theanti-collision protocols implementation. This RFID mod-ule is adapted to the Medium Access Control algorithmalso. The evaluation of anti-collision protocols based on theNS2 RFID module using an improved time model has beendiscussed in our last paper [3]. However, this NS2 RFIDmodule has some flaws.

In fact, in NS2 the time can be modeled. But the simulatoris not well suited for that. The solution used emulates thedurations that is to say that the commands are executed bythe simulator at the speed imposed by the waiting times inthe model. The too short waiting times are not executableand then the simulator can not execute the commands fastenough. In our last paper [3], we presented a new timemodel based on various slot durations. However, too shortdurations can cause a bad results and malfunction during

the simulation. Another flaw of the NS2 RFID module usedin [17] and [3], is that it does not implement the EPC C1Gen2 exactly like it is proposed in the EPC Standard in [11].To deal with these problems, we propose and validate inthis paper a solution for emulating the short durations and anew implementation of the Q-Algorithm for the NS2 RFIDmodule.

From another point of view, there are many critical appli-cations in which RFID systems can be used to carry outinventories or sensor data collection avionics, transporta-tion, health care, access control, warehouse inventories andproduction process. In such critical applications, communi-cation errors can cause catastrophic human losses. In addi-tion, in high quality applications, they can have economicconsequences in terms of product quality and manufacturingcosts. UHF RFID environments can be extremely disturbedby communication errors. Those errors can be caused bydisturbances that come from electromagnetic waves emit-ted by other tags and readers or other electronic devices.Thus, it is a good practice to evaluate the robustness ofthe anti-collision protocols in presence of communicationerrors. For that, researchers generally use fault injection andsimulation. It consists of injecting parametric variations onthe Bit Error Rate (BER) or in Packet Error Rate (PER).The communication errors in this paper refer to the errorswhich produce messages to be changed, delayed, repeatedor lost. The results which are evaluated by the fault injec-tion include fault detection and isolation, reconfigurationand recovery capabilities. In recent years, researchers havetaken more concern in developing software and hardwarefault injection tools.

For that, in this paper, we proposed and validated asoftware fault injection technique in order to evaluate theRFID system robustness with our NS2 RFID module. Thistool is advantageous as it does not need expensive hardware.Moreover, they can be used in many applications. By usingthis fault injection tool, we measure the impact of the faultsand especially the durations of the inventories.

In this paper, first, we present a new version of theQ-Algorithm that we implemented in the NS2 RFIDmodule. Then, we validate it by comparing it with theOriginal Q-Algorithm [17]. Secondly, we propose a faultinjection simulator and analyze the results of fault injectioncampaigns on the new EPC C1 Gen2 Q-Algorithm versionof the NS2 RFID module. Then, the impact of the faultinjections on the EPC C1 Gen 2 standard performance isanalyzed.

The outline of the paper is the following. Section 2provides an overview on the EPC C1 Gen2 standard andof its anti-collision algorithm which is the Q-Algorithm.This section also presents the Original NS2 EPC C1 Gen2RFID module [17] and the Old NS2 RFID module thatwe proposed in our last paper [3]. Then, we discuss the

Page 3: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 47

problems remaining in those two modules. In Section 3, wepresent our new enhancement of the Q-Algorithm that weimplement within the NS2 RFID module. Then, we validateit by comparing it to the Original version. In Section 4,we present the fault injection and discuss its impacts onthe robustness of our new NS2 RFID module. We finallyconclude the paper.

2 Overview of EPC C1 Gen2 UHF RFIDStandard

In this section, we introduce the EPC C1 Gen2 standardand its anti-collision algorithm (Q-Algorithm). Then, wedescribe the Original NS2 EPC C1 Gen2 RFID modulewhich was for the first time implemented and discussed in[17]. Then we present the Old NS2 EPC C1 Gen2 RFIDmodule using a new time model that we proposed in [3].Finally, we discuss the problems of this modified RFIDmodule and present the enhancement that we propose todeal with its problems.

In this paper we mention three NS2 RFID modules: theOriginal NS2 EPC C1 Gen2 module [17] that implementsthe Original Q-Algo (we will mention it by the OriginalQ-Algo), the Old NS2 EPC C1 Gen2 RFID moduleimplementing the Old Q-Algo (will be mentioned by theOld Q-Algo) and using a new time model that we proposedin [3] and finally the New NS2 EPC C1 Gen2 RFIDoptimized module (that we will mention by the New Q-Algo) which is the objective of this paper implementing theNew Q-Algo that we will propose later.

2.1 Presentation of the EPC C1 Gen2 Q-Algorithm

The EPC global Class-1 Gen-2 standard [11] (EPC C1Gen2) is a standard which targets the UHF frequency range(800 to 900 MHz or 2.4 GHz (ISM Bands)) for passiveRFID tags. An UHF RFID system is composed by an UHFtag and an UHF reader. An UHF RFID reader identifiesRFID tags by managing inventory. The inventory operationsare based on a slotted ALOHA collision resolution and onthe Q-Algorithm [11] which is a Dynamic Framed SlottedALOHA mechanism (Dynamic FSA). In FSA, the readersplits time into intervals of time slots, and each tag arbitraryselects one time slot and sends its ID in that time slot. As arule, slots are provided in frames, whose sizes are controlledby the reader. The size of each frame is dynamicallychanged by the reader.

In the Q-Algorithm, the Q parameter denotes theexponent of the frame size (2Q) used in the RFID readersin the EPC C1 Gen2 standard which manages largepopulations of tags with three operations: Select, Inventoryand Access. First, in the select operation, one or more

select commands are used to select a population of tags forthe following inventory and access operations. Secondly,in the inventory operation, the tags that need to beaccessed are identified by the interrogator. By transmittinga query command, the inventory operation begins. Whenone tag replies, the interrogator detects a single tag replyand identifies this single tag. Afterwards, series of querycommands are repeated for the identification of tags thathave been not identified. Finally, in the access operation,the interrogator communicates with the identified tags.An individual tag with an EPC code must be uniquelyidentified prior to access. The inventory operation is dividedinto several rounds and each inventory round includesseveral time-slots. The inventory command contains theQuery, QueryAdjust and QueryRep and its operations arebased on a slotted ALOHA collision resolution as depictedin Fig. 1.

Modifying the frame’s size by adjusting the Q parameter,is the most important part in the Q-Algorithm, which isexplained in [18]. As depicted in the Fig. 2, the reader atthe start of the algorithm has a floating-point parameterQfp and a small constant � for the frame length (2Q)adjustment. When a new inventory begins, the reader willneed to identify tags at each time slot and will receive oneof the three possibilities: single-tag reply, multiple-tag reply,and no-tag reply. When the interrogator detects that multipletags are replying, the Qfp value increases by �. When thereis a no-tag reply, the Qfp value decreases by �. When thereader receives a single tag reply, the Qfp value remainsunchanged. If the round value of Qfp is different from thecurrent Q value, the reader frame changes (it can be biggeror smaller).

2.2 Description of the Original NS2 EPC C1 Gen2RFIDModule [17]

For evaluating RFID systems, an NS2 RFID modulehas already been developed for the NS2 simulator [17].This NS2 RFID module implements the Q-Algorithm ofthe EPC C1 Gen2 standard. This module focuses onthe link layer and its mechanisms for anti-collision. Allneeded parameters related to the Q-Algorithm such as Qvalue, command type, counter and wait time accordingto specification of EPC C1 Gen2 are implemented in themodule. In addition, Query, QueryAdjust and QueryRepcommands are used to identify a population of tags. TheRFID reader stores many information for performanceanalysis such as slot counter for the success slots, idleand collision ones, identification IDs and initial parametervalues (like the constant �, the initial Qfp and thecurrent reader command). This NS2 RFID module alsouses counters to count all kinds of slots (collision, idle andsuccess slots).

Page 4: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

48 J Electron Test (2019) 35:45–58

Fig. 1 Link Timing in EPC C1Gen2 Specification [11]

Over the NS2 RFID module, the performances of theEPC C1 Gen2 anticollision protocol (Q-Algo) and itsnetwork layer mechanisms have been evaluated [17]. TheRFID module has been developed on the release 2.35 ofthe NS2 simulator with C++ language and Object-orientedTool Command (OTcl) which are the two key languagesin the NS2 simulator. The NS2 RFID module uses manyclasses that have been inherited from the NS2 defaultAgent and Packet classes. However, they were modifiedand redesigned to support specific RFID features. The baseclass used in NS2 to specify any kind of data packet isthe Packet class. Agent class allows sending and receiving

Fig. 2 Example algorithm for choosing the slot-count parameter Q [11]

data. ReaderClass is the main class in the module. TagClassis responsible of the reactions and responses of tags aftereach query of reader. The Send/Receive methods are alsoimplemented to send and receive packets operations (recv()and command()).

To perform a realistic evaluation of protocol temporalaspects, the transmission model defined by the EPC C1Gen2 Specification [11] (which defines time requirementsfor reader to tag and tag to reader communications, forinterrogator talks first system) is implemented also in theNS2 RFID module.

In order to compare the simulation results with other FSAschemes in the NS2 RFIDModule, the same slot duration ofT= 1ms was used (corresponding to a data rate of 100 Kbpsand 96 bit IDs) for FSA simulations and as well for EPC C1Gen2 simulations (Q-Algo simulations). According to EPCglobal specification, whenever the reader sends a messageto tags, the reader packet arrives to tags after a propagationdelay. After reception, tags need a time to respond to thereader. The reaction time lasts from the end of the receptionof the reader packet, to the start of transmission of thetag’s response, and is fixed to (10 × T 1) (where T1 = 1 /DataRate) according to EPC C1 Gen2 specification [11]. Apropagation delay is required again before the reader beginsreceiving tag responses. After receiving the responses oftags, the reader needs a period of time before being able toissue a new command (new query or time slot signaling).This period of time, which is defined for the reader side,lasting from the end of reception of tag’s transmission to the

Page 5: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 49

start of the new reader transmission. If there is no responsefrom tags, the reader realizes that no transmission is comingback from tags after an RX threshold period which is thetime at which the reader should begin the reception of thefirst bit of tag data. Then, the transmission session endswhen the RX threshold passes off, and the reader issues anew command after a time of T1.

2.3 The NS2 RFIDModule Using Different SlotDurations

As we mentioned before we have already proposed animprovement of the Original Q-Algo [17] and proposed anoptimization in our last paper [3]. We have changed its toosimplistic time model to implement a new more realisticone. In fact, in the Original time model used by the OriginalQ-Algo [17], the reader considers that all the slots (collision,idle and success slots) are equal to 1 ms. So, we havechanged the Original Q-Algo to use different slot durations.Whenever there is an idle, a collision or a success slot, thereader resends the next frame after the specific duration ofthe current slot. We fixed a waiting time of 2.18 ms for thesuccess slot, 0.15 ms for an idle slot and 0.447 ms for acollision slot based on [10]. This modification improved thetemporal accuracy of the communication simulation.

Table 1 presents the slot durations in the Original model[17] and in our Old Q-Algo model [3]. This table depictsthe duration of each slot (Collision, idle and success slot) inour model [3] and in the Original model first implementedin NS2 in [17]. In [3], to validate our time model, wehave changed the NS2 RFID module to use the Split Q-Algorithm [4] and the Q+ Algorithm [15] which are twowell-known anti-collision protocols. We have implementedthem in order to evaluate and validate their performanceswith and without our new time model. Our goal was toevaluate the impact of our time model on the inventorytime. We found that the Split Q-Algorithm had the lowestmarginal identification cost with the new time model (ratherthan the Q+ which had the lowest marginal identificationcost with the older model).

The NS2 RFID module in [17], still have some flaws aswe mentioned in the introduction. In the next section, wewill present these flaws and propose a new version of theNS2 RFID module much more realistic than the previousmodules in [17] and [3].

2.4 Remaining Problems in the NS2 RFIDModule

In our paper in [3], we validated the proposed RFID modulein [17] by comparing it with the theory. This comparisongave a small percentage of error for the average number of

success, collision and idle slots. This percentage of erroris due to the fact that the RFID NS2 module is not totallycompliant to the EPC C1 Gen2 protocol. The Old Q-Algo in[3] has the problem of using short time durations which cannot be entirely supported by NS2. This section will detailthese problems.

2.4.1 Problems in the Q-Algorithm Implementationin the Original NS2 RFID Module [17]

As stated in the previous section, the Original RFID NS2module implements an RFID system based on the EPC C1Gen2 anticollision algorithmwhich is the Q-Algo. However,in this NS2 RFID module, when there is a collision slot,the reader always sends a QueryAdjust command in orderto order the tags to randomly choose a new slot. Basedon the EPC C1 Gen2, what is supposed to occur after acollision slot is to send a QueryRep command in order tocontinue decrementing the tag slots. Only in the case of thechange of Q value, the QueryAdjust should be sent as it isalso explained in [19]. Thus, in the next section, we willpresent our new version of Q-Algorithm to deal with thisfirst problem.

2.4.2 Problems of Using Too Short Slot Durations in NS2

The goal of this section is to check how the use of veryshort slot durations could modify the behavior of NS2. Weevaluate the impact of too short slot durations measuringthe number of each slot. Indeed, normally the numberof each slot during an inventory should not be relatedto the slot durations. However, in NS2 the time is notmodeled but is emulated. The commands are executed bythe simulator at the speed imposed by the waiting times (slotdurations). Our experiments lead us to say that too shorttimes are not executable when the processor cannot executethe commands fast enough. An example of malfunction canbe the end of the inventory without having read all the tagsor the non-reception of the QueryRep or of the QueryAdjust.In the following, to evaluate the impact of the slot durations,we propose to measure the number of slots generated after

Table 1 Slots durations of the Original and the Old Q-Algo TimeModels

Slot Original Q-AlgoTimeModel [17]

Our Old Q-AlgoTime Model [3]

Collision Slot 1 ms 0.442 ms

Success Slot 1 ms 2.18 ms

Idle Slot 1 ms 0.15 ms

Page 6: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

50 J Electron Test (2019) 35:45–58

an inventory using the slot durations of 0.1 ms, 1 ms 10ms. We want to see if the slot durations have an impacton the results of the NS2 RFID module or not. Then wesimulate the module by using the different slot durationswhich are presented in Table 1. First, it should be noticedthat it is possible to statistically predict the number of emptyslots (E), success slots (S) or collision ones (C) during oneframe, knowing the number of tags N to be inventoriedduring a frame and the number of slots L contained inthe frame [16]. Indeed, the number t of tags present inone slot follows a binomial equation which is P (X=t) asfollows:

P(X = t) =(

N

t

)(1/L)t (1 − (1/L))N−t (I.1)

The number of slots m having t tags can therefore be asfollows:

m = L.

(N

t

)(1/L)t (1 − (1/L))N−t (I.2)

Thus, according to Eq. I.2, we can express the number ofslots having one single tag (i.e., the success slots S(N,L)),the number of slots with no tag - empty slots ((i.e., the emptyslots E(N,L))) - and the number of slots with at least 2 tags- slots collisions (i.e., the collision slots C(N,L)):

S(N, L) = N .(1 − (1/L))N−1 (I.3)

E(N,L) = L.(1 − (1/L))N (I.4)

C(N, L) = L − S(N, L) − E(N,L) (I.5)

In order to see the impact of using short slot durations, wereuse the Eqs. I.3, I.4 and I.5, which statistically predictthe number of success slots, idle slots or collision onesduring one frame. For this, we have measured the numberof empty slots, collision slots and success ones generatedduring the inventory of 5 tags with one reader having a firstframe of 16 slots. Then we have compared these results

with those given by the previous equations. The reader hasbeen configured with a parameter Q that equals to 4, thus,to use frames composed of 16 slots. We conduct the set ofexperiments with the NS 2.35 simulator [6]. Table 2 presentsthe number of slots generated by the Original NS2 RFIDmodule [17] using fix duration slots of 0,1 ms, 1 ms, and10 ms, then using the values of our time model. Table 2gives the expected theoretical results as well as the averageresults obtained for 100 simulation inventories of 5 tags witha frame starting with 16 slots.

In statistics, a confidence interval makes possible toestablish the margin of error between the data of a survey(sample) and the data of the total population. Indeed, if thepopulation is large (several thousands of data), it is faster towork on a sample and extend the results to the whole. Ofcourse, there is a risk of error.

In the NS2 simulator, for statistical analysis purpose,it is often necessary to simulate several times a scenarioand to compute the mean and the variance of some results.The randomness of each simulation is due to the use of aRandomNumber Generator (RNG). By default, NS2 alwaysuses a default RNG with an initial value (or seed) equalsto one. This makes the simulation reproducible. To obtainrandomness, it is better to change this initial value for eachsimulation. The random generator uses these changing seedvalues for generating different pseudo-random sequences.

The margin of error is the degree of error in the resultsfrom random sample surveys. A higher margin of error mayindicate a lower probability of relying on the results. Onthe other hand, a confidence interval corresponds to thelevel of unpredictability associated with a given statistic.Normally, it is used in relation to the margin of error toreveal the confidence in the evaluation of the results. Inorder to calculate the margin of error, we calculate the meanand the standard deviation of each sample. To calculate theconfidence interval, three parameters of the sample mustbe known: the mean value (mean), the standard deviationand the sample size n (number of measurements). The mostcommonly used degrees of confidence are 90%, 95% and99%. For our samples in this paper, we took 99%. Then themargin of error ME, is calculated with the formula (I.6):

Table 2 Number of success, empty and collision slots for 5 tags and 16 slots in theory and simulation with 3 fixed slot durations (0,1 ms, 1 ms,10 ms) and slot durations depending of the kind of slot [3]

Condition in Theory Original Q-Algo (0.1 ms) [17] Original Q-Algo (1ms) [17] Original Q-Algo (10ms) [17] Old Q-Algo [3]

S(5,16)=3.86 2.88 [2.1,2.99] 3.54 [3.42,3.67] 3.67 [3.55,3.78] 3.14 [2.99,3.58]

E(5,16)=11.59 13 [11,13.25] 11.89 [11.80,11,97] 11.87 [11.79,11.95] 8.52 [7.53,8.6]

C(5,16)=0.55 0.9 [0.88,1.3] 0.570 [0.483,0.658] 0.461 [0.386,0.536] 0.87 [0.1,1.99]

Page 7: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 51

Then the margin of error ME, is calculated on the basis ofthe formula (I.6) in the following:

ME = Zα/2 · σ√n

(I.6)

where α is the confidence level,

Zα/2 is the confidence coefficient,

σ is the standard deviation and and n is the sample size.

Therefore, for our sample, we can break down the formulainto two parts: the calculation of the critical value,Zα/2 witha degree of confidence of 0.99. We divide it by 2, which gives0.495. Then we take the Z-Table to find the value that corre-sponds to 0.495. By definition, The Z-table is the “StandardNormal z-table”. This Standard Normal model is used inhypothesis testing [7]. Once we have found the Z(0.99/2)value, we can simply use this value into the Eq. I.6 above toget the margin of error. Now, the only thing left to do is tofind the lower and upper bound of the confidence interval:

lower bound = mean − margin of error

upper bound = mean + margin of error.

For example, based on Table 2 after the average of 100simulations we have obtained for a duration slot of 1 msan average number of success slots equal to 3.54 with amargin error of [3.42,3.67] for the success slots, an averagenumber of empty slots equal to 11.89 with a margin error of[11.80,11.97] and an average number of collision slots equalto 0.570 with a margin error of [0.483,0.658]. First, theresults for the slot durations 1 ms and 10 ms are the same.In fact, we can see that the average variations with these twodurations (1 ms, 10 ms) are less than the precision based onthe confidence interval which is equal to 99%. For example,for the number of successful slots, the two values 3.54 and3.67 form confidence intervals that have intersections. Wecan see that [3.42.3.67] and [3.55.3.78] intersect each other.These variations between the different averages for 1 ms and10 ms durations are caused by the random mechanisms usedby the tags. In fact, the inventory procedure is divided intoseveral rounds, and each inventory round includes severaltime-slots, as shown in Fig. 1. The number of time-slots(also called frame size) affects the read performance. Afterthe interrogator sending the Query command with a Q value(0-15), all tags which receive this Query command, willgenerate their own RN16 (16 bit random number), andget a random number from the last Q-bits of the RN16,ranging from 0 to 2Q − 1. The tags will count downtheir slot numbers under the control of the reader and willsend their own RN16 when the counter reaches zero. FromTable 2, in conclusion, the increase of the slot durationfrom 1 ms to 10 ms does not impact the number of slots.

Secondly, we can see that if we use short slot durations of0.1 ms then the simulator could not follow this duration. Theresults are no longer close to the theory. In our simulations,using the slot duration of 0.1 ms or the NS2 RFID modulein [3], tags can not receive the QueryRep then can notalways decrement their slot numbers causing a malfunctionin the whole inventory. In fact, the non reception of theQueryRep is caused mainly by the short duration of thecollision slot which is in this example 0.1 ms. Indeed, thisduration is less than the necessary duration for the emissionof the RFID QueryRep packet in NS2. As a result, thepacket will never arrive at the receiving target causing thena malfunction in the inventory such as a non reception of aquery or a message not arrived to its destination. Thus, theuse of short slot durations has caused a dysfunction of theNS2 RFID module. The number of slots has been impactedand is no longer conformed to the theory. To deal withthis problem, in order to use our new time model properly,we multiply each slot duration given in Table 1 by 10.The minimal slot duration is now 1.5 ms for the idle slots.Thus, to obtain correct time results, we must now divide theinventory times by 10. We verify that the number of slotsis now correct with the model using various slot durations.We present results in the next section and in Table 4. Afterthis validation, now we will present our New version of Q-Algorithm (New Q-Algo) and validate it in the next section.As we said, the version of Q-Algorithm is not implementedas it was proposed in the EPC C1 Gen2 Standard. Thus, it isnecessary now to propose an implementation enhancementbased on the version of Q-Algorithm that was proposed inthe EPC C1 Gen2 using of course our new time model anda multiplication by 10 [3].

3 A New EPC C1 Gen2 NS2 RFIDModule

In this section, we introduce the basic architecture of ournew NS2 RFID module based on a new implementation ofthe Q-Algorithm compliant with the EPC C1 Gen2.

In fact, in the Old NS2 RFID module [3], after eachcollision or idle slot the reader sends a QueryAdjust to thetags in order to adjust the Q value even when this valuemust remain unchanged. This is not the manner of issuingqueries as it is proposed by the EPC C1 Gen2 [11]. TheNew Q-Algorithm design is very similar to the Original one.The difference between its old implementation and our newversion is the method of issuing the queries. Algorithm 1presents our New Q-Algo. As we can see in Algorithm 1,after each slot in Algorithm 1, the reader adjusts the Q-valueby sending a message containing a QueryRep if Q remainsunchanged, and QueryAdjust when Q changes.

Page 8: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

52 J Electron Test (2019) 35:45–58

Algorithm 1 New Version of the Q-Algorithm ReaderOperations Compliant with EPC C1 GEN2

Require: 0.3

Ensure: 4.0

Send Query CommandDetect

while Q ¿ 0 doif (Received more than one Reply) then

if (Q changed) thenQueryAdjust(

wait = 0.447 ms

elseQueryRep(

wait = 0.447 ms

end ifend ifif (Received no Reply) then

if (Q changed) thenQueryAdjust(

wait = 0.15 ms

elseQueryRep(wait = 0.15 ms

end ifend ifif (Received just one reply) then

QueryRep()

wait = 2.18 msend if

end while

In Algorithm 1, after receiving the QueryRep, each tagdecrements its slot counter by 1 and all the tags which have0 in their slot counters respond. We left tag operations thesame as in the Original NS2 RFID module [17]. Table 3shows the files that we have modified in the NS2 RFIDmodule. Of course, we implement in this new version ournew time model [3].

Table 3 Modified Files

File Comments

apps/rfidReader:{cc,h} RFID reader class definitions

apps/rfidTag:{cc,h} RFID tag class definitions

apps/rfidPacket:{cc,h} RFID packet class definitions

trace/cmu-trace.cc Inclusion of RFID packet trace information

tcl/lib/ns-default.tcl Inclusion of RFID reader and tags parameters

common/packet.h Inclusion of RFID packet parameters

Makefile.in Inclusion of reader, tag and packet classes

3.1 Validation of the New EPC C1 Gen2 NS2 RFIDModule

In order to validate our new implementation of the Q-Algorithm (New Q-Algo), we reuse the Eqs. I.3, I.4 andI.5 in order to predict statistically the number of successslots, idle slots or collision ones during one frame. Withthese equations we calculate the average number of emptyslots, collision slots and success ones generated during theinventory. We also measure the average number of slotsgenerated by our New Q-Algo and by the Old NS2 RFIDmodule [3].

Then we compare these results. The reader has beenconfigured with an initial parameter Q equal to 4, thus, itstarts using frames composed of 16 slots. Table 4 gives thecomparison between the expected theoretical results, as wellas the average results obtained using 100 simulations of 5tags inventories with a frame starting with 16 slots using theOld Q-Algo and the NewQ-Algo (after multiplying the slotsby 10 and dividing the final result by 10). From this table,we have a theoretical average of S(5,16)= 3.86 slots selectedby a single tag, E(5,16) = 11.59 slots with no tag reply, andC(5,16) = 0.55 slots selected by at least two tags. After 100inventories with a confidence interval equal to 99%, we haveobtained, first, for the Old Q-Algo an average number ofempty slots equal to 11.98 with an error of ∼= 2%.

Using the New Q-Algo, we have obtained an average ofempty slots equals to 11.62 with an error of ∼= 0.2%.

As depicted in Table 4, the error is more important withthe Old Q-Algo than the New Q-Algo. This was expectedas this algorithm does not implement exactly the EPC C1Gen2 anti-collision algorithm. Indeed, in the Original andOld NS2 RFID Modules, when there is a collision slot, thereader sends a QueryAdjust command in order to order eachtag to randomly choose a new slot. Based on the EPC C1Gen2 standard, what is supposed to occur after a collisionslot is to send a QueryRep command in order to decrementthe tags slots. Only in the case of the change of Q value,the QueryAdjust should be sent. For example, for 3 tags,with the Original and Old Q-Algo, potentially there is apossibility of never converging if there is always a collision

Page 9: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 53

Table 4 Comparison ofcollision, idle and success slotsof the two versions of Q-Algowith the theory

Condition The old Q-Algo The new Q-Algo

Mean Standard deviation Error Mean Standard deviation Error

S(5,16)=3.86 3.54 1.02 8% 3.78 0.95 2%

V(5,16)=11.59 11.98 0.72 2% 11.62 0.79 0.2%

C(5,16)=0.55 0.570 0.714 4% 0.543 0.546 1%

slot (with 2 tags) before detecting the remaining third tag.In the same case, with the new Q-Algo when there is atwo tags collisions we are sure to detect the remaining thirdtag. We will detect it by decreasing the counter each timethe QueryRep is sent. So, for the first algorithms the taginventory is uncertain, rather than for the second algorithmit is sure. So we can predict that the results achieved by thesealgorithms will not be the same as it is given by Table 4.

This can be proved by a simple reasoning using theEq. I.3 when a single one tag remains after a first slot collision.For the New Q-Algo if we change N by 1 in the Eq. I.3 thenumber of success slots S(1,L) is given by Eq. I.7:

S(1, L) = 1; (I.7)

where L is the remaining number of slots after the collision,with a probability of tag detection at each new slot which isP (1,L) and equals to:

PNew−QAlgo(1, L) = 1/L (I.8)

For the Old Q-Algo the probability of tag detection for thefirst random slot selection is:

POld−QAlgo−f irst−slot (1, L) = 1/L (I.9)

and then for the n random slot selection this probability isequal to:

POldQ−Algo−n−random−slots (1, L) = 1/L · ((L − 1)/L)n−1

(I.10)

In Eq. I.9, the probability is given with ((L − 1)/L)n−1. Itis due to the fact the the (n-1) previous single slot selectionswere not 0. We can then have this geometric series as givenby the Eq. I.10:

S(1, L) = (1/L) + ((L − 1)/L).(1/L))

+ ((L − 1)/L)2.(1/L) + ... (I.11)

This geometric series of ratio (L-1) / L converges to 1. Theprobability of tag detection of the Old Q-Algo is always lessthan the one of the New Q-Algo. Thus, this explain why weget less success slots with the Old Q-Algo method than withthe New Q-Algo.

As we can see from the Table 4, using the New Q-Algo, the error has been reduced. In conclusion, our newimplementation is more realistic and fully compliant to theEPC C1 Gen2. We will show in the following, simulationresults using the Old Q-Algo and the New Q-Algo forseveral large populations of tags in order to evaluate thetiming performance of the anti-collision algorithm.

3.2 Performance Evaluation of the NewQ-AlgoModule

This section presents a comparison of the simulation resultsconducted to validate the New Q-Algo and to evaluateits performances with the Original time model (fixed slotdurations 1 ms each one) and our time model (various slotdurations). We compare also our optimized RFID modulewith the Original RFID module [17] and with our Old RFIDmodule [3] . We conduct these sets of experiments with theNS2.35 simulator [6]. For the sake of clarity, these sets ofexperiments used the most important parameter which isthe Marginal Identification Cost (MIC). By definition, themarginal identification cost denotes the average slot numberused for identifying a tag during an inventory and is a goodindicator for the efficiency of an adaptive FSA algorithm.MIC is a good metric to evaluate the performance ofRFID anticollision system because it represents the averagenumber of slots required per tag identification. If thisnumber increases with the number of tags it means that thealgorithm will lack scalability for complex systems. A veryimportant property of UHF RFID system is their capabilityto manage big amount of tags witout requiring big amountof inventory time. This parameter has already been used inprevious work [3, 17]. The algorithm and the parameters forthe simulation are described in Algorithm 1 and in Table 5respectively. With the model using different slot durations,the MIC can not still stay the average number of slots usedto identify each tag. To compute it we now simply dividethe overall time of the inventory by the number of tags. Werun our simulations on a large scale network from 200 to700 tags and one reader that initiates the communication inevery iteration with all the settings in Table 5. In Table 5,we fix the simulated time of our scenario to 10 seconds. Theinitial position of the RFID tags has been chosen randomly.

Page 10: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

54 J Electron Test (2019) 35:45–58

Table 5 Simulation parameters

Parameter Value

Simulated time 10 seconds

Number of tags 200-700

Initial positions Random

Objective of the simulation Tags populations identification

Mobility None

Initial Q value 7

C value 0.3

Number of simulations

used to compute the average 100

In addition to that, we have chosen the initial value of Qequal to 7 in order to have a coherent comparison.

For that, we divided results on the total delay by the numberof tags. The results have been obtained by a confidence intervalof 99%. All the results of the simulation are averaged afteriterating it 100 times. The less marginal identification costobtained in an algorithm, the better algorithm it is. Figure 3presents the average marginal identification cost of theOriginal Q-Algo using 1 ms as a fixed duration for all theslots [17], the Old Q-Algo in [3] and our New Q-Algo usingthe time model of 1 ms and our optimized time model. Thegoal of Fig. 3 is to show the impact of the model quality onthe MIC parameter estimation. It’s important to note that themore realistic model (New Q-Algo) gives a MIC estimation(2,7 ms) which is 10% less than the Original model MICestimation (3 ms).

The important aspect in Fig. 3 is that the curves of eachalgorithm are close to a constant value for all the populationof tags.

Our curves are also close to each others. The MIC ofthe Original Q-Algo, the Old Q-Algo and our New Q-Algopersistently indicates a unique performance nevertheless thenumber of tags.

On the one hand, under the model of 1 ms the OriginalQ-Algo presents an average of ∼= 3 ms per tag andour New Q-Algo presents an average of ∼= 2.89 ms ofmarginal identification cost. As we can see, the New Q-Algo is significantly reducing the marginal identificationcost compared to the Original Q-Algo under the model of 1ms.

On the other hand, by using our new time model based onvarious slot durations, as we can see, theMIC of our NewQ-Algo, has been reduced compared to the Original Q-Algo.the New Q-algo gives the best performance compared to theOriginal and the Old ones. With the new optimizing timemodel, the New Q-Algo gives a realistic identification timeunder our real time model and it has reduced the marginalidentification cost with an average of ∼= 2.65 ms. ThisMIC presented by the New Q-Algo is the lowest comparedto the Old Q-Algo [3] which has an average of marginalidentification cost under our time model equal to∼= 2.79 ms.

In conclusion, using the New Q-Algo, the time inventoryhas been reduced. This is linked to the number of collisionand idle slots which has been reduced by our new enhancement.

With sending a QueryRep when the Q value remainsunchanged and sending a QueryAdjust only when Qchanges, we can reduce the number of generated slots,and consequently reduce the time identification of alarge population of tags and then reduce the marginalidentification cost per tag. We have now a new NS2 RFIDmodule with a realistic time model and a new version ofQ-Algorithm compliant to the EPC C1 Gen2 [11]. In thefollowing, we will evaluate its robustness in presence offaults by injecting software faults in our simulation.

Fig. 3 Marginal IdentificationCost of the two versions ofQ-Algo using using the twomodels

Page 11: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 55

4 Dynamic Software Fault InjectionMethod

Our new model is better than the two previous onesbecause it is more realistic. It corrects a lot of errorsin the previous models (such as time slot durations, Q-Algo implementation). However, in terms of robustness orperformance, our model does not target any improvementcompared to the previous models (the original and the oldmodel). After the validation of the new model, we wantin this section to show how it can be used to performrobustness analysis. The objective of this section is toevaluate the robustness of the New Q-Algo module becausein reality the communications are subject to disturbancesand it must be possible to evaluate the performance of thesystems in the presence of faults. The robustness evaluationcould be done by injecting software faults. In fact, theadvantage of the simulation-based fault injection techniquesis that there is no risk to damage the system in use. Inaddition, they are cheaper in terms of time and efforts thanthe hardware techniques.

4.1 Our Fault Injection Simulator

In simulation-based fault injection, the target system aswell as the possible communication errors are modeledand simulated by a software program, usually called faultsimulator. The fault simulator randomly injects communica-tion errors during the simulation. This allows evaluating thefaulty system behavior in presence of perturbations betweenreaders and tags [12–14].

The injection fault campaigns are performed usingruntime fault injection. Faults are injected during thesimulation of the Q-Algo models (Original Q-Algo, Old Q-Algo and New Q-Algo). We will explain our injection faultmethod later.

We propose to measure the impact of the fault injectionon the performances of an UHF RFID system. We willevaluate the robustness of the New Q-Algo in presenceof faults. The communication errors in this paper referto the errors which produce the loose of messages. Inthis paper, we only focus on the communication errors.These errors are modeled by errors in exchanged messages.Messages consist of numerous bytes exchanged betweenreaders and tags. Thus we are considering packet errorrate which measure the errors in these messages. For eachfault campaign, successive faulty packets will be theninjected during the whole time of the tag inventory. Ourfault simulator is characterized by the packet error ratewhich is fixed and the fault locality within the targetedcommunication message which is random. We have usedmany levels of packet error rates in order to be able toobserve the effects on the system depending on the level ofdisturbance.

4.2 Our Fault Injection Simulator Model

First, we select Pack Error Rates (PER) of 10%, 50%and 90% by injecting errors in 1, 5, and 9 messagesevery 10 messages respectively. We use a model in whichwe randomly inject these errors in different phases ofthe communication between the readers and the tags. Inparticular, we inject faults in communication slots used bythe tags to transmit its EPC identifier to the reader. Interm of time modeling, we consider that when the messageis wrong, the reader wait 2.18 ms which corresponds toa success slot duration (which is also the maximal slotduration (Table 1)). Indeed, as the fault is not detectedbefore being entirely received, then the reader wait theduration of a success slot.

4.3 Fault Injection Campaign Simulation Results

4.3.1 Fault Injection During the Inventory of 10 Tagsand One Reader

Based on the previous results with the New Q-Algo, thereader needs 14 ms in order to identify 10 tags in a fault freeenvironment. In the Table 6, we present the results given byour simulation for PER equal to 10%, 50% and 90%. Forexample, with a PER equal to 10%, the reader needs 19.5ms to identify the 10 tags.

We obviously observe that whatever the PER is, thereader needs more time in order to do the inventory than ina fault free environment.

This additional time increases with the PER. In fact,whenever a fault occurs the reader repeats the procedure foridentifying all unidentified tags. As we mentioned before,in our injection fault model, the reader wait 2.18 ms evenwhen a fault occurs.

In order to analyze this additional time, we havecomputed the mean number of faults for 10 inventories of10 tags. Table 7 presents simulation results conducted in thiscontext. By analyzing the trace files of the 10 inventories,we find for example a mean of 2.4 errors on the successslots (which become lost messages) with a PER of 10%.The additional time is directly related to the number ofoccurrences of faults. With a PER equal to 10%, if wemultiply the number of faults by 2.18 ms (the duration thatthe reader waits during one success slot in presence or in

Table 6 Inventory Time for 10 tags and for 3 different Packet ErrorRate (PER)

Fault free PER=10% PER=50% PER=90%

10 tags 14 ms 19.5 ms 36.2 ms 80 ms

Page 12: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

56 J Electron Test (2019) 35:45–58

Table 7 Inventory Time for 10tags and for 3 different PacketError Rate (PER)

PER PER=10% PER=50% PER=90%

Identification EPC 2.4 (mean of errors) 9.8 (mean of errors) 30 (mean of errors)

Total Time error 2.4*2.18 = 5.2 m 9.8*2.18 = 21.6 ms 30*2.18= 65.4 ms

absence of fault), we find a total additional time of 5.2 ms.If we add this additional time to the time needed by thereader to identify 10 tags in a fault free environment (whichis 14 ms), we find 19.2 ms which is the same value givenby simulation in Table 6. The same verification with PER of50% and 90% is also possible. As the fault injector as beenvalidated, in the following, we will conduct simulations onlarge population of tags.

4.3.2 Fault Injection on a Large Population of Tags

This section presents the fault injection simulation resultsconducted to evaluate the robustness of the New Q-Algousing our new time model in order to measure the impact ofthe fault injection on the inventory time in the UHF RFIDsystem on large population of tags. In Fig. 4, we comparethe results given by the New RFID module for fault freeenvironments and with different PER (10%, 50% and 90%).We perform our simulations on large populations of tagsfrom 100 tags to 700 tags.

In Fig. 4, we show a comparison of the marginalidentification cost (Identification time per tag) between thefour scenarios that we have chosen. We can see that thecurves are constant and do not depend on the populationof tags. However, the MICs are increasing with the PER.As we can see, the more faults are injected, the more time

is spent in the inventory. As shown in Fig. 4, the timeneeded by the New Q-Algo in order to identify all thepopulations of tags presents an average of MIC equal to∼= 2.65 ms. With a PER equal to 10%, we obtain an increaseof around ∼= 0.4 ms. With a PER equal to 50%, we obtainan increase of around ∼= 1.32 ms (measured difference withthe fault free curve). However, with a PER equal to 90%,the reader needs around ∼= 7.5 ms of additional time. Thisincrease is not proportional to the PER increase. This nonlinear increase, is basically linked to the number of errorsin the EPC identifier messages. In fact, the additional EPCidentifier messages required to perform the inventory maybe impacted by additional errors. The multiple occurrencesof errors on successive EPC identifier messages involve thisnon linear increase.

In conclusion, the fault injection shows a large and nonlinear impact on the time inventory. Thus it is mandatoryto propose solutions to reduce this impact by implementingerror detection mechanisms combine with replay of lostmessages.

In this section, we have used the New NS2 EPC C1 Gen2RFID module with a new time model and new version ofQ-Algorithm. We also presented a robustness evaluation forthis New EPC C1 Gen2 RFID Module implementing theNew Q-Algo. This can be used to evaluate the robustness ofRFID protocols and why not authentication ones.

Fig. 4 Marginal IdentificationCost with injection faultcampaigns on the New Q-Algousing different PER

Page 13: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

J Electron Test (2019) 35:45–58 57

5 Conclusion

In this paper, first, an improvement of the NS2 RFIDmodule was proposed for the EPC Global C1 Gen2RFID anti-collision algorithm. We have improved the anti-collision algorithm implementation. To validate it, wecompared it to the previous algorithm implementations.From our simulations, we found that with this new versionof the Q-Algorithm, we can reduce the number of generatedslots, consequently reduce the time identification for alarge population of tags and then reduce the marginalidentification cost per tag. Finally, we present a robustnessevaluation of this new NS2 RFID module by injectingfaults during the inventory process. Injection fault hasdramatically impacted the time inventory. Thus a detectionmechanism combined with a correction mechanism shouldbe implemented in the anti-collision algorithm in orderto improve the fault tolerance. These mechanisms will beimplemented in the future. We are currently performingsimulations and results will be published soon.

Our goal is to provide the research community with bettermodels to study the performance of UHF RFID systemswhere read distances, identification times and the largenumber of tags are critical and have a direct impact onthe inventories. We are currently performing a thoroughperformance evaluation of these systems taking into accountboth the security and the robustness using our simulationmodule.

References

1. Bagnato G, Maselli G, Petrioli C, Vicari C (2009) Performanceanalysis of anti-collision protocols for rfid systems. In: Vehiculartechnology conference, 2009. VTC Spring 2009. IEEE 69th.IEEE, pp 1–5

2. BENFraj R, Beroulle V, Fourty N, Meddeb A (2017) A globalapproach for the improvement of uhf rfid safety and security. In:2017 12th international conference on design & technology ofintegrated systems in nanoscale Era (DTIS). IEEE, pp 1–2

3. Benfraj R, Beroulle V, Fourty N, Meddeb A (2018) Timemodeling with ns2 in uhf rfid anti-collision protocols. In:Presented in the 32nd IEEE international conference on advancedinformation networking and applications (AINA-2018)

4. Chen WT, Kao WB (2011) A novel q-algorithm for epcglobalclass-1 generation-2 anti-collision protocol. World Acad Sci EngTechnol 78:801–804

5. Cheng T, Jin L (2007) Analysis and simulation of rfid anti-collision algorithms. In: The 9th international conference onadvanced communication technology, vol 1. IEEE, pp 697–701

6. Downard IT (2004) Simulating sensor networks in ns-2. Tech.rep., DTIC Document

7. Durrheim K, Tredoux C (2004) Numbers, hypotheses &conclusions: a course in statistics for the social sciences. Juta andCompany Ltd

8. Finkenzeller K, Handbook R (2010) Fundamentals and applica-tions in contactless smart cards, radio frequency identification andnear-field communication. Hoboken

9. Floerkemeier C, Sarma S (2009) Rfidsim—a physical and logicallayer simulation engine for passive rfid. IEEE Trans Autom SciEng 6(1):33–43

10. Fritz G (2012) Simulation de fautes pour l’evaluation du test enligne de systemes rfid. Ph.D. thesis, Grenoble

11. Global E (2015) Uhf air interface protocol standard genera-tion2/version2

12. Han S, Shin KG, Rosenberg HA (1995) Doctor: An integratedsoftware fault injection environment for distributed real-timesystems. In: Proceedings of international conference on computerperformance and dependability symposium, 1995. IEEE, pp 204–213

13. Hsueh MC, Tsai TK, Iyer RK (1997) Fault injection techniquesand tools. Computer 30(4):75–82

14. Koren I, Krishna CM (2010) Fault-tolerant systems. Elsevier15. Lee D, Kim K, Lee W (2007) Q+-algorithm: an enhanced rfid

tag collision arbitration algorithm. In: International conference onubiquitous intelligence and computing. Springer, pp 23–32

16. Liu L, Lai S (2006) Aloha-based anti-collision algorithmsused in rfid system. In: International conference on wirelesscommunications, networking and mobile computing, 2006.WiCOM 2006. IEEE, pp 1–4

17. Mota RPB, Batista DM (2013) An ns-2 module for simulatingpassive rfid systems. In: 2013 IEEE 10th international conferenceon high performance computing and communications & 2013IEEE international conference on embedded and ubiquitouscomputing (HPCC EUC). IEEE, pp 2263–2270

18. Namboodiri V, DeSilvaM, Deegala K, Ramamoorthy S (2012) Anextensive study of slotted aloha-based rfid anti-collision protocols.Comput Commun 35(16):1955–1966

19. Niu C, Zhang H, Lin T (2016) An enhanced q algorithm based onepc-c1g2 rfid protocol

20. Woellik H (2009) A simulation tool for rfid anti-collisionalgorithms based on aloha. In: 16th international conference onsystems, signals and image processing, 2009. IWSSIP 2009.IEEE, pp 1–4

Rahma Benfraj received her engineer’s degree in Applied Computingfrom the National School of engineering of Sousse, Tunisia in 2012.Currently she is a Ph.D. student at university of Tunis El Manar(Tunisia) in collaboration with Grenoble INP LCIS (France). Herresearch interest focuses on validating secure and robust UHF RFIDsystems considering the whole system in the presence of faults in realenvironment. Her work deals with fault modeling and fault injectionand she is also working on evaluating dedicated countermeasuresfor robustness enhancement and studying the impact of robustnessmechanism against security, which is required to validate robustnesssolution implementations.

Vincent Beroulle received the master’s degree from the NationalPolytechnical Institute of Grenoble (INPG) in 1996, as Normal‘Sup Cachan student he obtained the “aggregation” in 1998, anda second master’s degree and a Ph.D. degree in Microelectronicsfrom the University of Montpellier 2, respectively in 1999 and 2002.He is currently Associate Professor at the Grenoble Institute ofTechnology and he is member of the LCIS laboratory. His maininterests concern test and verification of complex analog and digitalintegrated systems. In particular, his work deals with fault modelingand fault injection, heterogeneous systems modeling with HardwareDescription Languages (VHDLAMS or SystemC), and embeddedsystems dependability and security enhancement with a specific focuson RFID technology.

Page 14: An Optimized NS2 Module for UHF Passive RFID Systemsvagrawal/JETTA/FULL_ISSUE... · propose an optimization of this NS2 RFID module by implementing and validating a more realistic

58 J Electron Test (2019) 35:45–58

Nicolas Fourty received his PH.D degree in Mathematics andcomputer science applied to social sciences from Doctoral Schoolof Mathematics, Computer Science and Telecommunications in 2008in Toulouse, in France. He is currently Associate Professor at theGrenoble Institute of Technology and he is member of the LCISlaboratory. His main interests concern on embedded communicationsystems, Quality of Service, energy saving. The targeted applicationsconcern the industrial field and target in particular technical assistanceto people.

Aref Meddeb obtained his Engineer’s degree from the NationalSchool of Engineering of Tunis, Tunisia, in 1992, and both hisM.S. and Ph.D. degrees, in Electrical Engineering and ComputerScience, from Ecole Polytechnique of Montreal, Canada, in 1995 and1998, respectively. He worked with Alcatel (Tunisia/France), INRS(Canada), Teleglobe (Canada), and Nortel (France). From 2002- 2010,he was assistant professor and deputy director at the Higher Instituteof Computer Science and Communication Technology, University ofSousse where he also headed the Telecommunications Departmentfrom 2003- 2005. Since 2012, he joined the faculty staff of the NationalSchool of Engineering, University of Sousse where he is currentlyfull professor and director. His research interests include Internetof Things, Sensor Networks, and Intelligent Transport Systems. Hemainly focuses on Security, Quality of Service, and Optimization.