Wireless Localization: Ranging (first part)

34
Wireless Localization: Ranging Stefano Severi and Giuseppe Abreu [email protected] School of Engineering & Science - Jacobs University Bremen October 7, 2015

Transcript of Wireless Localization: Ranging (first part)

Wireless Localization: Ranging

Stefano Severi and Giuseppe [email protected]

School of Engineering & Science - Jacobs University Bremen

October 7, 2015

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Questions and HelpFirst Aid Kit

For the matlab part:

Andrei Stoica

Room 100b, Res I

email: r.stoica

tel. 3203

Book appointment inadvance

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 2/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Calendar & DeadlinesAssignments and Lab Reports

All lectures will be given in Seminar Room in Research I from13:30 to 16:30. Modification of this schedule can be anywayagreed with the students.

Wed 30 Sep Lecture I

Wed 7 Oct 13:00 Deadline Report I

Wed 7 Oct Lecture II

Wed 7 Oct Lecture III

Wed 14 Oct 13:00 Deadline Report II

Wed 21 Oct 13:00 Deadline Report III

The date for final exam has yet to be defined - please refer toProf. Henkel.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 3/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Lab Report SubmissionHow and when

The lab reports must be submitted individually.

The lab reports must be submitted only electronically viaemail to both Dr. Severi ([email protected])and Mr. Stoica ([email protected]) by thepreviously depicted deadlines.

The 3 reports will constitute the 12,5% of the final grade.The grade of each report will be therefore multiplied by0,0416 to compute the final grade.

Failing to submit a report within the deadline will result in agrade 5.

Do not wait for the last day before the deadline to ask for anappointment and/or clarification!

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 4/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

The NetworkAnchor and Target Nodes

anchor nodesΘA , {θ1, · · ·,θA}.

target nodesΘT , {θA+1, · · ·,θN}.

[ηxN ] matrix networkΘ , [ΘAΘT ].

θ1

θ2

θ3

θ4

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 5/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Distances and MeasurementsThe Ranging Error

True distancedij ,

√(θx:i − θx:j)2 + (θy:i − θy:j)2 =

√〈(θi − θj), (θi − θj)〉 = ‖θi−θj‖

* The red part is valid only for η = 2, i.e. bidimensional case.

eij ranging error

d̃ij , dij + eij measureddistance

D euclidean distancesmatrix [NxN ].

θi θjdij

The symbol ˆ denotes estimated quantities and ˜ denotesmeasured quantities.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 6/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

LOS and NLOS ConditionsAn Example

Source: Dardari et al., Ranging With Ultrawide Bandwidth Signals in Multipath Environments

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 7/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

RSSI RangingPower-based Ranging

Received Signal Strength

Pr ∝ Pt − 10 γ log10(d) + S

S large-scale fading variation typically N (0, σ2S)

d distance

γ path-loss factor (typically between 2 and 6)

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 8/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

RSSI RangingGSM example

GSM Line-of-Sight link budgetPr(dB) = Pt(dB)− 20 log10(d)− 20 log10(f)− 20 log10( 4π

c )

100 200 300 400 500 600 700 800 900 1000

−90

−80

−70

−60

−50

−40

Line-of-Sight Link Budget

Transmitted Power = 1W, frequency = 900 Mhz

ReceivedPow

er[dB]

Distance [m]

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 9/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

RSSI RangingPros and Cons

Pros

¨̂ No need for synchronisation.

¨̂ No expensive hardware needed.

Cons

_̈ Severely affected by multipath even in LOS.

_̈ Subject to errors in NLOS environments.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 10/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Time-based RangingTime-of-Flight

Distance estimated from Time-of-Flight

τf , d/c,

where c = 299792458 m/s

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 11/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Time-based RangingClock Errors

Source: Verdone et al., Wireless Sensor and Actuator Networks: Technologies, Analysis and Design.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 12/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

ToA RangingOne-Way

τf = t2 − t1.

time accordingto node A

time accordingto node B

t1

t2τf

Effects of synchronisation error [clock offset] could be catastrophic!

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 13/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

ToA RangingEffect of Synchronization Error

If we consider a clock offset ετ between the two clocks, wehave:

d̃ = (τf + ετ ) · c,

that can be rewritten as:

d̃ = τf · c︸ ︷︷ ︸d

+ ετ · c︸ ︷︷ ︸εd

=

Now let’s estimate εd is ετ is . . .

1 ms −→ ετ · c = 0, 001 · 299792458 = 299,79 km,

1 µs −→ 299,79 m,

1 ns −→ 29,98 cm.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 14/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

ToA RangingTwo-Way

round-trip time τRT = 2 τf + τd.

time accordingto node A

time accordingto node B

t1

t2

τf

t3

t4

τ f

τd

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 15/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

ToA RangingTwo-Way

τf =(τRT − τd)

2

Effect of synchronisation (offset) error mitigated

τd is assumed known a-priori

τd ∼ ms

τf ∼ ns

a 0, 00001% error (one over one million!) on the holding time τd couldlead to catastrophic error in distance estimate.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 16/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

ToA RangingDifferential Time of Arrival

The two-way procedure is repeated, but holding time at node B is first τdBand then 2τdB .

t1

t2

τf

t3

t4

τ f

τdB

t′1

t′2

τf

2τdB

τ f

t′3

t′4

τf = t4 − t1 − (t′4 − t′1)/2.

Clock drift can be considered negligible within the interval [t1, t′4], although

clock jitter could still affects the ranging.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 17/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Error on ToAGaussian Distribution

Even ignoring errors introduced by clocks, time-based distance estimationis still subject to the imperfect detection of time or arrival of transmittedpacket in presence of noisy channel and multipath propagation.

Under this perspective, we can model the time-based estimation as aprocess following a normal distribution, with mean d and varianceproportional to the inverse of the SNR γ, whose PDF is:

fn(d̂; d, γ) =1√

2π(kγ)−2exp− d̂− d

2(kγ)−2, (1)

where k is a proportionality constant to model the variance.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 18/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Difference RangingBasic Principle

x(t) = A0 cos (2πf0t+ ϕA).

y(t) = B0 cos (2πf0t+ ϕB).

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 19/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Difference RangingMeasurement Cycle

ϕ1 = ϕB − ϕA.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 20/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Difference RangingFirst Measurement Cycle

Relationship between phase and distance:

ϕ1 = 2π

(2d

λ1−N1

)= 2π

(2f1d

c−N1

),

λ1 =c

f1,

N1 number of integer part of wavelength,

N1 =

⌊2d

λ1

⌋.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 21/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Difference RangingSecond Measurement Cycle

f2 = f1 + ∆f ,

ϕ2 = 2π

(2d

λ2−N2

)= 2π

(2f2d

c−N2

),

for N1 = N2 we have:

∆ϕ = ϕ2 − ϕ1 =4πd∆f

c,

that leads to

d =c

∆ϕ

∆f.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 22/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Difference RangingPros and Cons

Pros

¨̂ Very robust to NLOS environment.

¨̂ No need for robust synchronization.

Cons

_̈ Maximum ranging dMAX =c

2∆f.

_̈ Phase estimation subject to Tikhonov error.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 23/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Error on Phase MeasurementTikhonov Distribution

For medium and low SNR we model the estimation of a true phase ϕ asfollows:

ϕ̂ = ϕ+ nT, (2)

where nT is the estimation error and consequently the ϕ̂’s areTikhonov-distributed [ABREU08] random variables with mean ϕ and theirPDF is given by:

ft(ϕ̂;ϕ, γ) =exp(γ cos(ϕ̂− ϕ))

2πI0(γ). (3)

where γ expresses the SNR of the system and Ij(·) is the j-th order

Besseli function.

[ABREU08] G. T. F. de Abreu, “On the generation of Tikhonov variates,” Communication, IEEE Transactions on,

vol. 56, no. 7, pp. 1157-1168, July 2008.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 24/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Error on Phase MeasurementBesseli Function of j-th order

The j-th order Besseli function is:

Ij(γ) =

∞∑m=0

(−1)m

m! Γ(m+ j + 1)

(γ2

)2m+j

, (4)

where Γ(·) is the Gamma function defined as:

Γ(n) = (n− 1)! (5)

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 25/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Error on Phase Difference

The estimation error on the difference of two phases ϕ1 and ϕ2, bothtransmitted over sinusoidal tones with SNR γ, is still characterized by aTikhonov distribution:

ft(∆̂ϕ; ∆ϕ, γ/2), (6)

where ∆ϕ = ϕ2 − ϕ1 and the reference SNR is γ/2.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 26/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

On-Field ExperienceObserve, ask and learn

Mr. Stoica will guide you through an on-field ranging campaign and

classification

Lab TipsTo best exploit this experience:

Pay carefully attention to Mr. Stoica explanation;

Make questions about any unclear item;

Repeat what you have learn on your own computer: it will be later usefulto write down the report.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 27/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Based RangingOn-Field Measurements

1 collect the phase measurements from sensors

2 import the data in Matlab

3 estimate the measured distances

4 compute the error distribution

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 28/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase-Based RangingOn-Field Measurements

Data from measurements come according to the following format:

ϕA1f1 . . . ϕANf1 | ϕB1f1 . . . ϕBNf1ϕA1f2 . . . ϕANf2 | ϕB1f2 . . . ϕBNf2

. . .ϕA1fM . . . ϕANfM | ϕB1fM . . . ϕBNfM

(7)

where M is the number of frequencies used and N is the number ofsamples per each frequencies.

In the left side of the matrix are store phases sent by the initiator, on the

right side the received phases.

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 29/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase Difference vs FrequencyOn-Field Measurements

Having in mind that

d =c

∆ϕ

∆f.

we focus on the radio ∆ϕ/∆f .

1 plot the measured phase differences as a function of the frequencies

Matlab Tip

In order to linearly plot the phase differences as function of thefrequencies, use the following command:

unwrap(angle(exp(1j*phi)))

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 30/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Phase Difference vs FrequencyOn-Field Measurements

Due to measurements errors, the relationship between phase differences

and frequencies is not linear

1 linearize that relationship with linear regression (best fitting line)

2 get both graphically and analytically the ratio ∆ϕ/∆f

3 computed the estimated distances

Matlab Tip

For linear regression an useful command is:

p = polyfit(X,Y,N)

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 31/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Error DistributionOn-Field Measurements

Compute the error phase distribution, i.e. the distribution of the difference

between the measured phase differences and the estimated phase

differences, at each frequency

1 plot the distribution of the phase estimation error for a given frequency

using histogram

2 find the parameter of the Tikhonov distribution that best fits the

distribution of phase estimation error

3 plot the Tikhonov distribution on top of the histogram

Matlab TipFor the histogram use

[p,r] = ecdf(data); ecdfhist(p,r,nBins);

whiles for the Tikhonov distribution you must implement eq. (3).

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 32/34

Localization &PositioningPreliminaries

RangingRSSI

Time Based

One-Way ToA

Two-Way ToA

DToA

Phase-Difference Ranging

Error Estimation

Experience

Report 1/3Ranging

Complete the lab experience writing (one per group) a reportwith:

1 the plots described in the previous slide (only for one frequency)

2 the description of the selected parameter of the best fitting Tikhonov

distribution (γ and θ).

3 a clear explanation of the whole experience.

Please print and deliver the report within the aforementioned deadline to

[email protected],

[email protected].

Specialization Lab - Fall 2015 Wireless Localization: Ranging October 7, 2015 33/34

Thank you!