Tx Transmitter

CARA Collision Avoidance Resource Allocation CDF Cumulative Distribution Function CFO Carrier Frequency Offset CRC Cyclic Redundancy Check

This work would not have been possible without the help, guidance, and patience of my supervisor Bernard Uguen. I would like to warmly thank him for giving me this opportunity to conduct my Ph.D. under his supervision with the Propagation and Localization Group, in the Institute of Electronics and Telecommunications of Rennes (IETR), and for all the time he dedicated to help me. Many thanks to Dominique Lemur for his useful advice and constant support throughout the thesis period. Furthermore, I would like to thank Christophe Moy for the discussions we had during the thesis along with his encouragement, insightful comments what motivates me to succeed. I admit that my 3 years in the IETR lab was a great life experience mainly

RÉSUMÉ EN FRANÇAIS

L'IoT a pris de l'ampleur au cours des dernières années en tant que nouveau paradigme permettant de connecter efficacement des milliards de dispositifs [START_REF] Centenaro | Long-range communications in unlicensed bands: the rising stars in the iot and smart city scenarios[END_REF]. Au-delà des services traditionnels de voix, de vidéo et de données où le débit de données est l'objectif principal, dans le contexte du IoT, l'accent est mis dans ce mémoire sur les déploiements à faible coût avec de grandes zones de couverture. Pour fournir cette connectivité, les Low Power Wide Area Networks (LPWAN) sont considérés comme la principale technologie, en particulier le LoRaWAN dont la conception établit un compromis entre une faible consommation d'énergie et une grande portée de communication des dispositifs IoT [START_REF]Lora alliance homepage[END_REF], comme le montre la figure 1. Cette capacité se manifeste surtout dans les dispositifs LoRa typiques, qui peuvent couvrir des distances de plus de 10 km en utilisant une puissance d'émission maximale de 10 mW dans le spectre ISM sans licence, tout en maintenant des durées de vie de batterie extrêmement longues, jusqu'à plusieurs mois [START_REF] Oliveira | Long range communications in urban and rural environments[END_REF]. Ainsi, un module LoRaWAN fonctionnant dans la bande 868 MHz consomme 2.8 mA, à l'état "on", 38.9 mA en transmission de données et 14.2 mA en réception de données [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF]. La localisation est critique pour de nombreuses applications LPWAN en raison de la nature même des données collectées à partir des terminaux [START_REF] Adelantado | Understanding the limits of lorawan[END_REF]. Ces utilisations concernent les données de santé, la surveillance des animaux domestiques ou du bétail, de la faune ou des applications pour les villes intelligentes utilisant des capteurs tels que la température ou la surveillance de la qualité de l'air dans les environnements urbains [START_REF] Mainetti | An iot-aware aal system for elderly people[END_REF]. Ce problème pourrait être résolu simplement en équipant chaque capteur d'une puce Global Navigation Satellite Systems (GNSS), par exemple en utilisant le Global Positioning System (GPS). Bien que cette solution soit facile, l'ajout d'un tracker GPS à un appareil augmente à la fois le coût et la consommation d'énergie [START_REF] Sayed | Network-based wireless location: challenges faced in developing techniques for accurate wireless location information[END_REF]. Ainsi, il doit être rechargé tous les quelques jours car la consommation de courant d'un récepteur GPS est d'environ 30 mA à 50 mA, ce qui comprend à plus d'énergie que cette requise par la plupart des IoT à faible puissance. Par la suite, de nombreuses recherches dans le domaine de la localisation sans GPS dans les IoT, ont étudié des méthodes basées sur les RSSI, AoA, ToA, TDoA et leurs multiples intégrations [START_REF] Li | A narrow-band indoor positioning system by fusing time and received signal strength via ensemble learning[END_REF]. Ces mesures sont utilisées par les passerelles pour déterminer leurs relations de position relative avec la source pour la localisation. D'autre part, la perte de paquets sera le point faible de ces réseaux car elle dégrade les performances de l'ensemble du réseau à long terme. Par exemple, le protocole LoRaWAN ne disposant pas de droits exclusifs dans les bandes sans licence, également appelées bandes d'application ISM, des dégradations de canaux peuvent se produire sur la liaison entre le noeud final et la passerelle, réduisant ainsi la fiabilité des communications dans ces réseaux. Ces dégradations de canaux peuvent être dues à des collisions, comme le montre le document [START_REF] Rahmadhani | When lorawan frames collide[END_REF], ou à des effets de propagation, comme le montrent les documents [START_REF] Abdelghany | On superior reliability of effective signal power versus rssi in lorawan[END_REF], [START_REF] Abdelghany | Modelling of the packet delivery rate in an actual lorawan network[END_REF] et [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. Cet échec de transmission peut avoir des conséquences graves pour diverses applications IoT, en particulier celles qui utilisent le mode de messagerie avec accusé de réception pour les données importantes des capteurs. Si le noeud final ne reçoit pas le paquet Acknowledgment (ACK), il retransmet le paquet de données. Cependant, cette retransmission nécessite une consommation d'énergie supplémentaire qui a un impact sur la durée de vie de la batterie des dispositifs du noeud final, en plus d'occuper une patron de spectre supplémentaire et d'augmenter le niveau d'interférence. De plus, un temps supplémentaire est occupé qui pourrait être utilisé pour les liaisons montantes. En outre, l'augmentation de la demande de retransmissions, en particulier du côté du réseau, entraînera l'épuisement des ressources énergétiques et une augmentation potentielle des émissions de CO 2 . Par conséquent, l'industrie des télécommunications occupe une quantité équivalente de 2% à 10% de la consommation électrique mondiale. Cette quantité de consommation d'énergie provient principalement des stations de base à hauteur de 60% à 80%.

NB-IoT

Tout au long de cette thèse, la précision de la localisation est améliorée tout en préservant la faible consommation d'énergie du LPWAN, tandis que des techniques d'allocation de spectre sont proposées pour réduire les pertes de paquets. Ainsi, les propriétés de propagation du canal sans fil sont utilisées pour permettre aux dispositifs IoT de fonctionner avec une consommation d'énergie aussi faible que possible, comme indiqué dans les sections suivantes.

Objectifs et contributions

L'objectif initial de cette thèse est d'améliorer les techniques de localisation dans le réseau LPWAN qui dépendent de techniques centralisées (du côté du réseau). Ensuite, le travail s'oriente vers l'utilisation des mesures de canaux pour proposer des techniques d'allocation de spectre afin de réduire les pertes de paquets. En effet, ces deux approches utilisent les paramètres de propagation du canal pour réduire la consommation d'énergie dans le IoT afin d'être plus économe en énergie dans une perspective écologique, comme indiqué dans les sous-sections suivantes.

Localisation

La localisation est optimisée en améliorant la précision de la technique TDoA qui est considérée comme l'une des techniques les plus populaires, car elle ne nécessite aucune synchronisation du côté du noeud [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF]. Seule la synchronisation temporelle du côté de la passerelle utilise un module GPS pour horodater le paquet reçu. Après avoir acquis les différences entre les horodatages d'une transmission, celle-ci est considérée comme un problème de multilatération qui implique la résolution d'un ensemble de fonctions hyperboliques. Ici, l'amélioration de TDoA est réalisée comme suit :

• Proposer une technique paramétrique de TDoA qui dépend des fonctions hyperboliques pour localiser le noeud sur une hyperbole, plutôt que de le localiser dans une position libre dans l'espace pouvant subir l'influence des imperfections de l'horodatage, comme le montre la figure 2.

• Un algorithme de prétraitement est proposé pour éliminer les horodatages aber-rants à l'aide d'une méthode de seuillage robuste.

• Une autre méthodologie de prétraitement des TDoA pour éliminer les valeurs TDoA aberrantes est présentée, après avoir instrumenté un CRLB apparié. L'approche proposée détecte les meilleures valeurs de TDoA, qui ont les plus faibles valeurs de CRLB appariées, à proximité de l'emplacement du noeud supposé, en se basant sur une méthode de seuillage robuste. Un simulateur est mis en oeuvre pour l'analyse des performances de ces méthodes proposées dans un environnement de simulation bien défini. Ainsi, une comparaison est effectuée en étudiant les précisions atteignables pour la localisation basée sur ces approches TDoA proposées et la méthode classique TDoA, sur un environnement de simulation bien défini. Dans les résultats donnés, la faisabilité de ces techniques proposées est confirmée par une amélioration drastique sur une large gamme du nombre de passerelles ainsi que des variances du bruit de mesure. Comme le montre la Figure 3, la méthode paramétrique TDoA surpasse la méthode classique TDoA, ce qui indique que la méthode proposée est plus robuste aux fortes dérives des valeurs d'horodatage. D'autre part, la faisabilité de l'utilisation du CSI pour la localisation est étudiée, après avoir su que le CSI contient des informations sur le canal entre l'émetteur et le récepteur au niveau des sous-porteuses de données individuelles. Contrairement à la plupart des travaux précédents, l'approche envisagée consiste à utiliser l'intégralité des amplitudes des sous-porteuses sans calcul de moyenne ni réduction du CSI à bande étroite obtenu.

Résumé en Français

(a) Erreurs à chaque valeur de l'écart-type de la dérive.

(b) L'ensemble des résultats de simulation de σ 2 allant de 0 m to 600 m. De plus, le saut de fréquence dans les systèmes LoRa devrait être un avantage pour la localisation en permettant l'accès à une bande plus large. Afin d'obtenir une base fiable pour cette approche, une campagne de mesure en extérieur est réalisée dans la zone du Campus Beaulieu à Rennes pour estimer le CSI des signaux LoRa transmis depuis différents endroits. Les signaux LoRa transmis à partir de différents emplacements. Dans les résultats donnés, la faisabilité de l'utilisation de l'approche proposée est établie par la stabilité drastique de la pente du CSI dans le temps et l'espace, contrairement à l'amplitude moyenne du CSI. Ceci démontre la robustesse du CSI aux fluctuations du signal et sont rendu plus fiable que le RSSI.

Allocation du spectre

Le PDR est considéré comme une mesure majeure de la performance du réseau, tandis que sa dépendance aux dégradations du signal est confirmée [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. Dans cette thèse, le PDR est étudié comme suit :

• Une étude approfondie de la dépendance en fréquence du PDR est effectuée en réalisant une campagne de mesure en extérieur dans la zone du Campus de Beaulieu à Rennes. A partir de chaque emplacement différent, les valeurs de ESP et Signalto-Noise Ratio (SNR) sont obtenues ainsi que l'influence de ces paramètres sur le PDR est évaluée à chaque bande de fréquence indépendamment. Comme le montre la figure 4, la faisabilité de l'utilisation du ESP est prouvée par sa portée élargie lorsque le SINR est très faible, contrairement au RSSI qui présente une limitation.

• La modélisation du PDR à l'aide d'une fonction de distribution bêta ESP paramétrée est proposée. La faisabilité du modèle proposé est assurée par la simulation de PDR par rapport à l'ESP, comme le montre la figure 5. Ainsi, les valeurs de PDR simulées suivent bien la distribution des valeurs mesurées.

Cette investigation montre que l'utilisation de l'ESP dans les futures applications IoT, notamment la localisation à l'aide de l'empreinte digitale ESP. De plus, le modèle PDR proposé donne des directives importantes pour la régulation et l'optimisation des réseaux LoRaWAN futurs. Sur cette base, la qualité du canal dans les différentes bandes de fréquences est prise en compte pour réduire les pertes de paquets dans le IoT, en particulier dans les réseaux LPWAN. Ainsi, les techniques d'allocation de spectre sont proposées comme suit :

• Une technique d'apprentissage QoC-A basée sur des algorithmes de bandit est pro- posée afin de choisir le canal de transmission, de sorte qu'il atténue les dégradations du canal en utilisant le paramètre de qualité du canal, c'est-à-dire ESP.

• Un algorithme DQoC-A est proposé pour s'adapter rapidement à tout changement abrupt dans les conditions des canaux.

De plus, une campagne expérimentale réaliste est réalisée dans la ville de Rennes pour démontrer la faible complexité et la faisabilité de ces algorithmes proposés tout en les implémentant du côté du dispositif IoT (approche décentralisée). Dans les résultats donnés, QoC-A surpasse la politique classique UCB avec un processus d'apprentissage plus accéléré. D'autre part, la faisabilité de l'utilisation de la DQoC-A dans les scénarios non stationnaires est prouvée par sa convergence rapide lorsque des changements abrupts dans les conditions des canaux se produisent. À la fin du processus, ces techniques d'apprentissage proposées sont assurées de donner moins de pertes de paquets que les techniques de pointe avec une allocation de fréquence aléatoire, comme le montrent le tableau 1 et le tableau 2.

Ces algorithmes d'apprentissage par renforcement proposés sont recommandés pour être mis en oeuvre du côté du noeud final. De plus, des remarques importantes sont données pour ajuster les configurations des algorithmes en fonction des propriétés de chacune des applications IoT potentielles.

Organisation de la thèse

L'ordre de lecture du manuscrit peut être quelconque entre l'introduction du chapitre 1, et la Conclusion du dernier chapitre 7. La thèse est organisée en deux parties, correspondant aux deux colonnes de la figure 6.

Tout d'abord, dans la partie I (première colonne), elle commence par le chapitre 2 qui est nécessaire pour le reste de cette partie, car il présente l'état de l'art des techniques de localisation et les notations utilisées dans ce domaine. Les chapitres 3 présentent les approches proposées pour améliorer la précision des techniques TDoA. Ces améliorations se manifestent dans la méthode paramétrique TDoA proposée et les algorithmes de prétraitement. Dans le chapitre 4, la faisabilité de l'utilisation de la CSI pour la LPWAN localisation est affirmée expérimentalement.

Ensuite, la partie II (deuxième colonne) contient deux chapitres, qui peuvent être lus de manière indépendante. Le chapitre 5 commence par présenter les différents facteurs de pertes de paquets dans IoT, puis PDR est modélisé en fonction de l'ESP. Ainsi, il est prouvé que l'ESP est plus fiable que le RSSI sur la base d'une campagne de mesure réalisée. Enfin, le chapitre 6 présente les techniques d'allocation de spectre proposées pour réduire ces pertes de paquets et leurs résultats expérimentaux.

INTRODUCTION

IoT has been scaling up over the last few years as a new paradigm enabling the connection of billions of devices efficiently [START_REF] Centenaro | Long-range communications in unlicensed bands: the rising stars in the iot and smart city scenarios[END_REF]. Beyond the traditional voice, video and data services where data throughput is the main purpose, in the context of IoT, the focus here is the low-cost deployments with large coverage areas. For providing this connectivity, LPWAN are considered the major technology, especially the LoRaWAN whose design compromises between low energy consumption and a large communication range of the underlying IoT-enabled devices [START_REF]Lora alliance homepage[END_REF], as shown in Figure 1.1. This ability is mostly exhibited in the typical LoRa devices, which can cover distances of more than 10 km using a maximum transmit power of 10 mW in the unlicensed ISM spectrum while maintaining extremely long battery lifetimes at the scale of up to several months [START_REF] Oliveira | Long range communications in urban and rural environments[END_REF]. Hence, a LoRaWAN module operating in the 868 MHz band consumes 2.8 mA, in the "on" state, 38.9 mA transmitting data and 14.2 mA receiving data [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF]. Localization is critical for many LPWAN applications due to the very nature of the data collected from the terminals [START_REF] Adelantado | Understanding the limits of lorawan[END_REF]. These usages involve health data, monitoring of pets or livestock, wildlife or applications for smart cities using sensors such as temperature or air quality monitoring in urban environments [START_REF] Mainetti | An iot-aware aal system for elderly people[END_REF]. This problem could be simply solved by equipping each sensor with a GNSS chip, for example, using GPS. While this solution is tempting, adding a GPS tracker to a device will increase both cost and power consumption [START_REF] Sayed | Network-based wireless location: challenges faced in developing techniques for accurate wireless location information[END_REF]. Thus, it needs to be recharged every few days as the current consumption of a GPS receiver is about 30 mA to 50 mA, which is considered more energy required by most low power IoT devices. Subsequently, plenty of researches within the domain of GPS-Free localization in IoT, have investigated methods based on RSSI, AoA, ToA, TDoA and their multiple integrations [START_REF] Li | A narrow-band indoor positioning system by fusing time and received signal strength via ensemble learning[END_REF]. These measurements are utilized by the gateways to determine their relative position relations with the source for localization.

NB-IoT

Sigfox

On the other hand, packet loss will be the weak point of these networks as it degrades the performance of the entire network in the long term. For instance, LoRaWAN protocol has no exclusive rights in the unlicensed bands [START_REF] Wang | Performance of lora-based iot applications on campus[END_REF], also called ISM application bands, channel impairments may occur on the link between the end node and the gateway, reducing the reliability of communications in these networks [START_REF] Augustin | A study of lora: Long range & low power networks for the internet of things[END_REF]. These channel impairments may occur either due to collisions as depicted in [START_REF] Rahmadhani | When lorawan frames collide[END_REF], or propagation effects as manifested in [START_REF] Abdelghany | On superior reliability of effective signal power versus rssi in lorawan[END_REF], [START_REF] Abdelghany | Modelling of the packet delivery rate in an actual lorawan network[END_REF] and [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. Serious outcomes are caused by this transmission failure that may affect various IoT applications, in particular those using the acknowledged messaging mode for the important sensor data. If the end node does not receive the ACK packet, the end node will retransmit the data packet. However, extra energy consumption is required by this retransmission that impacts the battery life of the end node devices plus occupying an additional spectrum and raising the interfering level. Moreover, extra time is occupied that could be used for uplinks. Over and above, exhaustion of energy resources and a potential increase in the CO 2 emissions will occur by increasing the demand for these retransmissions, particularly at the network side. Hence, the telecommunication industry occupies an equivalent amount of 2% to 10% of the global power consumption [START_REF] Fettweis | Ict energy consumption -trends and challenges[END_REF]. This amount of power consumption is mainly from the base stations by an amount of 60% to 80% [START_REF] Ajmone Marsan | Optimal energy savings in cellular access networks[END_REF].

Throughout this thesis, localization accuracy is improved while preserving the low power consumption of the LPWAN, whereas spectrum allocation techniques are proposed to reduce the packet losses. Thus, the propagation properties of the wireless channel are Part , Chapter 1 -Introduction utilized to let the IoT devices function with less energy consumption as much as possible, as discussed in the following sections.

Objectives and Contributions

The initial target of this thesis is to enhance the localization techniques in the LPWAN that depend on centralized techniques (on the network side). Then, the work is shifted toward utilizing the channel measurements to propose spectrum allocation techniques owing to reduce the packet losses. Indeed, these two approaches are using the channel propagation parameters for reducing the power consumption in IoT to be more energy efficient in a green perspective, as briefed in the following subsections.

Localization

Localization is enhanced by improving the accuracy of the TDoA technique that is considered as one of the most popular techniques, as it does not need any synchronization on the node side [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF]. Only time synchronization at the gateway side using a GPS module to timestamp the received packet. After acquiring the differences between the timestamps of a transmission, it is considered a multilateration problem that involves solving a set of hyperbolic functions. Here, the improvement in TDoA is achieved as follows:

• Proposing a parametric TDoA technique which depends on the hyperbolic functions to localize the node on a hyperbola, rather than locating it in a free position in the space potentially suffering from the influence of the timestamp imperfections.

• A pre-processing algorithm is proposed for dropping out the outlier timestamps based on a robust thresholding method.

• Another TDoA pre-processing methodology for dropping out the outlier TDoA values is presented, after instrumentalizing a paired CRLB. This proposed approach is detecting the best TDoA values, which have the lowest paired CRLB values specifically, in the vicinity of the guessed node location, based on a robust thresholding method.

A simulator is implemented for the performance analysis of these proposed methods in a well-defined simulation environment. Hence, a comparison is performed investigating the attainable accuracies for localizing based on these proposed TDoA approaches and the classical TDoA method, on a well-defined simulation environment. In the given results,

Objectives and Contributions

the feasibility of these proposed techniques is asserted by a drastic improvement over a wide range of the number of gateways as well as measurement noise variances. Moreover, the parametric TDoA outperforms the classical TDoA, hence, it indicates that the proposed method is more robust to the high drifts in the timestamp values.

On the other hand, the feasibility of utilizing the CSI for localization is studied, after knowing that the CSI contains information about the channel between the sender and receiver at the level of individual data subcarriers. Unlike most of the previous work, the intended approach is to use the entire subcarrier magnitudes without averaging or any reduction of the obtained narrowband CSI. Moreover, the frequency hopping in the LoRa systems should be a profit for localization by getting access to a wider band. In order to obtain a reliable basis for this approach, an outdoor measurement campaign is performed in the area of Beaulieu Campus in Rennes to estimate the CSI of transmitted LoRa signals from different locations. In the given results, the feasibility of using the proposed approach is asserted by the drastic stability of the CSI slope over time and space, contrary to the CSI average amplitude. This manifests the robustness of the CSI to the signal fluctuations and its more valuable rendering than the RSSI.

Spectrum Allocation

PDR is considered as a major measure of the network performance, whereas its dependency on the signal impairments is confirmed [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. In this thesis, the PDR is investigated as follows:

• An in-depth investigation of the frequency dependency of the PDR is done by performing an outdoor measurement campaign in the area of Beaulieu Campus in Rennes. From each different location, the ESP and SNR values are obtained as well as the influence of these parameters on the PDR is evaluated at each frequency band independently. Within the given results, the feasibility of using the ESP is proven by its enlarged range when the SINR is very low, unlike the RSSI which has a limitation.

• Modelling the PDR using an ESP-parameterized beta distribution function is proposed. The feasibility of the proposed model is assured by simulating PDR against ESP, hence, the simulated PDR values follow the distribution of the measured ones well.

This investigation manifests using ESP in the future IoT applications, especially local- Based on that, the channel quality across the different frequency bands is considered to reduce the packet losses in IoT, especially in LPWAN. Thus, spectrum allocation techniques are proposed as follows:

• A QoC-A learning technique based on bandit algorithms is proposed in order to choose the transmission channel, so that it mitigates the channel impairments using the channel quality parameter, i.e. ESP.

• A DQoC-A algorithm is proposed to adapt rapidly to any abrupt change in the channels' conditions.

Moreover, a real experimental campaign is performed in the city of Rennes to demonstrate the low complexity and the feasibility of these proposed algorithms while implementing them on the IoT device side (decentralized approach). In the given results, QoC-A outperforms the classical UCB policy with a more accelerated learning process. On the other hand, the feasibility of using the DQoC-A in the non-stationary scenarios is proven by its rapid convergence when abrupt changes in the channels' conditions occur. At the end of the process, these proposed learning techniques are assured to give fewer packet losses than the state-of-the-art ones with a random frequency allocation. These proposed reinforcement learning algorithms are recommended to be implemented in the end node side, moreover, important remarks are given for adjusting the algorithms' configurations based on the properties of each of the potential IoT application.

Organization of the Thesis

The reading order of the manuscript can be any top-down path between the Introduction in Chapter 1, and the Conclusion in the last Chapter 7. The thesis is organized in two parts, corresponding to the two columns of the following Figure 1

.2.
First, in Part I (first column), it starts by Chapter 2 that is required for the rest of this part, as it introduces the state of the art localization techniques and the notations used in it. Chapters 3 present the proposed approaches for improving the accuracy of the TDoA techniques. These improvements are manifested in the proposed parametric TDoA method and the pre-processing algorithms. In Chapter 4, the feasibility of utilizing the Then, Part II (second column) contains two chapters, that should be read dependently. Chapter 5 starts by presenting different factors of the packet losses in IoT, subsequently, PDR is modeled as a function of ESP. Thus, ESP is proven to be more reliable than RSSI based on an accomplished measurement campaign. Finally, Chapter 6 introduces the proposed spectrum allocation techniques to reduce these packet losses and their experimental results.

Publications

This PhD thesis led to the publications that are mentioned in the following subsections.

Radio Localization for IoT Infrastructures

Chapter 2

BACKGROUND ON IOT POSITIONING TECHNIQUES

Localization of the end devices is a mandatory requirement for specific usages, particularly in Industry 4.0 [START_REF] Adelantado | Understanding the limits of lorawan[END_REF]. A GPS can achieve an accuracy of less than 10 m or even centimeter-level accuracy in an open outdoor scenarios [START_REF] Xu | GPS: Theory, Algorithms and Applications[END_REF]. However, GPS-based solutions are not feasible due to cost, processing and energy consumption, as discussed in the previous chapter. Hence, this chapter presents an overview of the localization techniques in the IoT, especially LPWAN which mainly depend on network-based localization methods [START_REF] Sayed | Network-based wireless location: challenges faced in developing techniques for accurate wireless location information[END_REF]. Before proceeding, an overview of the LoRa technology is presented in Section 2.1. Then, Section 2.2 describes the main observable signal measurements that can be utilized for localization, as shown in Figure 2.1. Accordingly, Section 2.3 explains how to localize the end node using the two different types of algorithms that are based on a fingerprinting or geometric approaches.

IoT Localization

Signal Measurements Localization Algorithm

Received Signal Strength Indicator (RSSI)

LoRa Technology

LoRa Technology

This section first presents LoRa physical layer, then, the basic LoRaWAN network components are introduced.

LoRa Physical Layer

LoRa is considered the leading radio standard for wide area networks that is patented by the semiconductor manufacturer Semtech [START_REF] Noreen | A study of lora low power and wide area network technology[END_REF]. This technique uses a Chirp Spread Spectrum (CSS) modulation to improve robustness against noise and then allows Internetconnected applications to communicate with low-power devices over long-range wireless transmission [START_REF] Masek | Measurements of lorawan technology in urban scenarios: A data descriptor[END_REF]. Hence, LoRa symbols are encoded into multiple signals of increasing (up-chirp) or decreasing (down-chirp) frequencies. As shown in Figure 2.2, one LoRa symbol is generated from the m th cyclic time shift of the basic chirp such as:

x m [n] = 1 2 SF exp(j2π (((m + n) mod 2 SF ) -2 SF -1 ) 2 2 1-SF ) (2.1)
with m = 0 for the basic chirp symbol, while n depicts the sample index n = 0, 1, 2, ..., 2 SF -1. Moreover, the Spreading Factor (SF) of the LoRa chirp can be modified ranging from 7 to 12 based on the required data rate and transmission range of the application [START_REF] Guo | Experimental evaluation of the packet reception performance of lora[END_REF]. Since one chirp consists of 2 SF samples, a higher SF increases the airtime of the packet and then resulting in greater receiving sensitivity. However, using high SF increases the power consumption and decreases the data rate. On the other hand, LoRa uses a bandwidth of 125 kHz, 250 kHz or 500 kHz to transmit a packet on the sub-1 GHz bands. In Europe, LoRa mostly operates in the 868 MHz ISM band.

Frame Structure

LoRa has a maximum packet size of 256 bytes [START_REF] Noreen | A study of lora low power and wide area network technology[END_REF], moreover, its frame structure contains the following main fields:

• Preamble: It is a variable-sized sequence of base chirps that is used for the time synchronization to detect the frame, as shown in Figure 2.2.

• Frame synchronization symbols: It can be used as a network identifier and it is composed of two modulated chirps [START_REF] Robyns | A multi-channel software decoder for the lora modulation scheme[END_REF].

• Frequency synchronization symbols: It is a two conjugate base chirps followed by a 0.25 conjugate chirp which are both utilized for fine frequency synchronization.

• Header (optional): It is a used field in the explicit mode that specifies the payload length, Forward Error Correction (FEC) code rate, the presence of a payload Cyclic Redundancy Check (CRC). In the implicit mode, this header field is not included to reduce the transmission time, hence, these configurations must be manually specified between the Transmitter (Tx) and the Receiver (Rx).

•

LoRaWAN Network Architecture

LoRaWAN is a proposed MAC protocol by the LoRa Alliance for defining the network architecture and layers above the LoRa physical layer [START_REF]Lora alliance homepage[END_REF]. Without peering with a specific gateway, end nodes communicate with nearby gateways using an ALOHA-based protocol. Each gateway within range receives the message and then forwards it to the connected network server, as shown in Figure 2.3. Thus, the network server handles the message deduplication. On this basis, four basic elements compose a LoRaWAN network as follows:

1. End Node: It is an object with an embedded low-power communication de

IoT Localization Signal Measurements

Passive geolocation is the preferred methods that depends on the information already available in most of the IoT networks. This section illustrates the commonly used localization signals that are estimated on the gateway side.

RSSI

Received Signal Strength Indicator (RSSI) is typically measured in dBm in the base station front end when the data packet is received from the end node [START_REF] Kwasme | Rssi-based localization using lorawan technology[END_REF][START_REF] Shojaifar | Evaluation and improvement of the rssi-based localization algorithm : Received signal strength indication (rssi)[END_REF], as shown in Figure 2.4. In free space, this value directly reflects the distance between the Tx and Rx [START_REF] Bor | Do lora low-power wide-area networks scale?[END_REF]. The high RSSI value obtained means that Tx and Rx are close to each other and vice versa. In practical life, the distance d between Tx and Rx can be determined using different path loss models where the transmission power at the Tx is known. For example, the determined RSSI value is related to a distance d using the following path loss model [START_REF] Sadowski | Rssi-based indoor localization with the internet of things[END_REF]:

RSSI = C -10n log 10 (d), (2.2)
where C is a fixed constant that accounts for system losses, n is the path loss exponent that varies depending on the environment. Thus, the value of n determines how quickly RSSI falls with respect to d.

Using RSSI has many advantages as:

• No extra hardware is required on the gateway side, hence, RSSI can be straightforwardly obtained [START_REF] Anjum | Analysis of rssi fingerprinting in lora networks[END_REF].

• RSSI can be flexibly used for various localization algorithms, such as trilateration or fingerprinting approaches [START_REF] Sallouha | Localization in long-range ultra narrow band iot networks using rssi[END_REF], as detailed in the following section.

However, the challenges for using RSSI include:

• The path-loss model parameters are difficult to be determined accurately in many scenarios such as urban and indoor environments [START_REF] Seidel | 914 mhz path loss prediction models for indoor wireless communications in multifloored buildings[END_REF][START_REF] Stojkoska | How much can we trust rssi for the iot indoor location-based services?[END_REF].

• RSSI value variations and interference often happen, especially over large transmission distances, due to environmental factors [START_REF] Li | Towards location enhanced iot: Characterization of lora signal for wide area localization[END_REF][START_REF] Kwasme | Rssi-based localization using lorawan technology[END_REF]. These uncertainties are problematic issues as every 1 dB change in the RSSI value may lead to distance differences of meters.

IoT Localization Signal Measurements

IoT device

ToA

ToA is defined as the time spent by the signal to propagate between the end node and the gateway [START_REF] Li | Toward location-enabled iot (le-iot): Iot positioning techniques, error sources, and error mitigation[END_REF]. The distance d is acquired simply as the product of the measured transmission time by the speed of light (c ≈ 3 × 10 8 m s -1 ) as:

d = c × (t arrived -t transmitted ), (2.3)
where t arrived and t transmitted are the time of receiving and transmitting the packet, respectively.

Using ToA includes the following advantages:

• The distance d can be obtained directly by linearly converting the ToA value to a spacial distance without knowing any path loss model, as shown in Figure 2.5.

• Localizing with ToA can achieve high accuracy of centimeter-level in Line-of-Sight (LoS) environments [START_REF] Dardari | Ranging with ultrawide bandwidth signals in multipath environments[END_REF].

• The accuracy assessment of ToA method is available [START_REF] Shen | Accurate passive location estimation using toa measurements[END_REF]. Nevertheless, ToA localization requires precise timing on both the end node and gateway, or synchronization between them. For instance, ten-nanosecond-level timing accuracy is required to achieve meter-level ranging. Such precise timing is not affordable for many IoT devices with low complex hardware.

TDoA

TDoA is measured by computing the signal arrival time differences among multiple gateways [START_REF] Leugner | Comparison of wired and wireless synchronization with clock drift compensation suited for u-tdoa localization[END_REF]. As shown in Figure 2.6, a mobile node transmits data to the network. Each gateway within reach records the timestamp of the received packet. The timestamps of each gateway are then forwarded to the network server which in turn sends a request to the geolocation solver.

Hence, TDoA localization has the following advantages:

• No precise timing on nodes is required. Instead, only the gateways are required to have synchronized clocks. This accurate time synchronization can be achieved easily by the use of a GPS receiver at each gateway.

• An accurate localization of hundreds to thousands of meters can be achieved based on TDoA localization methods.

• TDoA localization methods have many accuracy assessment mechanisms in theory [START_REF] Kaune | Accuracy analysis for tdoa localization in sensor networks[END_REF].

On the other hand, the challenges for TDoA localization include:

• TDoA localization accuracy is affected by the signal bandwidth W [START_REF] Krizman | Wireless position location: fundamentals, implementation strategies, and sources of error[END_REF]. In case of multi-path, a receiver can recognize a minimum difference in the distance ∆d that is traveled by two signals as:

∆d = c W , ( 2.4)
where c is the speed of light. A direct and a reflected signal with a path length difference less than ∆d will not be distinguished as separate signals but grouped as these signals will be summed and the phase shift will be added. This will result in harming the range estimation. For the typical LoRa signal with bandwidth W = 125 kHz, this gives the worst-case ambiguity as ± ∆d 2 ≈ ±1200 m [START_REF] Müller | Outdoor ranging and positioning based on lora modulation[END_REF]. • To have an accurate time synchronization, the base stations' cost increases by adding a GPS receiver module [START_REF] Xiong | Tdoa localization algorithm with compensation of clock offset for wireless sensor networks[END_REF].

• The TDoA based localization algorithms are more sensitive to the noise [START_REF] Li | Tdoa for narrow-band signal with low sampling rate and imperfect synchronization[END_REF]. Moreover, the impact of noise is enhanced by the use of differential measurements.

AoA

The AoA estimation is a mechanism that indicates the direction of arrival of the received signal by processing the incoming signal on an antenna array [START_REF] Badawy | A simple aoa estimation scheme[END_REF], as shown in Figure 2.7. Thus, AoA positioning has the following advantages:

• A high accuracy of a decimeter level can be achieved using a typical AoA localization system [START_REF] Monfared | Experimental demonstration of ble transmitter positioning based on aoa estimation[END_REF].

• Few gateways are needed to estimate a position [START_REF] Monfared | Experimental demonstration of ble transmitter positioning based on aoa estimation[END_REF]. For 2-Dimensional (2-D) localization, using two gateways only is feasible which is less than the required in ToA or TDoA.

• The well researched accuracy assessment mechanism of the AoA localization approaches [START_REF] Wang | An asymptotically efficient estimator in closed-form for 3-d aoa localization using a sensor network[END_REF].

However, the challenges for AoA localization include:

• Relatively large and complex hardware of the AoA system as it requires specific hardware, such as an antenna array and phase detector [START_REF] Bnilam | Low cost aoa unit for iot applications[END_REF]. These requirements make the IoT gateway has a high cost.

• Both angular measuring and positioning accuracy degrade significantly by shadowing and multipath reflections [START_REF] Bai | Association of doa estimation from two ulas[END_REF][START_REF] Spencer | Modeling the statistical time and angle of arrival characteristics of an indoor multipath channel[END_REF][START_REF] Klukas | Line-of-sight angle of arrival estimation in the outdoor multipath environment[END_REF], particularly when the distance between the node and gateway increases in LoRaWAN networks [START_REF] Bnilam | Loray: Aoa estimation system for long range communication networks[END_REF].

CSI

CSI between IoT node and the gateway is possible to be obtained to identify each location by it [START_REF] Wu | Csi-based indoor localization[END_REF]. Moreover, utilizing CSI for localization has the following advantages:

• A decimeter-level or higher accuracy can be achieved, especially for wide-band signals such as the typical Wi-Fi signal with bandwidth W = 40 MHz [START_REF] Chen | Confi: Convolutional neural networks based indoor wi-fi localization using channel state information[END_REF].

• CSI has more features than RSSI, thus, CSI is fine-grained information from the physical layer which describes the amplitude and phase on each sub-carrier in the frequency domain [START_REF] Chapre | Csi-mimo: Indoor wi-fi fingerprinting system[END_REF]. Hence, the signal travels along different fading or scattering paths on account of the multi-path effects over different sub-carriers. In the frequency diversity attribute of CSI, these bring different amplitudes and phases on each sub-carrier.

• CSI is more robust to noise and signal strength fluctuations which contribute to most of the estimation errors in the localization systems [START_REF] Wang | Csi-based fingerprinting for indoor localization: A deep learning approach[END_REF][START_REF] Ma | A new indoor localization algorithm using received signal strength indicator measurements and statistical feature of the channel state information[END_REF]. Hence, RSSI is easily affected by the temporal and spatial variance due to the multi-path effect.

However, not all the Network Interface Controllers (NICs) or the IoT gateways provide the CSI information [START_REF] Wang | Deep convolutional neural networks for indoor localization with csi images[END_REF].

IoT Localization Methods

This section presents the main state-of-the-art localization approaches with the advantages and challenges for each type of localization method. Importantly, these approaches don't impose any hardware or firmware changes for the end devices. Actually, these algorithms convert the different signal properties between the end node and the gateway to estimate the position of the node [START_REF] Wanderley | Localization techniques in the future iot: A review[END_REF]. Before the development of the machine learning techniques, the majority of the localization methods were based on geometric measurements, such as distances and angles. Later, Database-Matching (fingerprinting) methods are developed, thanks to the machine learning techniques and the diversification of the signal measurements, as discussed in the following subsections.

Geometrical Localization Methods

Range-based techniques are based on the measurement of distances or angles between the end node and the gateway, as the following detailed techniques.

Proximity

Proximity is regarded as a simple localization approach as it considers the estimated node location as the gateway location [START_REF] Bshara | Robust tracking in cellular networks using hmm filters and cell-id measurements[END_REF]. Therefore, it is commonly used in localization systems based on Radio Frequency Identification (RFID) and infrared [START_REF] Bouet | Rfid tags: Positioning principles and localization techniques[END_REF]. Moreover, the cell identification system of the mobile phone is another example of proximity. This method detects the probable position of a User Element (UE) by identifying which cell id is used at a given time from which base station, whereas the base station location is wellknown by the cellular network. Consequently, the proximity technique does not provide an absolute position of an object, only a piece of location information is provided [START_REF] Liu | Survey of wireless indoor positioning techniques and systems[END_REF]. Hence, the gateway with the highest RSSI is considered to estimate the node position when the transmitted packet is identified by more than one gateway [START_REF] Plets | Experimental performance evaluation of outdoor tdoa and rss positioning in a public lora network[END_REF]. On this basis, the performance of this approach relies on the dense deployment of the gateways with well-known positions.

Part I, Chapter 2 -Background on IoT Positioning Techniques

Although this coarse localization method has the largest localization uncertainty, it has the lowest computational load and the lowest number of gateways. Subsequently, this method is profitable for bridging the outages when the other localization methods do not have a sufficient number of gateways or signal measurements are acquired with low precision.

Triangulation

The triangulation technique is the way to use the geometric properties of triangles to localize the targeted nodes [START_REF] Bnilam | Low cost aoa unit for iot applications[END_REF]. It estimates the node location by computing the angles relative to multiple gateways, as shown in Figure 2.7. Using at least two gateways' locations as references, the intersection of the two independent Lines of Bearing (LoB) gives the estimated 2-D-position. A set of N gateways are considered with known positions G = g 1 , . . . , g n , . . . , g N (

with

g n = [x n , y n ] T , ( 2.6)
while p = [x, y] T is any node position in the plane. Thus, the measured angle of the received signal from p on gateway n is defined as:

θn = tan -1 y -y n x -x n + u n , ( 2.7)
where u n ∼ N (δ, σ 2 ) is an additive Gaussian random variable which is assumed independent and identically distributed (i.i.d.). In the classical AoA localization techniques, the node location p = [x, ŷ] T is estimated using the conventional algorithms such as the Least Squares (LS), or by minimizing a cost function on the unknown coordinates as: p = arg min

x,y

( N i=1 | θi -tan -1 y -y i x -x i |). (2.8)
For example, a node positioning method is experimentally proposed based on AoA estimation in [START_REF] Monfared | Experimental demonstration of ble transmitter positioning based on aoa estimation[END_REF]. For the angle estimation, MUltiple SIgnal Classification (MUSIC) algorithm is used due to its high angular resolution and sensitivity. The AoA is estimated at two gateways (anchors) which are equipped with 4 antennas. For the defined scenario in Figure 2.8, this approach is able to successfully determine the position of a node with an average accuracy of 14 cm.

Trilateration

The trilateration technique estimates the node position using the geometric properties of circles and spheres [START_REF] Daramouskas | A survey of methods for location estimation on low power wide area networks[END_REF], as shown in Figure 2.5. This classical technique is widely used in GNSS as well as indoor positioning. In contrary to the triangulation, at least three gateways at known reference locations are used to estimate the 2-D position of the targeted node. Besides, the node altitude can be obtained as well as precision of the node location can be improved using more distance measurements. These distance measurements can be obtained from the ToA values or by converting the RSSI values into distances using a path loss model as in [START_REF] Kwasme | Rssi-based localization using lorawan technology[END_REF][START_REF] Mackey | Lora-based localization system for emergency services in gps-less environments[END_REF][START_REF] Khan | A comparison of wireless standards in iot for indoor localization using lopy[END_REF]. Using each distance measurement d from a gateway, a circle of ambiguity, where the node can be located, is defined. Accordingly, the node location can be estimated from the intersection of these circles using the Pythagorean theorem as:

p = arg min x,y ( N i=1 | di -(x -x i ) 2 + (y -y i ) 2 |).
(2.9)

On this basis, [START_REF] Sanchez | Performance evaluation of rssi-based positioning system with low-cost lora devices[END_REF] develops a GPS-independent positioning system using a low-cost LoRa device. Using the trilateration algorithm, an RSSI-based positioning system is devel-Part I, Chapter 2 -Background on IoT Positioning Techniques oped and evaluated on different rural scenarios and environmental considerations. Using this low-cost system, an average error of ≈12.11 m is obtained for a 150 m × 150 m scenario.

Multilateration

Multilateration is solving a set of hyperbolic functions to localize the node after acquiring the differences between the timestamps (TDoA values) of a transmission [START_REF] Pospisil | Investigation of the performance of tdoabased localization over lorawan in theory and practice[END_REF]. Therefore, at least three gateways are needed to locate the node on the intersection point of the hyperbolas in 2-D space, as shown in Figure 2.6. Indeed, by increasing the number of gateways, more hyperbolas are acquired, and then the higher the accuracy is obtained with denser intersections at the node location [START_REF] Gustafsson | Positioning using time-difference of arrival measurements[END_REF]. First, the timestamp of the transmitted packet from the node location p is measured on gateway n as:

τ n = d n c + u n , (2.10)
where c is the celerity of light and u n ∼ N (δ, σ 2 ) is an additive Gaussian random variable which is accounting for the departure between the timestamp τ n and the node to gateway time of flight toa n . Notice that the standard deviation σ could be made dependent on the gateway index but this dependency is here omitted. Moreover, the time offset δ is assumed to be equal for all the gateways, and LoS conditions are implicitly assumed, while d n = g np 2 is the distance between any node position and the gateway n, where . 2 denotes the 2-norm. Each combination of 2 among N gateways leads to:

H =   N 2   = N ! 2!(N -2)! = N (N -1) 2 (2.11)
constraints, each being associated with one hyperbola. An hyperbola j involves the 2 gateways l(j) and r(j), while l = l(1), l(2), . . . , l(H) and r = r(1), r(2), . . . , r(H) . Accordingly,

G r = g r(1) , . . . , g r(H) , ( 2.12
)

G l = g l(1) , . . . , g l(H) , (2.13) h l(i),r(i) = d l(i) -d r(i) , (2.14) 40 2.3. IoT Localization Methods τ l(i),r(i) = τ l(i) -τ r(i) , (2.15) h = h l(1),r(1) , . . . , h l(H),r(H) (2.16)
and

δ τ = τ l(1),r(1) , . . . τ l(H),r(H) .
(2.17)

In the classical TDoA techniques, the estimated node location p = [x, ŷ] T is obtained using the conventional algorithms such as the LS or under Gaussianity assumption by Maximum Likelihood (ML) estimation [START_REF] Bensky | Wireless Positioning Technologies and Applications[END_REF]:

pML = arg min x,y ((h -cδ τ ) T R -1 (h -cδ τ )) (2.18)
with the associated H × H covariance matrix:

R =          2σ 2 σ 2 |0 . . . . . . σ 2 |0 2σ 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2σ 2          , ( 2.19)
where the notation σ 2 |0 means that each off-diagonal term of R is either equal to σ 2 or 0 provided that the two couples of gateways i.e., involved in that term, share respectively either one gateway or none.

Originally, multilateration is utilized for military purposes such as aircraft monitoring and detecting jammer signal sources in the 1960s [START_REF] Marcelić | Determining location in lpwan using multilateration[END_REF]. Later, it is used in the control towers in the airports to detect the airplane position passively without the need to send it a special request. In case GPS does not function as intended, this is considered a backup localization approach. With the rising star of IoT, multilateration is often preferred as one of the localization methods by many LPWAN network providers, after considering the cost of implementing localizations and the limits of these networks [START_REF] Bissett | Analysing tdoa localisation in lora networks[END_REF].

In [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF], the authors implement a localization system that is capable of estimating the Part I, Chapter 2 -Background on IoT Positioning Techniques node location by exploiting the transmitted LoRa packets. This is done by applying the multilateration algorithm on the gateway timestamps of the received packet. This experiment is accomplished outdoor in Denmark using only four gateways, a server and a java application to store the obtained information in a database. The results demonstrated that it is feasible to localize a stationary node with an accuracy of ≈100 m using a TDoA based technique (multilateration).

Furthermore in [START_REF] Podevijn | Tdoa-based outdoor positioning with tracking algorithm in a public lora network[END_REF], the performance of TDoA geolocation for outdoor tracking purposes has been investigated on a public LoRaWAN network. For different trajectories (walking, cycling, and driving) and LoRa Spreading Factors (SFs), localization accuracy, update probability, and update frequency are evaluated. The results show a median localization accuracy of 200 m, whereas 90% of the obtained errors are less than 480 m. When varying the mobility or the SF value, no trend is found on the performance of the localization error but in general, the best localization accuracies are obtained for SF12. Hence, a higher probability of a location update is a result of using a higher SF with a higher communication range. On the other hand, the number of potential location updates can be increased when using lower SF with more transmissions allowance after respecting the duty cycle.

Fingerprinting Localization Methods

Fingerprinting techniques utilize the database of previously measured signal parameters corresponding to well-known node positions [START_REF] Sallouha | Localization in ultra narrow band iot networks: Design guidelines and tradeoffs[END_REF]. Thus, the fingerprinting approaches find the closest matched location by computing the difference between the measured fingerprint and the reference fingerprint in the database [START_REF] Pimpinella | Machine learning based localization of lorawan devices via inter-technology knowledge transfer[END_REF]. In contrary to the ranging methods, the gateways' locations are not required in order to estimate the location of the end node. Consequently, this localization process consists of two phases as follows:

1. Offline (training) phase: Signal features are extracted from known positions [START_REF] Anjum | Rssi fingerprinting-based localization using machine learning in lora networks[END_REF]. These signal measurements are considered as the training data which can be RSSI, CSI, magnetic intensity, visual features or any other signal properties [START_REF] Li | Toward robust crowdsourcing-based localization: A fingerprinting accuracy indicator enhanced wireless/magnetic/inertial integration approach[END_REF].

In this thesis, RSSI values are estimated from different locations using LoRaWAN field test device, as shown in Figure 2.9. Accordingly, the Radial Basis Function (RBF) interpolation method is utilized for interpolating the RSSI values and then producing the heat map.

Online phase:

The real-time measured signal feature is compared with the stored database to predict the node location [START_REF] Chen | A novel real-time deep learning approach for indoor localization based on rf environment identification[END_REF]. To map the measured feature to the reference one, many pattern recognition techniques are commonly used such as K-Nearest Neighbors (KNN), Support Vector Machine (SVM) and neural networks [START_REF] Purohit | Fingerprinting-based indoor and outdoor localization with lora and deep learning[END_REF].

To have an accurate localization, the signal measurements, i.e. acquired in the training phase, should be stable over time for each location. However, the environment can alter rapidly, moreover, the signal measurements can be affected by thermal noise, multi-path, scattering and reflection effects [START_REF] Lemic | Regression-based estimation of individual errors in fingerprinting localization[END_REF][START_REF] Bhatti | Outlier detection in indoor localization and internet of things (iot) using machine learning[END_REF]. On the other hand, significant time and hard work are required in the offline stage to generate and update the database or filter out the outlier signal measurements [START_REF] Yoo | Change detection of rssi fingerprint pattern for indoor positioning system[END_REF][START_REF] Laoudias | Device signal strength self-calibration using histograms[END_REF][START_REF] Chen | Learning rssi feature via ranking model for wi-fi fingerprinting localization[END_REF]. Nevertheless, fingerprinting-based localization techniques are often better than the geometrical ones in terms of performance and localization accuracy [START_REF] Janssen | A primer on real-world rss-based outdoor nb-iot localization[END_REF].

In [START_REF] Choi | Low-power lora signal-based outdoor positioning using fingerprint algorithm[END_REF], the usability and accuracy of the fingerprinting localization approach are evaluated for the large coverage areas in the LoRaWAN networks. In a 340 m × 340 m test area, a private LoRa network is constructed using four gateways and an end node to collect the training RSSI measurements in the offline phase. Consequently, the RBF interpolation method is utilized for interpolating the RSSI values to fill grids that have no RSSI value in the matrix with 340 × 340 cells. After fully interpolating this RSSI map, the location is estimated using proposed probabilistic methods in the online phase. Based on that, a mean localization error of 24.1 m is obtained using 46 test points.

On the other hand, the work in [START_REF] Lin | Sateloc: A virtual fingerprinting approach to outdoor lora localization using satellite images[END_REF] is focused on averting the time and effort that are consumed for acquiring manually the signal measurements in the offline phase. For that, SateLoC technique is proposed that uses the high-resolution satellite images of the area of interest to generate the fingerprinting map. Thus, the environment type (such as urban, rural or vegetation) of each pixel in the image is identified and then assigned to a proper path loss model, as shown in Figure 2.10. To obtain the expected signal power at each pixel, an overall path loss is calculated that accounts for all the traversed environment types of an arbitrary LoRa link (from the gateway to the targeted pixel), as shown in Figure 2.11. This virtual fingerprinting approach is evaluated by localizing commercial LoRa devices in an urban area of 277 500 m 2 . The results confirm that this approach outperforms the N over types with the ia DeepGlobe [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. lass segmentation roach due to its atasets, modeling ures, and avoiding 3 satellite images atial resolution of ure vector for each ntains five typical values, the Local ifferent Vegetation st extract the same h land-cover type we standardize all te the convergence rresponding labels rform a grid-based he optimal hypertegy to maximize the following key 00] in increments nts of 1, and min ts. Finally, we find number is equal to in samples split is construct the final Table 3 shows the classification accuracy of the trained RF model. The OA is 0.51. This is because the labels provided in the dataset are far from perfect [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. In the dataset, many masks ignore terrain details and small structures not annotated in the ground truth. Incomplete and often inaccurate labeling presents a significant barrier for model development and evaluation. However, compared each land-cover area is composed of a number of clustered pixels with clear boundaries. This property helps speed up the generation of the corresponding ESP map, which will be described in the next section.

GENERATING ESP MAPS

In this section, we describe how to utilize the land-cover map to generate the virtual fingerprinting map, i.e., ESP map, for each gateway.

Figure 5 shows an example land-cover map and each square represents a pixel in the map. We aim to generate the ESP map for the gateway (shown as the yellow circle). The basic idea of ESP map generation is to first select the pixels on the wireless link between the LoRa gateway and each candidate location, and then calculate the path loss with the land-cover types of these pixels. Take Pixel 1 as an example, we first connect it with the gateway using a straight line. Then we extract the coordinates and label of each pixel on the line. Since these pixels all belong to the built-up type, SateLoc directly uses the path loss model in Equation 1, along with the distance d (Gateway,Pixel 1 ) and the corresponding path loss exponent n built-up , to calculate the ESP value at Pixel 1. It is worth noting that we set σ built-up = 0 to eliminate the randomness of the generated fingerprinting maps.

In a more complicated case shown in Figure 5, the link between Pixel 2 and the LoRa gateway goes through several land-cover types. There will be two intersections A and B at the boundaries between different types. Starting from the gateway, we first calculate the path loss PL (Gateway,A) on segment (Gateway, A) with Equation 1. For the next step, we replace the reference distance d 0 with the distance d (Gateway,A) between gateway and intersection A in the path loss model. The reference path loss PL(d 0 ) will also be replaced by PL (Gateway,A) correspondingly. Now we can calculate the path loss PL (A,B) on segment (A, B) with the updated path loss model and the path loss exponent n water . We repeat the above steps until we obtain the path loss of the last segment, i.e., segment (B, Pixel 2 ), of the link. for j = 1 to Y do 3:

Algorithm 1 ESP map generation alg

// Get the pixel array P that c and land-cover types c of all pixel getTraversedPixels function is desig algorithm.

4:

P = getTraversedPixels(x G , y G 5:
// Initialize the link length L an pixel P 1 in P. P 1x , P 1y , P 1c are the attrib 6:

x end = P 1x , y end = P 1y , n = n P1 7:

D = R (x end -x G ) 2 + (y end
EM(i, j) = ESP 0 -PL 24:
if EM(i, j) < S then 25:

EM(i, j) = -∞ 26: return EM
After that, we sum up the path loss of value at Pixel 2.

Algorithm 1 shows the details o algorithm. For each pixel in the lan extracts all the traversed pixels from it using a form of Bresenham's line d SateLoc divides these pixels into segm to the same land-cover type. The path iteratively calculated with the corres and its distance to the gateway. Fin overall path loss and further the ESP va belonging to the same type are usually in Section 5), there will be reasona corresponds to a segment) for each map generation cost (including time overhead) will be acceptable.

Summary and Conclusion

This chapter summarizes the main signal features and the two major approaches for IoT localization. Although these approaches have different characteristics, they are complementary for localizing properly in different scenarios as follows:

• Geometrical approaches: For outdoor scenarios with open space, the geometrical methods take the lead as the path loss models can be explicitly modeled and parameterized. Moreover, the other signal measurements, for instance, ToA, TDoA or AoA values, are exposed to fewer error sources, such as reflection and multipath conditions, in such open environments.

• Fingerprinting approaches: In contrast, fingerprinting approaches are more suitable for indoor and urban scenarios with complex structures whose channel propagation properties are difficult to be modeled. With fingerprinting methods, these signal propagation phenomenons and multipath effects are exploited as additional information to enhance the localization accuracy. Subsequently, more potential is given to the fingerprinting methods for providing higher resolution and more details on complex localization scenarios.

For more accurate localization solutions, it is feasible to fuse different signal measurements [START_REF] Li | A narrow-band indoor positioning system by fusing time and received signal strength via ensemble learning[END_REF][START_REF] Laaraiedh | Comparison of hybrid localization schemes using rssi, toa, and tdoa[END_REF], or integrate the geometrical and fingerprinting methods [START_REF] Zhang | Path-loss-based fingerprint localization approach for location-based services in indoor environments[END_REF][START_REF] Kodippili | Integration of fingerprinting and trilateration techniques for improved indoor localization[END_REF]. For example, [START_REF] Baik | Hybrid rssi-aoa positioning system with single time-modulated array receiver for lora iot[END_REF] proposes a hybrid RSSI-AoA localization system for localizing a LoRa device with one gateway only. To estimate the node position, the distance between the gateway and the node is calculated using a path loss model based on the RSSI value, after estimating the AoA of the received signal. This localization system is evaluated outdoor in a 55 m × 101 m playground in Kookmin University, Seoul, Korea. The results confirm the feasibility of estimating the end node position precisely using only one gateway in LoRaWAN.

However, these presented solutions are often sub-optimal when looking at what is needed for many IoT applications. Even the classical localization approaches should be optimized to meet the requirements for most IoT network operators, as detailed in the following chapters.

Chapter 3

ENHANCEMENT OF THE TDOA TECHNIQUE

Introduction

The last decade has witnessed the development of the localization methods based on RSSI, AoA, ToA, TDoA and their multiple combinations [START_REF] Sadowski | Rssi-based indoor localization with the internet of things[END_REF], as detailed in the previous chapters. The gateways utilize these measurements to determine their relative position relations with the source for localization. In RSSI techniques, the existing relation between received power and the node position is exploited [START_REF] Li | A narrow-band indoor positioning system by fusing time and received signal strength via ensemble learning[END_REF]. However, these techniques are sensitive to the channel environments and often require a good knowledge of the signal attenuation model [START_REF] Choi | Low-power lora signal-based outdoor positioning using fingerprint algorithm[END_REF]. In AoA techniques the angle from which the signal propagates is determined. The maintenance of an antenna array and precise calibration is always required, which results in extra expenses, moreover, their localization accuracy is sensitive to the distances between the node and the gateways [START_REF] Sathyan | Passive geolocation and tracking of an unknown number of emitters[END_REF]. ToA is one of the most accurate techniques available as it uses timestamps embedded in transmitted packets along with the received time to determine how far the packet had to travel to reach the destination [START_REF] Zafari | A survey of indoor localization systems and technologies[END_REF]. Through the use of synchronized clocks, the signal propagation time between the transmitter and receiver can be determined. However, when using a ToA setup, devices in the network need synchronized clocks down to nanosecond scale in order to achieve a proper distance approximation, which requires additional hardware, thus increasing the cost of the system. Therefore, these three kinds of techniques are not so practical.

TDoA is similar to ToA but it is a more popular technique for localization as it does not require the transmitter to be synchronized with the receivers [START_REF] Fargas | Gps-free geolocation using lora in low-power wans[END_REF]. Only the gateways are required to have synchronized clocks to compute the differences between the timestamps of a transmission. After recalling from the previous chapters, these accurate timestamps are given at each gateway when receiving a packet by N gateways. These N gateways Part I, Chapter 3 -Enhancement of the TDoA Technique are considered the anchor points with well-known locations at different distances to the end node, therefore, LoRa packet is received at different instances in time. Accurate time stamping is possible since each gateway has a GPS receiver for time synchronization. After acquiring the differences between the timestamps of a transmission, it is considered a multilateration problem that involves solving a set of hyperbolic functions, and therefore at least three gateways are needed to locate the node on the intersecting point of the hyperbolas. Based on that, the conventional geolocation for LoRa networks can be based on TDoA measurements, where hundreds to thousands of meters of accuracy can be achieved. In this chapter, the accuracy of the TDoA localization technique is improved by compensating for its shortcomings.

A Parametric TDoA Technique

Problem Statement and Contribution

In the practical situations of TDoA localization, the quality of each timestamp can vary largely from one gateway to another. This is due mostly to the time drift which occurs in the timestamping process and the effect of the multipath in Non-line-of-sight (NLoS) situations. These outliers timestamps may have an extremely deleterious effect on the final position accuracy with the classical TDoA solving techniques.

In this section, to tackle this problem, a novel parametric TDoA method is proposed that uses hyperbolic parameterization to localize the node on one of the hyperbolas instead of localizing it on the space far from the vicinity of the hyperbolas. Thus, the proposed approach is finding this location on a hyperbola at a point that has the minimum Euclidean distance to all the other hyperbolas. The accuracy and ease of use of this algorithm are evaluated through simulations. It is shown that the proposed approach effectively reduces localization errors in a wide range of situations covering different densities of gateways and noise models on ranging data.

Organization

The remainder of this section is organized as follows. Section 3.2.3 provides sufficient detail to allow implementation of the proposed algorithm. Section 3.2.4 provides guidance on the simulation model used to evaluate the performance of the algorithm on the localization accuracy. The results of the simulation are then presented and commented in Section 3.2.5. Finally, Section 3.2.6 is dedicated for conclusions.

Parametric TDoA

Unlike the classical TDoA i.e., its system model is introduced in Section 2.3.1, in which the estimated position p could be any point in the plane R 2 , the main concept of the parametric TDoA is obtaining the point ph,i to be placed on hyperbola i to be determined, by parameterizing the hyperbolic functions. This method is achieved using the following two steps:

1. Minimizing the Euclidean distance matrix by letting a set of points, each one lying in a different hyperbola among H hyperbolas to be expressed as:

P h (t) = p h,1 (t 1 ), . . . , p h,H (t H ) =   x h,1 (t 1 ), . . . , x h,H (t H ) y h,1 (t 1 ), . . . , y h,H (t H )   , ( 3.1)
where t = t 1 , t 2 , . . . , t H is the vector of the so called hyperbolic angles. Then, finding for every pair of gateways the distance between them as [START_REF] Mitchell | 96.40 a property of hyperbolas and their asymptotes[END_REF]:

d = g l(1) -g r(1) 2 , . . . , g l(H) -g r(H) 2 (3.2)
and also the difference of distances vector a which is defined for each hyperbola as the timestamps difference at both gateways expressed in meter as:

a = c • τ l,r , (3.3)
while the distances from a focus to either asymptote i.e., the semi-minor axis, are defined as:

b = √ d 2 -a 2 , ( 3.4)
as well as, the exact centroid between each pair of gateways are calculated as: Accordingly, all the H points on all the hyperbolas are initially acquired as:

q = G l + G r 2 . ( 3
P h (t) = q + a 2 cosh(t) U + b 2 sinh(t) V (3.6)
with

U = P h (t r ) -P h (t l ) d = û1 , . . . , ûH (3.7)
and

V = ẑ × û1 , . . . , ẑ × ûH , ( 3.8)
where and × are defined as the element wise matrix product and the vector cross product, respectively. Based on that, the obtained points P h (t) have a deterministic Euclidean distance matrix defined as:

D h (t) =            0 d 2
d 2 H1 d 2 H2 d 2 H3 . . . 0            (3.9)
where

d 2 ij = d ij (t i , t j ) 2 = p h,i (t i ) -p h,j (t j ) 2 2
is the Euclidean distance between the hyperbola i and j. Here, the main target is to find the proper hyperbolic angles t min which minimize the summation of the Euclidean distance matrix D h (t), and this can be achieved using a solver as:

t min = arg min t ( H i=1 H j=1 d ij (t i , t j ) 2 ).
(3.10)

2. Electing the convenient point from the set of estimated points P h (t min ) is the final step i.e., one of the points among the small cross blue markers as shown in Figure 3.1. This is achieved by picking the index of the point which has the minimum Euclidean distance to all the other hyperbolas as:

i min = arg min i ( H j=1 d ij (t min,i , t min,j ) 2 ). (3.11)
Hence, the final estimated location of the node is considered as: ph,i min = p h,i min (t min,i min ), (3.12) which is the large cross blue marker in Figure 3.1, actually most of the cases closer to the true position than the classical TDoA estimation with the large cross green marker. The reason behind the proposed method is that it should be less sensitive to the outliers because of the constraint imposed on the points of belonging by construction to hyperbolas associated with the constraints.

Simulation Model

In this section, a brief overview of the simulator model is given in order to allow for a dynamic study of the system performance. Thus, the two main aspects shaping the simulation scenarios are the distributions of the gateway locations with respect to the node location and the choice of convenient uncertainty in the timestamps, to be closer to the real measurements as detailed in the following subsections.

Gateway locations

The gateway locations are produced by the Poisson disk distributions algorithm which has been introduced in [START_REF] Bridson | Fast poisson disk sampling in arbitrary dimensions[END_REF]. This is considered as a fast 2-D blue noise sampler, easily implemented in arbitrary dimensions and it is guaranteed to take O(M ) time to generate M Poisson disk samples. To start the process, this algorithm takes as input the length len and width wid of the samples domain in R 2 , and the minimum distance ρ between the samples. First, it initializes a 2-D background grid for storing samples and accelerating the spatial searches. Then, it selects the initial sample randomly chosen uniformly from the domain and inserts it into a cell in the background grid. The cell size is picked to be bounded by ρ √ 2 , so that each grid cell will contain at most one sample. In the next iteration, the neighboring point is chosen uniformly from the spherical annulus between radius ρ and 2ρ around the previous sample. This linear algorithm is done recursively until all the M samples are generated. At this point, the node location is chosen randomly from the samples, while maintaining the other samples to be the gateway positions, as shown in Figure 3

Timestamp perturbation model

From our knowledge of what is observed in LoRaWAN practical situations, it often happens that few gateways are suffering from much larger uncertainty than the others. To model this fact, a Gaussian mixture distribution is proposed. The first Gaussian is taking into account the measurement noise whereas the second is taking into consideration the larger oscillator drift perturbation. Hence, the timestamp is individually calculated after extending Equation 2.10 by modeling the uncertainty term u n as:

τ n = d n c + u w 1 + (1 -u) w 2 (3.13) with Pr(u = 1) = p = 1 -Pr(u = 0), (3.14)
where w 1 ∼ N (0, σ 2 1 ) and w 2 ∼ N (0, σ 2 2 ) are the normal Gaussian distributions of the thermal noise and the gateway oscillator drift, respectively, by assuming zero means in both cases. Thus, the probability p is chosen equal to 0.8 taking into account the occurrence probability of the oscillator drift by 20%.

Simulation Results

In the previous section, the simulation framework is provided including the location distributions and the chosen noise model. In this section, the simulation results are presented, using the Euclidean distance error between the true position of the node and the estimated location, as a measure of performance for the localization methods. This is measured by Monte Carlo simulations after utilizing the proposed parametric TDoA technique and the classical TDoA using LS i.e., introduced in [START_REF] Bensky | Wireless Positioning Technologies and Applications[END_REF], for comparison. Moreover, the two main parameters which shape the simulation scenarios are the magnitude of the oscillator drift variance and the number of gateways, as detailed in the following subsections.

Impact of the oscillator drift variance

The robustness of the system against the outlier timestamps is checked by changing the drift standard deviation σ 2 in Equation 3.13 to be in the range from 0 µs to 2 µs (≡ 0 m to 600 m), while maintaining the thermal noise standard deviation σ 1 to be equal to 0.1 µs (≡ 30 m). For the gateway location distribution, the length len and width wid of the map are fixed to 5 km and 10 km, respectively, while the minimum distance ρ between the points is equal to 2.5 km. This distribution configuration usually gives a median number of gateways between 5 and 8.

As shown in Figure 3.2a, the simulation result shows an obvious reduction in the localization error medians when using the parametric TDoA, especially for the large values of the drift. This indicates that the proposed method is more robust to the high drifts. Accordingly as shown in Figure 3.2b, the CDF curves obtained for all the drift values preserve the same performance rank over the whole simulations with 50% of the error values less than 40 m and 65 m, using the proposed parametric and classical TDoA, respectively.

Impact of the number of gateways

The localization performance assessment for various number of gateways is studied by utilizing the minimum distance ρ between the gateways to be in the range from 1.6 km to 4 km, while fixing the length len and width wid of the map to be 5 km and 10 km, respectively. Moreover in all the results, the drift standard deviation σ 2 and the thermal noise standard deviation σ 1 are assumed to be equal to 1.2 µs (≡ 360 m) and 0.1 µs (≡ 30 m), As shown in Figure 3.3a, it is clear that all the medians of the parametric method are drastically the lowest values for all the network densities. While by observing the extreme error values, the main parameter in achieving the performance promised by the proposed algorithm without these outlier values, is the large number of gateways (>4) i.e., a realistic value in the near future. Thus, it is clear in the lower network density that the number of hyperbolas decreases accordingly, resulting in an incorrect selection of the convenient point i.e., discussed in Section 3.2.1, from the set of estimated points P(t min ) and a less accurate localization. Only at these low number of gateways, there is a trade-off to find between the two methods, the parametric one being better regarding the median and worst regarding the outliers. Nevertheless as shown in Figure 3.3b, the CDF curves obtained for all the inner radius values still confirm the prevalence of the proposed method over most of the simulations with 95% of the error values less than 840 m and 2200 m, using the proposed parametric and classical TDoA, respectively.

Conclusion

In this section, a novel TDoA parametric method for IoT localization is presented. The technique improves the accuracy of localization in the presence of outliers, even when high levels of drift in gateways can hardly be avoided. The principle is based on the choice of the node position to be located on one of the hyperbolas by bringing the optimization into the parametric space of the hyperbolic constraint sets. For performance assessment of this technique, a simulator has been developed that uses a Poisson distribution approach for determining the location of gateways and nodes based on configurations chosen to be as close as possible to the realistic situations encountered in the LoRaWAN context. Moreover, a noise model is proposed to emulate the proper disturbance in the timestamp values by considering the drift variance. Simulation results prove the high performance of our parametric method over a wide range of drift standard deviations and network densities. In some configurations the achieved performance using the proposed technique, almost matches the performance in non-drifted timestamp scenarios. This competes particularly well regarding localization accuracy with more traditional approaches. This is going to become increasingly useful when situations of localization with a greater number of gateways will be more frequent in the future. For future work, parametric TDoA can be used to detect outliers as well as an initial guess point for more sophisticated localization approaches that integrate other a priori information.

A Pre-processing Algorithm Utilizing a Paired

CRLB for TDoA

Problem Statement and Contribution

In the practical situations of TDoA localization, not all pairs of gateways are equivalent concerning the amount of extra information they bring to the estimation problem. Using the entire combinations as the classical TDoA solving techniques may have an extremely deleterious effect on the final position accuracy. Thus, it could be advantageous to define some criteria to select the best combination of gateways or equivalently the best hyperbolas to resolve the estimation problem.

In this section, to tackle this issue, a novel preprocessing method is proposed by utilizing a paired CRLB as an instrumental tool to detect the mostly perturbated TDoA values. This capability is due to the relative position of the node with respect to each pair of gateway locations which affect the paired CRLB values specifically. Accordingly, the perturbation probability in each TDoA value can vary largely. In the vicinity of the guessed node location, the proposed approach is detecting the best TDoA values, which have the lowest paired CRLB values specifically, based on a robust thresholding method. The accuracy and ease of use of this pre-processing algorithm are evaluated through simulations. It is shown that the proposed approach effectively reduces localization errors in a wide range of situations covering different densities of gateways and measurement noise variances.

Organization

The remainder of this section is organized as follows. Section 3.3.3 presents instructions to allow implementation of the proposed algorithm. Section 3.3.4 provides guidance on the simulation model used to evaluate the performance of the algorithm on the localization accuracy. The results of the simulation are then presented and commented in Section 3.3.5.

Part I, Chapter 3 -Enhancement of the TDoA Technique

Finally, Section 3.3.6 is dedicated for conclusions.

Paired CRLB pre-processing

The CRLB is a lower bound on the covariance of any unbiased estimation algorithm based on the measurement [START_REF] Kaune | Accuracy studies for tdoa and toa localization[END_REF]. This is calculated for the whole TDoA combinations from the inverse of the Fisher Information Matrix (FIM) J as:

E[(p -p t )(p -p t ) T ] ≥ J -1 , ( 3.15)
where E[•] determines the expectation value and p t is the true node position.

As mentioned before, when dealing with a rather large number of gateway combinations, not all relative configurations with respect to the unknown node position are equivalent. Therefore, the proposed method invokes the paired CRLB information applied on each combination of 2 gateways to detect these most suitable hyperbolas associated with the best configurations. Thus, the node is localized after removing the combinations which have the highest paired CRLB values at an initial guess location p o = [x o , y o ] T rather than, using the whole combinations including the ones whose configurations are less favorable and have been observed to introduce large errors. This algorithm is achieved using the following two steps:

1. Estimating the paired CRLB values is done separately for each combination by assuming a constant standard deviation σ for all the gateways. Thus, the covariance matrix at each pair of gateways is reduced to the scalar value R = 2σ 2 . Accordingly, the Jacobian of the measurement function for a given pair of gateways i evaluated at position p o is calculated as: Hence, the computation of the Fisher Information Matrix follows as:

f o i = ∂h l(i),r(i) ∂p p=po (3.16) = ∂h l(i),r(i) ∂x p=po , ∂h l(i),r(i) ∂y p=po (3.17) = xo-x l(i) d o l(i) - xo-x r(i) d o r(i) , yo-y l(i) d o l(i) - yo-y r(i) d o r(i) , (3.18) with d o l(i) = g l(i) -p o 2 and d o r(i) = g r(i) -p o 2 .
J o i = 1 2σ 2 f o i T f o i , ( 3.19)
thus, the paired CRLB value is calculated from the inverse of the FIM J o i , then, calculating the square root of its trace as:

c o i = tr(J o i -1
).

(3.20)

2. Determining the outliers from all the determined paired CRLB values

C o = c o 1 , . . . , c o H (3.21)
, which are shown in Figure 3.4, by observing that the high peak at any combination index is considered as an outlier combination, while the low peaks are the proper combinations to be utilized for the localization. Thus, several threshold methods have been investigated, which all try to separate the outliers from the regular paired CRLB values without other a priori knowledge. These investigated thresholding techniques are mainly based on analyzing the variance of the paired CRLB values since it is observed that the regular values have amplitudes close to one another. Subsequently, all these methods assume that the combinations have two classes: ordinary paired CRLB value class and outlier class which are below and above the shown threshold in Figure 3.4, respectively.

In this section, the proposed thresholding technique is based on Median Absolute Deviation (MAD) which is a robust measure of how spread out a set of data is [START_REF] Zoubir | Robust estimation in signal processing: A tutorial-style treatment of fundamental concepts[END_REF].

Hence, the classical standard deviation estimator could also measure the spread, but it is more affected by the extremely high or extremely low values and nonnormality due to the presence of outliers. Accordingly, this threshold is computed as:

γ = median(C o ) + 3 • σMAD (3.22) with σMAD = b • median(|C o -median(C o )|), (3.23)
where 3 has been heuristically chosen and the normalization factor b is set to 1.4826 in order to be consistent for the standard deviation at the normal Gaussian distribution i.e., usually the region of interest.

Simulation Model

Two main aspects shape the simulator model which allows for a dynamic study of the system performance. These are the distributions of the gateway locations with respect to the node location and the choice of convenient uncertainty in the timestamps, to be closer to the real measurements as detailed in the following subsections.

Gateway locations

The gateway locations are produced by the Poisson disk distributions algorithm which has been introduced in Section 3.2.4. After generating M samples, the node location is chosen randomly from the samples, while maintaining N extracted samples to be the gateway positions. Notice that generating the node location out of the dense M samples set forbids the node location to be less than ρ meter from any gateway.

Timestamp perturbation model

For the sake of simplicity, only the thermal noise using a normal Gaussian distribution is considered. Thus, the timestamp is individually calculated as in Equation 2.10 while assuming a zero mean of the uncertainty term u n ∼ N (0, σ 2 ).

Simulation Results

In the previous section, the simulation framework is provided including the location distributions and the chosen noise model. In this section, the simulation results are presented, using the Euclidean distance error between the true position of the node and the estimated location, as a measure of performance for the localization methods. This is measured by Monte Carlo simulations after utilizing the parametric TDoA technique i.e., introduced in [START_REF] Ghany | A parametric tdoa technique in the iot localization context[END_REF], with and without paired CRLB pre-processing for comparison. Moreover, the two main parameters which shape the simulation scenarios are the magnitude of the thermal noise variance and the number of gateways, as detailed in the following subsections.

Impact of the noise variance

The robustness of the system against the outlier combinations is checked by changing the thermal noise standard deviation σ in Equation 2.10 to be in the range from 0.1 µs to Part I, Chapter 3 -Enhancement of the TDoA Technique 1 µs (≈ 30 m to 300 m), while maintaining the number of gateways to be N = 7 which are chosen randomly from a fixed location distribution. For this gateway locations configuration, the length len and width wid of the map are fixed to 5 km and 10 km, respectively, while the minimum distance ρ between the M samples is fixed to 100 m.

As shown in Figure 3.6a, the simulation result shows a noticeable reduction in the localization error medians when using the paired CRLB pre-processing algorithm. Accordingly as shown in Figure 3.6b, the CDF curves obtained for all the noise values preserve the same performance rank over the whole simulations with 50% of the error values less than 200 m and 230 m, while turning the proposed algorithm ON and OFF, respectively. This indicates that the proposed method is robust to the high noise variances.

Impact of the number of gateways

The localization performance assessment for a various number of gateways is studied by utilizing the same gateway locations configuration i.e., introduced in the previous subsection, while choosing randomly from them a particular number of gateways N to be in the range from 3 to 15. Moreover in all the results, the thermal noise standard deviation σ is assumed to be equal to 0.1 µs (≈ 30 m).

As shown in Figure 3.7a, it is clear that all the medians of the proposed method are drastically the lowest values for all the network densities, especially for a large number of gateways (> 3) i.e., a realistic value in the near future. Thus, it is clear in the lower network density that the number of hyperbolas decreases (≈ 3), accordingly, only one hyperbola might be dropped resulting in a tiny or almost no gain. Nevertheless as shown in Figure 3.7b, the CDF curves obtained for all number of gateways range still confirm the prevalence of the proposed method over most of the simulations with 95% of the error values less than 1600 m and 1940 m, while turning the proposed algorithm ON and OFF, respectively.

Conclusion

In this section, a novel TDoA pre-processing method for IoT localization is presented. This technique improves the accuracy of positioning in the presence of outlier hyperbolas by choosing only the best hyperbolic constraint sets for estimating the node location

A Pre-processing Algorithm for Outlier Timestamp Detection

based on their low paired CRLB values. Thus, the principle is based on dropping the combinations, whose paired CRLB values are high in the proximity of the node location, using a robust thresholding technique. For performance assessment of this algorithm, a simulator has been developed. It uses a Poisson distribution approach parameterized for setting the location of gateways and nodes as close as possible to realistic situations. The used simulator also emulates the proper disturbance in the timestamp values. Simulation results demonstrate the high performance of our pre-processing algorithm over a wide range of noise standard deviations and network densities.

For future work, an optimum technique for outliers detection could be investigated rather than using a thresholding method.

A Pre-processing Algorithm for Outlier Timestamp Detection

Problem Statement and Contribution

In the practical situations of TDoA localization, the accuracy of each timestamp can vary largely from one gateway to another. This time drift in the timestamping process is due mostly to a large thermal noise or any imperfection that could accidentally happen in the process. Using the entire timestamps degrade the localization accuracy of the TDoA techniques.

In this section, to tackle this problem, a pre-processing method is proposed by utilizing an initial guess of the node position to detect the mostly perturbated timestamp values. This capability is due to the relative position of the node with respect to each hyperbola. First, the proposed approach is measuring the Euclidean distances from the guessed location to all the hyperbolas. Accordingly, the proposed approach detects the worst timestamps based on a robust thresholding method. These perturbated timestamps should be removed before using any TDoA localization technique, as detailed in the following subsections.

Outlier Timestamp Detection

The main concept of the proposed method is dropping the outlier timestamps which make some hyperbolas far away from the vicinity of the node location, as the bold hyperbolas in Figure 3.8. This method is achieved using the following two steps:

1. Estimating the Euclidean distances between the initial guess location p o = [x o , y o ] T to all the hyperbolas is the first step. This initial guess location i.e., labeled by the large cross green markers in Figure 3.8, can be obtained by the parametric TDoA localization technique which is introduced in Section 3.2. Using Equation 3.10, the set of points P h (t min ) which are lying on the H hyperbolas are acquired, as labeled by the small cross green markers in Figure 3.8. Then, the euclidean distances between each hyperbola and the initial guess of the node location are calculated as:

d o h = d o h,1 , . . . , d o h,H = p o -p h,1 (t min,1 ) 2 , . . . , p o -p h,H (t min,H ) 2 . (3.24)
As shown in Figure 3.9a, some of the euclidean distances have relatively extreme values than the other ones due to the inclusion of an outlier timestamp in the TDoA values which make these hyperbolas.

2. Determining the outlier timestamps is done by calculating first the average euclidean distances corresponding to each gateway index n as:

d o a = d o a,1 , . . . , d o a,n , . . . , d o a,N (3.25)
with

d o a,n = 1 H i=1 1 l(i)|r(i)=n H i=1 d o h,i 1 l(i)|r(i)=n ∀n. (3.26)
As shown in Figure 3.9b, the estimated average euclidean distances d o a have a high peak at gateway index 4 which is considered as an outlier, while the low peaks correspond to the proper timestamps to be utilized for the localization. As previously discussed in Section 3.3.3, several thresholding methods have been investigated, which all try to separate the outliers from the average euclidean distances without other a priori knowledge. These investigated thresholding techniques are mainly based on analyzing the variance of the average euclidean distances since it is observed that the regular values have amplitudes close to one another. Consequently, all these methods assume that the average euclidean distances have two classes: ordinary average euclidean distances class and outlier class which are below and above the shown threshold in Figure 3.9b, respectively. Again, a thresholding technique based on MAD is proposed. Accordingly, this threshold is computed as:

γ = median(d o a ) + 3 • σMAD (3.27) with σMAD = b • median(|d o a -median(d o a )|), (3.28)
where 3 has been heuristically chosen and the normalization factor b is set to 1.4826 in order to be consistent for the standard deviation at the normal Gaussian distribution i.e., usually the region of interest.

After labeling the indices of the outlier timestamps by this thresholding technique, the node is localized without these timestamps. As shown in Figure 3.8, the euclidean distance error of the new estimated position i.e., labeled by a large cross blue marker, is reduced after dropping the outlier timestamps in comparison to the scenario with the large cross green marker before dropping the outlier timestamps. Such a strategy increases the accuracy of the estimated position as the estimation process is not attracted to the outlier hyperbolas i.e., relatively far away from the node position, after dropping the outlier timestamps.

Summary and Conclusion

This chapter introduces the proposed strategies and methods to improve the localization accuracy of TDoA localization. These proposed approaches could be used as independent or complementary methods to obtain a more precise localization. For complementary usage, the proposed approaches are recommended to be utilized sequentially in the following order:

1. An outlier timestamp detection algorithm is a proposed preprocessing algorithm to drop out the perturbated timestamps before localizing using any TDoA technique. An initial guess of the node location and the euclidean distances from it to each hyperbola are the only requirement for this approach. Then, the perturbated timestamps are detected from examining the most perturbed hyperbolas whose locations are far away from the vicinity of the node location. Dropping these outlier timestamps is proven to increase the localization accuracy by preventing any unreliable sensitivity from them.

2. An outlier TDoA detection algorithm is another proposed preprocessing method to detect the outlier TDoA values by utilizing a paired CRLB as an instrumental tool. From the vicinity of an initial guess of the node location, the TDoA combinations, whose paired CRLB are low, are dropped based on a thresholding technique. Using an implemented simulator, this proposed method is proven to decrease the localization error by localizing with the best TDoA values whose perturbation probabilities are less.

A parametric

TDoA technique is a proposed approach to localize the node on one of the hyperbolas, contrary to the classical TDoA technique which localizes very often on the space far away from the vicinity of node location. The simulation results show that this proposed parametric method outperforms the classical one over different timestamps drift variances and number of gateways. Based on that, this proposed method is asserted to be less sensitive to any perturbation in the timestamps or the TDoA values.

For future work, the presented TDoA techniques can be complemented with classical machine learning techniques for merging other radio observations such as RSSI, AoA estimates or digital elevation model of the propagation environment.

Chapter 4

FEASIBILITY OF UTILIZING THE CSI FOR LORA LOCALIZATION

Introduction

Among all the localization technologies, wireless RSSI fingerprinting has proven as an effective positioning technique due to its simplicity and deployment practicability [START_REF] Choi | Low-power lora signal-based outdoor positioning using fingerprint algorithm[END_REF]. Fingerprinting based localization avoids hardware deployment cost and effort by relying on existing network infrastructure. It just relies on the received signal strength at each gateway to localize the node. However, RSSI-based fingerprinting localization methods may have poor positioning performance as RSSI always vary due to the large signal power fluctuations both in time and space, moreover, each measured RSSI value depends on the hardware accuracy as well as the system calibration for every measurement [START_REF] Wu | Csi-based indoor localization[END_REF]. Besides, RSSI contains coarse information so as to not fully utilize the abundant channel information in each subcarrier. Therefore, some little work has been published whose aim is to take the average value of the whole CSI subcarrier amplitudes which is proven to be more temporally stable in different environments and helps maintain the performance over time in comparison with RSSI [START_REF] Song | Csi amplitude fingerprinting-based nb-iot indoor localization[END_REF]. This chapter investigates the feasibility of using the CSI for localization in LoRaWAN, moreover, the advantage of utilizing ESP rather than RSSI in many prospective IoT applications is investigated.

Related Works

Recently, different characteristics of LoRa propagation are mentioned in many works. For example, the physical and data link layer performance are evaluated by field tests and simulations in [START_REF] Augustin | A study of lora: Long range & low power networks for the internet of things[END_REF]. While the coverage and channel attenuation of LoRa technology are evaluated for real environments in [START_REF] Li | On the application of lora lpwan technology in sailing monitoring system[END_REF] and [START_REF] Seye | A study of lora coverage: Range evaluation and channel attenuation model[END_REF], path loss models are developed and compared with widely used empirical models based on empirical results in [START_REF] Chall | Lorawan network: Radio propagation models and performance evaluation in various environments in lebanon[END_REF]. On the other hand, the feasibility of utilizing the CSI for localization is studied in [START_REF] Ghany | A robustness comparison of measured narrowband csi vs rssi for iot localization[END_REF]. However, these previous works don't investigate either the spatial correlation of CSI or, the reciprocity between the uplink and downlink CSI which could be exploited in some security procedures in the LoRaWAN [START_REF] Bloch | Wireless information-theoretic security[END_REF]. Moreover, these previous works do not inspect or utilize the ESP, i.e. introduced in [START_REF] Rahmadhani | Understanding collisions in a lorawan[END_REF].

A Robustness Comparison of Measured Narrowband CSI vs RSSI for IoT Localization

Contribution

In this section, it is favorable to show the possibility to leverage CSI for improving the performance of positioning by investigating the profit of using the entire subcarrier magnitudes without averaging or any reduction. Thus, an initial measurement campaign is done to compute the narrowband CSI of transmitted LoRa signals from different locations. To achieve significant localization gain, it is necessary for the individual channels from each different position to be uncorrelated with one another. Thus, the presented short time data indicate that channel slopes with even short separated distances will be quite stable and show weak intercorrelations between them. Furthermore, the CSI in each position after a while is more correlated with itself which can achieve a significant diversity gain in comparison with the mean amplitude of the CSI. This trial allows us also to derive recommendations for the use of diversity at the receiving site in short-range outdoorto-outdoor transmission systems, asking questions like: "At what distance must vertically polarized antennas be placed such that intercorrelation is low and hence gateway diversity is potentially beneficial for localization?" or "Can also the LoRa frequency hopping add a diversity gain for a static transmitting node scenario?".

Organization

The remainder of this section is organized as follows. Section 4.3.3 presents the measurement overview and Section 4.3.4 provides sufficient detail of the proposed postprocessing algorithm. The results of the channel correlation analysis are then presented and commented in Section 4.3.5. Finally, Section 4.3.6 is dedicated for conclusions.

System and Measurement Setup

The main concept of the proposed experiment is transmitting repeated up-chirps signal to sense the channels consecutively at the typical uplink frequency bands, i.e 9 channels with center frequency f k ∈ {867.1, 867.3, 867.5, 867.7, 867.9, 868.1, 868.3, 868.5, 868.8} MHz, and 125 kHz bandwidth. This is considered as a traditional channel sounder with a typical structure which has the Tx and Rx placed at two different locations, as shown in Figure 4.1. Thus, the Rx antenna is fixed on the roof of the university building, as shown in Figure 4.2a. While the Tx has a mobile structure with a laptop and a Universal Software Radio Peripheral (USRP), as it is described in Figure 4.2c. First, the Tx, i.e. located in specific positions within the area of the Campus Beaulieu in Rennes, should generate a signal by a laptop and transmit it using the USRP to sample the channel for a specific time interval. While the stationary Rx, whose antenna is located above the building, should receive the signal with its USRP at the same time interval of transmitting, as shown in Figure 4.2b. After the Rx picks up the signal, the desktop computer stores it to perform an essential post-processing algorithm on the received signal to mitigate the imperfections and obtain the channel transfer function, as detailed in the following subsection.

Data Processing

On the Rx side, the saved file is imported to be analysed for each center frequency f k , as shown in Figure 4.3. Thus, the following main signal processing techniques are carried out with the same order.

Frequency synchronization

The frequency and time synchronization are applied at first, respectively. The objective of frequency synchronization is to establish the subcarrier orthogonality by correcting the phase as an initial step before applying any further processing [START_REF] Ghanaatian | Lora digital receiver analysis and implementation[END_REF]. Let define the Carrier Frequency Offset (CFO) by ∆f k as being the difference between the up and down conversion frequencies. This CFO results in a phase offset ∆φ k = 2π ∆f k fs between two samples with the same index in consecutive upchirps. The residual part of this offset can

∆φ k [l] = arg ( 2 SF -1 n=0 y k [l + n]y * k [l + n + 2 SF ]). (4.1)
This method of detecting the CFO is described as the frequency acquisition algorithm and is utilized over the whole handled signal portion. As shown in Figure 4.4, the angles of the differential correlation function indicate that there are some phase deviations. Hence, the phase error is compensated and the angles of the corrected differential correlation function become concentrated around zero.

Channel estimation

The up-chirps in the LoRa preamble, i.e. typically consist of eight symbols, are considered as a channel sounder. Therefore, the least squares estimate of the raw channel transfer function H raw can be estimated for a simple division as [START_REF] Van De Beek | On channel estimation in ofdm systems[END_REF]:

H raw = Y X , (4.2)
where X and Y are the training and the received symbol in the frequency domain respectively. Hence, the proposed denoising technique is applied on the raw channel transfer function H raw . This imposes doing an incipient step, i.e. removing the thermal noise from the subcarriers in the channel transfer function. Thus, the raw channel transfer function H raw is low-passed in the frequency domain using Finite Impulse Response (FIR) filter to maintain the property of linear phase as:

H f iltered = R h • H raw , (4.3)
where R h is the autocorrelation matrix of the channel and the filtered channel H f iltered is also defined as H l f k . Where f k and l are the center frequency value in MHz and the location number, respectively. As shown in Figure 4.5, one can observe that the obtained CSI is smooth without any noise at the three different locations. Moreover, it is obvious that the channels have a different magnitude of attenuation at the same subcarrier through the different locations.

Correlation Analysis

To check the plausibility of utilizing the CSI for localization, the CSI spatial and temporal evolution at each location is analysed using a proposed method based on the CSI slope. Furthermore, this technique is also compared to the traditional method which Part I, Chapter 4 -Feasibility of Utilizing the CSI for LoRa Localization determines each position from its CSI average amplitude, as detailed in the following subsections.

CSI slope

Based on the LoRa narrow-band characteristic, i.e. with a bandwidth W = 125 kHz in Europe, a linear variation of the channel transfer function is assumed over frequency bandwidth centered on f k . This condition is generally valid under the considered reality of such a very narrow bandwidth, thus, all the obtained channel transfer functions are almost flat, as shown in Figure 4.5. Nevertheless, it is clear that each CSI has a unique slope. In this section, the CSI slopes are estimated to analyse the CSI evolution from each location i as:

s i f k = | H i f k [0] | -| H i f k [2 SF -1] | W . (4.4)
Then, the Normalized Slope Distance (NSD) between any two positions for the whole K uplink frequency bands is defined as:

S i,j = 1 2K K-1 k=0 | si f k -sj f k | (4.5) with si f k = s i f k S max , (4.6)
where S max is equivalent to the absolute value of the maximum observed slope in the measured dataset. This is chosen to be the scaling factor for the slope normalization. Consequently, 0 ≤ S i,j ≤ 1.

(4.7)

The magnitudes of the aforementioned normalized slope si f k are given in Figure 4.6a for each different location i and center frequency f k . Thus, the full scale is normalized and lies in [-1, 1], whereas every amplitude can vary on a several order of magnitude levels. Each frequency of the K uplink frequency bands is labeled with a specific color. In order to analyse the time variation of the CSI slope at each position, over a time duration τ of about 10 minutes, an arrow is drawn for every center frequency from the first time instant to the second one. This measurement dataset demonstrates the slow alteration of the CSI slope with respect to time.

Moving to the NSD S i,j values in Figure 4.7a, one can observe the high level of NSD values in the three location combinations, which are S 1,2 , S 1,3 and S 2,3 . This indicates that CSI models from different positions are distinctly different. While the CSI for each location significantly underlines a low NSD value with itself after a τ time interval. This is obvious in S 1,1 τ , S 2,2 τ and S 3,3 τ whose values are near zero as well as they are far away from the other NSD values, i.e. labeled by circles. So the environment of the propagation paths for each specific position is stable with only marginal modification during this duration.

CSI average magnitude

On the other hand, the channel evolution at each location is investigated by the mechanism, which depends on calculating the CSI mean magnitude. This method is considered as an alternative way rather than estimating the RSSI value. Thus, the CSI average amplitude is estimated for each location i as:

r i f k = 1 2 SF 2 SF -1 n=0 | H i f k [n] |, (4.8)
hence, the Amplitude Distance (AD) between any two positions for the entire K uplink frequency bands is computed as:

R i,j = 1 K K-1 k=0 | r i f k -r j f k | . (4.9)
For the whole evaluated locations and frequency bands, the measured values of the CSI average amplitude r i f k are given in Figure 4.6b. It is foremost supposed that the CSI slope variability from one sub-band to another is more informative than in the CSI average magnitude whose amplitudes at various bands are evaluating roughly at near levels. Moreover, it seems that the CSI average amplitude has more alternation in time than the CSI slope, which is particularly clear at location 2 when considering the shift between the values of 2 and 2 τ . As depicted in Figure 4.7b, the AD R i,j values obtained for all the location combinations preserve proper values. However, the AD values, i.e. labeled by triangles, for each location with itself after the time interval τ are near to the AD values of different location combinations, i.e. labeled by circles. This could be observed explicitly in the high AD value of R 2,2 τ . This confirms the proposed hypothesis which asserts that the CSI is more robust to the signal fluctuations than the RSSI, because, the CSI average magnitude values don't have the same temporal stability as the CSI slopes.

f 0 f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 (a) The normalized slope si f k values.
f 0 f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 (b) The CSI average amplitude r i f k values.
R 1, 2 R 1, 3 R 2, 3 R 1, 1 R 2, 2 R

Conclusion

Rather than using RSSI fingerprinting, in this section, the feasibility of utilizing the CSI for localization is presented. This hypothesis intends to improve the accuracy of positioning by utilizing the rich channel information in each subcarrier as well as the frequency hopping in the LoRa systems. To allow a dynamic study of this approach, an outdoor measurement campaign is carried out in the area of Beaulieu Campus in Rennes to estimate the CSI of transmitted LoRa signals from different locations. Hence, the individual channels from each different location have to be appropriately different with one another to achieve significant localization gain. This difference in the CSI for every two locations is done based on two aspects, i.e. CSI slope and its average amplitude. Thus, the presented data indicate that CSI slopes are more stable and robust to the signal imperfections than the CSI average amplitudes. This result demonstrates the high performance of the CSI-based fingerprinting for positioning than RSSI, as well as its temporal stability.

For future work, CSI-based fingerprinting could be more efficient by using more than one gateway i.e., a realistic value in the near future, to obtain more than one CSI for the instant singular center frequency. Moreover, it could be improved with classical machine learning techniques for merging other radio observables such as RSSI, AoA estimates or the propagation model.

Spatial Correlation of CSI in Real LoRa Measurement 4.4.1 Contribution

In this section, a real network deployment in the area of Beaulieu Campus in Rennes is employed to investigate the CSI at various locations. Hence, the ESP is used for the investigation to overcome the limitation of the RSSI at low SNR (< 0 dB) as proven. Thus, ESP values are average at each frequency band to estimate the absolute CSI of the uplink and downlink transmission. Consequently, the CSI reciprocity, as well as the spatial evolution of the CSI, are analyzed using the Pearson Correlation Coefficient (PCC).

Organization

The remainder of this section is organized as follows. Section 4.4.3 presents the measurement overview. Section 4.4.4 provides sufficient detail about the derivation and obtaining of ESP values. Section 4.4.5 provides sufficient detail about the estimation of the CSI shape. The reciprocity between uplink and downlink CSI is then investigated in Section 4.4.6. Hence, Section 4.4.7 provides an evaluation of the spatial correlation between the CSI shapes. Finally, the work is concluded in Section 4.4.8.

Measurement Overview

The main aim of the proposed experiment is obtaining an averaged ESP value at each frequency band. This is done by placing an IoT node at various distances in the range of 4.9b. This Pycom node transmits an uplink packet for each specific channel f k sequentially. While the gateway attempts to send an acknowledgment by default at the same frequency as the message transmitted. Accordingly, the node writes the information of the last received downlink packet (packet number, ESP, etc.) to the payload of the next uplink packet. A desktop computer runs a Python program is used as an AS which receives data from the LoRa Network Server (LNS), as well as LoRa metadata with all parameters of the LoRaWAN transmission (f k , SF, Bandwidth W , RSSI, SNR, etc.). Consequently, the computer stores this data for processing as detailed in the following sections. For the research society, the data is provided on this online repository [106].

Effective Signal Power

The LoRa system can operate at SNR below 0 dB as LoRa signals can be decoded with signal power below the noise floor [START_REF] Rahmadhani | Understanding collisions in a lorawan[END_REF]. Based on the independence between signal and noise, the measured power P r at the input Radio Frequency (RF) chain is the sum of the signal power P s , the potential interference power P i and the noise power P n . These are related on a linear scale as:

P r = P s + P i + P n (4.10)
and the signal to interference plus noise ratio is:

ρ = P s P i + P n . (4.11)
By assuming the power quantities are expressed in milliwatt, these can be redefined on a logarithmic scale as: with

RSSI dBm =
P n = k B T W • 1000, (4.18)
where the Boltzmann constant k B is 1.381 × 10 -23 J K -1 and the temperature T is set to 293.15 K. By using equation 4.16, the ESP lower limit can also be defined as:

ESP dBm = 10 log 10 (P n ) + SIN R dB . (4.19)
At this point, these can be estimated as:

RSSI dBm ≈ -123 + 10 log 10 (1 + 10 0.1SIN R dB ) (4.20)
and

ESP dBm ≈ -123 + SIN R dB . (4.21)
Taking the measured data in Rennes as an example, Figure 4.10 shows a comparison between RSSI and ESP against different SINR values. For positive SINR, ESP coincides with RSSI, but it differs for the negative SINR. The most striking observation is that the raw measurement of RSSI and ESP provided by the experimental setup are very precisely limited by expressions 4.20 and 4.21, while those lower limits are obtained by only considering the thermal noise assumption. Thus, the RSSI distribution saturates when the received power is approaching -120 dBm. In contrary to RSSI, ESP at negative SINR goes below this previous limited value of the RSSI. It is worth mentioning that when the ESP limitation gets to an extreme value, it refers to the maximum receiving sensitivity, i.e. -142 dBm as mentioned in the Tektelic gateway specifications sheet [104]. Since some packets are received with SINR below 0 dB in the practical experiments, ESP is more reliable to be used for CSI estimation and analysis, as detailed in the following sections. It could be utilized for IoT localization also, particularly ESP instead of RSSI

CSI Estimation

At the gateway side, the received data is extracted from the payload of each received packet plus the metadata. As an approach for obtaining the absolute CSI, uplink ESP, uplink and downlink ESP values are averaged at each frequency channel f k . As the shown example in Figure 4.11a, the absolute CSI from location 2 is frequency selective with a deep fade of more than 15 dB depth, particularly at 867.5 MHz. Moreover, channel reciprocity is manifested between the uplink and downlink CSI with almost the same fading position. While in Figure 4.11b, the obtained CSI also indicates multipath propagation whose deep fades are up to 10 dB depth. Apart from a constant value whose compensation would require an accurate calibration of the transceiver RF chains, the same channel reciprocity across all the frequency bands is preserved.

On the other hand, one can observe that the gap between the uplink RSSI and ESP is larger in Figure 4.11b than in Figure 4.11a, as indicated by the black arrows. This behavior is clarified by equation 4.16, thus, the gap between the RSSI and ESP increases when SNR decreases below 0 dB. Therefore, the RSSI values are ignored, whereas the ESP values are utilized for further investigations as detailed in the following sections.

Reciprocity of the CSI

In this section, the magnitude of the aforementioned CSI reciprocity is evaluated for all the locations. To quantitatively appreciate the similarity or dissimilarity of the frequency dependency of quantities, for example, the uplink versus downlink ESP values, the PCC is used [START_REF] Benesty | Pearson Correlation Coefficient[END_REF]. Let: be two frequency dependent vectors of the same size N , where N in this experiment corresponds to the number of the frequency channels f k . Consequently, the centered versions of those two vectors are:

x = [x 0 , . . . , x N -1 ] T (4.
x c = x - x T .1 N N = x -x (4.24)
and

y c = y - y T .1 N N = y -ȳ. (4.25)
At this point, the PCC between those two vectors is classically expressed as a simple dot product between their normalized versions as:

ρ xy = xT c .ŷ c = x c T .y c √ x c T x c y c T y c . ( 4.26)
This correlation coefficient is a measure of the linear correlation between those two vectors which captures only their fluctuations around their centers. Hence, this coefficient is essentially a normalized value, such that the result always has a value between -1 and 1.

By utilizing the PCC for quantifying the reciprocity of the uplink versus downlink CSI, Figure 4.12 shows the magnitudes of the PCC across all the locations. The result shows that most of the PCC values are greater than 0.9 which represents a nearly identical shape of CSI in the uplink and downlink. For future IoT applications, this reciprocity feature could be exploited for the physical layer security between the end node and the gateway [START_REF] Bloch | Wireless information-theoretic security[END_REF]. However, location 3 and 10 have lower PCC values due to the lack of the averaged ESP values at some frequency bands, hence, this often happens as a reason of the packet transmission losses.

Spatial Correlation of the CSI

For investigating the spatial correlation between the CSI shapes from different positions, the CSI spatial evolution at each location is also analyzed using the aforementioned method based on the PCC between each location combination i and j. As depicted in Figure 4.13a, most of the PCC magnitudes are generally unrelated to the Euclidean distance at any two locations in Figure 4.13b. In contrary to the nearly similar uplink and downlink CSI which is demonstrated by the high reciprocity for a single stationary location, hence, the CSI shape is varying from one place to another even for short separations. This behavior is reasonable as the minimum Euclidean distance between any two locations is ≈ 4.9 m in this experiment. This suggests the feasibility of utilizing the CSI for localization provided this CSI remains stationary enough over time. Thus, the accuracy of positioning could be improved by utilizing the rich channel information in each subcarrier f k as well as the frequency hopping in the LoRa systems. Hence, the individual CSI from each different location has to be appropriately different from one another to achieve significant localization gain.

Conclusion

This section investigates both the spatial evolution of the CSI from different locations, as well as, the reciprocity between the uplink and downlink CSI in LoRa is analyzed. Accordingly, a measurement campaign is carried out in the city of Rennes to estimate the CSI by averaging ESP values at each frequency band. Hence, ESP is more reliable than RSSI as it overcomes the RSSI limitation, especially at low SNR (< 0 dB). Thus, PCC is utilized to measure the linear correlation between two CSI, as a result, the uplink and

Spatial Correlation of CSI in Real LoRa Measurement

1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 PCC For future work, this section recommends using this reciprocity feature for the physical layer security between the end node and the gateway. Moreover, the unique CSI shape at each location could achieve significant localization gain by utilizing the frequency hopping in the LoRa systems to get the rich channel information in each subcarrier.

Summary and Conclusion

This chapter investigates the feasibility of localizing using LoRa CSI, by performing outdoor measurement campaigns in the area of Beaulieu Campus in Rennes. Thus, the spatial and temporal stability of CSI are asserted to be relatively stronger than the RSSI values. At each different location, the CSI reciprocity is quantified using the PCC which shows a very high linear correlation between the uplink and downlink CSI. On the other hand, most of the CSI shapes from different locations are highly uncorrelated to each other. Hence, it can be anticipated that this could achieve significant localization gain by utilizing the frequency hopping in the LoRa systems by getting access to a wider band. In the given results, the feasibility of using the ESP is proven by its enlarged range when the SNR is very low, unlike the RSSI which has a limitation. Without loss of generality, LoRa CSI can be obtained using the following proposed approaches:

1. Estimating the CSI from the IQ samples of the received LoRa preamble chirps at the gateway. For each center frequency, a narrowband CSI is estimated until the whole CSI shape is acquired by the frequency hopping, as shown in Figure 4.14.

2. Estimating the CSI by averaging the ESP values for each center frequency until the whole CSI shape is acquired by the frequency hopping. This approach is considered the most feasible one as it doesn't require any additional hardware on the gateway side. To obtain the ESP value, the value of RSSI and SNR is the only requirement that is mostly available in any traditional gateway.

For future work, this chapter highly recommends using ESP for the potential IoT applications, especially localization using ESP fingerprinting instead of using RSSI. Thus, the different channel gains can be used as additional information to increase the localization accuracy.

Part II

Spectrum Allocation for IoT Networks 94

Chapter 5

CHARACTERIZING AND MODELING OF PDR IN AN ACTUAL LORAWAN NETWORK

Introduction

With the growth of the IoT, it is critical to understand the packet transmission performance in LPWAN, especially LoRaWAN. Hence, the transmission quality of data packets has a significant impact on the performance of the entire LoRaWAN [START_REF] Augustin | A study of lora: Long range & low power networks for the internet of things[END_REF]. Thus, the reliability of communications in the network is impaired by the channel quality of the link between the end node and the gateway. Consequently, packet loss may occur due to the channel attenuation or interference. This transmission failure affects various IoT applications and even causes serious outcomes. Furthermore, the data integrity and accuracy in IoT data analytics may be reduced by a large amount of packet loss. Therefore, LoRaWAN supports both unconfirmed and confirmed messaging. Confirmed messaging is most probably used for important sensor data. In contrary to the unconfirmed message, the end node requires the message to be acknowledged as received by the network server when sending a confirmed message. Accordingly, the end node will retransmit the data packet when it does not receive the acknowledgment. However, this retransmission requires an extra energy consumption that impacts the battery life of end node devices plus occupying an additional spectrum, raising the interfering level and occupying time that could be used for uplinks.

Part II, Chapter 5 -Characterizing and Modeling of PDR in an Actual LoRaWAN Network

Related Works

Recently, many papers are addressing the different origins of LoRa packet loss. For example, in [START_REF] Rahmadhani | Understanding collisions in a lorawan[END_REF] the authors conduct experiments to evaluate a characterization of LoRaWAN frame collision conditions. Moreover, the PDR and coverage of LoRa technology are evaluated for outdoor cases in [START_REF] Li | On the application of lora lpwan technology in sailing monitoring system[END_REF] and [START_REF] Wang | Performance of lora-based iot applications on campus[END_REF]. Based on empirical results in [START_REF] Chall | Lorawan network: Radio propagation models and performance evaluation in various environments in lebanon[END_REF], path loss models are developed for LoRaWAN communications and compared with widely used empirical models. In [START_REF] Cattani | An experimental evaluation of the reliability of lora long-range low-power wireless communication[END_REF], authors study the impact of environmental factors on the performance of LoRa, and show that higher temperatures decrease the RSSI and may drastically affect PDR. While in [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF], the first attempt to investigate the PDR in a real city-scale LoRaWAN network is presented. However, these previous works do not evaluate the ESP, i.e. introduced in Section 4.4.4, as one of the main factors affecting the PDR rather than evaluating RSSI only. Besides, they do not focus on the frequency dependency of PDR. Over and above, these previous works don't introduce the modeling of PDR corresponding to the received power. Hence, the received power is considered as one of the main factors affecting the PDR.

Contribution

In this chapter, an in-depth investigation of the frequency dependency of the PDR is done by utilizing the measured data of a measurement campaign, i.e. introduced in Section 4.3.3. From each different location, the ESP and SINR values are obtained as well as the influence of these parameters on the PDR is evaluated at each frequency band independently. Hence, the whole ESP values in the experiment are extensively evaluated, and the other possible causes of packet loss are thoroughly explained. With the given results, the feasibility of using the ESP is proven by its enlarged range when the SINR is very low, unlike the RSSI which has a limitation. Accordingly, modeling the PDR using an ESP parameterized beta distribution function is proposed. Feasibility of the proposed model is assured by simulating PDR against ESP, hence, the simulated PDR values follow the distribution of the measured ones well. This PDR model gives important guidelines for future LoRaWAN network regulation and optimization. Moreover, this investigation manifests and gives important guidelines for using ESP in the future IoT applications.

Organization

The remainder of this chapter is organized as follows. Section 5.5 presents the main factors of the packet losses. Section 5.6 provides an evaluation of the PDR's frequency dependency. The effect of the channel quality on PDR are then presented and commented in Section 5.7. Hence, Section 5.8 provides the modeling of PDR from the measured data. Finally, the work is concluded in Section 5.9.

Key Factors of Packet Loss

Packet losses are the main drawback for IoT [START_REF] Guo | Experimental evaluation of the packet reception performance of lora[END_REF]. Hence, packet losses cause many retransmissions at the cost of a lower battery lifetime of the end nodes and may lead to an increase of the RF contention level. Even worse, a total failure of the IoT service could happen, either because end nodes can not succeed in sending any data to the gateway or because all their energy is consumed much faster than expected due to the multiple repetitions of the transmission. Without loss of generality, LoRaWAN is used as an example in this thesis but any other IoT protocol could be utilized. Thus, the major sources of the packet loss are described in the following subsections, as shown in Figure 5.1.

IoT device

Shadowing

Packet collision

Channel contention occurs when multiple devices attempt to send data over the same channel simultaneously [START_REF] Rahmadhani | When lorawan frames collide[END_REF][START_REF] Moy | Decentralized spectrum learning for radio collision mitigation in ultra-dense iot networks: Lorawan case study and experiments[END_REF]. Whereas the end nodes are uncoordinated, the packet transmission is initiated by the end node, not the network. Hence, the traditional LoRa device does not check if the channel is preempted by other devices before transmitting a packet, so it may cause packet collision. Additionally, the IoT networks are superposed with no coordination between them. So, these collisions could also occur no matter whether the interfered signal is from other end nodes of the same network or the surrounding IoT networks, using the same IoT standard or not. Moreover, interference could occur from other radio signals present in the ISM bands which are not IoT signals, so they can be considered "jammers" by definition. Last but not least, electromagnetic radiations could disturb the end nodes due to the proximity of other electronic devices suffering from leakage radiations, for instance, this could happen in an industrial environment.

Channel factors

The end node can be located far away from the gateway, especially in LPWAN networks, which causes shadowing and signal attenuation across the transmission range [START_REF] Chall | Lorawan network: Radio propagation models and performance evaluation in various environments in lebanon[END_REF]. Packet transmission success is closely related to the channel state, indeed, a channel facing bad propagation conditions has the same effect as caused by collisions. These propagation conditions are directly determined by the channel parameters which are SNR, RSSI and ESP. SNR is the ratio of signal power to the measured noise power. Consequently, the higher SNR is, the smaller the noise mixed in the signal, and the easier it is to separate the effective signal. RSSI is a relative value of signal power measured by the end node or the gateway at its receiving end. However, ESP is a more reliable parameter as it overcomes the RSSI limitation, especially at low SN R (< 0 dB) as depicted in the previous Section 4. 4.4. Without loss of generality, ESP is computed from SN R | SIN R as depicated in Equation 4. [START_REF] Fettweis | Ict energy consumption -trends and challenges[END_REF]. In general, ESP value decays with the shadowing effect and increase of distance, in particular for the long transmission range, as in most IoT applications. Due to the low transmission power, i.e. maximum transmit power of the LoRa signal is 14 dBm, and the large propagation attenuation, this value is usually negative in dBm. Furthermore, these channel parameter values depend on the specific environmental conditions around 5.6. Frequency Dependency of PDR each end node, hence, each CSI is different from one location to another.

Frequency Dependency of PDR

The radio channel between a gateway and an IoT node in a LoRaWAN is very specific at each location. Its quality has an impact on the capability to establish a successful transmission, as it is confirmed in the previous sections. Moreover, the LoRa channel with such a small bandwidth of 125 kHz is almost flat. However, this section shows that there are significant variations of the channel gain over different LoRa center frequencies f k , with only a 200 kHz spacing in the 868 MHz ISM band. Consequently, the impact of the channel on the successful packet rate is investigated for each center frequency independently. In an offline mode, the received data is extracted from the payload of each LoRa packet at the gateway side. Thus, ESP value is extracted and analyzed against the PDR value at each frequency channel f k . On the other hand, PDR is calculated at each different channel f k independently as:

P DR = Number of received packets Number of transmitted packets , ( 5.1)
where the number of transmitted packets to obtain the PDR value at each frequency band f k is 20.

As an example shown in Figure 5.2a, the absolute CSI from location 4 is frequency selective with a deep fade of more than 10 dB depth. On the other hand, channel reciprocity is clearly manifested between the uplink and downlink CSI apart from a constant value whose compensation would require an accurate calibration of the transceiver RF chains. While the PDR values preserve almost the same magnitude ranks across all the frequency bands, as shown in Figure 5.2b. Here, downlink PDR values are preferred because they are more correlated with the absolute CSI shape in these near transmission conditions.

CSI shape variability over the ISM-Band

Impact of channel parameters on PDR

shows moderate fades with a low indication of multipath propagation. Thus, the variation of signal level is less than 6 dB over the 1.5 MHz frequency range. The opposite is the signal level spectrum of location 2, 4, 5, 6, and 7 which stand for another category of channels showing strong frequency selectivity. This category indicates multipath propagation with a path delay so it has many deep fades with up to 15 dB depth, in such a small bandwidth of 1.5 MHz only.

Impact of the channel quality on PDR

The PDR values on each center frequency for all the locations are shown in Figure 5.3b. Location 1 and 3 show total successful transmissions across the whole frequency bands which is reasonable as they already have almost flat fading channels, and high received power as shown in Figure 5.3a. While PDR values in the other locations preserve the same pattern of their CSI shape. For example, location 5 has PDR values that fit well with respective properties of the corresponding frequency bands, particularly at 867.1 MHz and 867.3 MHz with low PDR values like their ESP values. This confirms the strong frequency dependency of the PDR in the LoRa system.

Impact of channel parameters on PDR

To check the plausibility of utilizing the ESP, the main causes of the packet loss events are discussed in this section. Two main aspects can affect the PDR, which are measured received power and SINR, as detailed in the following subsections. Hence, one can observe that the PDR magnitudes are uniformly quantized with a resolution of 1 20 . Nevertheless, there are some irregular gaps between the PDR values which could be compensated by taking more measurement data. On the other hand, the result shows that high PDR values reduce significantly with the decrease of RSSI, which is similar when the ESP decreases. However, RSSI distribution is limited when approaching the aforementioned noise floor limitation, i.e. RSSI ≈ -120 dBm at SIN R = 0 dB. One can observe the rather large gap between the ESP values and the RSSI values, especially when constant to ensure that the total probability is 1. In the above equation, P DR is a realization, i.e. an estimated PDR value that actually occurred, of a random process. Moreover, this Beta distribution function f (P DR; α, β) has a mean E[P DR] which is computed as:

Impact of received power

E[P DR] = α α + β . ( 5.5)
By exploiting the noticeable formal similarity between the two expression of the expectation in equation 5.2 and 5.5, α and β are estimated as α = 1 and β = e -k(ESP -ESP 0 ) . At this point, these can also be redefined as:

E[P DR] = 1 1 + β (5.6)
and the variance Var[P DR] is:

Var[P DR] = αβ (α + β) 2 (α + β + 1) = β (1 + β) 2 (β + 2)
.

(5.7)

Simulation Results

In this section, the performance of the proposed PDR model is evaluated by generating PDR distributions at each ESP value. Figure 5.5b shows the simulated PDR distribution which follows the distribution of the measured PDR in Figure 5.5a. Consequently, the expectation of the simulated PDR values lies within the 2σ confidence interval around the sigmoid curve, whereas the extreme variations of the PDR are well simulated as promised by this proposed model. For obtaining the same resolution of the measured PDR, the simulated PDR values are uniformly quantized with the same resolution of the measured PDR.

On the other hand, the PDR distribution is different at each ESP value as manifested by their corresponding Beta distribution functions in Figure 5

Conclusion

ESP is considered to be more reliable than RSSI as it overcomes the RSSI limitation, especially at low SNR (< 0 dB). Accordingly, this section presents the modeling of the PDR as a function of ESP. From the data of an accomplished measurement campaign, the measured PDR is investigated against ESP and is modeled using a Beta distribution function. Besides, the PDR distribution is simulated using the proposed model, as a result, the simulated PDR follows the measured one well. Furthermore, the fine parameters of the Beta distribution function are tuned at each ESP value for analyzing their effect on the PDR distribution.

For future work, this section recommends using this Beta distribution function for modeling PDR as a function of ESP. Thus, the potential studies in IoT can simulate the PDR against ESP to have an estimation for dimensioning the LoRaWAN network.

Summary and Conclusion

In this chapter, the frequency dependency of PDR in LoRa is studied. Thus, the channel parameters (RSSI, ESP, SINR) from different node locations are estimated during a measurement campaign in the city of Rennes. Hence, PDR is investigated against ESP at each different frequency. At each different location, the CSI shape is proven to be correlated with the PDR values. On the other hand, the presented data indicate that ESP has a more natural relationship with PDR than RSSI. Based on that, PDR is modeled as a function of ESP, hence, this proposed model could be utilized for future LoRaWAN network regulation and optimization.

As detailed in the next chapter, this frequency dependency of ESP should be exploited to improve PDR.

Part II, Chapter 6 -Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information on the properties of each of the potential IoT application.

Related Works and Motivation

Recently, many works are proposing different solutions for reducing the packet loss rate. For example, in [START_REF] Li | Dylora: Towards energy efficient dynamic lora transmission control[END_REF] the authors propose DyLoRa, a dynamic LoRa transmission control system to improve energy efficiency, as an alternative to the state-of-the-art LoRaWAN ADR. Thus, the idea of DyLoRa is to adjust the transmission parameters, i.e. transmission power and SF, among different environments. Moreover, a Collision Avoidance Resource Allocation (CARA) algorithm is proposed in [START_REF] Chinchilla-Romero | Collision avoidance resource allocation for lorawan[END_REF] with the objective of increasing the system capacity by mitigating packet losses from the collisions. However, these previous works are either centralized approaches (on the network side), hence, they do not consider the different interference conditions in the proximity of each end node which is located in a specific area. Or, they are imposing changes on the IoT protocol with extra packet transmissions and time synchronization between the end nodes. While in [START_REF] Moy | Iotligent: First world-wide implementation of decentralized spectrum learning for iot wireless networks[END_REF] and [START_REF] Moy | Decentralized spectrum learning for radio collision mitigation in ultra-dense iot networks: Lorawan case study and experiments[END_REF], the first implementation of a decentralized spectrum learning for IoT wireless networks is proposed in order to mitigate radio collisions without changing anything to LoRaWAN protocol. Moreover, they can be used in addition to conventional ADR techniques. They propose to use a learning algorithm on LoRa devices that can cope with spectrum scarcity which could occur in unlicensed bands. Nevertheless, this learning algorithm does not exploit the channel quality at each frequency band on the end node side to accelerate the learning process. This decentralized approach could be extended, which was just to avoid collisions to the management of channel quality too. Hence, the channel quality is estimated from the channel parameters, i.e. SNR, RSSI and ESP, which are considered as one of the main factors affecting the packet loss rate [START_REF] Abdelghany | On superior reliability of effective signal power versus rssi in lorawan[END_REF][START_REF] Abdelghany | Modelling of the packet delivery rate in an actual lorawan network[END_REF]. Moreover, these channel parameters could be obtained on the end node side for implementing a decentralized approach, thanks to the reciprocity between the uplink and downlink CSI.

Contribution

In this chapter, a machine learning algorithm is proposed for spectrum allocation which could be embedded at the IoT end node side with low hardware extra cost in terms of processing power, memory footprint, etc. This algorithm reduces the packet losses by learning a proper frequency allocation schema based on ESP as the channel quality indication to avert using a channel with poor propagation conditions and accelerating the learning process. Moreover, an adaptive algorithm is also proposed for non-stationary scenarios when the end node moves from one place to another or alternatively the CSI shape changes. Another non-stationary example could be when the end node exhibits a changing environment model, for example, if it is placed in a road where there are moving cars and objects. These moving obstacles may introduce a temporal evolution of the CSI shape between the morning and night period [START_REF] Rauh | Multipath characteristics of indoor-to-outdoor radio channels in the 868-mhz band[END_REF]. In a real network deployment in the university campus in Rennes, these algorithms are implemented inside an end node device and executed in different scenarios, i.e. stationary and non-stationary. Consequently, the whole results from the experiment are extensively evaluated among the proposed reinforcement learning algorithms against the state-of-the-art ones with random frequency allocation.

Organization

The remainder of this chapter is organized as follows. Section 6.5 provides sufficient detail about the system model of the proposed algorithm. The proposed algorithms are then illustrated in Section 6.6. While Section 6.7 shows the experimental architecture and network configuration used for the measurement campaign. In Section 6.8, the experimental results of the proposed algorithms are tested through the different scenarios. Additional remarks are given for adjusting the algorithms' configurations in Section 6.9. Finally, the work is concluded in Section 6.10.

System Model

The proposed learning approach can help IoT devices to reduce packet losses due to both weak channel propagation conditions and also collisions. That for, the proposed approach is inspired from [START_REF] Moy | Iotligent: First world-wide implementation of decentralized spectrum learning for iot wireless networks[END_REF] and [START_REF] Moy | Decentralized spectrum learning for radio collision mitigation in ultra-dense iot networks: Lorawan case study and experiments[END_REF] where a solution to radio collisions is proposed, while imposing no change on the IoT protocols, as, for instance, LoRaWAN. Employing the acknowledged messaging mode is the only required condition to utilize the proposed solution. Based on the investigation in [START_REF] Abdelghany | On superior reliability of effective signal power versus rssi in lorawan[END_REF], the underlying hypothesis is that the channels' PDR is not equally balanced across the K different frequency bands an IoT device can use. In other words, some channels are less attenuated than others. These channel con-Part II, Chapter 6 -Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information ditions are possibly be predicted online in time and space in a decentralized manner (on the end node side). As the end nodes may be quite far away from the gateways and suffer from different jamming and channel conditions, it is much more efficient to implement a spectrum allocation approach on the end node side than on a centralized unit. While taking into consideration that no extra processing can be afforded at the end node where every Watt is counted at transmission to save energy.

To be compatible with the constraint of low complexity of the end node hardware, a kind of Artificial Intelligence (AI) algorithm is considered. This proposed approach is based on reinforcement learning algorithms which have been introduced by the machine learning community [START_REF] Lai | Asymptotically efficient adaptive allocation rules[END_REF] and first proposed for cognitive radio communications more than 10 years ago [START_REF] Jouini | Upper confidence bound based decision making strategies and dynamic spectrum access[END_REF]. It is also experimentally validated on real radio signals for cognitive radio and especially for Opportunistic Spectrum Access (OSA) in [START_REF] Moy | Reinforcement learning real experiments for opportunistic spectrum access[END_REF]. As asserted for OSA, Multi-Armed Bandit (MAB) problem can be utilized to model the IoT spectrum access issue [START_REF] Moy | Iotligent: First world-wide implementation of decentralized spectrum learning for iot wireless networks[END_REF]. Thus, reinforcement learning is based on a feedback loop that gives a success|failure measure of the action. In the IoT context, a binary reward, i.e. 1|0 for the presence|absence of the ACK packet which is sent by the gateway to the end node, is considered, as shown in Figure 6.1. If a message has been successfully transmitted from the end node to the gateway on the uplink channel, as well as the ACK message has been successfully transmitted from the gateway and received by the end node on the same channel in the downlink, a reward of "1" is given plus the channel parameters, i.e. SNR, RSSI and ESP, are estimated to optimize and accelerate the learning process as illustrated in the following sections. While a reward of "0" means that packet loss has happened either on uplink or downlink so that ACK has not been received by the end node. Maximizing the PDR is the main target, or equivalently, maximizing its cumulated reward. This proposed approach can adapt to any other IoT protocol, moreover, it has the following main advantages:

• Coordination between the end nodes is not necessary. Therefore, no extra retransmission, no data to be added into the uplink or downlink packet. While the content of the ACK packet isn't changed.

• The very low processing and memory overhead of both the implementation and execution of the proposed approach [START_REF] Moy | Iotligent: First world-wide implementation of decentralized spectrum learning for iot wireless networks[END_REF]. Consequently, it is possible to execute the proposed algorithm in the end node devices whose complexity is negligible in terms of processing, hardware, memory as well as energy consumption overhead.

the gateway, then, it starts to wait for a fixed delay (one second in LoRaWAN) in the same channel i for receiving an ACK packet from the gateway, as shown in Figure 6.1. But due to propagation issues, the message sent by the end node to the gateway, or the ACK sent by the gateway to the end node, could be lost. Hence, selecting the channel i at time n yields a random feedback, i.e. the binary reward r i (n) and the channel quality g i (n).

Maximizing the transmission success rate of the end node or, equivalently, maximizing the cumulative reward is the main target. Sequence of rewards drawn from a given arm i is assumed to be i.i.d., consequently, this problem is considered as a "stochastic" MAB [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF]. A player (here, an end node) has to try all arms (here, channels), a sufficient number of times to get a robust estimate of their qualities, while not selecting the worst arms too much. This requires tackling the so-called exploration-exploitation dilemma to be able to progressively focus on the best arm i.e., the arm with the largest average reward, using the proposed algorithms in the following subsections.

UCB Algorithm

Exploiting the channel with the highest estimated mean by selecting it at each time could be a first naive solution, however, this "greedy" approach is known to fail dramatically [START_REF] Lai | Asymptotically efficient adaptive allocation rules[END_REF]. Thus, the selection of arms is highly dependent on the first draws with this greedy policy. For example, if the first transmission in one channel succeeds and the first one on the other channel fails, the end node will never use the other channel again, even it is the best one and has the best channel conditions on average. While UCB algorithm instead is adding an extra exploration term to the empirical mean, which can be viewed as a confidence bound [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF]. At each end node, the number of times the channel i is selected up-to time index n ≥ 1 is calculated as:

T i (n) = n m=1 1 A(m)=i ∀i, (6.1)
where A(m) ∈ {1, ..., K} is a discrete action which corresponds to the chosen channel index at time index m. Hence, the empirical mean estimation of the successful transmissions obtained in channel i by selecting it up to time n, is denoted by the mean reward as:

R i (n) = 1 T i (n) n m=1 r i (m)1 A(m)=i ∀i. (6.2)
Subsequently, the upper confidence bound B i (n) of the channel i is denoted by the sum of the empirical mean and a confidence term as:

B i (n) = R i (n) + α ln n T i (n) , ( 6.3)
where the exploration factor α is recommended by the theory to be ≥ 0.25 [START_REF] Bubeck | [END_REF]. At this point, the maximum upper confidence bound B i (n) is chosen by the end node to decide the next channel for sending the packet, thus, the next action A(n + 1) is obtained by choosing the best channel as:

A(n + 1) = arg max i (B i (n)). ( 6.4)
For each end node, the time index n corresponds to the total number of transmitted packets from the beginning. As time is not slotted, this time index n isn't shared across different end nodes. Every end node implements its own UCB algorithm independently, which can be described as follows in Algorithm 1.

Data: K, [α]

Result: A(n + 1) for n = 1 to ∞ do if n < K then Initialize policy by trying each channel for at least one time.

A(n + 1) = n + 1 else T i (n) = n m=1 1 A(m)=i ∀i R i (n) = 1 T i (n) n m=1 r i (m)1 A(m)=i ∀i B i (n) = R i (n) + α ln n T i (n) A(n + 1) = arg max i (B i (n)) end end
Algorithm 1: UCB policy as depicted in [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF].

Part II, Chapter 6 -Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information

QoC-A Algorithm

As mentioned in the previous sections, there is a strong dependency between the PDR and the channel quality. Hence, a QoC-A policy is proposed to find the channel which is optimal in terms of both quality and probability of receiving the ACK packet [START_REF] Modi | Qos driven channel selection algorithm for cognitive radio network: Multi-user multi-armed bandit approach[END_REF]. As first stated in Algorithm 2, all the channels are explored at least once to acquire the initial binary reward and their channel qualities. At the final step, Algorithm 2 returns the channel index A(n+1) which has to be used in the next time slot. Again, T i (n) defines the number of times channel i has been utilized up to time n. After n ≥ K iterations, the term B i (n), i.e. corresponding to the score of the i -th channel at time n, are updated as [START_REF] Modi | Qos driven channel selection algorithm for cognitive radio network: Multi-user multi-armed bandit approach[END_REF]:

B i (n) = R i (n) -Q i (n) + α ln n T i (n) , ( 6.5)
where R i (n) denotes the exploitation term, or equivalently the empirical mean of the states (ACK packet received or not) of the i -th channel at time n. While the bias term α ln n T i (n) forces to explore the other channels, if the scheme leads to a channel whose average rewards degrades. Furthermore, the quality term Q i (n) defines the quality information of the channel i which can be calculated as:

Q i (n) = β(1 - G i (n) G max (n) ) ln n T i (n) (6.6) with G i (n) = 1 T i (n) T i (n) k=1 g i (k) (6.7)
and

G max (n) = max i G i (n), (6.8)
where G i (n) is the empirical mean of quality observations g i (n) collected from channel i and G max (n) is the maximum expected quality value within the set of channels. Moreover, the new parameter β forces the algorithm to give some weight to the quality in the score computation, whereas the parameter α forces the exploration of other channels to check their probability of receiving the ACK packet. Such a formulation tends to select a channel with the highest quality and probability to be acknowledged.

An important contribution of this chapter compared to the previous works in the cognitive radio field [START_REF] Modi | Qos driven channel selection algorithm for cognitive radio network: Multi-user multi-armed bandit approach[END_REF], is that the quality observation g i (n) is the channel quality, i.e. ESP in linear scale, of the ACK packet. On the contrary, the channel parameters are obtained from a sensing phase before sending the packet in the OSA context, as the "listen-before-talk" model in [START_REF] Modi | Qos driven channel selection algorithm for opportunistic spectrum access[END_REF], which consumes power. It also worth mentioning that ESP is the used parameter that is obtained as a function of SNR, thus, it has an enlarged range when the SNR is very low, unlike the RSSI which has a limitation as detailed in Section 4.4.4. Accordingly, this proposed algorithm is simple to implement and to use in practice, even on embedded microprocessors with limited computation and memory capabilities as detailed in the following sections.

Data: K, [α, β] Result: A(n + 1) for n = 1 to ∞ do if n < K then
Initialize policy by trying each channel for at least one time.

A(n + 1) = n + 1 else T i (n) = n m=1 1 A(m)=i ∀i R i (n) = 1 T i (n) n m=1 r i (m)1 A(m)=i ∀i G i (n) = 1 T i (n) T i (n) k=1 g i (k) G max (n) = max i G i (n) Q i (n) = β(1 -G i (n) Gmax(n) ) ln n T i (n) B i (n) = R i (n) -Q i (n) + α ln n T i (n) A(n + 1) = arg max i (B i (n)) end end
Algorithm 2: QoC-A policy.

DQoC-A Algorithm

In many IoT applications, the end node could be in a non-stationary scenario, for instance, when it moves across different locations whose CSI shapes are different. Based on that, the probability of receiving the ACK packet and the quality of each channel are likely to experience changes in time, which exhibits the limitation of the aforementioned MAB algorithms. Although the convergence of these algorithms is very fast, however, the stationarity of the environment is required. Resetting the learning algorithm from time to time can be a simple solution, however, it may fail to determine when the propagation In this chapter, a DQoC-A algorithm is proposed to learn on the same channel conditions, i.e. quality and the probability of receiving the ACK packet, as the previous QoC-A but in non-stationary scenarios [START_REF] Modi | Machine learning and statistical decision making for green radio[END_REF]. Since the confidence interval of the standard QoC-A policy becomes tighter when time goes up, it is not appropriated for the non-stationary environment as stated before. While the motivation for the DQoC-A policy is to find an optimal channel in the case of changing environments, with less exploration. Therefore, discount factors (λ and λ g ) are considered for the DQoC-A to guaranty the adaptiveness of DQoC-A policy in a non-stationary environment, as stated in Algorithm 3. The idea behind the inclusion of these discount factors (λ and λ g ) is to give more weight to recent observations compared to the ones acquired in the past. A remarkable contribution of this chapter compared to the previous work in [START_REF] Modi | Machine learning and statistical decision making for green radio[END_REF], is that two different discount factors (λ and λ g ) are considered rather than using one. Thus, λ and λ g should have different values as they are used to average two different distributions, which are the binomial distribution of the binary reward r i (n) and the log-normal distribution of the channel quality g i (n), respectively.

Based on that, this proposed DQoC-A policy learns a channel that is optimal in terms of the probability of receiving the ACK packet and quality in a gradual manner. As with QoC-A policy, an end node employing DQoC-A policy first starts to explore all channels at least once initially. After n ≥ K iterations, it updates the scoring term B i (n), however, each term in the equation is adapted to take into account the non-stationary hypothesis as:

B i (n) = R i (n) -Q i (n) + α ln W (n) N i (n) , ( 6.9)
where N i (n) is the discounted number of times channel i has been used up to time n, and W (n) is the total discounted time. Contrary to QoC-A policy, the empirical mean of rewards R i (n) and channel quality G i (n) are estimated by taking into account the discount factors (0 < λ < 1 and 0 < λ g < 1), as shown in Algorithm 3. While the coefficients α and β, are the same as in the QoC-A policy, to weight exploration for the probability of receiving the ACK packet and channel quality, respectively.

Experimental Results

The scope of this section is to compare the aforementioned learning policies against the state-of-the-art ones with random frequency allocation that is considered as the reference. For emulating the state-of-the-art frequency allocation, a uniform Round-Robin algorithm is executed that simply transmits the packets sequentially at each frequency band f i across the time index n. Furthermore, the experiments are performed in two different environments as detailed in the following subsections.

Scenario 1: Stationary IoT node

The first experiment is carried out by placing the end node in a fixed position without moving it to have stationary channel conditions. Hence, the CSI shapes are almost identical across the whole experiment duration of ≈ 8.8 hours and 800 iterations (800 transmitted packets), as shown by the received power level in Figure 6.3. Each CSI shape is acquired by averaging the ESP values at each frequency band f i independently every 200 iterations. Moreover, the frequency selectivity of this CSI is clear, particularly at 867.3 MHz with a deep fade of more than 10 dB depth. These unequal channel qualities across the frequency bands f i could be exploited using the proposed algorithm QoC-A.

As depicted in Figure 6.4, the performance of UCB (α = 0.6), and QoC-A (α = 0.6 and β = 0.2), i.e. with ESP in the linear scale as the quality observation g i (n) that is shown in Algorithm 2, are compared against the uniform frequency allocation. As promised in the previous sections, all the learning algorithms outperform the uniform frequency allocation. On the other hand, the final average reward obtained using the QoC-A policy outperforms the UCB policy, as manifested in Figure 6.4a. Accordingly as shown in Figure 6.4b, the cumulative regret obtained for all the methods preserve the same performance rank over the whole time index n with final total lost packets of 32, 39 and 132, while using the proposed algorithm QoC-A, the classical UCB, and the uniform frequency allocation, respectively. As shown in Table 6.1, QoC-A policy outperforms all the other algorithms by a total number of successfully transmitted packets of 768 over 800. This indicates that the proposed policy QoC-A is exploiting properly the channel quality to converge faster. Hence, it does not need to lose some time to acquire this knowledge before learning actually ends.

Scenario 2: Non-Stationary IoT node

For analyzing the behavior of MAB learning policies in a non-stationary scenario with an abrupt changing environment, the end node is moved during the experiment across three different positions to have unconstant channel conditions. As shown in Figure 6.5, the CSI shapes are different across the whole experiment duration of ≈ 6.6 hours. Again, each CSI shape is estimated by averaging the ESP values every 200 iterations at each frequency band f i independently. Although all the locations are indoor, nevertheless, a progressive reduction is observed in the received power across locations 1 to 3. This reduction is reasonable as the end node goes deeper inside the building from location 1, i.e. behind the window as shown in Figure 6.2, to location 3. Moreover, the CSI shape which is represented in location 1 shows fades of ≈5 dB, especially at 867.1 MHz and 868.5 MHz, while the best channel quality is obtained at 867.9 MHz. The opposite behavior is obvious in the CSI shapes of locations 2 and 3 whose best channel conditions are almost around 868.1 MHz, 868.3 MHz and 868.5 MHz. While they have degradation in the channel quality at 867.9 MHz, contrary to the CSI of location 1. These abrupt changes in the channel qualities from one location to another could be learned using the proposed algorithm DQoC-A.

In this non-stationary environment, identifying the abrupt change in the reward distribution with reduced delay should be the ability of an optimal policy. As shown in Figure 6.6, the performance of UCB (α = 0.6), QoC-A (α = 0.6 and β = 0.2) and DQoC-A (α = 0.6 , β = 0.2, λ = 0.98 and λ g = 0.90) are compared against the naive frequency allocation. For both the QoC-A and DQoC-A algorithms, the linear scale of the ESP value is utilized as the quality observation g i (n). Moreover, the discount factor λ is equal to 0.98 in the DQoC-A policy, while λ g is set to 0.90 to acquire more rapidly the most recent ESP values, which follows a log-normal distribution from the channel shadowing when the end node moves and subsequently to converge faster. Motions of the end node are represented by the two breakpoints at time index n = 200 and n = 400 in which an abrupt change in the reward distribution is indicated. Before the first breakpoint (at n = 200), the evolution of the cumulative regret is almost flat using any algorithm. This is a reasonable behavior as most of the frequency bands f i at location 1 have relatively high ESP values and low packet losses. While after the first breakpoint (at n = 200), DQoC-A achieves significantly lower regret and higher average reward than QoC-A and UCB policy in this non-stationary environment. As shown in Table 6.2, DQoC-A policy outperforms all the other algorithms by a total number of successfully transmitted packets of 520 over 600. This is plausible due to the inclusion of the discount factors (λ and λ g ) in the DQoC-A calculation, so it wastes significantly less time than QoC-A to identify an abrupt change (at n = 200 or n = 400) in the channel conditions. While the UCB and QoC-A are prevented to adapt quickly to changes as the old rewards have a higher influence on them. In other words, all the learning algorithms converge to the optimal mean reward in the long run, but DQoC-A policy benefits from less dependency on past observations.

Additional Remarks on the Algorithms' Configurations

The aforementioned results confirm the feasibility of utilizing the proposed policies to achieve lower packet losses in different scenarios. However, the parameters of all the proposed learning algorithms should be adjusted based on the environment's conditions. Thus, the exploration factor α is chosen depending on the channel conditions in terms of channel qualities or presence of interference signals [START_REF] Melián-Gutierrez | Hybrid ucb-hmm: A machine learning strategy for cognitive radio in hf band[END_REF]. Furthermore, the influence of the optimal choice of α is higher as the number K of channels increases, and less as it decreases. In the case of a small number of arms, choosing the value of the exploration factor α does not influence the policy performance much. In the opposite case, if the number of arms to explore is large, the choice of this factor will have a greater influence. If, for example, the chosen alpha parameter is deviated from the optimal value for a large number of arms to be explored, significant degradation in performances may be observed. Hence, the algorithm will then have either a tendency either to over-explore or to overexploit.

On the other hand, the discount factors (λ and λ g ) values should be adjusted based on the requirements of the potential application. Thus, they will regulate properly the amount of dependency on the old observations to track an abrupt change in the reward distribution. For example, if an IoT node sends one packet every a fixed short time, therefore, the discount factors in the DQoC-A algorithm should be close to one to benefit also from the older observations as the environment is stationary over such a short horizon of time, and vice versa.

Summary and Conclusion

This chapter introduces a decentralized learning technique to mitigate the channel impairments in the IoT signal propagation. Thus, the proposed QoC-A policy could learn a proper frequency allocation based on the channel quality, i.e. ESP, as an extra observation to avert using the channels whose quality is poor. Besides, another DQoC-A policy is proposed to adapt rapidly to any change in the channels' conditions, as a result of the IoT node motion for example. To demonstrate the low complexity of these proposed algorithms and the feasibility of implementing them on the IoT device side, at a very low cost of implementation and no protocol overhead, a real experiment campaign is carried out in the city of Rennes. Consequently, the results show that QoC-A has a more optimized and accelerated learning process than the classical UCB policy, and then it has lower packet losses at the end of the process. On the other hand, DQoC-A policy converges faster than QoC-A policy in the non-stationary scenario, thanks to the discount factor in DQoC-A algorithm which decreases the dependency on the old observations gradually.

For future work, these proposed reinforcement learning algorithms could be implemented to decrease the packet losses in the potential IoT applications. Thus, the configurations of the implemented policy should be adjusted based on the application.

Chapter 7

GENERAL CONCLUSIONS AND FUTURE WORKS

Conclusions

In this thesis, the propagation properties of the wireless channel are utilized for different purposes which all have an impact on the overall efficiency of the IoT functions, especially in LPWAN. Thus, the thesis is based on the following two axes:

1. Localization is optimized after presenting background on the passive localization techniques which are implemented on the gateway side with low energy consumptions. Thus, strategies and methods are proposed to improve the accuracy of the most popular LPWAN localization technique, i.e. TDoA. To obtain a more precise localization, these proposed approaches could be used as independent or complementary methods. Contrary to the classical TDoA technique which localizes very often on the space far away from the vicinity of node location, a parametric TDoA technique is proposed to localize the node on one of the hyperbolas. Over different timestamps drift variances and number of gateways, this proposed parametric method outperforms the classical one, therefore, this method is asserted to be less sensitive to any perturbation in the timestamps or the TDoA values.

A preprocessing algorithm to drop out the perturbated timestamps before localizing using any TDoA technique is proposed. For implementing this approach, an initial guess of the node location and the euclidean distances from it to each hyperbola are the only requirement. After examining the most perturbed hyperbolas whose locations are far away from the vicinity of the node location, the perturbated timestamps are detected. After dropping these outlier timestamps, the localization accuracy is improved, as any unreliable sensitivity from them is prevented.

By utilizing a paired CRLB as an instrumental tool, another preprocessing method is proposed to detect the outlier TDoA values. The only requirement for this method is an initial guess of the node location, hence, the paired CRLB of each TDoA combination is estimated from the vicinity of this initial guess location.

Based on a robust thresholding technique, the low paired CRLB are detected and then their corresponding TDoA combinations are dropped. By localizing with the best TDoA values whose perturbation probabilities are less, this proposed method is proven to decrease the localization error.

On the other hand, the feasibility of localizing using LoRa CSI is investigated by performing outdoor measurement campaigns in the area of Beaulieu Campus in Rennes. In contrary to the RSSI values, the spatial and temporal stability of CSI are asserted to be relatively stronger. Using the PCC, the CSI reciprocity is quantified which shows a very high linear correlation between the uplink and downlink CSI, at each different location. On the contrary, most of the CSI shapes from different locations are highly uncorrelated to each other. By utilizing the frequency hopping in the LoRa systems to get access to a wider band, a significant localization gain could be achieved. Moreover, the reliability of using the ESP is proven by its enlarged range when the SNR is very low, unlike the RSSI which has a limitation. Based on that, a wider CSI can be obtained by the frequency hopping after estimating the narrowband CSI from the IQ samples of the received LoRa preamble chirps at each center frequency. Or, by averaging the ESP values for each center frequency until the wider CSI shape is acquired by integrating these averaged values.

2. Spectrum Allocation algorithms are proposed for the IoT, after studying the frequency dependency of PDR. During a measurement campaign in the city of Rennes, the channel parameters (RSSI, ESP, SINR) from different node locations are estimated. Hence, PDR is investigated against ESP at each different frequency. At each different location, the PDR values is proven to be correlated with the CSI shape. On the other hand, the presented data indicate that PDR has a more natural relationship with ESP than RSSI. Based on these investigations, an ESP parameterized beta distribution function is deployed to model PDR. For the LoRaWAN network regulation and optimization, this proposed model could be utilized.

The aforementioned frequency dependency of ESP is exploited to improve PDR. Hence, a decentralized learning technique is proposed to mitigate the channel impairments in the IoT signal propagation. A proposed QoC-A policy considers the ESP value as an extra observation of the channel quality information to learn a proper frequency allocation. Accordingly, this proposed algorithm averts using the channels whose quality is poor. Moreover, to adapt rapidly to any change in the channels' conditions, as a result of the IoT node motion, for example, another DQoC-A policy is proposed. An experimental campaign is carried out in the city of Rennes, hence, the low complexity and the feasibility of implementing these proposed algorithms on the IoT device side with no protocol overhead are demonstrated. With the obtained results at the end of the process, the QoC-A policy is proven to have lower packet losses, thus, its learning process is more optimized and accelerated than the classical UCB policy. While in the non-stationary scenario, DQoC-A policy converges faster than QoC-A policy as a result of the discount factor inclusion in the DQoC-A algorithm, which decreases the dependency on the old observations gradually.

Future Works

In this thesis, the presented works in each contribution suggest many possible directions for future studies, such as the following perspectives:

• The parametric TDoA can be optimized, for instance, by merging its two main steps.

• For outlier timestamps and TDoA values detection, an optimum weighting technique could be investigated rather than using a thresholding method.

• Machine learning techniques could be used to integrate other signal measurements with the proposed TDoA techniques such as RSSI or CSI.

• Utilizing ESP for all the potential IoT applications is highly recommended, especially localization using ESP fingerprinting instead of using RSSI in LoRaWAN.

• The proposed PDR model can be utilized to have an estimation of the PDR against ESP for having a proper envision of the LoRaWAN network design.

• To decrease the packet losses in IoT, the proposed spectrum allocation algorithms could be optimized or implemented properly. Therefore, many hints are presented for adjusting properly the configurations of the proposed learning algorithms based on the application requirements. The main objective of this work is to improve various LPWAN functions, by exploiting the knowledge of the propagation properties of the wireless channel. First, localization techniques (without GPS) are studied and then enhanced by proposing an original parametric TDoA technique. In this context, preprocessing techniques for observables specific to the TDoA technique are proposed. Using a specific simulator implemented in the framework of the thesis, the results show that the proposed approaches are more efficient than the classical TDoA technique. On the other hand, the use of CSI for localization is advocated, the thesis studies its spatial and temporal variability. Through a measurement campaign, the reliability of the use of ESP in substitution of RSSI is affirmed by its increased range. At this stage, the LoRaWAN PDR is modeled according to the ESP. Then, the work is oriented towards the improvement of the PDR by proposing spectrum allocation algorithms that exploit the frequency dependency of the PDR. Thus, two decentralized policies are proposed to learn an appropriate frequency allocation scheme based on the ESP as channel quality information. Experimentally, these proposed algorithms outperform the conventional UCB policy with less packet loss at the end of the process.

Figure 1 -

 1 Figure 1 -Consommation d'énergie en fonction de la portée de communication pour divers protocoles radio, comme illustré dans [5].

Figure 2 -

 2 Figure 2 -Un scénario de localisation envisagé qui est généré avec le simulateur proposé.

Figure 3 -

 3 Figure 3 -Erreur de distance euclidienne et CDF tout en changeant l'écart type de la dérive σ 2 .

Figure 4 -

 4 Figure 4 -Comparaison du RSSI et du ESP mesurés avec le SINR.

  PDR mesuré en fonction de différentes valeurs de ESP. PDR simulé en fonction de différentes valeurs de ESP.

Figure 5 -

 5 Figure 5 -PDR contre différentes valeurs de ESP.

Figure 6 -

 6 Figure 6 -Une carte de lecture de la thèse. Tout parcours descendant contenant le chapitre 1, au moins une des deux colonnes colorées et la conclusion est une manière possible de lire cette thèse.

Figure 1 . 1 -

 11 Figure 1.1 -Power consumption versus communication range for various radio protocols, as depicted in [5].

Figure 1 . 2 -

 12 Figure 1.2 -A reading map of the thesis. Any top-down path containing Chapter 1, at least one of the two colored columns and the Conclusion is a self contained way to read this thesis.

Figure 2 . 1 -

 21 Figure 2.1 -Localization system in IoT including the signal measurements and classification of the positioning techniques.

Figure 2 . 2 -

 22 Figure 2.2 -LoRa packet structure.

1 Figure 2 . 4 -

 124 Figure 2.4 -Example of localization based on RSSI.

Part I, Chapter 2 - 1 Figure 2 . 5 -

 2125 Figure 2.5 -Example of localization based on trilateration.

Figure 2 . 6 -

 26 Figure 2.6 -Example of localization based on TDoA.

Figure 2 . 7 -

 27 Figure 2.7 -Example of localization based on AoA.

Fig. 5 .

 5 Fig. 5. RMSE of the estimated beacon position with minimum PDU size of 2 bytes.

Figure 2 . 8 -

 28 Figure 2.8 -RMSE of the estimated node position [42].

Part I, Chapter 2 -

 2 Background on IoT Positioning Techniques classical model-based approaches by achieving a median localization error of 47.1 m, while saving the human effort during the fingerprinting acquisition process.

Figure 2 . 9 -

 29 Figure 2.9 -Interpolated RSSI map at the Beaulieu campus by integrating 70 measured points (labeled by circles).

re 3 :

 3 Overview of SateLoc and the workflow.

Figure 4 :

 4 Figure 4: An example of land-cover type classification: (a) the ground truth satellite image in RGB, and (b) the corresponding land-cover map generated by SateLoc in a 5×5 km 2 urban area of Hangzhou, China.

Figure 2 . 10 -

 210 Figure 2.10 -An example of environment type type classification the in a 5 km × 5 km urban area of Hangzhou, China. The ground truth satellite image in RGB is converted to the corresponding environment type map by SateLoc [83].

Figure 5 :

 5 Figure 5: Illustration of ESP map generation with an example land-cover map. LoRa node at Pixel 1 transmits its packets in the same land-cover type (i.e. built-up) while node at Pixel 2 needs to transmit across multiple types.

  -

8 :

 8 PL = PL(d 0 ) + 10n log D d 0 9: L = D, x start = P 1x , y start = P 1y 10: // Search for the segments who and iteratively calculate their path lo gateway. P kx , P ky , P kc indicate the attri respectively. |P| is the total pixel numb 11: for k = 2 to |P| -1 do 12: if P kc == P k+1c then 13: end = P kx , y end = P ky , 16: D = R (x endx start ) 2 17: PL = PL + 10n log L+D L 18: L = L + D, x start = P kx , 19: // Add the path loss of the last loss. 20: x end = P |P| x , y end = P |P| y , n = n 21: D = R (x endx start ) 2 + (y end 22: PL = PL + 10n log L+D L 23:

18

 18

Figure 2 .

 2 Figure2.11 -Envision of a generated environment type map. Thus, LoRa node at Pixel 1 transmits its packets in the same environment type, i.e. built-up, while the packets need to propagate across multiple environment types node when transmitting from Pixel 2[START_REF] Lin | Sateloc: A virtual fingerprinting approach to outdoor lora localization using satellite images[END_REF].

. 5 )

 5 Part I, Chapter 3 -Enhancement of the TDoA Technique

Figure 3

 3 Figure 3.1 -A sample pattern from the algorithm (ρ = 2.5 km, wid = 10 km, len = 5 km).

Part I, Chapter 3 -

 3 Enhancement of the TDoA Technique (a) Errors at each value of the drift standard deviation. (b) The whole simulation results of σ 2 ranging from 0 m to 600 m.

Figure 3 . 2 -

 32 Figure 3.2 -Euclidean distance error and CDF while changing drift standard deviation σ 2 .

Part I, Chapter 3 -

 3 Enhancement of the TDoA Technique (a) Errors at each number of gateways. (b) The whole simulation results of ρ ranging from 1.6 km to 4 km.

Figure 3 . 3 -

 33 Figure 3.3 -Euclidean distance error and CDF while changing inner radius ρ.

58

 58

3. 3 .

 3 A Pre-processing Algorithm Utilizing a Paired CRLB for TDoA

Figure 3 . 4 -Figure 3 . 5 -

 3435 Figure 3.4 -The CRLB values of all the combinations (H = 6).

  29.98 83.94 137.9 191.87 245.83 299.79 Noise standard deviation [m] 10 Error [m] (a) Errors at each value of the noise standard deviation. (b) The whole simulation results of σ ranging from 30 m to 300 m.

Figure 3 . 6 -

 36 Figure 3.6 -Euclidean distance error and CDF while changing noise standard deviation σ.

Figure 3 . 7 -

 37 Figure 3.7 -Euclidean distance error and CDF while changing the number of gateways N .

Part I, Chapter 3 -

 3 Enhancement of the TDoA Technique

Figure 3 . 8 -

 38 Figure 3.8 -Improvement of the localization accuracy after dropping the outlier timestamps.

  Euclidean distances from the initial guess of the node location to all the hyperbolas (H = 15).

  Average euclidean distances corresponding to each gateway timestamp.

Figure 3 . 9 -

 39 Figure 3.9 -Detecting the outlier timestamps.

Figure 4 . 1 -

 41 Figure 4.1 -The locations of the three measured points in the area of the Campus Beaulieu. Positions of Tx and the Rx are labeled by black, and red markers respectively. (©by OpenStreetMap Contributers)

  (a) Position of the Rx monopole antenna fixed on the roof of the IETR lab. (b) The Rx USRP connected to the computer and the antenna cable. (c) A trolley shelf with the different parts of the transmission equipment at Tx location 2.

Figure 4 . 2 -

 42 Figure 4.2 -Views from the Tx and the Rx sites.

  The spectrogram of the raw signal.

  The PSD of the raw signal.

Figure 4 . 3 -

 43 Figure 4.3 -A typical 40 s of received data from location 2.

  l

Figure 4 . 4 -

 44 Figure 4.4 -The angles of differential correlation function ∆φ k [l] before and after correction of the whole portion of about 30 symbols.

Figure 4 . 5 -

 45 Figure 4.5 -The normalized CSI with 125 kHz bandwidth.

Figure 4 . 6 -

 46 Figure 4.6 -A comparison between the two families of the distinct observables.

  The AD R i,j values.

Figure 4 . 7 -

 47 Figure 4.7 -The distance values.

≈ 5 m

 5 to ≈ 800 m, as shown in Figure 4.8. While setting the LoRaWAN Configuration as depicted in Table 4.1. At the typical frequency bands for Europe, i.e. 8 channels with center frequency f k , confirmed LoRa packets are transmitted sequentially with 125 kHz bandwidth W .

5 10(

 5 a) The end node locations in the area of the Residence University Beaulieu. Location 8, 9 and 10 are indoor.

  The end node locations in the area of the Campus Beaulieu. Location 1 is indoor.

Figure 4 . 8 -

 48 Figure 4.8 -Positions of the node and the gateway are labeled by black, and red markers respectively. (©by OpenStreetMap Contributers)

Figure 4 . 9 -

 49 Figure 4.9 -The gateway and views from the end node sites. For the end node, a packaged Pycom device fixed on a rod and connected to a battery is used.

4. 4 .Figure 4 . 10 -

 4410 Figure 4.10 -Comparison of the measured RSSI and ESP against SINR.

  (a) The absolute CSI from location 2. (b) The absolute CSI from location 7.

Figure 4 . 11 -

 411 Figure 4.11 -The absolute CSI shape from different locations.

  22) and y = [y 0 , . . . , y N -1 ] T (4.23)

Part I, Chapter 4 -

 4 Feasibility of Utilizing the CSI for LoRa Localization1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Figure 4 .

 4 Figure 4.12 -The PCC magnitude between the uplink and downlink CSI at each location.

  Euclidean distance values.

Figure 4 . 13 -

 413 Figure 4.13 -PCC and Euclidean distance values across all the combinations.

Figure 5 . 1 -

 51 Figure 5.1 -An envisioned IoT network with the potential factors of the packet losses.

Figure 5 . 5 Frequency

 55 Figure 5.3a shows exemplary signal level spectra observed in all the scenarios of the experiment, averaged over the whole trial. A progressive reduction is observed in the received power across location 1 to 10. This reduction is reasonable as the distance between the gateway and the node gradually increases from ≈ 5 m at location 1 to ≈ 760 m at location 10. The first category of CSI is represented in location 1, 3, 8, 9, and 10 which

Figure 5 . 2 -

 52 Figure 5.2 -Result from location 4 at each different frequency band.

Figure 5 .

 5 Figure 5.4a explores how downlink PDR changes along with uplink RSSI and ESP.Hence, one can observe that the PDR magnitudes are uniformly quantized with a resolution of1 20 . Nevertheless, there are some irregular gaps between the PDR values which could be compensated by taking more measurement data. On the other hand, the result shows that high PDR values reduce significantly with the decrease of RSSI, which is similar when the ESP decreases. However, RSSI distribution is limited when approaching the aforementioned noise floor limitation, i.e. RSSI ≈ -120 dBm at SIN R = 0 dB. One can observe the rather large gap between the ESP values and the RSSI values, especially when

Part II, Chapter 5 - 5 Frequency

 55 Characterizing and Modeling of PDR in an Actual LoRaWAN Network 867.1 867.3 867.5 867.7 867.9 868.1 868.3 868.ESP values over different frequency bands at each location. (b) PDR values over different frequency bands at each location.

Figure 5 . 3 -

 53 Figure 5.3 -Result from the ten different locations.

  Changes with the measured received power.

  Changes with the measured SINR.

Figure 5 . 4 -

 54 Figure 5.4 -PDR for various received power and SINR values.

. 6 .

 6 For example, the Beta distribution function at -130 dBm has a distribution concentrated around low PDR values, in contradiction with the distribution at -110 dBm which has high PDR values. While the distribution at -119.794 dBm, i.e. sigmoid's midpoint ESP 0 as depicted in equation 5.2, is considered the most ambiguous one which is an almost uniform distribution. In this uniform case, the packet delivery rate has an equivalent probability of success and failure. Measured PDR versus different ESP values.

  Simulated PDR versus different ESP values.

Figure 5 . 5 -

 55 Figure 5.5 -PDR against different ESP values.

Figure 5 . 6 -

 56 Figure 5.6 -Beta distribution function f (P DR; α, β) at different ESP values.

108

 108

5. 8 .

 8 Modeling of PDR as a function of ESP ESP (a) α and β evolution against ESP. ESP (b) Mean E[P DR] and variance Var[P DR] evolution against ESP.

Figure 5 . 7 -

 57 Figure 5.7 -Parameters of the Beta distribution function f (P DR; α, β).

Part II, Chapter 6 -

 6 Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information conditions change as the acquired reward distribution evolves with time occasionally.

Part II, Chapter 6 -

 6 Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information received downlink packet (packet number, ESP, etc.) to the payload of the next uplink packet. In this experiment, there is no retransmission attempt if the node does not receive the ACK packet. A desktop computer that runs a Python program is used as an AS only for analyzing purposes in this experiment. This computer receives data from the LNS, as well as LoRa metadata with all parameters of the LoRaWAN transmission (f i , SF, W , RSSI, SNR, etc.). Those data are analyzed as detailed in the following sections. They are provided to the research community on this online repository[124].

Figure 6 . 2 -

 62 Figure 6.2 -The packaged Pycom device is fixed on a rod and connected to a battery inside a building.

Figure 6 . 3 -

 63 Figure 6.3 -Stability of the CSI shape throughout the 800 iterations (one CSI every 200 iterations) in the stationary scenario.

Figure 6 . 5 -

 65 Figure 6.5 -Evolution of the CSI shape throughout the 600 iterations (one CSI every 200 iterations) in the non-stationary scenario.

Part II, Chapter 6 -

 6 Decentralized Adaptive Spectrum Learning in Wireless IoT Networks based on Channel Quality Information (a) Average reward across the iteration number. (b) Cumulative regret across the iteration number.

Figure 6 . 6 -

 66 Figure 6.6 -Result of the algorithms against the uniform frequency allocation (nonlearning) in the non-stationary scenario.

Titre:

  Exploitation ciblée du canal dans l'IoT : Amélioration de la localisation et de l'allocation du spectre dans les réseaux LPWAN Mot clés : IoT, Localisation, PDR, ESP, Apprentissage automatique, Allocation de spectre Résumé : L'objectif principal de ce travail est d'améliorer diverses fonctions LPWAN, en exploitant la connaissance des propriétés de propagation du canal sans fil. Tout d'abord, les techniques de localisation (sans GPS) sont étudiées, puis améliorées en proposant une technique TDoA paramétrique originale. Dans ce contexte, des techniques de prétraitement des observables spécifiques à la technique TDoA sont proposées. En utilisant un simulateur spécifique implémenté dans le cadre de la thèse, les résultats montrent que les approches proposées sont plus efficaces que la technique TDoA classique. D'autre part, l'utilisation du CSI pour la localisation est préconisée, la thèse étudie sa variabilité spa-tiale et temporelle. A travers une campagne de mesure, la fiabilité de l'utilisation du ESP en substitution du RSSI est affirmée par sa portée accrue. A ce stade, le LoRaWAN PDR est modélisé en fonction du ESP. Ensuite, le travail est orienté vers l'amélioration du PDR en proposant des algorithmes d'allocation de spectre qui exploitent la dépendance en fréquence du PDR. Ainsi, deux politiques décentralisées sont proposées pour apprendre un schéma d'allocation de fréquence approprié basé sur le ESP comme information sur la qualité du canal. Expérimentalement, les algorithmes proposés sont plus performants que la politique conventionnelle UCB avec moins de perte de paquets à la fin du processus. Title: Purposely Exploiting the Channel in IoT: Enhancement of Localization and Spectrum Allocation in LPWAN Keywords: IoT, Localization, PDR, ESP, Machine Learning, Spectrum Allocation Abstract:

Table 1 -

 1 Nombre de paquets transmis avec succès et perdus dans le scénario stationnaire

	Algorithme Succès Perte
	Uniform	668	132
	UCB	761	39
	QoC-A	768	32

Table 2 -

 2 Nombre de paquets transmis avec succès et perdus dans le scénario nonstationnaire

	Algorithme Succès Perte
	Uniform	405	195
	UCB	487	113
	QoC-A	497	103
	DQoC-A	520	80

  Part , Chapter 1 -Introduction ization using ESP fingerprinting. Moreover, the proposed PDR model gives important guidelines for future LoRaWAN network regulation and optimization.

End node Gateway Network Server Application Server

	Part I, Chapter 2 -Background on IoT Positioning Techniques
	extend class A by adding scheduled receive windows for downlink messages from
	the server. Last, class C devices extend class A by continuously keep the receiving
	windows open unless they are transmitting a packet.
	2. Gateway: It is an equipment with an antenna that receives broadcasts from
	the end nodes and sends data back to them. Each gateway is registered to the
	LoRaWAN network, subsequently, it forwards the messages to the network server
	through a backbone IP network based on a communication protocol. This commu-
	nication protocol can be a cellular network, Wi-Fi, ethernet, fiber-optic or 2.4 GHz
	radio links.
	3. Network Server: It is a server that manages the entire LoRaWAN network and
	routes messages from the end nodes to be delivered to the respective application
	server, and vice versa. It is also responsible for decoding the packets, managing
	Adaptive Data Rate (ADR), providing the Over-The-Air-Activation (OTAA) and
	acknowledgment of the confirmed data messages.
	4. Application Server (AS): It is a server that hosts the final user application.
	This application allows users to interact or send data to the end nodes, moreover,
	measured data from sensors can be analyzed by it.
	-
	vice, hence, they are often battery operated. This can be a sensor, an actuator
	or both. Using LoRa modulation, these end devices are wirelessly connected to the
	LoRaWAN network through gateways. By default, the end node operates using
	class A, nevertheless, one of the three classes (A, B or C) can be used to imply a
	different media access procedure. Class A has two receiving windows scheduled to
	send the downlink packet in one of them, following each uplink packet. This class is Figure 2.3 -General LoRaWAN architecture.
	the most commonly used for battery-powered devices, as it is considered the lowest
	energy consumption by spending most of the time in sleep mode. Class B devices

Table 3 :

 3 Classification accuracy of the RF model.

	Type	Built-up Forest Field Water Rangeland
	Precision	0.57	0.46	0.44	0.68	0.39
	Recall	0.52	0.56	0.49	0.66	0.31
	OA			0.51

  Land-cover map LM with X ×Y p Basic ESP value ESP 0 ; Path loss expon Receiver sensitivity S; Pixel resolution R (set with Table 2 according to the landgateway is placed) at the reference dis Output: ESP map EM = {EM(1, 1), ..., E

Input: 1: for i = 1 to X do 2:

Table 4 .

 4

		1 -LoRaWAN Configuration
	LoRaWAN Parameter	Value
	Modulation technique	LoRa (based on CSS)
	SF	7
	Coding rate	4/5
	Bandwidth W	125 kHz
	Transmission power	14 dBm
	Center frequency f k	{867.1, 867.3, 867.5, 867.7, 867.9, 868.1, 868.3, 868.5} MHz
	in Figure

  ESP dBm = RSSI dBm + SIN R dB -10 log 10 (1 + 10 0.1SIN R dB ).(4.16)By ignoring the potential interference power P i , the RSSI lower limit can also be Part I, Chapter 4 -Feasibility of Utilizing the CSI for LoRa Localization defined with respect to the thermal noise power P n as:

	RSSI dBm =10 log 10 (P n ρ + P n )
	=10 log 10 (P n ) + 10 log 10 (ρ + 1)	(4.17)
	=10 log 10 (P n ) + 10 log 10 (1 + 10 0.1SIN R dB )
	ESP dBm = 10 log 10 P s ,	(4.13)
	and the SINR is:
	SIN R dB = 10 log 10 ρ.	(4.14)
	Hence, the computation of the RSSI follows as:
	RSSI dBm =10 log 10 (P s +	P s ρ	)
	=10 log 10 (P s ) + 10 log 10 (1 +	1 ρ	)	(4.15)
	=ESP dBm + 10 log 10 (1 + ρ) -10 log 10 (ρ)
	=ESP dBm + 10 log 10 (1 + 10	SIN R dB 10	) -SIN R dB ,
	then the ESP can be expressed as:

10 log 10 P r , (4.12)

Table 6 .

 6 1 -Number of successfully transmitted and lost packets in the stationary scenario

	Algorithm Succeed Lost
	Uniform	668	132
	UCB	761	39
	QoC-A	768	32
	123

Table 6 .

 6 2 -Number of successfully transmitted and lost packets in the non-stationary scenario

	Algorithm Succeed Lost
	Uniform	405	195
	UCB	487	113
	QoC-A	497	103
	DQoC-A	520	80
	126

5.8. Modeling of PDR as a function of ESPthe received power is below -120 dBm. Therefore, ESP has a simpler and more natural relationship with PDR than RSSI.

Impact of SINR

The result shows a general rise in PDR when the color-coded ESP or SINR increases, as shown in Figure 5.4b. This direct proportionality is established in the previous works [START_REF] Liu | Characterizing packet loss in cityscale lorawan deployment: Analysis and implications[END_REF]. On the other hand, it can be noticed that this long-term observation exhibits two kinds of unexpected behavior. These should be related in two manners in how the interference can affect the relationship between received power and SINR. The first unexpected situation is to have at the same time a low SINR and a rather high received power, as depicted in Figure 4.10. Those situations correspond to a case where the SINR is probably measuring an additional interfering power coming from a colliding packet. The second unexpected situation is having a high SINR and nevertheless, a low packet success rate as depicted in Figure 5.4b, which is most probably due to a typically accomplished interference in the downlink. Those observations suggest that the joint observation of SINR and RSSI or ESP can be exploited for detecting interfered conditions.

Modeling of PDR as a function of ESP

Contribution

In this section, an in-depth investigation of the PDR using the traces collected from the real network deployment of the aforementioned measurement campaign. Hence, the whole ESP values in the experiment are extensively evaluated, and then a stochastic model is proposed for modeling PDR as a function of the ESP rather than using RSSI to overcome the RSSI's limitation at low SNR (< 0 dB).

Organization

The remainder of this section is organized as follows. Section 5.8.3 provides sufficient detail about the PDR modeling based on the measurement's result. Hence, Section 5.8.4 provides an evaluation of the simulated PDR based on the proposed model. Finally, the work is concluded in Section 5.8.5.

PDR Modeling using Beta distribution

For system-level simulations or for dimensioning actual IoT deployment performances, it is very useful to benefit from a PDR model that encompasses all the possible situations and their very large observed variability. However, the PDR values show extreme variations which make the exploitation of their empirical mean difficult, as shown in Figure 5.5a. Therefore, the first step of the proposed approach is to get access to a reasonable estimation of the expected PDR average by logistic regression. This regression takes into account all the datasets at once by fitting a smooth and reasonable curve to the measured values. Consequently, the mean of the PDR distribution can have a deterministic model using a logistic function or logistic curve which is a common sigmoid curve with an equation as:

where k is the logistic growth rate or steepness of the curve which is estimated to be 0.238. While the ESP value of the sigmoid's midpoint ESP 0 is -119.794 dBm. These parameters are estimated while setting SF equal to 7 during the experiment, hence, these values can be different if another configuration is set. On the other hand, the expected PDR values lie around an interval that can be sized with a given level of confidence 2σ. This σ value is obtained based on the number of packets used in this experiment to produce the empirical estimation of each PDR value. This confidence region is the shaded blue region in Figure 5.5a, accordingly, the PDR values are estimated roughly around this region.

In a second step, in order to simulate the observed huge variability in the measured PDR, an ESP parameterized Beta distribution of PDR is proposed [START_REF] Kerman | A closed-form approximation for the median of the beta distribution[END_REF]. Consequently, the Probability Density Function (PDF) of the PDR distribution can have a stochastic model using a Beta distribution function as:

where Γ(z) is the gamma function. While the beta function B(α, β) is a normalization Chapter 6

DECENTRALIZED ADAPTIVE SPECTRUM LEARNING IN WIRELESS IOT NETWORKS BASED ON CHANNEL QUALITY INFORMATION

Introduction

With the growth of the IoT usages in various applications, packet losses are increasing due to channel impairments on the link between the end node and the gateway, as detailed in the previous chapter. Therefore, it is essential to reduce the packet losses, especially in LPWAN. Decentralized artificial intelligence techniques have been proposed against collisions, but the approach here is extended to cope with the propagation disturbances. In this chapter, a QoC-A learning technique based on bandit algorithms is proposed in order to choose the transmission channel, so that it mitigates the propagation impairments between the radio channels using the channel quality parameter, i.e. ESP. Moreover, a DQoC-A algorithm is proposed to adapt rapidly to any abrupt change in the channels' conditions. A real experiment campaign is performed in the city of Rennes to demonstrate the low complexity and the feasibility of these proposed algorithms while implementing them on the IoT device side (decentralized approach). In the given results, QoC-A outperforms the classical UCB policy with a more accelerated learning process. On the other hand, the feasibility of using the DQoC-A in non-stationary scenarios is illustrated by its rapid convergence when abrupt changes in the channels' conditions occur. At the end of the process, these proposed learning techniques are assured to give fewer packet losses than the state-of-the-art ones with a random frequency allocation. These proposed reinforcement learning algorithms are recommended to be implemented in the end node side, moreover, important remarks are given for adjusting the algorithms' configurations based

• The strong mathematical proof of convergence of the Bandit algorithms [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF].

Thanks to the good matching between models and reality, these proofs are verified in real radio conditions [START_REF] Moy | Reinforcement learning real experiments for opportunistic spectrum access[END_REF].

• Rapid convergence of the proposed learning techniques in real experiments [START_REF] Besson | Gnu radio implementation of malin: "multiarmed bandits learning for internet-of-things networks[END_REF].

• Thanks to the reinforcement learning concept, any prior training isn't needed. This proposed algorithm can efficiently start learning from scratch.

• These proposed learning algorithms' results will always outperform the given stateof-the-art ones with random frequency allocation [START_REF] Besson | Gnu radio implementation of malin: "multiarmed bandits learning for internet-of-things networks[END_REF].

Gateway

Proposed Reinforcement Learning Techniques

Bandit algorithms are used at the end node side to handle IoT wireless spectrum issues. While LoRaWAN is the considered example, a simple ALOHA-based protocol is the utilized communications between the end nodes and the gateway. Whenever the end nodes decide, they can transmit their packets in one of the K ≥ 2 channels which are predefined in frequency f i . As stated in the previous sections, the channel conditions in unlicensed ISM bands suffer in particular from propagation conditions and interference which are different from one place to another. Even in one place, these channel conditions are very often unevenly distributed over the K different channels.

From the point of view of a single end node in the network, it has to choose one channel (or arm), denoted as i ∈ {1, ..., K}, every time slot n when it sends a packet to 6.7. Experiment Setup Data: K, [α, β, λ, λ g ] Result: A(n + 1) for n = 1 to ∞ do if n < K then Initialize policy by trying each channel for at least one time.

Algorithm 3: DQoC-A policy.

Experiment Setup

Comparing the proposed algorithms against the state-of-the-art method with random frequency allocation in real conditions of operation, is the main target of the experiment. This is done by setting the LoRaWAN configuration as presented in Section 4.4.3, but it could be done with any other IoT standard, as soon as it uses acknowledged messaging. Again, the Tektelic KONA Macro Gateway is used whose antenna is fixed on the roof of the university building [104], as shown in Figure 4.2a and 4.9a. While the end node is implemented using a Pycom card which is composed of an Expansion Board and a LoPy 4 module [105], as shown in Figure 6.2.

First, the network is joined with an OTAA. Then, the proposed algorithms are executed sequentially at each time index n inside the Pycom node. An uplink packet is transmitted at the channel i which is chosen by the algorithm, then the node waits about 10 seconds before sending the next packet to respect the duty cycle. By default, the gateway attempts to send one acknowledgment at the same channel i and center frequency f i as the message transmitted. Subsequently, the node writes the information of the last