DOI: 10.5281/zenodo.10838490
title: Evaluation of underfloor accelerometers through fingerprinting for indoor localization

description: # Fingerprinting

Code developed to test the effectiveness of an indoor positioning system where multiple accelerometers are placed under the floor and set up to collect data.

 

## Why?

This material complements the work done for the paper "Evaluation of Underfloor Accelerometers for Enabling Location-based Services in Intelligent Environments" 

and helps readers to reproduce and validate the results presented in that paper. 

 

The contributions made by this material are listed below:

 

1. Data sets as csv and txt files:

- u1p1ACC.csv u1p1GT.csv u1p1.txt  

- u1p2ACC.csv u1p2GT.csv u1p2.txt 

- u1p3ACC.csv u1p3GT.csv u1p3.txt

- u2p1ACC.csv u2p1GT.csv u2p1.txt 

- u2p2ACC.csv u2p2GT.csv u2p2.txt 

- u2p3ACC.csv u2p3GT.csv u2p3.txt

 

2. Implementation of the main code into a Jupyter notebook:

    - fingerprinting.ipynb

 

3. Implementation of the code for generating the plots:

- plots.ipynb

 

4. Data for generating the plots into appropriate nested folders:

- data_for_plots (folder) 

 

5. Yaml files for the creation of the conda environment with linux and windows:

    - linux_environment.yml

    - windows_environment.yml

  

## Abstract (tentative)

Device-free indoor positioning systems can effectively monitor people's movements in their everyday living environments without the constraints of invasive or wearable devices. Such systems are valuable for designing location-based services in intelligent environments, and particularly, they could be key enablers for enhancing the inclusivity of visually impaired individuals. The current work introduces an indoor positioning system composed of underfloor accelerometers. The goal is to implement a non-invasive system that combines hardware and software features to minimize the average positioning error of a person walking in a room. 

To assess the feasibility of deploying accelerometers in a device-free localization system, a chamber with multiple accelerometers positioned under the floor was set up for data collection and testing. To identify the best-performing algorithm and obtain empirical feedback on the quality of the developed localization system, we applied representative machine-learning strategies to the collected data and evaluated the Euclidean distance between ground-truth and estimated positions.

 

## What the code does

The execution of the main code performs the following:

1. generation of sensor maps through their absolute coordinates;

2. noise reduction on the raw data according to the average of the white noise the accelerometers are subjected at quiet;

3. generation of the fingerprint maps per each data set;

4. generation of the clean ground truth files (deleting coordinates set to zero);

5. computation of the n-dimensional distance between observations at a given time step and the euclidean error between the minimum distance value coordinates and the respective temporally closest ground truth ones;

6. same as in 5 but with intra-user fingerprint maps;

7. same as in 5 but with inter-user fingerprint maps;

8. same as in 5 but with enhanced inter-user fingerprint maps.

 

# Run

 

## Install

To run the code is advised to create a conda environment and install all the dependencies contained in environment.yml file by executing the following steps:

 

```

cd fingerprinting-main

conda env create --file=[linux_environment.yml or windows_environment.yml]

conda activate fingerprinting

```

 

## Configuration

No further configuration is required.

 

## Launch!

To reproduce the experiments, run the fingerprinting.ipynb with Jupyter as follows (remember to activate the conda environment first):  

```

jupyter notebook fingerprinting.ipynb

```

 

To generate the plots, run plots.ipynb with Jupyter as follows (remember to activate the conda environment first):

```

jupyter notebook plots.ipynb

```

 

Once launched, for both tests, you can run all the cells by taking advantage of the notebook's main menu.

 

## Results

By default the code produces results for k=[1,2,3] and tw=[10,30,60]. In doing so, it generates several files and stores them into the following, nested subfolders:

 

fingerprinting

|

data -

        |    |

|    clean_ground_truth

|    |

|    csv (already present)

|    |

|    data_with_reduced_noise

|    |

|    ground_truth (already present)

|    |

|    txt (already present)

|

  data_for_plots - 

  |        |

  |        images

  |        |

  |        inter (already present)

  |        |

  |        inter_enhanced (already present)

|        |

    |        intra (already present)

        |  

fingerprint_maps

|

mapping

|

output -

               |

       K1 -

       |  |

       |  distance_and_error

       |  |

       |  inter_user_distance_and_error

       |  |

       |  inter_user_distance_and_error_with_enhanced_FT

       |  |

       |  intra_user_distance_and_error

       |

       K2 -

       |  |

       |  distance_and_error

       |  |

       |  inter_user_distance_and_error

       |  |

       |  inter_user_distance_and_error_with_enhanced_FT

       |  |

       |  intra_user_distance_and_error

               |

       K3 -

  |

  distance_and_error

  |

  inter_user_distance_and_error

  |

  inter_user_distance_and_error_with_enhanced_FT

  |

  intra_user_distance_and_error           

   

 

Main results are saved into the `output` folder.

 

All plots are stored in the `images` folder, subfolder of the `data_for_plots` folder.

 

Note that when you launch a new experiment by changing some parameters, the new results will override the old ones.

 

# Contributing

If you find something missing, wrong or you want to suggest an improvement you are welcome to notify it by writing an email to the correspondig author: antonino.crivello@isti.cnr.it.

 

# Authors

Dimitri Belli, Antonino Crivello, Davide La Rosa, and Paolo Barsocchi