Fig. 1. Diagram of ZigBee stack.Fig. 2. Application proﬁles.undertaken.II. RESEARCH METHODOLOGYA. ZigBee NetworkZigBee uses IEEE 802.15.4 standard as its PHY and MAClayer standard which deﬁnes a 250k bps direct sequencespread spectrum (DSSS) radio operating in the 2.4 GHzunlicensed band, with lower bit-rate alternatives in the 868MHz and 900 MHz bands . Above the MAC layer,ZigBee deﬁned network layer (NMK) and application layer(APL) -. The diagram of the stack is showed in Fig.1., .RSSI is the basic function we use to form ﬁngerprintingand measure data. As the multi-path affection in upstreamand downstream is usually different, the RSSs received byBeacon and MS are different. Although we have deﬁnedtwo Clusters in Location endpoint: the RemoteLocation andLocalLocation. But in this paper, only the LocalLocationcluster is used. Fig.2 presents the attributes and clustersdeﬁned in the application proﬁles.B. System MethodologyIn our system, some Beacons are ﬁxed in several pointsevenly to make sure that mobile station (MS) can receiven (3 to 5 as usual) points’ radio signal at each location.The MS records and processes the RSS vector and thensearches the ﬁngerprinting database to ﬁnd some ﬁnger-printing which makes the algorithm criterion maximum.Each ﬁngerprinting is formed by a phase of training in aFig. 3. System methodology (n=3).location. Error distance is used to evaluate the result. Systemmethodology is showed in Fig.3. Oxy = (o1xy, o2xy, ..., onxy)Tis the observed RSS vector from beacons at location Lxy,and Fij = (f1ij, f2ij, ..., fnij)Tis average RSS of locationFingerprinting database is constructed by a process of ofﬂinetraining. Denote a series ofﬂine training measurement ofbeacon k at location Lij is L = [lk0ij , ..., lkM−1ij ] which enablescomputing the histogram hkij of signal strengths for eachbeacon indexed k:hkij(ζ) =1MM−1m=0δ(lkmij − ζ), −255 ≤ ζ ≤ 0 (1)where ζ represents the Kronecker delta function .The estimation algorithms will map the online observeddata Oxy to some physical Lxy by using probabilisticmethod; detail is described in II.C. We deﬁne two errordistances to evaluate the accuracy from signal and physicalspace respectively. The signal space’s Euclidian distancebetween Oxy and Lxy is :Dist(Oxy, Fij) =nk=1(okxy − fkij)2 (2)And the physical space’s Euclidian distance is:Dist(Lxy, Lij) = (x − i)2 + (y − j)2 (3)C. Location Estimation AlgorithmRadio waves can be modeled accurately in free space. But in practical environment, the radio channel is ofnoisy characteristics by reﬂection, absorption, diffraction,scatteration and even the ﬂuctuation of temperature. So thesignal transmitted from beacon usually reaches the mobile
station by more than one path, resulting in a phenomenonknown as mutli-path fading   . The observationOxy deviates signiﬁcantly from Fij Fortunately, throughobservation the signal strength’s temporal distribution pre-sented in III.C, we conclude that the distribution has obviousstatistical character. So we applied a probabilistic approachusing Bayesian inference.Suppose there are 4 beacons deployed in system. Theestimation algorithm’s target is to ﬁnd a location Lij hatmakes the probability P(Lij|Oxy) maximized.Mathematically, the probability P(Lij|Oxy) can be repre-sented as:P(Lij|Oxy) =P(Oxy|Lij)P(Lij)P(Oxy)=P(Oxy|Lij)P(Lij)Jj=1Ii=1 P(Oxy|Lij)P(Lij)(4)where conditional probability P(Oxy|Lij) is the likelihoodof Oxy occurring in the training phase of Lij. And P(Lij) isthe prior probability of location Lij being the correct position and is usually uniformly distributed if the positionrelative to the map is entirely unknown.The CSMA/CA mechanism ensures the signal from differ-ent beacons independent from each other, so the joint prob-ability distribution then becomes the problem of estimatingthe marginal probability distributions as:P(Oxy|Lij) =nk=1P(okxy|Lij) (5)whereP(okxy|Lij) = hkij(ζ) (6)is the location ﬁngerprint can be obtained in the ofﬂinetraining phase . We can conclude two points aboutwhether the methodology works:1) Feasibility: hkij(ζ) itself being stable enough andnk=1 hkij(ζ)being sensitive to different (i, j) are necessaryconditions.2) Practicability : Each histogram hkij(ζ)’s distributionis narrow. In another word, the standard deviation should besmall. Only several ζ are high-frequent, so the small searchspace of the algorithm insures the practicability.III. IMPLEMENT AND RESULTSA. ZigBee ModuleWe implement a ZigBee module adopted TI’s single-chip2.4 GHz IEEE 802.14.5 compliant RF transceiver CC2420and MicroChip’s enhanced Flash and nanoWatt technologymicrocontroller PIC18LF4620. A LCD module was addedto coordinator node for displaying some useful networkinformation such as network ﬁnding, orphan notiﬁcation,association and disassociation. And an EIA RS-232 interfaceis also supported to receive command from or send networkinformation to an attached laptop. The module is presentedin Fig.4 and the system components are presented in Fig.5.For location estimation application, the wireless modulesare ﬁxed on ceiling usually. To obtain even covering inFig. 4. Wireless module.Fig. 5. System components.estimation area, we apply the 2.4 GHz 50 ohm inverted-F antenna which gets 1.1 dB gain and omni-directionalradiation pattern in PCB plane . The module can evenlycover about 30 meters in clear space and 18 meters in indoorspace as be programmed to 0 dBm output power with thetypical -95 dBm receive sensitivity.B. Layout of ExperimentationThe experiments were carried out in an ofﬁce room dimen-sions of 7.2m×9m×2.6m. The layout was depicted in Fig.6. All the beacons are ﬁxed on the ceiling and powered bybatteries. They are separated near the four corners that enablethem provide even four-overlap coverage in all portions ofthe ofﬁce. The calibration points where the mobile stations’signal strength was collected are denoted by the gray square.And the arrow’s direction indicates the operator’s orientationas the attenuation by operator’s body can effect the signalstrength signiﬁcantly   . For carrying out experiment,we only deﬁned 34 calibration points, and in each point wecollect the signal strength only in one direction. The laptopconnected with a wireless module by serial cable was puton a small desk with 0.7 meter height which can be movedstably.C. Signal Statistical CharacterMulti-path fading and people’s activities lead the RSSIluctuating, such as Fig. 7 shows. We took numerous mea-surements at various locations under different scenes to seewhether the feasibility and practicability can be obtained
Fig. 6. Layout of the experimentation environment.0 100 200 300 400 500 600−90−88−86−84−82−80−78−76−74−72Time in secondReceivedsignalstrengthindBmTime series of RSS from beaconFig. 7. Typical signal strength received by MS.−84−83−82−81−80−79−78−77−76−75−74−73−72−71−700501001502002503003502 Minutes of Measurement @ 5Hz Sample RateRSSI in dBmNumberofSamplesAverage = −74.7267Standard deviation = 1.7166Fig. 8. Short-term measurement from L1.−95 −90 −85 −80 −75 −700501001502 Minutes of Measurement @ 5Hz Sample RateRSSI in dBmNumberofSamplesAverage = −81.08Standard deviation = 2.2178Fig. 9. Short-term measurement from L2.from statistical viewpoint. Experimentation was designedas collecting RSSI of beacon3 at location L1 and L2 re-spectively. The two locations are separated by 1.2 meters,and nobody resident below L1 but frequent activities occuraround L2 . The short-term measurement lasts 2 minutes at 5Hz sample rate and the long-term collection lasts 50 minutesat 0.2 Hz. Fig. 8 and Fig.9 presents the short-term high-rate measurement results. We have concluded below fromthe histograms:• L1 has higher mean value than L2. The instinctivereason may be L1 being closer to beacon and signalstrength is sensitive to the distance between locationand beacon.• Both of the locations get very small standard deviationin short time. L2 has larger deviation mainly for peoplewalking in aisle frequently.The long-term probabilistic distributions are depicted inFig. 10 and Fig. 11. The two distributions show thesecharacteristics obviously:• The two distributions have some similarities of meanvalue and standard deviation, as the signal has propertyof long-term stability.• The shape of the long-term distribution is smoother thanthat of the short-term distribution; this is consistent tothe result of .• Left-skewed distributions are prominent with both short-term and long-term measurement that could be approx-imated by a lognormal distribution; this is consistent tothe result of .It is concluded that the statistical characters of signalfrom one beacon ensure the feasibility and practicability.However, the system’s performance depends on the sepa-ration of location ﬁngerprints. To investigate how the patternof ﬁngerprinting at different locations effects the locationseparation, we carry out the experimentation at location L1and L2 by measuring signal strength from beacon 2 andbeacon3 at the same time. 100 groups of data are sampledin 20 seconds. Fig. 12 plots the frequency of occurrenceof each sample pattern. The plot shows most of data issurrounding the centers. L1 has more sharper peak for theits peaceful surroundings. It suggests that only two beacons
−84−83−82−81−80−79−78−77−76−75−74−73−72−71−7005010015020025030035040050 Minutes of Measurement @ 0.2Hz Sample RateRSSI in dBmNumberofSamplesAverage = −74.4967Standard deviation = 1.0417Fig. 10. Long-term measurement from L1.−95 −90 −85 −80 −75 −7002040608010012014016050 Minutes of Measurement @ 0.2Hz Sample RateRSSI in dBmNumberofSamplesAverage = −82.085Standard deviation = 2.596Fig. 11. Long-term measurement from L2.are sufﬁcient for distinguishing the two locations. The valleybetween them is very clear that the edge can be used by thealgorithm as boundary of classiﬁcation. We believe addingmore beacons can promote the performance greatly. So insystem implementation, we add beacon 1 and beacon 4 asFig. 6 shows.Fig. 13 shows how the mean RSSI (10 samples @ 5 Hz)varies at 30 calibration points. Compared with Fig. 2 in ,we ﬁnd our results ﬂuctuate frequently. It suggests that inofﬁce environment, it is more sophisticated than corridor.When the BS is about 6 meters away from the beacon, themean value ﬂuctuates with ±5 dBm as dashed shows becauseof the number of reﬂect path increases greatly in such points.But in positive points, the RSSI is sensitive to locations insuch environment.−90 −85 −80 −75 −70 −65−100−80−6000.10.20.30.184.108.40.206Beacon2L1Two clusters with frequency of RSSI with two beaconsBeacon3L2FreuecncyFig. 12. Separation of location ﬁngerprints.0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930−95−90−85−80−75−70−65−60−55Calibration numberRSSIindBmMean RSSI in calibration pointsBeacon1Beacon2Beacon3Beacon4Fig. 13. Mean RSSI in calibration points .D. Ofﬂine Training PhaseThe location ﬁngerprinting is collected at each point ofthe 30 calibration points. The probabilistic distributions offour directions are obtained by (1) where we use the samplerate 5 Hz and 10 samples per point.E. Online Estimation PhaseWe pick points around the calibration points randomlyto perform the online estimation phase, which contains twosteps for each location. First, measure and average the RSSIfrom beacons. We take 4 samples per beacon at 5 Hzsample rate to insure this step will be ﬁnished in less than4 seconds. The average RSSI forms the observation tupleOxy = (o1xy, o2xy, o3xy, o4xy)Tand be applied in (4) (5) (6)to triangulate location Lij. Second, search the ﬁngerprintingdatabase which stores the prior probability hkij(ζ) to ﬁnd the(i, j) which makes P(Lij|Oxy) maximized.F. Results and AnalysisOur experiments returned 70% correct locations averagewith the tolerance of 0.5 meters. Most false estimationhappen when someone was standing near the mobile sta-tion or crossing fast under the beacon. Another importantphenomenon confused us is that, although the TI’s designnote indicates omni-directional radiation pattern , thedirection of the module which connected to the laptop impactthe RSSI obviously. We suspect it as the battery or LCD’sinﬂuence because they are the only obstructs that block theradiation of the antenna. However, this will be analyzed infuture.IV. CONCLUSIONS AND FUTURE WORKA new location estimation technique based on ﬁnger-printing in ZigBee network has been introduced. Throughcollecting received signal strength from several beacons toform training dataset and comparing the mobile station’sonline collected signal with using Bayesian inference, thesystem can triangulate the location within 70% accuracy withthe tolerance of 0.5 meters that is quite encouraging.Compared with other indoor location systems based onWLAN -, -, this design has the similar systemmethodology and even the same algorithm -, -. But this work ﬁrst extends the method into ofﬁce
environment by the easy network construction. And ourdesign is not only ﬁt for indoor but also outdoor environmentwith much lower cost. It can provide a set of embeddedlocation-aware applications such as wireless sensor network.Our work can be extended in several directions. Severalpattern classiﬁcation methods can be applied and evaluated,such as k-Nearest Neighbor , Neural Network , andSupport Vector Machine . Direction sensors can be addedto reduce search space of the ﬁngerprinting database such asdigital compass.REFERENCES L. Yang and F.-Y. Wang, “Driving into Intelligent Spaces with Perva-sive Communications”, IEEE Intelligent Systems , vol. 22 , no. 1, pp.12-15, Jan.-Feb. 2007. T. P. Moran and P. Dourish, “Introduction to This Special Issue onContext-Aware Computing”, Human-Computer Interaction , vol. 16,pp. 87-95, 2001. K. Pahlavan, X. Li, and J. P. Makela, “Indoor Geolocation Scienceand Technology”, IEEE Communications Magazine , vol. 40, no. 2,pp. 112-118, Feb. 2002. J. Hightower and G. Borriello, “Location Systems for UbiquitousComputing”, IEEE Computer , vol. 34, no. 8, pp. 57-66, Aug. 2001. P. Bahl and V. N. Padmanabhan, “RADAR: An In-building RF-based user Location and Tracking System”, in Proc. IEEE NineteenthAnnual Joint Conference Computer and Communications Societies(INFOCOM’00.) , Tel Aviv, Israel, pp. 775-784, Mar. 2000. J. Small, A. Smailagic, and P. Siewiorek, Daniel, “Determining UserLocation for Context Aware Computing Through the Use of a WirelessLAN Infrastructure”, ACM Mobile Networks and Applications , vol. 6,2001. Z. Xiang, S. Song, J. Chen, H. Wang, J. Huang, and X. Gao, “Awireless LAN-based Indoor Positioning Technology”, IBM Journal ofResearch and Development , vol. 48, no. 5/6, pp. 617-626, Sept./Nov.2004. M. A. Youssef, A. Agrawala, and S. A. Udaya, “WLAN LocationDetermination via Clustering and Probability Distributions”, in Proc.IEEE International Conference on Pervasive Computing and Commu-nications(PerCom 2003) , Dallas-Fort Worth, TX, pp. 143- 150, Mar.2003. K. Kaemarungsi, “Design of Indoor Positioning Systems Based onLocation Fingerprinting Technique”, Ph.D.Thesis , University ofPittsburgh, 2005. A. Wheeler, “Commercial Applications of Wireless Sensor NetworksUsing ZigBee”, IEEE Communications Magazine , vol. 45, no. 4, pp.70-77, Apr. 2007. IEEE Std. 802.15.4, “Wireless Medium Access Control (MAC) andPhysical Layer (PHY) Speciﬁcations for Low-Rate Wireless PersonalArea Networks (LR-WPANs)”, May 2003. ZigBee Alliance, “ZigBee Speciﬁcation Ver. 1.0”, Dec. 2004. Jennic Inc. (2007, April) “ZigBee Stack User Guide”[Online]. Available:http://www.jennic.com/support/view-ﬁle.php?ﬁleID=0000000044. C. Gentile and L. Klein-Berndt, “Robust Location Using SystemDynamics and Motion Constraints”, in Proc. IEEE International Con-ference on Communications , vol. 3, pp. 1360-1364, Jun. 2004. T. S. Rappaport, Wireless Communicaions: Principles and Practice ,1st ed. Upper Saddle River, NJ: Prentice Hall PTR, 1996. S. Ali and P. Nobles, “A Novel Indoor Location Sensing Mechanismfor IEEE 802.11 b/g Wireless LAN”, in Proc. The Fourth Workshopon Positioning, Navigation and Communication (WPNC ’07) , pp. 9-15, Mar. 2007. T. Roos, P. Myllymaki, H. Tirri, P. Misikangas, and J. Sievanen,“A Probabilistic Approach to WLAN User Location Estimation”,International Journal of Wireless Information Networks , vol. 9, pp.155-164, 2002. A. Kushki, K. N. Plataniotis, A. N. Venetsanopoulos, and C. S.Regazzoni, “Radio Map Fusion for Indoor Positioning in Wirelesslocal Area Networks”, in Proc. The Eighth International Conferenceon Information Fusion , vol. 2, pp. 8, Jul. 2005. A. M. Ladd, K. E. Bekris, G. Marceau, A. Rudys, L. E. Kavraki, andD. S. Wallach, “Robotics-based Location Sensing Using Wireless Eth-ernet”, in Proc. ACM International Conference on Mobile Computingand Networking (MOBICOM’02) , pp. 227-238, 2002. R. Battiti, M. Brunato, and A. Villani. (2002, Oct.) “Statistical Learn-ing Theory for Location Fingerprinting in Wireless LANs”, [Online].Available: http://rtm.science.unitn.it/”battiti/archive/86.pdf. T. King, S. Kopf, T. Haenselmann, C. Lubberger, and W. Effels-berg, “COMPASS: A Probabilistic Indoor Positioning System Basedon 802.11 and Digital Compasses”, in Proc. The First InternationalWorkshop on Wireless Network Testbeds, Experimental Evaluation &Characterization(WiNTECH ’06) , pp. 34-40, Sep. 2006. Texas Instruments Inc. (2007, April) “Design Note DN007 2.4 GHzInverted F Antenna”.