Show simple item record

dc.contributor.advisorPaikens, Pēteris
dc.contributor.authorSīmanis, Raivis Tomass
dc.contributor.otherLatvijas Universitāte. Datorikas fakultāte
dc.date.accessioned2024-06-01T01:02:43Z
dc.date.available2024-06-01T01:02:43Z
dc.date.issued2024
dc.identifier.other100847
dc.identifier.urihttps://dspace.lu.lv/dspace/handle/7/65607
dc.description.abstractSaistībā ar apgrūtināto iekštelpu pozicionēšanās risinājumu ieviešanu un uzturēšanu lielā daļā situāciju, šī pētījuma mērķis ir izstrādāt risinājumu, ar kura palīdzību ir iespējams kontrolēt atrašanās vietu telpās, izmantojot jau daudzās vietās apkārt uzstādīto bezvadu sakaru infrastruktūru, tādēļ neprasot lietotājam veikt papildus specializētas tehnikas uzstādīšanu. Veicot literatūras apskati, tika atklāts, ka šim nolūkam vispiemērotākie būtu algoritmi, kas veic pozicionēšanos telpās, izmantojot uztverto signālu nospiedumus. Literatūras apskate arī atklāja, ka šāda veida algoritmiem vispiemērotākie signāli būtu WiFi, to vieglās uztveršanas un plašās sastopamības dēļ. Par ierīci, ar kuru veikt eksperimentus, tika izvēlēts AtomS3 Lite ESP32S3 mikrokontrolieris tā relatīvi lētās cenas un visu pamatprasību izpildes dēļ. Projekta ietvaros tika izstrādāta programmatūra priekš signālu nospiedumu ievākšanas, datu analīzes un atrašanās vietas kontroles telpās demonstrācijām. Programmatūra tika rakstīta tādā veidā, lai to var interpretēt gan Python 3.10, gan Micropython 1.21 interpretatori. Divi dažādi signālu nospiedumu sakritības algoritmi tika notestēti. Viens no šiem algoritmiem tika nosaukts par “naivo” algoritmu, un tas satur divus hiperparameterus - required_network_matches un rssi_match_epsilon. Otrs algoritms ir populārā mašinmācīšanās k-tuvāko kaimiņu algoritma adopcija šim projektam, un tas satur divus hiperparametrus - k un dist_algo. Hiperparametrs dist_algo norāda kādu algoritmu izmantot, lai aprēķinātu distanci starp diviem signālu nospiedumiem. Šajā pētījumā divi šādi distances aprēķina algoritmi tika notestēti - Eiklīda un Manhetenas. Šo abu algoritmu testēšanai tika atvēlēta daļa no dzīvokļa, kura tika sadalīta divās vienādās taisnstūrveidīgās zonās, kas atrodas viena otrai blakus - “sliktā” zona un “labā” zona. Priekš katras datu kopas, katrā zonā tika ievākti 24 signālu nospiedumi režģveidīgā izkārtojumā. Divu nedēļu laikā katru dienu tika ievākta viena šāda datu kopa, izņemot pirmo dienu, kurā tika ievāktas divas šādas datu kopas ar mērķi vienu no tām lietot algoritmu trenešanai, bet otru - testēšanai. Tika izvirzīta hipotēze, ka 14 dienu vidējā precizitāte k-tuvāko kaimiņu algoritmam ar optimizētiem hiperparametriem būs lielāka nekā naivajam algoritmam. Rezultāti parādīja, ka augstākā vidējā precizitāte k-tuvāko kaimiņu algoritmam, kas ir 68.01%, tika sasniegta ar hiperparametriem dist_algo = ‘euclidean’ (Eiklīda distance) un k = 13. Augstākā vidējā precizitāte naivajam algoritmam, kas ir 61.61%, tika sasniegta ar hiperparametriem required_network_matches = 2 un rssi_match_epsilon = 1.0. Tādēļ rezultāti apstiprināja hipotēzi, ka k-tuvāko kaimiņu algoritms šādā scenārijā performēs labāk nekā naivais algoritms. Kā arī šī risinājuma precizitāte ir pietiekoši augsta, lai to pielietotu scenārijos, kur nav nepieciešams momentāni noteikt, ka ierīce ir šķērsojusi kādas zonas robežu. Viena no šī pētījuma limitācijām ir, ka visi eksperimenti tika veikti tikai viena veida telpā - dzīvoklī. Cita limitācija ir, ka visi precizitātes mērījumi tika veikti tikai laika intervālā, kas ir divas nedēļas, jo ir iespējams, ka, palielinot šī laika intervāla garumu, iegūtās vidējās precizitātes rādītāji kritīsies. Turpinot šo pētījumu, ir iespējams atkārtot šos pašus eksperimentus dažādās vidēs, palielināt laika intervālu, kurā tiek veikti precizitātes mērījumi, palielināt treniņu datu kopu, kā arī notestēt citus algoritmus, kā, piemēram, svaroto k-tuvāko kaimiņu algoritmu. Atslēgvārdi: atrašanās vietas kontrole iekštelpās, wifi signāli, mikrokontrolieris
dc.description.abstractThis research aims to solve issues regarding the widespread adoption of indoor geofencing systems by creating an indoor geofencing system that is relatively precise and cost-effective, which can be implemented in many different environments and scenarios. By analyzing different indoor positioning methods and wireless technologies, the fingerprinting method and WiFi signals were deemed to be the most suitable technologies for this project. Due to its cost-effectiveness and the ability to meet all the necessary requirements, AtomS3 Lite ESP32S3 microcontroller was chosen as the device to perform fingerprint collection and indoor geofencing demonstrations. Software for fingerprint collection, live indoor geofencing demonstrations and data analysis was developed in a way that it can be run by both Python 3.10 and Micropython 1.21 interpreters. Two different fingerprint matching algorithms were developed, tested and optimized. The first algorithm is called the “naive” algorithm, which takes two hyperparameters - required_network_matches and rssi_match_epsilon. The second algorithm is called the k-NN algorithm, which is an adaptation of the popular k-nearest neighbors machine learning algorithm. This algorithm takes two hyperparameters - k and dist_algo. Hyperparameter dist_algo denotes the distance metric that is used to calculate the distance between two fingerprints. In this research two such distance metrics were tested - Euclidean and Manhattan. To test these algorithms, a rectangular area was divided into two equally-sized zones - the “good zone” and the “bad zone”. For each data set, 24 fingerprints from both the “good” and the “bad” zones were collected. Over a time span of two weeks, each day one data set was collected, except for the first day, when two such data sets were collected with the intention of using one of them for training and the other one for testing. A hypothesis was proposed stating that the average precision of the k-NN algorithm over 14 days with optimized hyperparameters will be higher than that of the naive algorithm. The results showed that the highest average precision for the k-NN algorithm of 68.01% was achieved with hyperparameters dist_algo = ‘euclidean’ and k = 13. The highest average precision for the naive algorithm of 61.61% was achieved with hyperparameters required_network_matches = 2 and rssi_match_epsilon = 1.0. Therefore, the results proved the hypothesis that the k-NN algorithm is the most optimal fingerprint matching algorithm from the tested algorithms for this indoor geofencing solution. Furthermore, these results showed that this indoor geofencing solution using the k-NN algorithm is viable in scenarios where the ability to instantly detect border crossing is not necessary. The limitations of this research are that these experiments were performed in only one type of environment (apartment) and that during each fingerprint collection session objects that are obstructing or interfering with WiFi signals were always in a close proximity to the data collection device. Furthermore, due to time limitations the precision of this solution was only measured for a time span of two weeks and it is likely that increasing the time span will decrease the average precision. Future work in this project could include testing this solution in different environments, repeating the experiments with larger training data set, increasing the time span over which the precision tests are performed and testing different fingerprint matching algorithms, such as weighted k-NN algorithm. Keywords: indoor geofencing, indoor positioning, location fingerprinting, wifi signals, microcontroller
dc.language.isolav
dc.publisherLatvijas Universitāte
dc.rightsinfo:eu-repo/semantics/openAccess
dc.subjectDatorzinātne
dc.titleAtrašanās vietas kontrole telpās ar WiFi signāliem
dc.title.alternativeIndoor Geofencing Using WiFi Signals
dc.typeinfo:eu-repo/semantics/bachelorThesis


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record