## 2 Outdoor Positioning in the IoT Ecosystem
### Location-Enabled IoT Technologies
#### 2.3.1 LoRaWAN  
LoRaWAN's inventors aimed to develop a long-range, low-power technology to provide a scalable network for IoT systems. For this purpose, they used Chirp Spread Spectrum (CSS) modulation technology. CSS was widely used for sonars in the maritime industry and radar in aviation [20]. In CSS modulation, symbols are transmitted throw constantly increasing or decreasing frequency. CSS is known to provide resilience against interference, multipath, and Doppler effects. In February 2015, the LoRaWAN Alliance was founded, and the networking protocol was renamed \"LoRaWAN\". LoRaWAN is a Long-Range Wide-Area Network technology developed by Semtech. The LoRaWAN medium access control (MAC) protocol called LoRaMAC is an open-source protocol [21]. LoRaMAC defines different classes for end-users and security layers to enable secure bidirectional communication. Therefore, LoRaWAN provides the possibility for private network deployments by working in a license-free spectrum and its open access specifications. This subsection discusses different layers and features of LoRaWAN. There are four key parameters to determine the CSS of the LoRaWAN physical layer. By incorporating these four parameters, LoRaWAN can work in different situations. each one of these four parameters can have unique variations. Four key parameters are channel, BandWidth (BW), spreading factor (SF), and transmission power (TX-PoW) [22]. Channel: LoRaWAN works in license-free channel of 433 and 868 MHZ (in Europe), 915 MHZ (in US), and 430 MHZ (in AS) [23]. Lower Carrier Frequency leads to lower path loss. Therefore, Lower Carrier Frequency can be useful in long-distance. On the other hand, antenna dimensions at Lower Carrier Frequency should be bigger for a stated radiation efficiency. It leads to inefficiency for IoT systems with size limitations. In addition, a narrower Carrier Frequency leads to a lower number of communication channels. As a result, it is not suitable for systems with many users. * Spreading Factor (SF): Spreading technique leads to extend a symbol to a longer sequence of bits. This technique reduced the signal-to-noise and interference ratio. In LoRaWAN, symbols are encoded using several chirps. The number of chirps is determined by the spreading factor. SF in LoRaWAN can range from 7 to 12. Therefore, SF7 means that each chirp represents seven bits. According to the explanations, SF12 has the lowest data rate and highest energy consumption but it has the highest resilience against noise, interference, and other unpredictable time-varying impairments because of user mobility. Therefore, SF12 is useful for IoT systems that work in dynamic and harsh environments and SF7 is useful for IoT systems with power limitations. * Bandwidth (BW): Bandwidth measures the amount of data that can be transmitted per unit of time. The duration of each chip is equal to \(1/BW\). Therefore, the symbol duration (\(T_{s}\)) is equal to \(2^{SF}/BW\). As a result, by increasing the BW, symbol duration and chirp duration would change accordingly which leads to a better Signal-to-Noise Ratio (SNR). Bandwidth in LoRaWAN can range from 7.8 kHz to 500 kHz. * Transmission Power (TX-PoW): TX-Pow determines the direct amount of power used to transmit a chirp. By increasing TX-PoW, the probability of signal resistance versus channel fading increases too and there will be more chances for correct transmission of data. The LoRaMAC layer provides the medium access control mechanism. LoRaWAN has a star topology. Therefore, end nodes in LoRaWAN can only communicate with LoRaWAN gateways. For communication and data transmission, end nodes must join to network and their connection is allowed by the LoRaWAN network server. By allowing a LoRaWAN network server, end nodes will earn a set of parameters that are necessary to operate in a LoRaWAN. End nodes can join the network in two ways: Over-The-Air Activation and Activation by personalization [24].