1 Sparsity based Efficient Cross-Correlation Techniques in Sensor Networks Prasant Misra, Senior Member, IEEE, Wen Hu, Senior Member, IEEE, Mingrui Yang, Member, IEEE, Marco Duarte, Senior Member, IEEE, Sanjay Jha, Senior Member, IEEE Abstract—Cross-correlationisapopularsignalprocessingtechniqueusedinnumerouslocationtrackingsystemsforobtainingreliable rangeinformation.However,itsefficientdesignandpracticalimplementationhasnotyetbeenachievedonmoteplatformsthatare typicalinwirelesssensornetworkduetoresourceconstrains.Inthispaper,weproposeSparseS-XCorr:cross-correlationvia structuredsparserepresentation,anewcomputingframeworkforrangingbasedon(cid:96)1-minimization[1]andstructuredsparsity.The keyideaistocompresstherangingsignalsamplesonthemotebyefficientrandomprojectionsandtransferthemtoacentraldevice; 6 1 whereaconvexoptimizationprocessestimatestherangebyexploitingthesparsesignalstructureintheproposedcorrelation 0 dictionary.Throughtheoreticalvalidation,extensiveempiricalstudiesandexperimentsonanend-to-endacousticrangingsystem 2 implementedonresourcelimitedoff-the-shelfsensornodes,weshowthattheproposedframeworkcanachieveuptotwoordersof magnitudebetterperformancecomparedtootherapproachessuchasworkingonDCTdomainanddownsampling.Comparedtothe n standardcross-correlation,itisabletoobtainrangeestimateswithabiasof2-6cmwith30%andapproximately100cmwith5% u compressedmeasurements.Itsstructuredsparsitymodelisabletoimprovetherangingaccuracyby40%underchallengingrecovery J conditions(suchashighcompressionfactorandlowsignal-to-noiseratio)byovercominglimitationsduetodictionarycoherence. 1 1 IndexTerms—Ranging,LocationSensing,Positioning,Cross-Correlation,SparseApproximation,CompressedSensing, (cid:96)1-Minimization,StructuredSparsity ] H (cid:70) O . s c [ 1 INTRODUCTION measuring the travel time1 of the ranging signal. However, 3 Location sensing is a vital enabling technology for numer- the resources required for signal detection are a deciding v ous applications in the field of binaural science, acoustic factorforthecost,sizeandweightofthesensingplatform; 3 and this essentially strikes a trade-off between (localization sourcedetection,targetmotionanalysis,sensornetworking, 7 accuracy, coverage range) and energy efficiency. Low-cost mobilerobotnavigation,mobilecomputing,etc.WhileGPS 4 remains to be the de facto solution for outdoor positioning, and low-power systems estimate the arrival time of the 6 pulsebyutilizingsimpledetectionschemes(suchasempiri- 0 its limitation to service GPS denied environments (such as calthresholdingoftheleadingpulseedge[2]).Nevertheless, . indoor and obstructed outdoor) makes location estimation 1 - still - a fundamental problem. Localization is a two step they turn out to be less reliable due to their limited com- 0 5 process.Thefirststepistomeasuretheseparationdistance putational capability to counter environmental noise and multipath reflections [3]. An established methodology to 1 (orrange)oftheunknownentity(thatneedstobelocalized) : fromatleastthreepositionedentities(orknownlocations). overcome these limitations is to broaden the range of signal v These measurements are subsequently utilized in the sec- frequencies and distribute the energy between the various i X ond step that multilaterates the position estimate using a multiplepaths;andsubsequentlyapplyamatchedfilteratthe r spatially constrained optimization framework. This strong receiverendtocounttheelapsedtimesamplesbyresolving a those multiple propagation paths. Its benefits are two fold dependencyofthereliabilityofpositioningaccuracyonthe distance measurement makes ranging a crucial prerequisite as broadband signals reduce the chance of the entire signal fading at any particular time, while matched filters allow forlocalization. for their processing and form a strong pulse at the line- Challenges. Acoustic and radio ranging technologies have of-sight(LoS)pathbyincreasingtheoverallsignal-to-noise maturedsignificantlyinthelastfewdecades.Itisnowwell ratio(SNR)withoutusingexcesstransmissionpower. understood that highly accurate results can be achieved by Therearenumerousin-airandunderwaterrangingsys- tems [4]–[8] that have widely used these techniques to • P. Misra is with the TCS Innovation Labs, Bangalore, India. E-mail: deliver remarkable (accuracy vs. range) performance, but [email protected] atthe expenseofspecialized computing platforms(suchas • M. Yang is at the Case Western Reserve University, USA. E-mail: DSP processors) that are both power intensive and costly. [email protected] Such stringent needs pose a major challenge to the field of wireless sensor networks (WSN) that aim to achieve • M.DuarteisattheUniversityofMassachusetts,Amherst,USA.E-mail: [email protected] 1.Traveltimeisinterchangeablyreferredtoas:time-of-flight(ToF), • W. Hu and S. Jha are at the University of New South Wales, Sydney, time-of-arrival(ToA),propagationdelay,ortimedelayintherangefind- Australia.E-mail:{wen.hu,sanjay}@cse.unsw.edu.au ingliterature. 2 similar functional capability on constrained devices with ranging system and its evaluation in Section 3. Finally, we high restrictions on data sensing rates, link bandwidth, surveyrelatedworkinSection4,andsummarizethepaper computationalspeed,batterylifeandmemorycapacity(less withconcludingremarksinSection5. than 50kB of code memory and 10kB RAM) [9], [10]. This has been the primal factor that has greatly limited the 2 THE DESIGN OF STRUCTS-XCORR realisationofsophisticatedalgorithms(suchasthematched filter).Thisproblemcanbesimplifiedbydesigningalight- To ground our discussion, in this section, we first present weightsignaldetectionandpost-processingmechanismthat thedetailsoftime-basedrangingusingcross-correlationand notonlyservesthepurposeofsamplecounting,butisalso structuredsparseapproximation.Webuildontheselearning suitable for running on constrained embedded platforms to cast the ranging problem into the new computation typically used in WSNs. Motivated by the need to design framework of StructS-XCorr, and then follow it up with its suchamechanism,weproposeStruct-Sparse-XCorr. empiricalanalysis. Contributions.Struct-Sparse-XCorr(orStructS-XCorr):cross- 2.1 AnOverviewofTime-basedRanging correlation via structured sparse representation is a new computing framework for ranging based on (cid:96)1- Previousstudieshaveshownthemostsuccessfultechniques minimization [1] and structured sparsity. It is based on a forestimatingtheprecisedistancebetweentwodevicesare mechanism to compress and transmit the condensed rang- basedonmeasuringthetraveltimeofthesignalpropagation ing data to a more resourceful offloading device (or base- between them [14]. The reliability of this measurement station), wherein the time delay of the ranging signal can dependsonmanyfactors,ofwhichrobustnessofexamining be efficiently recovered to determine the range. Cross- and estimating the energy of the received signal is one of correlation is the conventional method of obtaining this pa- them. In this regard, matched filter is the state-of-the-art in rameter;but,givenitssparseinformationcontentandstruc- detectiontechnology. ture, we make use of the theoretical results in structured A matched filter is implemented by cross-correlating the sparseapproximationtoachieveasimilarperformance.The receivedsignalx(t)withthetransmittedsignalreplicap(t). underlyinginformationtheorysuggeststhatasignalcanbe Cross-correlation(X-Corr)ofp(t)andx(t)isasequences(τ) recoveredby(cid:96)1-minimization[1],whenitsrepresentationis definedas: (cid:90) t=+∞ sufficientlysparsewithrespecttoanover-completedictionary s(τ)= p(t+τ)x(t) (1) of base elements. The recovery model (or the optimization t=−∞ frameworkthatbearresemblancetoLassoinstatistics[11], wheretheindexofτ ∈Risthetimeshift(orlag)parameter. [12]), instead of penalizing the number of nonzero coeffi- This operation s(τ) results in correlation peaks where the cientsdirectly(e.g.,(cid:96)0-norm)[13],penalizesthe(cid:96)1-normof positionofthepeaksprovidesameasureofthearrivaltime thesparsecoefficientsinthelinearcombination. of the different multipaths. The index of the first tallest We propose a new dictionary that combines the infor- correlation peak is the estimate of the pulse arrival time mation sparsity along the time-delay search dimension, of the LOS path, which is a direct measure of the range. and achieves up to two order of magnitude better sparse Generally,x(t)isacquiredfora(finite)minimumtimet=ta representation and performance compared to standard ap- givenby: proaches such as working on DCT domain and down- (cid:18)d (cid:19) sampling. StructS-XCorr overcomes ranging inaccuracies ta ≥ vc +tp+tr (2) s induced by dictionary coherence by approximately 40% for signals subjected to high compression factor and/or where, dc is the channel length between the transmitter receivedwithlowSNRlevels. and the receiver, vs is the speed of the ranging signal in Weempiricallyvalidateourhypothesisinreal-worldin- the medium, tp is the time-period of the transmitted signal door and outdoor setups. With respect to cross-correlation, p(t), and tr is the approximate reverberation time within we show that StructS-XCorr obtains range estimates with a which the echoes from the transmitted pulse should have relative error of less than 2cm by using 30% compressed fallen below an acceptable level before the next pulse is measurements,andapproximately60cmrelativeerrorwith emitted.Thecorrespondingdiscrete-timesignalofp(t)and 5% measurements only. We also address the problems of x(t)obtainedatasamplingrate(hertz/samplespersecond) slower compression speed and incorrect peak identification of Fs is given as: p[np] = p[tpFs] and x[na] = x[taFs] (important for estimating range) by devising a divide-and- 0≤np,na ≤∞.Therefore,p(t)andx(t)canberepresented conquermethod. asvectorsp∈Rnp andx∈Rna.Thetimedelayisobtained We present the design and implementation of an end- byfinding: to-end acoustic ranging system consisting of Tmote Invent τˆ=argmax|s(τ)|2. (3) τ (receiver) nodes and a custom built audio (transmitter) Road-map. The computing operation of τˆ (Eq. 3) is ex- node. The results show a relative ranging and 2D position pensive, and demands high memory, computation and en- error of less than 4cm over cross-correlation using 30- ergy resources. Considering the constraints of typical WSN 40%compressedmeasurements,butwithsignificantenergy platforms, it is desirable to scale down its complexity by savingsofanorderofmagnitudetwo. a simpler process while still being capable of precisely To support our contributions; we present the design of estimatingτˆ.Thismotivatesthescopeforanewframework. SparseS-Xcorr and its emprirical studies in the next section, Fig. 1(a) shows a received signal trace recorded for a which is then followed by the description of the acoustic durationof0.1ssampledat48kHz,anditscross-correlation 3 andΨsatisfiestheRestrictedIsometryProperty(RIP),then 1.0 Time based Representation 1 Cross−correlation based Representation the (cid:96)0-minimization problem (Eq. (5)) has the same sparse Normalized Magnitude−00..055 Normalized Magnitude0000....2468 L1osSt M2Pnd MP scmoaenluthtbiooedn(ss(cid:96)o.a1lsv)e:tdheˆsi1nf=oplolaolrywgnimonmgini(cid:96)a(cid:107)1ls-(cid:107)ti1mmisenuibbmyjeiczlitantteiooa:nrxpp=rroogΨbrlsaemmmtih(n6ag)t −1.0 0 However, due to noise (white Gaussian) v ∈ Rn present 0 0.02 0.04 0.06 0.08 0.1 0.02 0.03 0.04 0.05 0.06 0.07 Time (second) Time (second) in real data, x may not be exactly expressed as a sparse (a) (b) superpositionofs,andso,Eq.(4)needstobemodifiedto: Fig. 1: Range estimation by cross-correlation. The infor- x=Ψs+v (7) mationcontentissparseasthetimedelayvaluecorresponding to the correlation peak is only useful. It also depicts the same where v is bounded by (cid:107)v(cid:107)2 < (cid:15). The sparse s can still be receivedwaveformintwodifferent(timeandcross-correlation) recoveredaccuratelybysolvingthefollowingstable(cid:96)1-min- representations.Notethatinthefigure:LOSstandsforline-of- imizationproblemviathesecond-orderconeprogramming. sightandMPisexpandedasmultipath. ((cid:96)1s): ˆs1 =argmin(cid:107)s(cid:107)1 subjectto:(cid:107)Ψs−x(cid:107)2 ≤(cid:15) (8) withthereferencecopy(alinearchirpof1-20kHz/0.01s)is It is important to note that RIP is only a sufficient but depicted in Fig. 1(b). Ideally, only a single dominant peak not a necessary condition. Therefore, (cid:96)1-minimization may should be observed at the correct time shift; however, due still be able to recover the sparse s accurately, even if the tosignalandnoiseinterference,peaksofsmallermagnitude sensing matrix Ψ does not satisfy RIP. In fact, the use of may also coexist. Fig. 1(b) exactly reiterates this principle, (cid:96)1-minimization to find sparse solutions has a rich history. where the correlation peak is the only useful information, It was first proposed by Logan [18], and later developed and is representative of the signal’s time delay. Therefore, in [1], [19]–[24]. Here, we use (cid:96)1-minimization to solve the our idea is to exploit the underlying information sparsity cross-correlationproblemviasparserepresentation. in the signal model to design a simpler acquisition scheme Dimensionality reduction by random linear projections. that supports efficient compression, and later recovery. In As shown in [25] by the Johnson-Lindenstrauss Lemma, other words, our problem statement is to: obtain the cross- the (cid:96)2 distance is preserved in the projection domain with correlationresult(unknown)susingsignificantlyfewer(known) high probability by random projections. In other words, observationsofxbasedonthesparsitysturectureoftheproblem. all the useful information is preserved in the projection Inthenextsection,wediscussthetheoryofsparseapproxi- domain.Hence,(cid:96)1-minimizationcanstillbeusedtorecover mationandstructuredsparsitythatcanexploitthisfeature. the sparse s from the projected measurements with an overwhelming probability, even though its dimension is 2.2 SparseApproximationandStructuredSparsity significantly reduced. More precisely, this projection from high to low dimensional space can be obtained by using a Motivation insight. One can accurately and efficiently re- randomsensingmatrixΦ∈Rm×n as: cover the information of a high dimensional signal (as x) from only a small number of compressed measurements, y=Φx=Φ(Ψs) (9) whenthesignal-of-interestissufficientlysparseinacertain transformdomain(e.g.[15]). where m (cid:28) n and y ∈ Rm is the measurement vector. The rationale of (cid:96)1-minimization. Using the sparsifying In practice, if s has k (cid:28) d nonzero coefficients, then the domain, referred to as a dictionary Ψ ∈ Rn×d (with full numberofmeasurementsisusuallychosentobe[26]: rank), any discrete time signal x ∈ Rn can be represented m≥2klog(d/m) (10) asalinearcombinationofcolumnsofΨas: The sparsity level of s can be verified if the reordered d (cid:88) entries of its coefficients decay like the power law; i.e., if x=Ψs= siψi (4) s is arranged in the decreasing order of magnitude, then i=1 the dth largest entry obeys |s|(d) ≤ Const·d−r for r ≥ 1. where s ∈ Rd is a coefficient vector of x in the Ψ domain, Forsparses,the(cid:96)2-normerrorbetweenitssparsestandap- and ψi is a column of Ψ. If s is sparse enough, then the proximated solution also obeys a power law, which means solution to an underdetermined system of the form x = that a more accurate approximation can be obtained with Ψs (where the number of unknowns d is greater than the the sparsest s. However, for efficient recovery, the columns numberofobservationsn)canbesolvedusingthefollowing of ΦΨ should be as independent as possible so that the (cid:96)0-minimization problem, where the (cid:96)0-“norm” counts the information regarding each coefficient of s is contributed numberofnonzeroentriesinavector. byadifferentdirection;andthisisachievableifΦandΨare more incoherent. Ensembles of random matrices sampled ((cid:96)0): ˆs0 =argmin(cid:107)s(cid:107)0 subjectto: x=Ψs (5) independentlyandidentically(i.i.d.)fromGaussianand±1 However, this problem of finding the sparsest solution Bernoullidistributionsarelargelyincoherentwithanyfixed ((cid:96)0-minimization) of an underdetermined system of linear dictionary, and hence, permit computationally tractable re- equations is NP-hard [13]. As an alternative, Candes et al. coveryofs[1],[16]. in [16] and Donoho in [17] show that if s is sparse enough, Sparseapproximationwithstructuredsparsity.Thetheory 4 of sparse approximation is applicable to a sensing problem Signal Representation in Different Dictionaries iftheunderlyingsignalcanbesparselyrepresentedinsome 1 dictionary.Ausefulfeatureisthatthedimensionalityreduc- FFT tionoperationiscompletelyindependentofitsrecoveryvia DCT e (cid:96)1-minimization.Asparsesignalcanbecapturedefficiently d Correlation u using a limited number of random measurements that is nit proportional to its information level. The (cid:96)1-minimization g a process does its best to correctly recover this information M d 0.5 with the knowledge of only the dictionary that sparsely e z describesthesignalofinterest,whenthenoisepower(cid:107)v(cid:107)2is ali smallenoughandthedictionaryΨissufficientlyincoherent. m r The mutual coherence of Ψ ∈ Rna×(2na−1), denoted as No Threshold µ(Ψ),isgivenas: 0.1 |ΨTΨ | 0 µ(Ψ)= max i j (11) 0 2000 4000 6000 8000 10000 1≤i<j≤(2na−1)(cid:107)Ψi(cid:107)(cid:107)Ψj(cid:107) Samples Fig. 2: Signal representation in different dictionaries. The worst-case coherence µ(Ψ) corresponds to the largest The signal has a more sparse representation in the correlation absolute value of the inner product between two distinct dictionary than its FFT and DCT counterparts by an order of dictionary elements, and is bounded as: 0 ≤ µ(Ψ) ≤ 1. magnitudeexceeding2. WhileithasbeenproventhatanydesignedΨislargelyin- coherentwithΦ,itstillmaynotbegoodenoughforparameter estimation - especially under high noise conditions. There- if we design a representation dictionary having column fore, it is important to prevent coherent pairs of dictionary element that enumerate over all possible time delay com- elementsfromappearingintheapproximationprocess. binations. Candesetal.[15,Theorem1.2],infact,haveshownthat Design execution. For realizing this design goal, we adopt for conventional sparse approximation with coherent and a positive and negative time-shifted Hankel matrix design redundant dictionaries, the reconstruction error is upper ofthetransmittedsignalvectorpasΨ.Notethatreversing bounded by both the noise level and the best k-term ap- the time-shifting order results in a Hankel matrix. We refer proximationerror.Inanotherrecentwork,DuarteandBara- tothisnewlydesignedΨasthecorrelationdictionary. niuk[27,Theorem1]haveexaminedthatwithastructured Depending on the lengths of x and p, the following two sparsitymodel(andusingagreedyrecoveryapproach),the categoriescanbeidentified. upper bound of the reconstruction error decays exponen- • Case-1 (ta = tp) : Vectors p and x are of equal dimensions tially to the noise level with an increase in the number of with na samples. The elements of Ψ ∈ Rna×(2na−1) are iterations. Thus motivated by the significant benefits of the givenas: structuredsparsitymodel,weproposeStructS-XCorrthatis detailedinthenextsubsection. [zeros(n −i)p(1:i)]T 1≤i≤n a a 2.3 DetailsofStructS-XCorr Ψ(:,i)= [p(i+1−na :na)zeros(i−na)]T Inthissection,wepresentthedetailsofthenewdictionary (n +1)≤i≤(2n −1) a a designfollowedbythecomputingmodelofStructS-XCorr. (12) where Ψ(:,i) denotes the ith column, [·] denotes a vector 2.3.1 DesignofRepresentationDictionary of length na, zeros(i) denotes a zero vector of length i, Design guidelines. The general criteria for designing a ·T denotes the transpose of a vector (matrix), and p(i : j) reliablerepresentationdictionaryΨrequiresittosufficiently denotesavectorofelementswithindicesfromitoj ofthe sparsify the signal x. This one dimension search over the inputsamplesetp. time delay space introduces an important design criteria; • Case-2 (ta > tp) : The size of x is greater than p, and where, Ψ should be able to preserve the propagation chan- so,thesystemisbalancedbyrightzero-padding(na−np) nel profile information while adhering to the basic design entriestop. guidelinesoutlinedbytheunderlyingtheory.Wealsodefine Other popular dictionaries such as the FFT and DCT, an additional criteria where Ψ should facilitate a faster in contrast, do not provide as good a sparse depiction as recovery mechanism that implicitly derives the time delay theproposedcorrelationdictionary,andalso,donotsatisfy result without reconstructing the original signal. Therefore, the remaining two requirements (important for ranging). thedesigncomplexityistoidentifyandconstructabefitting Fig. 2 compares their sparsity levels (for an indoor high representation dictionary that satisfies all of the aforesaid multipath channel) by sorting the samples by their magni- requirements. tudes. The fastest decay characteristic (or the smallest k) is Design intuition. To this end, we were guided by Eq. 1 observedinthecorrelationdomain,andso,offersthemost where the locally generated reference copy ensembles val- sparse representation. This implies that the most accurate ues from a sweep over all possible (positive and negative) approximations (or range estimates) can be obtained with time delay values. This suggests that the received signal x the correlation dictionary using the smallest number of could be sparsely represented by a single dimension space measurementsm(Eq.(10)). 5 XCorr: 1440 Samples with 480 Samples S−XCorr: 432 Samples with 480 Samples StructS−XCorr: 432 Samples with 480 Samples 1 1 1 Lag: −ve 1 Lag: +ve Lag: −ve 1 Lag: +ve Lag: −ve 1 Lag: +ve de de de u u u nit nit nit g g g ormalized Ma0.5 43 2 ormalized Ma0.5 43 2 ormalized Ma0.5 N N N 0 480 960 1440 1920 2400 2880 0 480 960 1440 1920 24002800 0 480 960 1440 1920 24002800 Samples Samples Samples (a) Standardcross-correlation (b) Recoveryviasparseapprox. (c) Recoveryviastructuredsparseapprox. Fig.3:Validation: StructS-XCorr vs. {S-XCorr, XCorr}. The detection accuracy of StructS-XCorr is on a par with S-XCorr and XCorr,butwithbetterrobustnessagainstmultipathsandlow-noisepeaks. 2.3.2 CompressionandRecovery s can be recovered by solving Eq. (8). However, as the Compression. The dimensions of x ∈ Rna are significantly dimensions of x are reduced significantly via Eq. (9)2, the reduced at the receiver by multiplying it with a random reduced (cid:96)1- minimization problem for a given tolerance (cid:15) is sensing matrix Φ ∈ Rm×na resulting in the measurement givenas: vbyectthoer cyom∈pRremss(iomn(cid:28)factnoar)αags:ivyen=asΦ:mx. m=αisnraelawtehderetoαn∈a ((cid:96)1r): ˆs1 =argmin(cid:107)s(cid:107)(cid:96)1 s.t:||ΦΨs−y||2 ≤(cid:15) (14) [0,1]. For example, α = 0.10 means that the information in x has been compressed by 90%. Φ is a binary sensing ((cid:96)1)isknownasLasso3 instatisticalliterature,andregular- r matrixwithitsentriesidenticallyandindependently(i.i.d.) izes highly undetermined linear systems when the desired sampled from a balanced symmetric Bernoulli distribution solution is sparse. The correlation domain coefficients ˆs1 are of±1. related to the various propagation (direct and reflected) paths, Φ= √1mΦ¯ whereΦ¯i i.i.d. Pr(Φ¯i,j =±1)=0.5 (13) wthheeersetitmheatienodfexthoefptuhlesefiarrsrtivtaallletsimt ecoorfretlhaetidoinreccotepffiatchie,natnpdetahkuiss, providestherange. Binary ensembles have a shorter memory representation than Gaussian ensembles, and also, alleviate operational Recovery via Structured Sparsity and Sparse Approxima- complexity;hence,theyareeconomicalforsensorplatforms. tion(StructS-XCorr).Inourcase,Ψisnotstrictlyincoherent AbalancedΦconsistsof±1atequalprobability,whereeach duetotherepetitivenatureoftheelementsalongeachrow rowcontainsequalnumberof1’sand-1’s.Therefore,ineach of the matrix (which is an artifact of Hankel matrices). To rowofΦ,thesumoftheelementsisalwayszero.Abalanced Φ provides a higher probability of detection (at recovery) Procedure1StructuredSparseXcorrss =Sk(s,µ0) if the noise in x is Gaussian [28]. The receiver transfers m Input: Coefficientvectors,targetcoherenceµ0 samplesofytothebase-station(BS)forpost-processing. Output: Structuredsparsecoefficientvectorss RecoveryviaSparseApproximation(S-XCorr)[29].TheBS 1: Initializess =0,i=1 uploadsthecompressedmeasurementstoaserviceapplica- 2: whilei<kands(cid:54)=0do tiononthecontrolserver.Itrequiresthea-prioriknowledge 3: l(cid:63) =argmax1≤l≤2n−1|s(l)| of the seed that generates Φ, and the dictionary Ψ. Since x 4: ss(l(cid:63))=s(l(cid:63)) c(tahnebreecreeipveredsesnigtendal)spisarksneloywans,sthine dtheesirdeidctisopnaarrsyeΨsolauntdionx 56:: Λs|Λ=={λ0: (cid:107)ψ|ψλλT(cid:107)(cid:107)ψψl∗l∗|(cid:107) ≥µ0} 7: i=i+1 8: endwhile OUTPUT R CHANNEL overcometheshortcomingsduetodictionarycoherence,we L apply the principles of structured sparsity to the S-Xcorr E AuSdtieor eCoa rd L Pulselectronic PulseAcoustic cteinaoffiimnPceipredouncvtteiindhagueluirmnereios1adtritechpl.[ar2Aot7glw]trhaaoomfrtukemgsrhieanxstghe,fceowuoltlepionatwigdmsoE.apqIltn.sa1ol4licun.oteImito3pinsuacptnaardnteisobleinennaotelebldy4- INPUT R CHANNEL 2.Directcross-correlationintheprojectiondomain(usingy)didnotproduce desirablerangingresultsbecauseyconsistsofrandomprojections. 3.Theminimizerof(cid:107)x−Ψs(cid:107)22+λ(cid:107)x(cid:107)1 isdefinedastheLassosolution; Fig.4:Systemarchitectureofacustomdesignedacousticrang- whereλcanbereferredastheinverseoftheLagrangemultiplierassociatedwith aconstraint(cid:107)x−Ψs(cid:107)2≤(cid:15).Foreveryλ,thereisan(cid:15)suchthatthetwoproblems ingsystemforempiricalcharacterizationofStructS-XCorr. 2 havethesamesolution. 6 oftheprocedure,weselecttheentrys(l∗)ofthecoefficient to obtain the multipath profile5, but it is not accurate as vectorswithlargestmagnitudethatisthenpushedintothe it does not follow the same height-to-position relationship outputofthestructuredsparsevectors.Topreventcoherent (observethepositionofpeak-2&3inFig.3(b)assuggested elementsfromappearingsimultaneouslyinΨss,wedefine by the corresponding XCorr result shown in Fig. 3(a)). (line5)thesetΛofallindicesλforwhichtheinnerproduct Although, these parameters are not important for distance of ψλ and ψl∗ is larger than some predefined threshold µ0. estimation, they are - nevertheless - legitimate sources of This set indices all dictionary elements that are coherent erroneousdetection.StructS-XCorr,ontheotherhand,does with the newly selected one, and their future selection is not recover multipath/low-noise peaks apart from the LoS prevented in line 6 by setting the corresponding entries of path(Fig.3(c));andtherefore,alleviatessuchanomalies. thevectorstozero. Analysis: space and time complexity. The functionality algorithm(XCorrvs.compression)onthereceiveristhevital 2.4 AnalysisofStructS-XCorr point of difference. The running time of XCorr is O(n2) in thetimedomain(TD-XCorr)andO(nlogn)inthefrequency Inthissection,weanalyzetheperformanceofStructS-Xcorr domain(FD-XCorr)onconventionalreceiversystems.How- andidentifychallengesindetectionreliability. ever,forWSNnodes,additionalsignalprocessingplatforms Experimentalsystem.Weconductedthisstudyusingacus- havetobeaddedtocompensateforthelackofhardwaredi- tomdesignedacousticrangingsystem(Fig.4)withdifferent videorfloatingpointsupportunits.Therefore,wepropose assembled units. The front-end of the transmitter consisted analternatedatacompressionfunctionalitythathasasimi- ofaCOTSribbon(speaker)transducer,butdrivenbyancus- lartimecomplexity(mn≈O(nlogn)),butamuchsmaller tomassembled(external)widebandpoweramplifierwitha spacecomplexity(competentwiththemoteconstraints). tunable (5-20 times) gain controller. The receiver front-end We compared their performance on the experimental comprisedofacustomdesignedpreamplifierunitinterfaced system, for which we performed the same ranging process with a COTS Knowles microphone (SPM0404UD5). The but configured the receiver to record for 0.1s (i.e., 4800 controller for this system was setup on a laptop, where acquired samples). Table 1 shows the individual running synchronization and ranging signals were generated, cap- time of the TD-XCorr, FD-XCorr and compression for dif- tured and analyzed for range estimation. The operational ferent compression factors α. We note that FD-XCorr is sequencecommencedwiththegenerationofthelinearchirp ≈ 30 times faster than TD-XCorr as expected from their [01-20]kHz/0.01sthatwasthendirectedintotwoseparate asymptoticresults.However,thecompressiontime(shown streams:first,leftinputchanneloftheADCoftheaudiocard as‘Compression1-Buf’)variesfordifferentα,andisslower (i.e., an electronic chirp) and second, wideband amplifier thanFD-XCorrforallexceptα=0.05. (i.e., an acoustic chirp). The electronic chirp is equivalent We overcome this drawback by using the simple idea to an RF pulse and marks the transmission time of the of buffer-by-buffer compression rather than one-step com- acoustic chirp, which is thereafter detected by the receiver pression. This method divides the acquired signal vector unit and directed into the right input channel of the ADC. x of length na across b buffers of equal sizes, compresses The received acoustic signal is considered from the time the information in each buffer, and finally, assembles the marker provided by the electronic chirp so as to discard measurements in their correct order. The signal in each the delays incurred during the transmission stage4. At the buffer ˜x is of length n˜, where n˜ = na/b. The random processing station (that functionally replicates the receiver sensing matrix Φ for compressing the data in each buffer post-processing stage and BS), the acquired samples are is of size [m˜ ×n˜], where m˜ = αn˜ = α(na/b) = m/b. firstcompressedandsubsequentlyrecoveredtoestimatethe The resultant measurement vector y˜ (for each buffer) is of range. length of m˜. The number of iterations required to process each buffer is (m˜n˜). Therefore, the compression time for b 2.4.1 RangingChallengesandMitigation bufferstake(bm˜n˜)=(mna/b)iterations.Thisimprovement Analysis: basic ranging performance. In this experimental can be identified in Table 1 (shown as ‘Compression 10- setup, the transmitter and the receiver were placed 1.5m Buf’), where we divide the 4800 samples across 10 buffers apart.Therangingprocesswasperformedwiththereceiver and record their individual compression time for different configuredtorecordfor0.03s-justlongenoughtocapture α. The results show a worst-case to best-case improvement therangingsignalalongwithitsmultipaths.Theaudiocard of6×to60×overFD-XCorr.AsresourceconstrainedWSN wasconfiguredtosampleat48kHz;hence,thetransmitted motesdonotsupportfloatingpointoperation,ourproposed signalpandtheacquiredtracexconsistedof480and1440 method is expected to yield better performance (shown in samples respectively. Using α = 0.30, x was compressed to Section3)onsuchplatformsthanonastandardPC. obtain the measurement vector y of 432 samples followed Analysis: signal detection and post-processing. The pro- byitsrecoverytoobtains(Section2.3.2)usingS-XCorrand cess of detection is not without errors as the reconstructed StructS-XCorr, and its accuracy is then validated against coefficientssmayhavebeenwronglyapproximateddueto XCorr (Eq. 3). Fig. 3(a), Fig. 3(b) and Fig. 3(c) show the measurementnoisethatcontributestohighercoefficientval- respective results, where we observe that all the methods ues at incorrect locations. To overcome these inaccuracies, obtainexactlythesameestimateforthepositionofthefirst tallestpeakatanegativelagof220samples.S-XCorrisable 5.Thegenerationofthedictionarycoefficientsandcross-correlation peaksareinthenegativelagpartsincewehavereversedtheorderof 4.Theexperimentalsetupmimicstheconceptofvelocity-difference operation,whereinthereferencesignalwasoperatedwiththeacquired TDOA(V-TDOA)[14] signal. 7 TABLE1:TimeComplexityAnalysis XCorr in Buffers: [Buf−1] XCorr in Buffers [Buf−2] 480 samples with 480 samples 480 Samples with 480 Samples α TD-XCorr FD-XCorr Comp. Comp. 1 1 000...013500 (000s...111)999333222 (000s...000)000666222 1000-...000B002u471f278fer(s) 10000...000-000B000u136ffers(s) malized Magnitude0.5Lag: −ve21 Lag: +ve malized Magnitude0.5Lag: −ve 42 31Lag: +ve 0.50 0.1932 0.0062 0.0361 0.0010 Nor Nor 0 200 4S00amples600 800 960 0 200 4S00amples600 800 960 weusethesameprincipleofbuffer-by-bufferreconstruction (a) (b) attheBSaswell,whichnotonlyprovidesanadditionalclue StructS−XCorr in Buffers [Buf−1] StructS−XCorr in Buffers [Buf−2] forcorrectdetection,butalso,servesasaguidelinetochoose 144 Samples with 480 Samples 144 Samples with 480 Samples 1 1 toohffestTbhahmueefpfrenelreufescmroienbunenceretaobcsf.higbbnuuafffleferpsr,biis.iest.h,cehn˜ossa=emnetspuaFscsht.htFehoasrtatmehxepalmneupcmloeub,neirft malized Magnitude0.5 Lag: −ve1 Lag: +ve malized Magnitude0.5Lag: −ve 1 Lag: +ve p contains 100 samples and x consists of 1000 samples, Nor Nor then b is 10. There are two benefits in making this choice. 0 200 4S0a0mples600 800 0 200 4S00ampes600 800 First, it restricts the direct path signal (in the total acquired trace) to be spread across a maximum of 2 buffers, and (c) (d) so, guarantees that the magnitude of the corresponding Fig.5:Buffer-by-BufferProcessing.Thedetectionaccuracy recovered coefficient would always remain at least 50% ofStructS-XCorr,inregardstothepositionoftheLoSpeakand above its original estimate. Increasing b beyond 2 buffers thetallestpeakineachbuffer,isatparwithXCorr. decreasestheindividualpeakheightstosmallermagnitudes that poses a difficult detection task to differentiate them 2.4.2 CharacterizationStudiesandBenchmarks from the noise-floor. Second, it provides easy processing at theBS,wheretheoperationofrightzero-paddingptomake Rangingerrorvs.{compressionfactor,SNR}.Theoptimal its dimensions equal to x is substituted by fragmenting x choice of the compression factor α that achieves the best intobbufferstomatchthesizeofp(Section2.3.2). accuracy with the least measurements (or projections) m Thereconstructionprocessisperformedonallbbuffers, is a key design decision as a smaller m leads to lower whichisfollowedbythesignaldetectionandrangeestima- storage and transmission cost. α depends on the sparsity tionalgorithm. k (Eq. 10) of the received signal in the correlation domain, • Phase-1: It identifies the various correlation domain coef- whichinturndependsonthereceivedSNRthatvarieswith ficient peaks and selects the first tallest peak in each of the transmissionpowerandrangingdistance.Inthissubsection, b buffers that is at least 6 standard deviations above the we empirically study the relationship between SNR and α. mean. The detection is considered to have failed for those Thestudywasconductedinthefollowingenvironments. bufferswherenopointqualifiesasapeak.Thisreducesthe • Case-A {outdoor, very low multipath}: A less frequently validationspaceforphase-2to˜b(≤b)buffers. used urban walkway, and the weather being sunny with • Phase-2: If there are valid peaks in more than one buffer occasionalmildbreeze. (i.e.,˜b>1),thenthetallestpeak(acrossall˜bbuffers)among • Case-B {indoor, low multipath}: A quiet lecture theatre themisselectedastherangingpeak.Thedetectioniscorrect, ([25×15×10]m) with a spacious podium at one end of ifthispeakinbufferbi hasalagthatis: thelargeroom. • Positive: ⇒ The peak in the previous buffer bi−1 • Case-C {indoor, high multipath}: A quiet meeting room musthaveanegativelag. ([7×6×6]m) with a big wooden table in the center and • Negative: ⇒ The peak in the next buffer bi+1 must otherofficefurnitures. haveapositivelag. The transmitter and the receiver were fixed at a constant separation distance of 5m. The transmit power was varied This relationship is a result of the manner in which the suchthatthereceivedSNRwererecordedwithinthelimits: signal gets aligned in different buffers and its equivalent [0-5)dB, [5-10)dB, [10-20)dB, [20-30)dB. For reasons that representation in the correlation domain/cross-correlation will be explained in the next subsection, we slightly modi- (Fig.5). fiedthepeakselectioncriteriaofthedetectionalgorithmto If˜b=1(i.e.,onlyasinglebufferhasavalidpeak),thenthe choosethetallestpeakiftherewasnovalidpeak(6standard peakidentifiedinphase-1qualifiesastherangingpeak.The deviationabovethemean).100observationswerecollected estimatedrangerisobtainedas: for every experiment. We show the relative mean error and its r =((n˜bi−1+ˆl)/Fs)×vs (15) deviationwithrespecttothe(best-case)XCorrinalltheresultsin thissegment. where bi−1 is the buffer count before the detection buffer,ˆl Fig.6(a),Fig.6(b)andFig.6(c)showsthedependenceof is the lag (in samples) of the ranging peak in the detection α-compressionanditsrecoveryaccuracyontheSNRofthe buffer, and vs is the temperature compensated speed of rangingsignalusingS-XCorr.Acrossallfigures,weobserve soundinair. thatapplyingahigherαonalowerSNRsignalresultsinan 8 Correlation Domain Correlation Domain Correlation Domain Outdoor Walkway Indoor: Lecture Theatre Indoor: Meeting Room 140 140 140 [20-30) dB [20-30) dB [20-30) dB 120 [10-20) dB 120 [10-20) dB 120 [10-20) dB [05-10) dB [05-10) dB [05-10) dB m)100 [00-05) dB m)100 [00-05) dB m)100 [00-05) dB c c c or ( 80 or ( 80 or ( 80 Err 60 Err 60 Err 60 n n n a 40 a 40 a 40 e e e M M M 20 20 20 0 0 0 0 0.05 0.10 0.15 0.20 0.25 0.30 0 0.05 0.10 0.15 0.20 0.25 0.30 0 0.05 0.10 0.15 0.20 0.25 0.30 Compression Factor Compression Factor Compression Factor (a)Case-A: (b)Case-B: (c)Case-C: Multipath:very-low Multipath:low Multipath:high Fig.6:S-XCorr.CharacterizationofcompressionfactorαwithSNR. Correlation Domain Correlation Domain Correlation Domain Outdoor Walkway Indoor: Lecture Theatre Indoor: Meeting Room 140 140 140 [20-30) dB [20-30) dB [20-30) dB 120 [10-20) dB 120 [10-20) dB 120 [10-20) dB [05-10) dB [05-10) dB m)100 [00-05) dB m)100 [00-05) dB m)100 [[0050--1005)) ddBB c c c or ( 80 or ( 80 or ( 80 Err 60 Err 60 Err 60 n n n ea 40 ea 40 ea 40 M M M 20 20 20 0 0 0 0 0.05 0.10 0.15 0.20 0.25 0.30 0 0.05 0.10 0.15 0.20 0.25 0.30 0 0.05 0.10 0.15 0.20 0.25 0.30 Compression Factor Compression Factor Compression Factor (a)Case-A: (b)Case-B: (c)Case-C: Multipath:very-low Multipath:low Multipath:high Fig.7:StructS-XCorr.CharacterizationofcompressionfactorαwithSNR. Buffer-by-Buffer vs. Single Buffer Detection Method Buffer-by-Buffer vs. Single Buffer Detection Method Buffer-by-Buffer vs. Single Buffer Detection Method Outdoor Walkway Indoor: Lecture Theatre Indoor: Meeting Room 104 104 104 Buf-by-Buf Buf-by-Buf Buf-by-Buf Single Buf Single Buf Single Buf Error)102 Error)102 Error)102 n n n a a a e e e M M M g (100 g (100 g (100 o o o L L L 10-2[ 00-05) [05-10) [10-20) [20-30) 10-2[ 00-05) [05-10) [10-20) [20-30) 10-2[ 00-05) [05-10) [10-20) [20-30) SNR (dB) SNR (dB) SNR (dB) (a)Improvement: (b)Improvement: (c)Improvement: Orderofmag.1 Orderofmag.1.5 Orderofmag.4 Fig.8:StructS-XCorr:Buffer-by-Buffervs.SingleBufferDetection.Foracompressionfactorof0.30,thebuffer-by-bufferdetection showsanorderofmagnitude1-4improvementoversinglebufferdetectionmethod. increaseinestimationerror.Fig.6(a)forCase-Apresentsthe in Case-C (due to high multipath), and so, the errors are mostclearcharacterizationbynegatingtheeffectofchannel as large as 1m with α = 0.05, but attain stability after multipaths (though introducing an increased background α = 0.25. The cumulative probability results suggest that noise level), where observations with a high SNR of [20- there is a 95% probability of incurring an additional error 30)dB provide reliable range estimates by using only 15% of < 1.5cm in indoors and < 3cm in outdoors with projections while those having low SNR of [0-5)dB show α=0.30withrespecttoitsXCorrestimate.Usingα>0.30 confident result only with α = 0.30 (i.e., using more pro- doesnotimprovetheaccuracysignificantlyconsideringthe jections). Fig. 6(b) and Fig. 6(c) show the results for Case- additionaloverheads.Fig.6alsoshowsthatforapplications B and Case-C. Due to a less dominant multipath profile that require lower accuracy (e.g., 100cm), α as less as 0.05 and background noise in Case-B, the accuracy levels show is sufficient. We also performed ranging experiments with high confidence for α ≥ 0.20. The situation is challenging changes in distance over 1-10m. Although, smaller values 9 Domain and Algorithm Comparison Domain and Algorithm Comparison Domain and Algorithm Comparison Outdoor Walkway Indoor: Lecture Theatre Indoor: Meeting Room 108 108 108 Corr Domain + CP + StructS−Xcorr Corr Domain + CP + StructS−Xcorr Corr Domain + CP + StructS−XCorr Error)110046 DDCCSor T+r DDXooCmmoraariinn ++ CDPS ++ SSttrruuccttS−X−XCCoorrrr Error)110046 DDCCSor T+r DDXooCmmoraariinn ++ CDPS ++ SSttrruuccttSS−−XXccoorrrr Error)110046 DDCCSor T+r DDXooCmmoraariinn ++ CDPS ++ SSttrruuccttS−X−XCCoorrrr n n n a a a Me102 Me102 Me102 g ( g ( g ( o o o L100 L100 L100 10−2[ 00−05) [05−10) [10−20) [20−30) 10−2[ 00−05) [05−10) [10−20) [20−30) 10−2[ 00−05) [05−10) [10−20) [20−30) SNR (dB) SNR (dB) SNR (dB) (a)Improvement: (b)Improvement: (c)Improvement Orderofmag.1-4 Orderofmag.2-4 Orderofmag.4 Fig.9:DomainandAlgorithmComparison.Foracompression(CP)/downsampling(DS)factorof0.30,StructS-XCorrmodelinthe correlationdomainshowsanorderofmagnitude1-4higherdetectionaccuracycomparedto:(i)compressionwithStructS-Xcorrinthe DCTdomain(ii)downsamplingwithXCorr(iii)downsamplingwithStructS-XCorr. ofα(i.e.,lesserprojections)weregoodforhighSNRlevels, ministically choosing samples and discarding information the results with α = 0.30 were optimal, even in the worst (i.e.,frequencycomponents)bydownsampling.Thisresult, casetoobtainhigheraccuracy(<2cm). therefore, supports the theoretical underpinning that there Fig.7showstheaboveanalysis,butusingStructS-XCorr. is an overwhelming probability of correct recovery via (cid:96)1- Itrevelastwointerestingobservations.First,similartoFig.6, minimization for dimensionality reduction by random lin- weobservethatapplyingahigherαonalowerSNRsignal ear projection (Section 2.2). Since the recovery techniques results in an increase in estimation error. Second and more are based in l1-minimization, we direct the readers to [30] imporantly,thereisa40%improvementinrangingaccuracy forasystematicbenchmarkoftheirperformance. forcasesofhighcompressionfactorandlowSNRinCase-A Adaptiveestimation:compressionfactor.Thedesignofan andCase-C.However,thereisn’tappreciableimprovement adaptive mechanism for α requires estimating the received inCase-B(anenvironmentwithlownoise). SNR.Weproposetwodifferentapproaches:first,withaBS Fig. 8 compares the detection accuracy between our feedbacktoreceiver,andsecond,onthereceiveritself. proposedbuffer-by-buffermethodversusprocessingallthe For the BS-feedback mechanism, we utilize empirical samplesinasinglebufferusingtheStructS-XCorrrecovery information from the peak detection algorithm. In Sec- method.FromreasonsexplainedinSection2.4.1,theresults tion 2.4.1, we considered the scenarios where the valid showatleast1orderofmagnitudeimprovement. buffer count˜b ≥ 1. If a valid peak (i.e., at least 6 standard The sparse representation in the proposed correlation deviations above the mean) is not detected in any buffer domain shows significantly better accuracy of an order of (i.e.,˜b = 0), then the detection is considered to have failed. magnitude 2 (Fig. 9) compared to the DCT domain (for Thisimpliesthattherecoveredcoefficientsarenoisydueto α=0.30) due to the most sparse depiction of the ranging anon-optimalαfortherespectivemeasurements(character- signal (Fig. 2). For DCT domain processing, the recovered ized by its SNR). It was precisely the reason for modifying coefficientsˆs1 weremultipliedwiththeDCTbasisΨ(Eq.4) thepeakselectioncriteriaintheprevioussubsection,where to obtain an estimate of the received signal ˆx1, and then we observed large errors in peak positions for magnitudes cross-correlated with the reference signal p. Here also, the below the specified threshold. The BS-feedback algorithm recoverymechanismisbasedonStructS-XCorr. starts with the initial knowledge of whether a valid peak Another simple (but deterministic) method of reducing was determined with α = 0.30. If the detection succeeds, thesamplecountistodownsamplexbyafactorFdresulting thenαisdecrementedbyastepsizeof0.05andcompressed. in yˆ. We verify its detection accuracy in the correlation This process is iterated until the detection fails, in which domain by using two different algorithms: (a) standard case, the previous α values is selected. On the other hand, cross-correlation and (b) StructS-XCorr with the following if no valid peaks were encountered for the starting case, formulationofthesparseapproximationproblem: α is incremented in steps of 0.05 and the entire process is repeateduntilthedetectionsucceeds. ((cid:96)1r): ˆsd1 =min(cid:107)s(cid:107)(cid:96)1 subjectto:||Ψ(cid:48)s−yˆ||2 ≤(cid:15) (16) A major drawback of the feedback approach is the ad- The comparison results in Fig. 9 show that neither of ditional measurements (that translate to transmission over- these two methods based on downsampling provide better head),anditsassociateddelayandpowerusageforderiving estimates than the proposed method of (cid:96)1-minimization α.Therefore,weintroducethisfunctionalityonthereceiver and structured sparsity in the correlation domain where by a simple power estimation algorithm. The ratio ρ of the the improvement is of an order of magnitude 2 across peaksignalamplitudetotheaverageoftheabsolutevalues all experimental environments. Information embedding in in the sampled signal is calculated, and a corresponding random ensembles preserves the (cid:96)2-norm (or energy) of its α is selected according to the following empirically chosen respective higher dimension representation, and therefore, criteria.α = {{0.05 : ρ > 30},{0.10 : 20 < ρ ≤ 30},{0.10 : the recovery accuracy is significantly better than deter- 20 < ρ ≤ 30},{0.20 : 15 < ρ ≤ 20},{0.30 : 10 < ρ ≤ 10 TABLE 2: Projections vs. Accuracy. A positive value indi- responseof≈22dBabovethenoise-floorbetween1-10kHz. cateshigherprojectionsorreconstructionerrorcomparedtothe thresholdα=0.30 Receiver. TmoteInvent [32] was used as the listener node, due to its low-cost and low-power (100 times more power Scenario Projections(%) Accuracy(%) efficient than the DSP on the transmitter) features that are expected from a WSN platform. The receiving front-end BS-Feedback 101.16 -1.75 Receiver -17.55 5.26 consistedofanomni-directionalelectretmicrophone(Pana- sonic WM-61B) attached to an Analog Devices SSM2167 15},{0.50:05<ρ≤10},{1.00:ρ≤05}}. preamplifier. It allows omni-directional acquisition in the For our analysis, we randomly selected 1000 measure- range20Hz-10kHz,andhasanear-flatfrequencyresponse ments pertaining to different SNR levels in the indoor between 3-7kHz that is 10dB above the noise floor. High- lecture theatre (Case-B). The respective α was estimated rate audio data collection was achieved using the DMA using the above two methods and their performance was controller packaged with the MSP430 MCU. However, the compared against our empirically selected threshold value MSP430DMAcausestruncationofthe12bitsADCdatato of α = 0.30. Table 2 reports their performance trade-off 8 bits rather than to two bytes, and so, results in a data where the BS-feedback obtains high accuracy but requires resolutionlossof4bits. 2 times more measurements, while the receiver estimation Ranging/Detection methodology. The system uses the V- approachtakesfewermeasurementsandobtainsonlya5% TDOAofRFandacousticsignalstomeasurethebeacon-to- worseaccuracy. listenerdistance.Thebeaconinitiatestherangingprocessby periodicallytransmittingaRFsignalfollowedbyaacoustic pulse after a fixed time interval. The fast propagating RF 3 EVALUATION pulse reaches the listener almost instantaneously and syn- Wepresentthedesignandimplementationofanend-to-end chronizes the clocks on both the devices, following which, acoustic ranging system using constrained WSN platforms theTDOAismeasuredafterthearrivaloftheacousticpulse. in this section, followed by evaluation results. Fast data The ranging signal was a linear chirp of [3-7]kHz/0.01ms acquisition and compression on the receiver node was the and was transmitted at an acoustic pressure level of 70dB. underlying system rationale; hence, all design decisions The DAC on the audio codec of the beacon node was were guided towards maximum RAM utilization rather programmed to sample at 48kHz, while the ADC on the than external flash (that would introduce additional la- receiverTmotewasconfiguredtoacquireat15kHz. tency). If the time taken for sound to travel a maximum range dc at a speed vs is at most dvsc, and if the transmitted chirp 3.1 Systemdesignonconstrainedplatforms. length is tp, then the signal must reach the receiver within ThesystemcomprisedoftheTmoteInvent(aslistener),our o[dvfscth+etspig].nFalormtupst=be0.c0o1mspalnedteddcby≈0.1003ms.,Wtheeinrcelcuodrdeinang designed sensor mote (as beacon) and a network interface additional 0.01s to compensate for reverberation time (tc), tothebase-station(Fig.10). and setup the recording time to 0.04s (Eq. 2). Following Transmitter. The beacon node [31] comprised of our WSN the buffer-by-buffer compression method, the signal was platform along with a custom designed audio daughter spreadacross5buffers.AmeasurementmatrixΦ¯ wasstored board that included four TI TLV320AIC3254 audio codecs in the RAM that contained i.i.d. entries sampled from a and the Bluetechnix CM-BF537E digital signal processor symmetric Bernoulli distribution (Eq. 13). We postponed module.Thetransmittingfront-endofthebeaconmotecon- the multiplication operation on the matrix entities with the √ sistedofapoweramplifierdrivingatweeter(speaker)trans- constant(1/ m)untiltherecoverystageattheBS. ducer (VIFA 3/4” tweeter module MICRO). The tweeter Thelisteneracquirestheaudiosamples,compressesand (size:[2×2×1]cm)hadafairlyuniformandhighfrequency stores these measurements in the RAM over a period of 5 iterations, and then, transfers them to the BS. These mea- surements are again divided into their respective buffers Transmitter Receiver and reconstructed to obtain the coefficients. The detection RF process is the same as explained in Section 2.4.1, however we made two minor modifications. First, due to a higher Acoustic receiver noise floor, we set the criteria for selecting the first tallest peak to 3 (instead of 6) standard deviations RF above the mean. Second, as each sample corresponds to 2.2cm of distance (at a sampling rate of 15kHz), we used Base Node a simple parabolic interpolation method [8] to obtain finer resolution.Thisadditionalstepidentifiesthepositionofthe SOFTWARE Serial first neighboring peak on the left and right of the selected Packet ranging peak, finds the parabola that passes through these Reconstruction Simulator Display/ & TCP IP/ points, and calculates the time coordinate of the maximum Database Localization Directory Poll Algorithm Packet ofthisparabolathatestimatestherange. Listener Base Station Fig. 10: System architecture. End-to-end acoustic ranging systemusingconstrainedWSNplatforms.