# Methods

## Ground Truth Map

All Wi-Fi localization methods utilize maps of indoor environments, generated with computer vision and Wi-Fi antennae. This map will be processed to improve fidelity and optimize system performance.

Methods For each localization method, we begin with a pre-generated ground truth map which contains Wi-Fi signal strength readings at every point. To localize, we read all available Wi-Fi signal strengths and create a vector of signal strengths. Signal strengths are normalized to account for slight differences in antennas. Likewise, the signal strength readings in the ground truth map are also normalized.

## Subtraction

To localize with subtraction we begin by reading all available Wi-Fi signal strengths and placing them in a vector, which is then normalized. • The normalized readings are in form:

```     norm = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address
```

• For each cell in the ground truth map, readings are of the form:

```    cell = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address
```

• Absolute difference vectors are calculated according to formula:

```    absDiffVector = elementwise absolute value( norm – cell )
```

• For each cell in the map, the absolute difference vector is calculated • For each cell in the map, total absolute difference is calculated according to the formula:

```    totalAbsDiff = | absDiffVecor |
```

• At the point, the user has a list of total absolute differences. • To get a single match, the user selects the point corresponding the lowest value of totalAbsDiff • To get a region of matches, the user selects all points which fall between 0 and a tolerance • The coordinates corresponding to the match(es) is(are) the estimated positions(s)

The following provides a visual representation of subtraction-based localization

Wi-Fi readings are given as a value out of 100. Each unique access point will have value associated with it.

To account for differences in antennae, readings are normalized. Normalization helps account for small differences between antennae.

We have a ground truth map of the normalized Wi-Fi readings at every point. Each plot represents a set of readings at a distinct point (9 in all, in this case)

Find the Difference between a point on ground truth map and Reading. Each column represents the absolute difference between the signal strength of a reading and the signal strength on the ground truth map. Each column corresponds to a unique access point.

Find the difference between ground truth map and reading at every point. Each set of plots corresponds to a point on the ground truth map.

Find the total difference between ground truth map and reading by adding up the differences. Simply sum the individual differences for each access point. This gives a quantitative measure of the difference between a reading and a given point.

Find the total difference between the ground truth map and each Wi-Fi reading at every point on the ground truth map.

At this point, we have a quantitative measurement of the difference between a Wi-Fi signal reading and ground truth map. The closest match will be the least different, meaning it will have the smallest value of total difference. Looking at the map, one can easily conclude he is closest to the bottom right position (point 9).

## Correlation

To localize with correlation we begin by reading all available Wi-Fi signal strengths and placing them in a vector, which is then normalized. • The normalized readings are in form:

```norm = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address
```

• For each cell in the ground truth map, readings are of the form: cell = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address • For each cell in the map, the normalized readings are correlated to the values in the ground truth map according to the following formula: corr = norm * cell, where * indicates the dot product • At this point, the user has list of correlation values for each point on the ground truth map • The find a single match, the user selects the point with the greatest value of corr • The find a region of matches, the user selects all points wich fall between 1 and a prescribed tolerance • The coodinates corresponding to the match(es) is(are) the estimated position(s)

## Ratio

To localize with ratios we begin by reading all available Wi-Fi signal strengths and placing them in a vector, which is then normalized. • The normalized readings are in form:

```norm = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address
```

• For each cell in the ground truth map, readings are of the form:

```    cell = [Reading1, Reading2, … ReadingN], where N corresponds to each unique Mac address
```

• For each cell, a ratio matrix is found by elementwise division: Ratio = norm[i] % cell[i], for i=1.2…N(number of mac addresses) • For each cell, a total ratio is found my adding the elements in the Ratio vector and dividing by the number of mac addresses according to the formula:

```    totalRatio = | ratio | / N
```

• At this point, the user has a list of total ratios, the ‘better matches’ being those closest to 1 • To select a single match, the user finds the value closest to 1 • For a region of matches, the user find all values with a tolerance according to:

```    1-tolerance < totalRatio < 1+tolerance
```