41 a localization and an identification system of personnel in areas

Upload: ik-neena

Post on 03-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 41 a Localization and an Identification System of Personnel in Areas

    1/5

    A localzaton and an dentcaton sstem ofpersonnel n areas at rsk usng a wreless sensor

    netwo

    R MAMMD L AMElectronics dept

    University of Science and Tecnology ran (US TMB)ran, Algeria

    E-mail: [email protected]

    - In this paper, we present the design of a new

    embedded real time system that performs two main tasks, thelocalization based on the received signal strength indicator(RSSI) and the radio frequency identication (RFID). This

    proposed hardware platform is implemented using a RFIDmodule an XBee, and an Arduino running a multitaskingapplication, which respects the different time constraints

    required by the environment. In our case, the management was

    performed by an embedded real-time operating system, theFreeRTOS, running on the AT mega microcontroller. Thisapplication allows both locating personnel in areas at risk using

    wireless instruments installed in the site, and the verication of

    the required area security measures. This work is done accordingto the internationally recognized benchmark for managementsystems of health and safety OHSAS 18001, using RFID

    technology. A worker suit, equipped with appropriatelydistributed sensors to accomplish the required tasks of

    identication and localization is given here. The results obtainedaer testing the system are very encouraging, since the system

    based on a wireless sensor network is operating properly. The

    localization is done with an acceptable accuracy and theidentication is achieved successfully.

    K- ; ; ;z; F; FO; X

    I. NTRODUCTON

    Many companies are implementing a management systemfor health and safet in the context of ther risk management

    strategy, to respond to development in legislation in order toprotect their employees The objective of this system is tominimize the rate of workplace accidents by studying thepunctual risks. However, in most cases, there are alwaysaccidents caused by workers neglecting safet measures in thesite. Furhermore, in the manufacturing indus such asreneries, the toxic risk and even an explosion may occur.Therefore, it is necessar to know the location of eachindividual in the site, in order to protect workers' health andsafety.

    IN 978-1-4673-5613-82013 IEEE

    ULM MAMDElectronics dept

    University of Science and Tecnology ran (USTMB)ran, Algeria

    E-mail: [email protected]

    The use of an embedded system, to tackle the problem of

    localization and identication is a ver attractive objective, asembedded systems are mode computing systems coverng

    various ranges of applications. However, the need to reducethe development time of embedded systems, and the highdegree of embedded soware complexit have led to the use ofa real-time operating system, which requires that each elementof the system must be real-time, that is taking into account

    time constraints. Such an operating system is called a realtime operating system [1]. The problems involved with taskscheduling, task syncronization, inter-task communications,resource management, and interrupt handlers should be solvedin order to make the whole system nctioning properly. TheFreeRTS [2] [3] [4] was used for this purpose in our

    implementation.The next parts of this paper describe the eleconic circuit

    developed, the real-time keel and the programming of thetasks in the enviroment of the embedded system used, as wellas the analysis of the proposed system.

    II. ESCRPTON OF THE PRORPOSED PPLCATON

    We developed an application that locates the personel inrisk aeas using wireless insuments installed n the site. Itensures also the necessar zone safet measures. We started

    this application by adequately putting the wireless sensor of thetarget in the worker safet helmet. Whereas, the special workersuit used as protective clothes, was equipped with multipleFID antenas to identi the necessar safet equipmentswhich were supplied with FID tags. As a consequence, theposition infoation and the data delivered by the safetequipment, wo by the person within the site, are all sent to

    the conol room using a wireless communication.Fig. shows the various safet equipments involved with the

    proposed application. A detailed description is given in whatfollows.

    127

  • 8/12/2019 41 a Localization and an Identification System of Personnel in Areas

    2/5

    Rag

    "ieless semor+

    R eade

    antenna

    Fig. 1. Dirent equipments of the proposed application.

    A. Safe helmet

    The safet helmet has the sensor of the target within anembedded system made of several components as it is shown in

    Fig.2.

    Arduino Uno [5]: This is an embedded system based onATmega328 microcontroller. It is compatible with theFreeRTS real time keel.

    XBee module: This is a wireless component developed byDigi (formerly MaxStream). It implements differentcommunication protocols, including IEEE 802. 15.4. There aevarious tpes of XBee modules. XBee with inteal antea,XBee2 (MMCX) with conector UFL using exteal anteaXBee3 with integrated wire antena and XBee4 with printedantena. XBee 1 and XBee4 ae used for applications that havesize consaints. Whereas, XBee2 is used when the module is

    enclosed in a metallic box in order to avoid the Faraday cageeffect. The XBee3 has less directivit than the XBee and it isalso recommended in the case of size design consaints withinthe application [6]. In o case, aer a preliminar study, weselected XBee2 the appropriate module/antena combinationfor o application.

    FID Module UM005 [12]: This module allows contactlessreading of transponders FID tpe Unique It has a LEDouut, a buzzer ouut and a serial RS232 ouut.

    Inertial sensors: The used sensors ae the accelerometer 3axes and the gyroscope 2 axes, to measure the mobilit of thetarget, as it is shown in Fig. 2.

    Fig. 2. The embedded circuit.

    IN 978-1-4673-5613-82013 IEEE

    The need for these sensors is justied by the fact that thelocalization tecnique based on the RSSI is inaccurate, in thecase where the target is moving. Therefore, we deteined thetagets position when the mobilit is less than a certaintreshold.

    B afet worker suitThe worker suit protects the body of the person in the site,

    thereby allowing someone to check the securit measuresnecessar for areas at risk usng FID antenas, as it is shownin Fig.

    Securi Accessories

    All safet accessories, such as safety shoes and gloves, areequipped with FID tags so that we can identi them.

    The microconller within the helmet must processseveral tasks at the same time. These are the measurement ofthe inerial data and the mobilit, the reading of different FIDtags, the RSSI measurement of neighbo nodes, and the

    transmission of all information of interest to the main station.To guarantee an adequate operating mode and to allow theappropriate management of these tasks, we used theFreeRTS, an embedded real-time keel that has severalservices such as binar semaphores for mutual exclusionbetween sharable and non-shareable resoces, and the queungmechanism for the puose of syncronization among thetasks.

    III. DS ND FRTS

    Developed by Richard Bar [2], the FreeRTS is a realtime operating system, open source, eely disibuted under theGPL. ne can nd in its website, different versions that can

    run on different embedded devices such as Altera, Atmel, andMicrochip [7] [8]. This is an executive keel, small in size andit presents good performance. t is particularly suitable forembedded systems. Under FreeRTS, tasks are represented bynctions that run indenitely or they are self deleting. Eachtask is assigned a priorit. The level 0 is the lowest. The keelhandles a task using the task control block (TCB). The TCBexists for each task in the keel and it contains all the

    necessar infoation to completely describe the state of atask. The scheduling algoritm of the FreeRTS is dynamicand it is a priorit based. The communication aong tasks isperformed by either binar semaphores or message queues [2][8][11]. DuinS is also a real-time multitasking and pre

    emptive operating system. t is specically designed for theArduino platforms using the Atmel microcontroller It is basedon the FreeRTS solid core. Therefore, the declaration of tasksand the system calling are the same.

    . RACTCAL APPLCATON OF FRTS

    A. Management of tasks and resources by FreeRTOS

    To ll the proposed application needs, we created six taskswith different priority levels using the FreeRTS, as it is

    128

  • 8/12/2019 41 a Localization and an Identification System of Personnel in Areas

    3/5

    shown in Fig.3. We have fo soware periodic tasks; task 1,2, 3 and 4 and two hardware tasks; task 5 and task6.

    Measurement Gyroscopeofacceleraion PrioritYii

    MobilityriOritY2

    CommunicationPrioritY3

    Fig. 3. The FreeRTOS management of the developed tasks.

    Task is a soware task with a priorit level equals to two.It sends a broadcast message to neighboing nodes andmeasures the strength of signals received (the RSSI). It issyncronized with the task of comunication using the RSSIqueue and the task 3 of mobilit using the broadcast messagequeue as it is shown in Fig.

    Qurct m

    QRS

    Fig. 4. Task queue synchronization.

    Task 2 and 3 are periodic tasks with a \ 00 mS time period.

    They have a low priorit level which is equal to one. Thesetasks can measure the inerial data. That is, the linearacceleration x, y, z and the angular acceleration x, y. They usethe analogue to digital converter considered as a non-shareableresource. In order to solve the problem of mutual exclusion, weused a binar semaphore, as it is shown in Fig.5.

    maphrA v

    Fig. 5. Resource management using the binary semaphore.

    Task 4 is a periodic soware task with a Second timeperiod and a priorit level equals to two. It allows themeasurement of the target mobilit using the inertial sensors.The role of this task is to syncronize the task 1 to stat theneighbohood discover, in the case where the target is stable,checking whether the mobility is less than or equals to aspecic treshold.

    Task 5 is a hardware task with the highest priorit leveltree. It handles the neighbourhood detection by receivng

    IN 978-1-4673-5613-82013 IEEE

    signal frames trough RS232 interface, using the XBeemodule, and it rebuilds a neighbourhood table containing theinformation conceing neighbouring nodes such as the nodeID number and the RSSI within the wireless sensor network.

    Task 6 is a periodic task with a 5 Second time period andwith a priorit level equals to two. It allows the identicationof different safet equipments wo by the target, using theID reader conected to the antenas within the worker suit.It ansmits the gathered infoation, the neighbourhood tableand the type of safet equipments, to the main station via radiowaves using the XBee module.

    B Implementation of the application with the FreeRTOS

    The development of the main program and the coordinationamong tasks, based on the FreeRTS, requred several stepsnamely, the conguration of microconllers, the creation ofboth semaphores and queues, and the scheduling. These stepsare illustrated in Fig.6 and they are described by giving thenecessar FreeRTS code in the followin araraph [4].

    C

    Fig. 6. Organization chart of the implemented tasks.

    Launch of scheduling: We use the system callvtaskstartscheduler to start the task scheduling and to createthe idle task.

    Creation of Semaphores: The semaphores initialized to 1(S=\) are binar semaphores. The 0 indicates that thesemaphore is considered unavailable or empt. When it isequal to \, the semaphore is considered available or ll.During its creation, one can assign to it, a value of 1 or . Thebinar semaphores are used for syncronization and for mutualexclusion. When using a semaphore protection, it is important

    to avoid destroying tasks in the critical section, otherwise weget a blocking situation. Indeed, if the task is destroyed in thecritical section, it can never retu S back to and the criticalsection will be permanently blocked. Thus, the tasks should notbe easily desoyed or blocked. The following code is used tocreate the bina semaphore initialized to .

    xSemaphoreHandle xSemaphore_Ana=NULL;

    / / Ci f h h:

    129

  • 8/12/2019 41 a Localization and an Identification System of Personnel in Areas

    4/5

    vSemaphoreCreateBinary(xSemaphore_Ana);

    Creation of message queues: The handles of queues arecreated for the different tasks using the following code.

    xQueueHandle xQueue_RSSI;

    xQueueHandle xQueue_BROADCAST;

    To create the needed queues we used , the following two lines

    of code.

    xQueue_RSSI = xQueueCreate( 2, sizeof( struct Message * ) );xQueue_BROADCAST = xQueueCreate( 2, sizeof( structMessage * ) );

    Creation of the tasks: The tasks handles, xTaskHandle, andthe tasks are created using respectively the following twostatements.

    xTasHandle Hand Tak I Hand Tak0, Hand_Tak03,Hand_Tak04, Han_Tak05, Han_Tak0;xTaskCreate(function , name, pile, parameter,priority,xTasHandle)

    The overall sarized source code of the proposedapplication is given below.

    xTaskCreate(vTask_Task, "T" ,congMINIMAL_STACK_SIZE, (void *) NULL , 2 ,&xHandle_Task);

    xTaskCreate(vTask_Task02, "T2" ,congMINIMAL_STACK_SIZE, (void *) NULL, 1 ,&xHandle_Task02 );

    xTaskCreate(vTask_Task03, "T3" ,congMINIMAL_STACK_SIZE, (void *) NULL, ,&xHandl_Task03 );

    xTaskCreate(vTask_Task04, "T4" ,

    congMINIMAL_STACK_SIZE, (void *) NULL, 2 ,&xHandle_Task04 );

    xTaskCreate(vTask_Task, "T" ,congMINIMAL_STACK_SIZE, (void *) NULL, 3 ,&xHandle_Task );

    xTaskCreate(vTask_Task06, "T6" ,congMINIMAL_STACK_SIZE, (void *) NULL , 2 ,&xHandle_Task06 );

    V. OMPUTATON OF THE POSTON OF THE TRGET

    The target information is received in the main station using thesik node conected to a PC via USB port, as it is shown inFig.7.We used four wireless sensor nodes, as reference nodes and the

    h as the taget node. The RSSI of neighboing nodes wasconverted into a distance, and the position of the target wascomputed using the Cramer's Rule. Given the position of theneighboing nodes, in the case where the target is in aclassied zone, one checks whether these nodes ca thenecessar safet classied zone equipment. The failure tocomply with securit measures will be automatically posted tothe conol room.

    IN 978-1-4673-5613-82013 IEEE

    XBe2

    XBe2

    XSe2

    (-

    )' xsp2

    XBe2

    Gwy Xe2

    Gl p pl

    Fig.? Bloc diagram of te proposed WSN.

    Convering the measured RSSI to a distance: The mostcommon method to convert the RSSI to a distance is to use themathematical equation given n ( 1).

    RSSI=-10 logO d+A 1

    Where n is the signal propagation constant, d is the distanceom the sender, ad A is the received signal sength at a 1meter distance.

    Cramers Rule approach [9] [10] has been widely applied inseveral localization applications. It is based on the concept oflinear equation systems, where the number of equations isequal to the number of variables, and the ansformation of

    these linear equations into the matrix fo. Fig. shows thestructe and components used by Cramers rule based on treereference nodes to determine the taget position, which isconsidered as the intersection of the tee circles.

    Fig. 8. Te Cramer's rule [9].

    In Fig. 8, we used (x; , yD .as the coordinates ofthe referencenode i, (xu Yu as the coordates of the arget obect, and R; asthe distance between the reference node I and the target.From the crcle equation given in equation (2), and doing allmathematical transformations as in [9], we get equations (3),(4) and (5) om which we can obtain the coordinate denngthe position of the target node as it is indicated in equation (6).

    (x;xJ2+(y;yR;2 i 1,,3 2

    130

  • 8/12/2019 41 a Localization and an Identification System of Personnel in Areas

    5/5

    VI.

    det IX =

    -1 detA)

    (Rj2 - R ) (Xj2 - X ) -(y -y )( R ) (x; - xi ) Y yi )

    detA2)and Yu )det A(6)

    HE PERFORMNCE OF THE MBEDDED SYSTEM

    (5)

    In order to study the performance of o embedded system andits operation in real time, we measured the execution time of

    each task by using the nction micros O. The obtained resultsare indicated in Table 1.From Table 1, we can state that the overall execution tmerespects the time constraints of the application. The memorsize required to run the proposed application, was around 56%of the available microconoller memor size. That is,18Kbytes versus 32Kbytes provided by the ATmega328. Thisallowed us to use the FreeRTS keel, which occupies9Kbytes. Furthermore, the proposed system performed thetarget localisation with a position error less or equals to 1.7meter. This result is considered acceptable, if we take intoaccount the resicted number of reference nodes used withinthe proposed wireless sensor network.

    TBLE I. THE EXECUTON TME OF THE PPLCATON TASKS

    Tak Exeutn Te n SecondsTask I 2 980 836Task 2 340Task 3 224Task 4 10Task 5 4696 aTask 6 1396 b

    a. (844 x b f ghbg d) + (300 x b f g) + 120

    b. 340 x b f g g f g d f ghbg d

    VII. ONCLUSON ND PERSPECTVESIn this paper we have presented the design of an embeddedsystem based on a wireless sensor network implemented onArduino platform, XBee modules and the FreeRTS.

    During this work, we were faced with the real-time operatngmode and the multitasking problems. Thus, we proposed thenecessa mechanisms that solved these problems. The overallperformance of the designed application was acceptable. Thelocalisation and the identication achieved tasks, allowed us tostate that the proposed system is able to protect a person in itsworkspace with a limited accuracy.

    IN 978-1-4673-5613-82013 IEEE

    The overall obtained results ae ver encoaging, the reasonwhy we are continuing this work. Indeed, we noticed that weneed to improve the proposed localization tecnique. In orderto achieve this objective we are working on the sion of theinerial data, the acceleration and the velocit, together with theposition of the target using the Kalman lter. We believe thatby estimating the next target position this will help us toprecisely locate the target.

    EFERENCES

    [I] P. Lindgren, J. Nordlander, and J. Eriksson. "Robust Real-TimeApplications in Timber, n Sixth EEE nternational Conference onElectro, nrmation Tech, pp.191-196,May 2006.

    [2] R. Barry, "Manual FreeRTOS," http://www.freertos.org/ ,2011.

    [3] D. Deharbe, S. Galvao, A. M. Moreira. Formalizing FreeRTOS: FirstSteps, n SBMF '09. LNCS 5902, pp. 101117. Springer, 2009.

    [4] R.Goyette, n nalys is and Description of the nner Workings of theFreeRTOS Kernel, Carleton University, 2007.

    [5] rduino,http://arduino.cc/e/Main/rduinoBoardUno

    [6] S.Hass, Safdar H. Bouk, ad Mehmood, Nadeem Javaid, andSasase wao, "Effect of Fast Moving Object on RSS in WSN: nExperimental Approach, http://arxiv.org/abs/1202.4137v, 19 Feb2012.

    [7] DuinOS,hp://code.google.comp/duinos/

    [8] J.T. Mhlberg, and L.Freitas,Veriing FreeRTOS: om requirementsto binary code, Proc. A VoCS 20 II ,pp.I-2,20 II.

    [9] K.Maneerat, .Prommak,On the nalysis of Localization Accuracy ofWireless ndoor Positioning Systems using Cramer's Rule, WorldAcademy of Science, Engineering and Technology, article 60, pp202-206,2011.

    [10] B. Cooperstein, "Elementary Linear Algebra, University of California,Santa Cruz, pp. 312-323,January 2006.

    [II] K. Aizi, Tlmesure des donnes mto base de capteurs sans ",Masters thesis 2011,department of electronic USTOMB,2011.

    [12] RFD UM005,http://www.netronix.pl/

    131