A Comprehensive Review of Indoor/Outdoor Localization Solutions in IoT era: Research Challenges and Future Perspectives

 Abstract — Abstract – The number of connected mobile devices and Internet of Things (IoT) is growing around us, rapidly. Since, most of the people daily activities are relying on these connected things or devices. Specifically, this past year (with COVID-19) changed daily life in abroad and this is increased the use of IoT enabled technologies in health sector, work, and play. Further, the most common service via using these technologies is the localization/positioning service for different applications including: geo-tagging, billing, contact tracing, health-care system, point-of-interest recommendations, social networking, security, and more. Despite the availability of a large number of localization solutions in the literature, the precision of localization cannot meet the needs of consumers. For that reason, this paper provides an in-depth investigation of the existing technologies and techniques in the localization field, within the IoT era. Furthermore, the benefits and drawbacks of each technique with enabled technologies are illustrated and a comparison between the utilized technologies in the localization is made. The paper as a guideline is also going through all of the metrics that may be used to assess the localization solutions. Finally, the state-of-the-art solutions are examined, with challenges and perspectives regarding indoors/outdoors environments are demonstrated.


I. INTRODUCTION
here are growing appeals for providing Localization-based services to people around the world. Localization or positioning is a process that is used to obtain tracked objects' information concerning multiple reference points within a predetermined area. In other words, it is an attempt to identify the position of the movable/fixed devices (including This paragraph of the first footnote will contain the date on which you submitted your paper for review. It will also contain support information, including sponsor and financial support acknowledgment. For example, "This work was supported in part by the U.S. Department  smartphones, drones, watch, beacons, and vehicles) using certain fixed nodes and mobile computing devices [1]. Further, the location information can be used in different services including navigation, tracking, monitoring, etc. Location information, currently, is an important feature in most of Internet of Things (IoT) applications. Beside this, recent advanced technologies have ability to provide various options to make sure that the data includes location information for the IoT solutions. Admittedly, the IoT is a network of interconnected or internet-connected items (or "things") that are implanted with sensors, actuators, software, and other technologies in order to receive, gather and transmit data without the need for human interaction through a wireless network. Experts predict that by 2025 there will be more than 22 billion linked IoT devices around the globe [2]. Further, localization idea is a critical component of the IoT with the availability of Big Data, where the position of everything plays a significant role in improving the majority of IoT services. For example, how could direct people to find a certain location inside the large hospital, shopping malls, large area of warehouses or complex industrial area? This problem has attracted the attention of both academic and commercial staff all around the world, and they are still competing to find a satisfactory answer. For outdoors, Global Navigation Satellite System (GNSS) signals [3] including Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Galileo and Beidou are the localization system examples. To coverage the globe, the GPS is the most commonly used satellite-based localization system. However, the GPS suffers from some limitations in urban areas and indoor environments. This is because, the GPS device loses substantial power in an indoor setting due to signal attenuation induced by various building materials or the GPS signals will be blocked in the deep indoors [4]. This means that the GPS cannot be used for localizing devices/items in indoor environments. This is because (1) the indoor environment is more complicated due to the surrounding by many objects, (2) signal interference exists, (3) reflection within the building is highly dependent on the environment, such as object positions and human activity, and (4) the indoor communication channel is unreliable [5]. To tackle these issues in indoor settings, a variety of solutions utilizing various technologies have been presented. Frequency modulation (FM) [ [7], Radio Frequency Identification (RFID) [8], Wi-Fi [9], Bluetooth [10], ZigBee [11], [12] and cellular networks (including LTE and 5G) [13], [14], inertial sensors and wearable devices [15] are examples of these technologies. Furthermore, some hybrid approaches combine the advantages of two or more technologies to enhance indoor localization [15]. Equally, there are several common kinds of techniques that are used in localization. Where, the variety of these techniques is based on Received Signal Strength Indicator (RSSI) signal measurements [16] and Time of Flight (TOF) measurements [17]. The RSSI measurements can be also used in different ways: (1) placement based on the estimated distance between the target device and known fixed stations computed via RSSI.
(2) RSSI fingerprint-based location estimation. Whereas, the TOF as a distance measurement concept is used in many techniques including TOA, TDOA and AOA techniques. However, utilizing these measurements or localization techniques has its own limitations which will struggle to do the localization process in an accurate way. Dead-reckoning measurements, where the inertial sensors or wearable devices are utilized, with pre-defined reference data can also provide location information [18]. Last but not least, the performance of aforementioned localization technologies and techniques within different environments (outdoors, urban, suburban and indoors) can be evaluated when different IoT devices are deployed. The evaluation metrics include positioning accuracy, precision, cost, reliability, complexity, seamlessness, power efficiency, scalability, and security. The most important elements of localization solutions with the IoT context that should be considered are depicted in Fig. 1. Therefore, the purpose of this study is to investigate localization orientation in terms of employing different techniques and technologies within IoT era. Furthermore, it presents the most precise and accurate approaches that have been proposed when some metrics, including cost, complexity in terms of computing and time, power and effort consumption, reliability, scalability, and security are considered. These metrics directly or indirectly have effectiveness on the performance of indoor localization systems. Finally, the difficulties of that researchers and professionals confront are presented to shorten their journey time.
The rest of the article is organized as follows. Section II provides the main contributions of this study. Additionally. section III introduces the applicable localization techniques; this is followed by providing the performance metrics of localization solutions in Section IV. Furthermore, different types of localization technologies are discussed and compared in section V. In section VI, the challenges and perspectives are listed in the area of indoor localization. Finally, some recommendations in relating to indoor localization for IoT applications are concluded in section VII II. THE MAIN CONTRIBUTIONS 1) This study provides a comprehensive survey on different localization solutions (in both academic and commercial sectors) which have been proposed in IoT era, particularly from the year 2019 to 2021. 2) The survey includes the evaluation and investigation on localization technologies and techniques which can be enabled on IoT devices. The investigations include new discussions and findings on how the techniques could be adopted on the IoT enabled technologies within different environments including indoors, urban, suburban, and outdoors. 3) New localization metrics which can be used to evaluate the localization solutions are presented including realtime possibilities, energy consumptions, complexity, and security. These new metrics should be considered, specifically with IoT environments, for every localization solutions. 4) Several IoT applications are presented with the demand of localization accuracy and precision such as: application in health-care system, fitness/sports, automation transport systems, and point-of-interest (POI) services. 5) The uniqueness of this study is to illustrate how different objects/things (including wireless sensors nodes, smartphones, wearable devices, vehicles, drones, and etc.) can be located via stand-alone or hybrid technologies and techniques. 6) Finally, the list of challenges and future perspectives including pros and cons of each localization technologies and techniques within specific environments are demonstrated.

III. LOCALIZATION TECHNIQUES
Several techniques are available to offer an accurate localization solution and to locate movable or fixed objects, in both outdoor and indoor situations. When these Techniques are based on several technologies or the fusion of various sorts of technologies to increase localization accuracy. Furthermore, each of these technologies has its own set of advantages and disadvantages that have an impact on the localization system. The taxonomy of the localization techniques is shown in Fig.  2. The most common techniques, that are utilized, will be explained in the next sub-sections.
These techniques are based on several measurements to locate the target devices. RSSI, TOA, and AOA/DOA are the core wireless signal measurement localization systems. In addition, in an indoor localization and tracking context, TDOA, Round Trip Time (RTT), angle difference of arrival (ADOA), the phase difference of arrival (PDOA), POA, Channel State Information (CSI), RSRP, and RSRQ are utilized. In the following subsections, there will be enough explanation about how the core signal measurements are used within these techniques which are used in the localization context. Further, at the end of this section, the advantages and disadvantages of each of the core measurements are presented in Table 1.

A. Proximity Detection Techniques
The proximity approach is a basic method for localization that evaluates the position of a target device concerning a predefined place or region [19], [20]. The proximity locating approach necessitates the deployment of a specified number of detectors at known locations. When a detector detects a tracked target device, the target's location is considered to be inside the proximity region that is defined by the detector. A1, A2 and A3 are the tracked target mobile devices, as illustrated in Fig. 3. In Fig. 3, a proximity region of the detector device is defined and indicated by the light green circle, which is cell tower, base station (BS), or wireless access point (WAP) in this scenario. A1, A2 and A3 are located by observing whether or not they are in the vicinity. The cellular detector estimates the location of the targets A1, A2 and A3. Closeness is a straightforward and commonly used method, but precision is limited to base-station radio coverage. Thus, the target devices A1 and A2 is in the detector's area, but A3 is not, as illustrated in Fig. 3-a. As a result, unlike the other types of localization techniques, the proximity technique cannot provide relative or absolute location estimations. The proximity localization information is critical for a variety of location-based services and applications. This approach is used for the majority of GSM-based localization systems. It has an average accuracy of 76 to 216m, which corresponds to the size of a GSM cell [21]. The variance of a proximity-based approach is considerable, and it may not always meet the demand for localization. For that reason, the cell area can be divided into a number of sectors to determine the location of the mobile, more precisely. Fig. 3-b demonstrates that the cell area is divided into three sectors.

B. Received Signal Strength Indicator-Based Techniques
Two approaches are used to determine the position of a mobile target based on RSSI measurements including Fingerprinting-based and RSS-propagation model.

Fingerprinting-based technique
Scene analysis or fingerprinting refers to the techniques that obtain scene features from videos, virtual images, or electromagnetic signal and then estimate target device position by comparing online measurements with the nearest fingerprinting location information [22]. Many scholars have been interested in received signal strength indicator (RSSI) fingerprint-based location estimation algorithms since RSS measurements can be collected easily by a Wi-Fi integrated smartphone without any additional hardware equipment. RSS values are measured in decibels over a reference level of one milli-watt (dBm). There are two phases for fingerprinting technique including the offline (training) and online phases as depicted in Fig. 4. During the offline phase, the system collects site data then stores it in a database. In an RSSI fingerprinting scenario, the collected measurements typically include the coordinates of the collection-point and the received signal strength (RSS) readings from nearby fixed stations. The number of APs in the testbed space enhances the efficiency of fingerprint-based algorithms [23]. However, because RSS measurement takes a long time and effort, any increase in the number of APs will lead to increased localization costs [24]. During the online stage, the system uses the current signal strength measurements and compares them with the measurements collected during the offline phase to estimate the existing position. The RSS concept is to create a one-to-one connection between the signal power of the APs and the target device. Whenever the distance between the transmitter and the receiver decreases, the RSS levels decrease as well. However, due to multipath, the RSS distance ratio is not always linear, especially with indoor spaces [23]. Only WLAN [25], UWB [26], Zigbee [27], Bluetooth [28], and Infrared [29] detectors are required for RSS detection and measurement. Because of its low cost and unattended availability throughout time, WLAN localization is advantageous.
Additionally, diffraction, reflection, and scattering might indeed affect signal strength in indoor propagation settings, which is a critical challenge for fingerprinting based localization systems. This kind of localization method is recognized for its simplicity; however, enough dataset needs to be collected and the changes of the environment can also lead to changes in the available features. Due to these changes in the features, the dataset is required to be updated periodically, which requires extra time, effort and cost [30]. Nevertheless, interference concerns with other devices, that operate on the same frequency bands including microwave ovens and Bluetooth devices, might occur and affect the localization accuracy. The likelihood of making a highly accurate system is possible because RSS systems do not rely on time information. Furthermore, there is no requirement for device synchronization. RSS localization systems are superior at short distances but have lower precision at long distances as compared to outdoor-friendly TOA systems. For localization, however, training and complicated matching algorithms are necessary. RSS is also vulnerable to shadowing, low Signal to Noise Ratio (SNR), and NLOS propagation [31].

RSSI Radio Propagation Technique
RSSI based localization system operates by measuring the power of the signal between a target mobile device and multiple distinct BSs/WAPs, then integrating that data with a modelling technique to calculate the distance between the target device and the BSs/WAPs. To compute the predicted target device's location in relation to the known position of fixed stations (BSs/WAPs), trilateration techniques can be employed as presented in Fig. 5. Although it is one of the most inexpensive and most manageable ways to be implemented, it has the drawback of not providing very excellent precision (which is around 2 to 4 meter of location error), as RSSI readings fluctuate due to changes in the testbed area or multipath fading [32].
The estimated path loss factor's prior knowledge of the corresponding environment (which may be established offline) is all that is necessary in the RSSI-based signal propagation technique. However, during measuring the distance between BSs/WAPs and the target device, most of the researches faced some challenges due to determining the path of loss exponent, parameters of signal propagation, and conditions of the deployment area. Equation (7) can be considered to determine the distance between the target device and BSs/WAPs [33]: where di is the distance between the target device and BSs/WAPs. The estimated calibrated distance, at zero distance, is expressed with d 0 . The RSSI value for the d 0 is present with RSS i0 . RSS i is the measured signal power for the received BSs/WAPs signals and the calculated/calibrated path loss exponent for the received BSs/WAPs signals is denoted by ᵑ .

C. Angle Based Method (Angulation)
Angulation is a directional technique which is used in the approach to Angle of Arrival (AOA). It is a technique for locating a target device by calculating the angles of several fixed stations with the North Pole [34]. Angle of Arrival (AOA) is one of the triangulation approaches that use angles measured from transmitters at specified locations to estimate the position of a target mobile device, as illustrated in Fig. 6. The antennas having direction characteristics are utilized in the angulation approach [35]. The AOA is a calculation process of direction between the target device and the fixed stations. The AOA measurements are used to determine the angle at which a target mobile device acquires signals from numerous fixed stations at a known location [36]. To estimate a position in a 2D space, the AOA method only requires two fixed stations. Although, to increase the accuracy of the position estimation, three or more fixed stations are necessary. Highly directional antennas or antenna arrays are required for direction finding [37]. The intersection of two bearing lines from known reference locations can be determined using geometric relations, as shown in Fig. 6.
The position of the target device can be calculated by giving two or more directions from fixed stations to the same target device, as expressed in Equation 2. In summarize, to locate the target device two angles between the fixed stations' direction to the target with the North Pole and one range measurement between the stations are needed. When very simply the distance between the two displays can be measured [38]- [40].
( 1 ) where (x 1 , y 1 ) and (x, y) are XY coordinate values of BS/WAP1 and BS/WAP2 locations respectively, θ 1 , θ 2 are the AOAs for the received BS/WAPs signals and (x, y) are the coordinate values of the Target mobile's location. Techniques based on AOA have a number of disadvantages. This includes (1) the need for more antennas for measuring angles to improve the system's accuracy, which immediately raises the implementation cost. (2) AOA-based technique also suffers from multipath and NLOS signal propagation issues. (3) Another difficulty that impacts AOA measurements, especially in indoor environments, is reflections due to available objects and walls, thus the indoor implementation is not always optimum [41]. Because of these factors, the direction of signal arrival can be considerably changed which reduces the accuracy of indoor localization systems based on AOA measurements.

D. Time-Based technique
Lateration, also known as trilateration, is the most frequentutilized method for calculating position uses trilateration idea. The "tri" in trilateration means that a location must be defined by at least three fixed points, as shown in Fig. 7. To compute the position of a target object, trilateration employs the known distance between at least three fixed stations in a 2D environment or four fixed stations in a 3D environment just like the earth surface. In another vain, trilateration is used to locate the intersection of the circles. When the center of each of the circles is the location of a fixed station and the radii of each of the circles is the distance of the station to the target device [42]. With trustworthy and precise information, the trilateration approach predicts a correct, unique location. It indicates that the predicted location, as indicated in Fig. 7-a, will be precisely situated in the intersection point of the circles. On the other hand, without reliable and perfect information the circles will not intersect at a single point. To this end, the estimated location will be located in a large region located between the intersections of the circles. In this case, an estimate of the location is determined by observing the point that minimizes the range to all spheres or circles at the same time as shown in Fig. 7-b. For this process mathematical approach, the Least Square Estimation is used [43].
Time-based techniques estimate distance between the mobile target device and various fixed stations by measuring the signal's propagation time, which known as time-of-flight (TOF). The common approaches for distance measurement include TOA, RTT, and TDOA. A large variety of location methods have been suggested based on the Time of Flight (TOF), which is the measurement of the electromagnetic wave's propagation time from transmitter to receiver [44]. To determine the time difference between the transmitters placed in the localization environment, two standard measures, TOA and TDOA, are provided. The TOA technique is based on the computation of signal propagation time between the transmitter and receiver when both of them need to have accurate synchronized time clocks. As well as, light speed multiplied by time equals distance [45]. For location computation, the emitting time and the propagation time are required. When the propagation time equals the arrival time minus the emitting time. The propagation time determines the transmitter-receptor distance "d" (as expressed in equation 4), then receptor position is determined by the TOA measurement and geometry relationship between them, specifically via circle intersections where their radii is the distance between each of them and the target. Fig. 8 depicts when BS/WAP1 sends the signal to the target mobile at "t0" time, then the mobile device, when receives the signal at time "t 1 ", calculates the time of Flight "T" via Equation 3 [46]. A precise localization requires at least three BS/WAPs since a single TOA measurement only locates the mobile target's coordinates in one sphere.
when is the speed of light (c = 3*10 8 ) (4) The difference between TOAs from APs (BS/WAPs) to a target is known as the TDOA. The most frequently used distance measurement technique is TDOA, which is slightly more flexible than TOA. The TDOA only requires the time that the signal is received and the speed at which it travels, not the time at which the signal is transmitted from the receiver's side [47]. To estimate the accurate position of the target device, three or four fixed stations at known locations are commonly required. When, fixed stations send synchronous signals to the mobile node or vice versa (Multilateral or Unilateral). Thereafter, these time measurements would be stored as separate time marks. These measurements are also analyzed by a location engine, which calculates the distance differences between a pair of fixed stations with the target device. The difference in the TOA, between the target device and the two or more fixed stations, is utilized to determine the range between the target device and the two fixed stations after the signal is received at the fixed stations. Equation (5) may be used to determine this difference: ∆ = . ∆ (5) Where ∆d is the difference in the time arrivals at each fixed station, and it can be calculated via equation (5) [48].
The known locations of the fixed stations BS/WAP1, BS/WAP2 and BS/WAP3, are (x1, y1), (x2, y2) and (x3, y3) respectively. This equation may be transformed to a hyperbola employing nonlinear regression. After calculating a sufficient number of hyperbolas, the intersection may be used to determine the target's location (x, y). At an unknown instant, the target sends a signal which is received by BS/WAP1 at t1, BS/WAP2 at t2 and BS/WAP3 at t3. As illustrated in Fig. 9-a, the difference in range (d) is computed between BS/WAP1 and BS/WAP2, and the hyperbola of potential locations is drawn. Because this hyperbola has two branches, it will be much more difficult to identify the intersection. One of the branches can be eliminated if the target device's approximate position is known. The top branch is eliminated in this situation ( Fig. 9-a). This procedure is repeated for the other fixed station pairings, with the result is illustrated in Fig. 9-b. The Target device is located at the intersection of the three hyperbolas. The disadvantages of the TDOA approach are similar somehow to those of the TOA method. Fixed stations clock synchronization is required for TDOA. Whereas in the TOA approach the clock synchronization between the target and fixed stations are required [49]. With TDOA and TOA, the accuracy of the position is linked to the accuracy of the clocks used in the nodes. Both TDOA and TOA are also sensitive to multipath, noise, and interference. Furthermore, in a lowbandwidth environment, they are difficult to be implemented. Additionally, they are preferred only direct LOS is available including open areas or a big open building [50]. The round-trip time of flight (RTT) or received phase method is also used in some systems for range estimation. The duration of time in milliseconds that takes for a data packet to be transmitted from the transponder (BS/WAP) to a target device (Smartphone) plus the time it takes for a response packet to be received back at the BS/WAP is referred to as Round Trip Time (RTT), as presented in Equation (7). Then, the RTT is used to find the TOF and distance as presented in Equation (8) and (9) respectively. [51] = ( 2 − 1 ) + ( 4 − 3 ) Where the estimated RTT, for each received BSs/WAPs signal, is presented via RTT i ; i refers to the number of BSs/WAPs; t i1 & t i4 are the measured times of transmitted and received signals beside the target mobile device, respectively; t i2 & t i3 are the measured times of received and transmitted signals via BSs/WAPs, respectively; Where TOF i is the time of flight of the signal from BSi/WAPi to the target device [52]; ∆ is the signals processing delay time beside receiver and transmitters as presented in Fig. 10.
(9) Where d i is the distance measurement between the BSi/WAPi and target device; c is the speed of light.
In indoor environment obstacles, including walls, roofs, doors and other materials, might cause multipath fading which makes the RTT to be unprecise. Recently, researches have solved this by using signal path analysis or statistical correction to stabilize the distance between the transmitter and receiver. However, many factors influence the RTT of transmission/reception simultaneously [53]. This includes (1) noise because of the LOS/NLOS situation, (2) measurement errors owing to non-receipt, and (3) distortion due to signal delay. Furthermore, The RTT measurement is influenced by a number of other factors, including processing, queuing, and encoding delays. For a given pair of communication endpoints (BS/WAP and mobile target device), these factors are usually considered to be constant. To calculate the delay in TOA, both the target device and the BS/WAP clocks are utilized, but in RTT, just the mobile target device's clock is then utilized to collect the transmission and arriving timings. RTT, as a result of this benefit, reduces the need for clock synchronization between the target device and BSs/WAPs [54]. However, the disadvantage of this technique is that distance calculations must be performed simultaneously from several BSs/WAPs, which will result in problematic latencies for Location-Based Services (LBS) applications where mobile target devices move fast. Additionally, due to the enormous number of frames that are exchanged between the mobile target devices and the BS/WAPs, this technique creates a significant amount of network traffic load [55].
Fortunately, the IEEE 802.11 Working Group's Task Group mc (TGmc), added Wi-Fi-RTT as a feature to the IEEE 802.11 protocol. Wi-Fi RTT allows devices to determine the distance between them and adjacent Wi-Fi routers [56], [57]. The Wi-Fi RTT protocol is a brand-new ranging protocol. Between devices that implement the Wi-Fi RTT protocol, Wi-Fi RTT signals are sent back and forth. The distance between the base station and the smartphone is estimated using the recorded time of the same signal. Localization performance with Wi-Fi RTT is affected by issues including multipath interference and packet loss. The Wi-Fi RTT localization mechanism cannot function correctly when devices experience packet loss at the same time. [9], [54]

E. Dead Reckoning Technique
The dead-reckoning (DR) technique is to estimate the present location of a movable item using a previously calculated location, and then integrating estimated of speed, heading direction, and course over time taken is known as Dead Reckoning (DR) [18].
A DR technique can be beneficial to overcome the constraints of GPS/GNSS technology. It provides highaccuracy navigation by calculating the current location using data from multiple sensors including gyroscope, accelerometer, speed pulse and magnetometer sensors, even when GPS/GNSS technology is problematic or impossible. The general required elements of DR technique are presented in Fig. 11. In vehicle navigation systems, the DR approach is frequently used. [58] The DR location's primary pros are its low cost and easy for implementation. However, it suffers from some limitation including (1) the reference position should be determined and (2) accumulative errors [59].

F. Map-Matching Technique
The process of connecting the mobile target device's estimated position with the geographical information retrieved from the digital map is known as Map Matching (MM). Fig. 11 illustrated a combination between MM and PDR techniques. Map-matching algorithms use a priori knowledge of geographic characteristics to improve a target device's navigation solution by locating the target's real 2D or 3D coordinates inside the movement area [60]. This process is performed via employing machine-learning algorithms including pattern recognition/matching algorithms. Furthermore, digital map information has been demonstrated to rectify accumulated errors in DR type sensors (e.g., inertial measurement unit "IMU"). Digital maps, on the other hand, may face errors including displacement errors [61]. The primary disadvantage of this approach, particularly when used in the indoor area, is the need to create and maintain a massive database of knowledge about a testbed area's layout.

G. Hybrid Localization Technique
To improve localization performance many combined localization techniques are proposed to effectively combine two or more existing approaches, including the Combination of (1) AOA and RSSI measurements [62], (2) TDOA with Fingerprinting techniques [63], and PDR with RSS-fingerprinting techniques [64]. Fig. 12 shows a combination method that demonstrates the link between map matching, geographical features, and other localization techniques.
Initial location findings and geographical restrictions from the indoor environment are fed into map-matching algorithms, which return the improved location. According to the localization signals, initial location can be acquired using localization techniques including proximity, triangulation, fingerprinting, DR or hybrid based on the signals from different technologies. These technologies may include Wi-Fi, UWB, cellular, Zigbee, Mobile Inertial Sensors, Light, Camera and/or Bluetooth.
Apart from making localization systems more reliable and accurate, these combinations offer the opportunity to address the following disadvantages that are present in non-hybrid techniques:  High power consumption  Time and memory complexity  Error accumulation  High measurement records requirement  High cost infrastructure IV. PERFORMANCE METRICS Various technologies might be utilized to develop localization systems in several different ways. These varieties of ways make the structural comparison between these technologies more difficult. Therefore, many types of criteria for evaluating the quality of localization systems are defined, including accuracy, complexity, scalability, stability, safety, and cost [65]. These types of criteria allow researchers to evaluate the performance of structurally different localization systems.

A. Accuracy
The accuracy of a localization system is determined by the Euclidean distance between the receiver's estimated and actual locations. In this case, the accuracy is measured in meters. The localization error is proportional to the accuracy of the system, and the mean value of these occurrences of error is calculated correspondingly to determine the mean square error of the localization system [66]. The necessary system's accuracy is connected to the localization error and reflects the average error value, and this average error must be as low as possible to maintain an accurate position.

B. Precision
Precision is a metric of a measurement's repeatability; if the findings are extremely repeatable, the measurements are precise. When there are more estimated location points around a point, the system becomes more precise. Even though precision and accuracy are inextricably connected, they cannot be balanced in all localization situations. Furthermore, for the localization system description and to acquire the accurate estimation of the localization system, it is not sufficient to know simply the exactness or accuracy of the system; both criteria better to be understood [67]. Fig. 13 depicts the relation between the precision and accuracy metrics.

C. Real-Time
Real-time is equally as important as accuracy and precision in some localization-based applications. When criminals are being rehabilitated, for example, the police need to know where they are being rehabilitated in real-time so that they can have additional possibilities for more rehabilitation [68]. A catastrophe occurs inside buildings, panicked trapped individuals can move in real-time, and the rescue team must locate the location of the trapped individuals in real-time during an emergency rescue. To develop indoor localization technology, most indoor positions employ techniques to improve algorithm complexity, signal acquisition, APs deployment, and hardware quality to be worked in realtime.

D. Complexity
The complexity of a localization system is proportional to the hardware and software requirements to operate the system efficiently. Although, it is reasonable to expect that increasing the system's features and algorithms' characteristics will directly increase the localization system's performance. And this is only valid up to a point when the system is possibly applied in a normal peoples' functioning environment [69]. In addition to enhancing the accuracy of a localization solution, users may encounter other difficulties such as energy consumption and higher memory utilization.

E. Scalability
The scalability of the localization system indicates how the receiver's approximate location changes over time as the receivers' correct position changes. Although, scalability should be maintained to a level so that the system reliably identifies the receiver's location. In some scenarios, due to system redundancies, this is not ideal. If the scalability is very small, even the tiniest movement in the recipient location is detected. In other words, if you sit at your desk and move a bit to answer the phone, the system will determine that movement in your location [70].

F. Stability
The localization system can operate normally without a signal or lack of signal measurements due to the change environments. For example, with RSS-based fingerprint technique, if a new given RSSI value is not exist in the RSS Map database, because of obstacles or failures of a part of the localization system, the system should provide accurate location information [71]. Thus, one of the system's most critical features is stability, so precision is often sacrificed to increase system stability.

G. Security
The security of the localization system is another key metric that should be considered. Signal resistance to intrusion and other sorts of attack is defined by the security of the devices that are used in localization infrastructure. To utilize localization services, the user's mobile device often runs an application offered by the service provider [72]. And due to the sensitivity of user's data, security and privacy issues need to be explored carefully. This is specifically crucial in military localization systems, as well as other types of localization systems including billing, navigation or point-of-interest (POS) applications [71].

H. Reliability
Reliability, in general, might be defined as the likelihood of getting error-free feedback from indoor optimization systems at a specific time and location. The localization system's reliability comprises of three elements which are (1) specified time, (2) operating environment and (3) the correctness of the system's estimation. Reliability is one of the most essential factors for assessing localization systems in certain environmental settings including mining and firefighting areas. In an emergency, location-based systems might report erroneous locations and this makes the situation much more out of control, particularly in the face of such unforeseen circumstances where reliability cannot be guaranteed [73]. Therefore, the localization system should consider the reliability of the techniques as much as possible in terms of lack of environment changes, material ages, and complexity of the localization techniques.

I. Cost
The cost is one of the most important effective factors to be considered while building and executing a localization system. It must be considered in this regard. The cost of the needed hardware and software equipment, the cost of services and their performance, and the cost of the deployment environment make up the overall cost of the localization system. At the same time, after completion of the design process, additional factors like power consumption, maintenance, and expanding the system to provide more services directly impact and increase the cost of the localization system. However, the cost of location-based systems has recently reduced as a result of the widespread use of smart terminal devices around the globe and the increment of the availability of wireless local area networks [74].

V. STATE-OF-THE-ART LOCALIZATION SOLUTIONS AND EMPLOYED TECHNOLOGIES
The essential recent wireless localization systems, which are effectively available in IoT era, are reviewed in this section. Fig. 14 illustrated the taxonomy of the advantageous technologies for localization. Besides the characteristics of the technologies as presented in Table 2, the research's majority focus is on radio frequencies-based systems, particularly IoTenabled wireless Local Area Networks (WLAN) based localization systems.

GNSS Technology
GNSS is a satellite navigation system that has worldwide coverage. The GPS of the United States, Russia's GLONASS, China's BeiDou system [75], and the Galileo of European Union are all fully operating GNSSs as of September 2020. The Quasi-Zenith Satellite System (QZSS) of Japan is a (US) GPS satellite-based enhancement system designed to improve GPS efficiency, with satellite navigation independently of GPS expected to be operational by 2023 [76].
Fortunately, GNSS chipsets are a necessary component of any smartphone. At the very least, GPS is available on smartphones. Furthermore, an increasing number of smartphones contain the GLONASS, Galileo, and Beidou measurements. The GNSS transmissions are in the L-band, which is between 1.164 and 1.300 MHz with a wavelength of 25.7 to 23.1 cm and 1.559 to 1.610 MHz with a wavelength of 19.2 to 18.6 cm [77].
GNSS uses a triangulation technique to identify physical positions by receiving signals from several satellites. Although GNSS is the most widely used technology for outside navigation, several challenges must be addressed for interior navigation. Excessive noise, high multi-path signals, and deteriorated geometry are all impairing the GNSS performance. To improve the localization accuracy, the combination between the GNSS and other technologies are proposed in the literature. [78] proposed a real time GNSS and PDR hybrid solution by using KF to offer a reasonable tradeoff between energy conservation and localization precision which might be achieved by turning on and off the GNSS receiver.
In another vain, [79] presents a 5G-GNSS fusion localization solution based on AOA-TOA measurements. To achieve the fusion localization, it combines AOA calculations from 5G BSs with TOA observations from GNSS satellites. In comparison to conventional solutions, experimental findings illustrate that the proposed solution is free of the impact of time synchronization issues, thereby improving the accuracy and resilience of the hybrid positioning systems.

Sound-Acoustic Technology
An acoustic technique for locating the source of a sound signal in a setting is referred to as sound-based localization. The Direction of Arrival (DOA) of the sound waves and the distance [80] between the source of the sound and the sound receiver sensors are generally used to identify the location of the source. Where, the distance can be calculated via TOA, TDOA, or TOF. Essentially such kinds of systems require the availability of structural design of the sensors' arrangement and signal processing algorithms. The acoustic Indoor localization solution provides a precise location point. However, the acoustic signals' short-range characteristics and the influence of background sound noise are the main factors that make to be inappropriate for widespread deployment. Besides that, it possibly can be combined with other technologies eliminate the existing problems. The acoustic source localization approach was used in [81] to reduce the cumulative error of PDR localization, resulting in a localization accuracy of 30 cm, which is somehow. Meanwhile, applying just PDR, the RMSR of localization acceptable is 2.15 m.

Radio-frequency Technologies
Radiofrequency (RF) transmission is a wireless electromagnetic signal that is utilized as a means of communication. Radio waves are electromagnetic pulses with recognized radio frequencies ranging from 3 kHz to 300 GHz. The RF technologies are the most commonly used ones in the localization environment that is due to their already availability in the vicinity.

Bluetooth based Localization Techniques
Bluetooth is an electromagnetic signal or a short-range wireless personal area network (WPAN) technology with a wavelength of roughly 12.5 cm that operates between the frequencies of 2.4 and 2.48 GHz [82].
Bluetooth is extensively utilized in headphones and cell phones for shortdistance communication. However, the most recent Bluetooth version (5.1) currently has a range of about 200 meters [83]. AOA may also be used to measure the direction angle of the received or broadcast signal starting with this version. Bluetooth location calculation might be based on Time or RSSI [84]. Bluetooth has several advantages, including support by most smartphones, laptops, Desktops, PDAs, and other devices. Further, the Bluetooth provides low cost, high security, small size, easy integration in portable devices, and power efficiency, which makes it possibly transmitters operate for months or even years on a single charge [85]. It allows users to reuse devices that already have Bluetooth technology and readily expands to new users without the need for extra hardware. The smartphone may be used for localization within airport terminals, railway stations, large markets, supermarkets, hospitals, cafe and restaurants, where the area map is supplied to the smartphone and then localization is accomplished using the Bluetooth (e.g., (iBeacons from Apple and Eddys-tone from Google). Bluetooth is preferable for indoor localization to a variety of technologies for the aforementioned reasons: (1) channel hopping strategy, (2) reduced transmission power, and (3) significantly greater scan rate than Wi-Fi [86]. Bluetooth-based location systems, on the other hand, can only give precision of 1 to 3 meters and have 20-second latency [87], which is inconvenient for real-time monitoring. Moreover, it has the limitations of all RF localization techniques in complicated and changeable indoor environments. While utilizing Bluetooth, signal attenuation, multipath effect, and signal strength fluctuations need to be considered [88].

Wi-Fi based Localization Techniques
Wi-Fi is a trademarks name for the IEEE 802.11 standards. It works within 2.4 GHz and 5 GHz bandwidths, when these bands are known as the Industrial, Scientific, and Medical (ISM) bands. WiFi is typically utilized to offer networking capabilities and Internet access to various devices in private, public, and commercial contexts [89]. The coverage range of Wi-Fi was originally at 100 meters, but in IEEE 802.11ah, it has recently risen to around 1000 meters, which is essentially optimized for quality of service (QoS) within IoT environments [90], [91].
Due to the availability of Wi-Fi chipsets on the majority of today's smartphones, computers, and other handheld devices, Wi-Fi becomes a perfect option for indoor localization [92], [93]. Modest localization solutions with sufficient localization precision and accuracy may be constructed even without the requirements of additional hardware devices to be added to the existing Wi-Fi access points or infrastructure. The Wi-Fi infrastructure can also be used as reference sites for signal gathering in fingerprinting-based solutions [94]. However, it is necessitated that innovative and efficient methods be developed to enhance the localization accuracy. Furthermore, it has been demonstrated that unrestricted interferences in the ISM band affect localization performance [95]. To implement Wi-Fi-based localization services, the aforementioned RSSI, TOF including RTT, TOA and TDOA, AOA or hybrid methods could be utilized.
The authors of [96] proposed utilizing the "Principal Featured Kohonen Deep Structure (PF-KDS)" to locate Wi-Fi equipment for indoor floor design. Initially, the "Principal Feature Enhanced Auto Encoder" method is used to analyze spatial data and then extracting Principal features, resulting in dimensionality reduction and localization complexity. After that, the "Kohonen Self-Organizing Deep Structured Learning" method is built using the dimensionality reduced characteristics. This method records a list of single MAC addresses and corresponding RSSI by using a novel path loss model that considers the impact of walls on RSSI, thereby increasing localization accuracy. The obtained findings show that combining Principal Feature Enhanced Sampling with Kohonen Deep Structure for Indoor Localization gives excellent localization accuracy with minimal time and cost.
The authors of [97] provide an indoor localization solution based on Wi-Fi FTM RTT measurements. The solution depends on the temporal-spatial restrictions between neighboring virtual positioning clients (VPC). In a dynamic environment with substantial multipath effect and signal interferences availability, the solution delivers reliable localization accuracy, which is a sub-meter level at an average of 80%.
The study of [98] presents CADE-CNN Positioning (CCPos) solution. CCPos is a Wi-Fi RSSI fingerprinting localization solution that based on "convolutional denoising autoencoder (CDAE)" and convolutional neural network (CNN) methods. This solution uses the K-means method to extract the validation set of features from the entire training dataset in the offline phase. The RSSI is initially filtered in the online stage, and the CDAE extracts important characteristics. The CNN then outputs the location estimation. The Alcala Tutorial 2017 and UJIIndoorLoc datasets are used in the study to test the solution's performance. The solution provides a good noise filtration and elimination and generalization performance. According to the experimental results, the two datasets have mean localization errors of 1.05 m and 12.4 m, respectively. The limitation of this method is that it must be adjusted for different environmental settings in real-world applications.
Depending on the KNN method, the work of [94] offers a new and improved approach. To fully account for the environmental complexity, initially, the RSSI fingerprint measurements are preprocessed to remove the interference of abnormal RSSI values. Thereafter, the KNN method is weighted using a novel weight mechanism. The authors utilized two phones in their experiments including an Honor V20 and a Huawei Nova4; the improved approach's localization errors are 3.73 and 2.36, corresponding to the phone types, respectively. Thus, it is evident that device heterogeneity has a significant influence on the accuracy of localization.

Ultra-Wide Band Technology
Ultra-wideband (UWB, Ultra-wide band or Ultraband) is a wireless communications technology with a frequency of over 500 MHz and a carrier frequency over 2.5 GHz that is ultrashort and high-bandwidth. The low energy consumption of UWB results in a large bandwidth with high multipath immunity. Although, UWB is strengthened in multipath fading by communication with high speed, high time resolution, high data rate, and short-wavelength [7], [99]. Another important aspect of UWB is its capacity to employ low carrier frequencies, where signals may more effectively penetrate obstacles; it is also free of interference because its spectrum is quite distinct. As a result of all of these characteristics, UWB technology is a suitable option for indoor positioning [7], [99].
In comparison to time-based techniques, the RSSI based technique does not effectively exploit the wide bandwidth of UWB to improve localization accuracy. Whereas, TOA, TDOA and AOA take use of the UWB short duration signal's high time resolution to improve localization accuracy in comparison to other approaches [100], [101]. The UWB technology outperforms conventional positioning technologies. Furthermore, UWB technology is extremely scalable and is employed in a variety of applications, including indoor positioning.
To reduce NLOS errors and enhance BS location accuracy, [102] propose combining a CNN neural network method with an adaptive error correction method. Besides, authors in [7] propose a positioning technique that is improved by a neural network. The findings demonstrate that the neural network could be used with UWB-based techniques and that it can maintain a consistent accuracy in NLOS settings.
Owing to a control design issue and poor GPS signal, operating a quadrotor unmanned aerial vehicle (UAV) in an indoor setting is challenging. To tackle this issue, an Unscented Kalman filter to combine UWB and IMU measurements for the indoor localization of quadrotor UAV is proposed in [103]. The results demonstrate that UWB localization alone is accurate to within ±5cm, whereas UWB and IMU combination localization is accurate to within ±1.5cm.
A "passive anchor assisted localization" (PAAL) scheme is proposed in [101]. In the scheme, TOA/AOA measurements to the agent are obtained by the active anchor, whereas the active anchor and agent signals are captured via the passive anchors. Additionally, the TDOA information from the passive anchor measurements is fully utilized to complement single-anchor joint TOA/AOA localization. Furthermore, The PAAL scheme is built on a low-cost UWB platform with providing 20 cm localization accuracy, particularly, in NLOS settings [101].
To reduce infrastructure costs and setup time, a low-cost inertial navigation system (INS) and UWB combined pedestrian solution which relies on only one UWB base station at an unknown location is proposed in [104]. The findings present that the proposed solution decreases the mean location error to 60 cm. However, the anchor location is only calculated once during the first stages of tracking, where the precision of the base station location estimate has an impact on the subsequent combination tracking solution.
Due to the decrease in UWB-based localization accuracy in NLOS scenarios and the decrease in update rate as the number of customers increases, [105] propose a hybrid technique in a store environment that combines UWB and dead reckoning (PDR) technique with considering a shopping cart. To track the cart in between two UWB measurements, each is attached with a UWB tag and an IMU sensor to detect the step length and heading of a customer carrying the shopping cart. The authors examine and contrast two techniques for combining PDR and UWB measurements, namely Kalman filter and particle filter techniques. Furthermore, they consider the impact of the store's map information on the trajectory information. The findings indicate that the average location inaccuracy with UWB is only 62.6 cm, while the Kalman and particle filters achieve accuracy of 34.1 cm and 41.3 cm, respectively. whereas the accuracy increases up to 28.0 cm when map information is fused with particle filter.

ZigBee Technology
ZigBee is a popular wireless communication technology used in the IoT era. It enables smooth communication between devices from various manufacturers. The IEEE 802.15.4 standard is used to build the ZigBee protocol stack [106]. The 868 MHz, 915 MHz, and 2.4 GHz frequency bands are used by ZigBee-based wireless devices and also 250 kilobits per second is the highest data rate. It provides two sorts of keys, network key and multiple link key, to enable a protected connection between devices. The network key is shared by all network devices, but the multiple link key is shared only by communicating devices. Different sorts of topologies, including tree, star, and mesh network topologies, are supported by ZigBee. It's ideal for applications and devices that require low data usage, long battery life, and high security [107]. The signal range of a ZigBee in an indoor environment is around 20m to 30m. RSSI measurements are commonly used to calculate the range between two ZigBee enabled devices. ZigBee is vulnerable to interference from a wide range of operational signal types running at the same spectrum since it runs without a license inside ISM bands [108]. A ZigBee-based localization technique has been used by several researchers [12], [109].
In ZigBee sensor networks, an area plus RSSI based localization solution is suggested in [11] utilizing neural network algorithms. ZigBee sensor-based devices gather sensing data from Four ZigBee positioning reference devices, which are available surrounding the environment, and transfer the collected data to the back-end database system for storage and processing. The accuracy of area localization was then compared between the K-nearest neighbor average (KNN-AVG) and the backpropagation neural network (BPNN) methods. The experimental examinations indicate that the gains in area-based localization accuracy obtained by BPNN are much more prominent than those obtained by the KNN-AVG method due to its learning capability.

Radio Frequency Identification Technology
In a word, Radio Frequency Identification (RFID) is a rapidly evolving technology that uses radio waves for recognizing and tracking tags to provide wireless identifying and tracking capacity. The RFID technology uses a unique tag ID to recognize a target mobile device or object using an RF signal, which minimizes the complexity and overcomes occlusion issues and other environmental issues. However, achieving high localization accuracy is not guaranteed owing to hardware limitations. On the other hand, the usage of RFID systems has grown rapidly due to the fast drop in the cost of RFID tags. Additionally, the RFID market is expected to be valued at $13.4 billion by 2022. The credit cards, gathering tolls, providing access to cars in gated communities, monitoring library materials, animal tracking, and many other applications use RFID technology today.
There are several different types of RFID systems on the market right now. Low Frequency (LF), High Frequency (HF) and Ultra High Frequency (UHF) systems where they operate at 125 kHz, 13.56 MHz and (433 MHz, 860 to 960 MHz, and 2.4 GHz), respectively. There are also some customized RFID systems that operate at 5.8 GHz in the Super High Frequency (SHF) band [110]. For smart cards and tickets, LF systems are commonly used. Additionally, LF systems rely on inductive coupling and typically need a quasidirect physical contact between both the reader and the tag, thus they can't be used for localization purposes. Whereas, HF systems use inductive coupling as well, but their reading range is only a few centimeters, which is sufficient for proximitybased localization techniques. UHF tags depend on electromagnetic wave propagation since they may be identified by a microwave signal transmission. The distance reading is affected by a number of aspects, the most important of which is the existence or disappearance of a tag battery. RFID tags and RFID systems may be active, semi-active, or passive [111]. Active tags have a reading distance of tens of meters and typically operate at 433 MHz, with a reading distance of up to 100 meters. The modulated backscattering concept is used to communicate with passive RFID tags, which do not have a power supply. So, instead of employing an internal local oscillator, they self-power via the intruding electromagnetic wave that is sent by the reader and reflected back by modulating the wave to communicate their Electronic Product Code (EPC).
Current UHF passive tags, 860 to 960 MHz [112], have a reading distance of up to 10 meters, and they are gaining popularity for localization owing to their low cost, ease of installation, and maintenance. Semi-passive tags have a battery that is only employed to provide the power to the microchip and other auxiliary devices including sensors, not to power the transmitter.
The singularity issue of laser sensors in object recognition can be handled using the RFID tag's unique ID. The capabilities of a laser range calculation's high measurement efficiency can be employed to compensate for RFID's low localization accuracy. Thus, the authors of [113] combine RFID and laser range calculator information to accomplish dynamic multiple object recognition and localization solution. They compute the radial speeds of moving tags by employing the RFID's phase difference in the subsequent time. Experiments demonstrate that in an area with the availability of obstacles, the solution presented obtained a localization error of 33 cm.
A sensor hybrid solution was designed in [114] to track a movable robot with two rotary encoders and two RFID reference tags pointing to the floor. Sensor hybridization is achieved via using particle filter (PF). Where, the PF employs collected data from the encoders in both the prediction phase and PDOA as well as the detected data from a collection of reference RFID tags on the floor. The PDOA frees the technique from the need to calibrate the phase offset of each RFID reference tag. Two set of experiments have been carried out. The robot walked in a 3.5 m 2.6 m office area with 30 tags placed 60 cm apart in the first experiment. For a 10 m route, the median localization error is 5.4 cm. In the second experiment, 42 tags are distributed with a grid spacing of 60 cm in a 5 m 5 m crowded office-like setting with the existence of metallic items. On a 9-meter route, a median error of 5.9 cm is obtained.
[8] proposed a six-degree-of-freedom RFID solution for unmanned aerial vehicles (UAV). Authors attached at least three latest ultrahigh-frequency (UHF) RFID tags to UAV. The approach employs a Singular Value Decomposition (SVD) based method and a Bayesian filter, and it is effective for a variety of aerial vehicles. The proposed solution is evaluated in a complex indoor environmental setting. The obtained results show that the localization and orientation errors are 0.04 m and 2.5 degrees, respectively. Whereas, on directional antenna-based aerial networking, an unscented Kalman filtering (UKF) method is used to predict the location of UAV [115].
In [116] When rotary encoders are used, an EKF with a Rauch-Tung-Striebel (RTS) smoother is proposed for tracking robots in an industrial IoT environment. At each evaluation period, three or more tags must be inside the reader detection region to fulfil the reliability criteria. Through a numerical study, the authors evaluated the solution's efficiency and computing load for various RTS smoother sizes. When executing a complicated trajectory in a hypothetical 60 m x 60 m warehouse setting with four UHF RFID tags with an assumed infinite reading distance, the solution's accuracy is about 0.4 m with a smoother size (55 samples).

Frequency Modulation Technology
Frequency Modulation (FM) technology is a type of longdistance wireless technology that is utilized in indoor and outdoor environments all around the world. The FM operates on the 87.5 to 108.0 MHz radio band in most areas [117]. FM is less impacted by weather and obstacles including walls, trees, human body and other objects since it uses the very high frequency (VHF) band, which is much lower than Wi-Fi (2.45 GHz), cellular (0.9 and 1.8 GHz) networks, and other current wireless technology. Because FM is so widely used, there is no need to invest in additional beacon infrastructure for interior localization [118]. Furthermore, an FM receiver is inexpensive and consumes less power, resulting in longer battery life. Because it has a longer wavelength (3 m), it interacts differently with indoor items and furniture that are at Wi-Fi bands. Operating at FM frequency does not cause interference with other RF components that operates at 2.4 GHz.
The fingerprinting approach is utilized with RSS for indoor localizations; The KF-KNN solution, which is a fingerprint localization solution based on FM signals, is presented in [6]. Initially, the authors utilized the KNN method to perform the preliminary localization computation based on RSSI information recorded from the RF module to be localized, the RSSI fingerprint dataset, and noise characteristics from the environment. Thereafter, the KF is used to improve the localization information. The results of the study reveal that the KF-KNN method performs better in localization than the traditional KNN and WKNN fingerprint-based localization methods, with an average localization error of 1.9 m.
Authors also proposed an RF-RSSI fingerprinting based solution employing weighted centroid k-nearest neighbors (WC-KNN). The WC-KNN solution's average localization error is reached 0.8 m, according to experimental evidence, and no extra hardware is required to be added to the infrastructure.

Cellular Based Technology
Cellular network-based localization solutions have been rapidly gained the attention of researchers around the world specifically with the appearance of the LTE and 5G in which are advantageous in IoT environments [119]. Where, a cellular or a mobile network is a network system of radios that are deployed across the land. At least one fixed transceiver is located in these cells, which delivers wireless coverage over the covered region. To minimize interference in cellular transmission, nearby cells utilize distinct sets of frequencies.
A mobile network's comprehensive network coverage is provided by a group of cells (BSs/WAPs). This allows enduser mobile devices to communicate even while they are travelling between cells.
The cellular technology has undergone several generations, including (1) 1G, which is an analogue technology that is no longer in existence and only delivered voice calls without any data capability. (2) Voice and limited communication services are supported by the 2G digital technology, which is now active. (3) Voice, low-speed data, and a set of data services are all supported by 3G networks. (4) Mobile broadband in the real sense is enabled by 4G (LTE) technologies, which aim for speeds of 100 Mbps or greater when on the move. (5) 5G technology is projected to deliver improved mobile broadband with a high data transfer rate of 20 Gbps, expand 4G's IoTs functionality, and allow mission-critical applications that demand ultra-high bandwidth.
Different frequency bands are used by cellular networks, including 0.9 GHz, 1.8 GHz, and 2.8 GHz frequencies as the standard bands for the Global System for Mobile Communications (GSM) [120]. Cellular networks outperform Wi-Fi networks in terms of coverage and don't require any extra equipment. Traditionally, the proximity technique was employed for localization, in which the mobile device's location was determined under the cell coverage area; however, this method yielded disappointing results. Additionally, phone localization is generally accomplished using RSSI, which employs the fingerprinting approach [121].
Where, cell stations are treated as BSs in the case of RSS fingerprinting. Equally, the TOA technique is considered in other researches, in which trilateration is the chosen technique of localization. To reduce the influence of multipath signals, [13] proposed an LTE Synthetic Aperture Navigation (LTE-SAN) system based on the Synthetic Aperture Antenna Array and LTE Carrier Phase Measurements; a synthetic aperture antenna is used to capture signals at various time instants. This is comparable to capturing signals from an array. SAN will identify direction-of-arrival (DOA) using the Estimation of Signal Parameters through Rotational Invariance technique; in their research, the RMSE of localization for LTE-SAN was 3.9 m, compared to 7.19 m for LTE alone. TDOA measurements are commonly used in cellular localizations. In a 5G millimeter-wave (mmWave) multipleinput single-output (MISO) configuration, the study [14] proposes a new solution in which the mobile user calculates its own location by combining TDOA and angle of departure (AOD) measurements inferred from downlink broadcasts. The authors initially do a Fisher information analysis to determine the lower boundaries on estimate accuracy, and then present a new localization solution that can enhance performance even when there are few transmit antennas and bandwidth is restricted. The solution's efficiency is assessed by varying the bandwidth from 10 MHz to 700 MHz. Whenever the bandwidth becomes below 100 MHz, time measurements are insufficient to get the location precision below 10 cm. However, since there are so many antennas, AOD readings alone provide excellent localization accuracy. For bandwidths within 100 and 500 MHz, the suggested solution beats both TDOA and AOD alone.
Despite the fact that massive MIMO technology is a major subject in communication, its capacity in localization is often overlooked. To tackle the difficulty created by ultra-dense networks, a novel method combining near-field and far-field in 5G massive MIMO technique is presented in [122]. At the first a novel coarse localization approach with low complexity is presented. Then, to estimate the near-field errors, authors use a fourth-order cross cumulant with various weights. Lastly, to prevent cumulative errors, they perform all of the required computations using raw data. The Experimental results illustrate that the suggested method outperforms other methods in terms of localization accuracy. The method also offers some immunity to multipath and NLOS, which aims to enhance the localization effectiveness of municipal hotspots. However, the inaccuracy produced by the elevation angle to the plane angle, which is visible in the near field, is not completely solved by the proposed method. In the method, the inaccuracy is only decreased by one linear weight. [123] propose an innovative mmWave MIMO-NOMA based localization solution that can satisfy the needs of IoT systems. It establishes a NOMA-based localization scheme from a system-level viewpoint, as well as transmission strategy design. The localization error bound (LEB) is chosen as an assessment criterion to define localization effectiveness. Theoretical research is used to simulate comparisons of localization effectiveness between NOMA and traditional orthogonal multiple access (OMA). When contrasted to OMA, numerical findings demonstrate that using NOMA to localization is a realistic approach to decrease the LEB.
Intelligent Transportation Systems (ITS) are becoming a reality and an integral part of smart cities, due to the availability of Information and Communication Technologies (ICT) and installed wireless sensor chips in current vehicles. The mission of ITS is to increase traffic safety and efficiency while also benefiting society. Vehicular Ad Hoc Networks (VANET), a technique that uses moving cars as a node in a network to create a mobile mesh network, has gained a lot of attraction in this area. Despite the similarities between VANET and Mobile Ad-Hoc Networks (MANET), VANET has significant characteristics that discriminate it from MANET. Where Vehicle-to-vehicle (V2V) and vehicle-toinfrastructure (V2I) communication is provided through VANET [124] , as demonstrated in Fig. 15. Moreover, VANET ensures that the routing path is not broken before the transmission is completed. There are numerous applications including vehicle navigating/monitoring, accident avoidance, and efficient transportation, depending on the VANNET technology. The navigation application is aided by using cellular (LTE and 5G) signals. Furthermore, VANET based localization may be applied in locations at which GPS is not accessible. All of these achievements belong to the advancements in wireless network technologies including the IoT [125]. In [126] an innovative localization solution based on the LTE signal RSSI measurements is presented, to determine the precise position of a target vehicle. The solution provides the capability of receiving signals within its range, communicating with Road Side Units (RSUs) and calculating the mean of the RSSI. After the RSSI has been obtained, the RSSI Based Localization solution is used to determine the vehicle's precise location. The suggested solution's major feature is its high SNR, which is derived from the nearest RSU. Following the discovery of the vehicle's position, the Cramer Rao Lower Bound (CRLB) is examined. All of the simulations demonstrate that the recommended RSS-based Localization is effective and outperforms other traditional LS and weighted least squares (WLS) techniques.
In another vain, A CSI-Fingerprinting solution is presented in [127] to fill up the gaps in GPS precision and delay in a WAVE-based vehicle setting. Because communication systems and vehicle localizations employ the same signals, there is no need for a separate localization infrastructure. The authors apply signal processing to reduce multipath effects and use location features to offset hardware errors. Additionally, they reduce the influence of low-variability CSI fingerprints with similarity degrees and use reference point filters to eliminate traffic noises. The mean distance error reached 0.36 m in 30 free experiments under various traffic circumstances. The experiments reveal great precision and minimal latency, with no effect from grid size, vehicle speed, traffic, or weather.
Visible light positioning (VLP) technologies may be used in a variety of 5G based solutions due to their excellent localization performance [128]. The cultural and historical infrastructure, in particular museums and workshops, are some of the application areas where the Visible light communication (VLC) technology has the most impressive implications, since attendees could achieve real-time, availability of digital information about specific artworks or objects via directional VLC transmitters utilizing LED-based lighting systems. Consequently, an effective attendee's location and tracking solution might be implemented, aiming, for example, at the intelligent management of user flows inside the building. The present experimental results in [128], where three LEDs placed in the receiver's LOS, can achieve a positioning localization accuracy of 18 cm. Aside from that, the solution offers plenty of additional advantages, including high transmission bandwidth, relatively low cost, and radiation-free operation. However, the authors do not consider the dynamic selection of the available LEDs based on user's movement to provide comprehensive localization services while maintaining appropriate brightness in a multi-user VR environment.

Inertial Sensors
With the assistance of inertial sensors, which are incorporated in most every smart device particularly smartphones, the users' location might be detected relative to a particular start location. Micro-Electro-Mechanical Systems (MEMS) including accelerometers, gyroscopes, pressure, and magnetometer sensors are the most utilized sensors among the inertial sensors. Integrated inertial sensors in smartphones only provide a relative position estimation, with accuracy deteriorating over time. Thus, they should be used in combination with other technologies including GNSS [129], UWB [103], Wi-Fi [130] and Bluetooth [131] to determine the precise location and improve accuracy. The accelerometer's readings may be utilized to calculate distance travelled through step counting. Besides, the gyroscope might be utilized to determine the user's direction or angle of movement. The magnetic field is also measured by the magnetometer sensor. The employed localization technique is dead reckoning, which is referenced to as PDR in the case of pedestrian navigation. Sensor noises and interference problems (particularly indoors) influence accelerometer and magnetometer data, while gyroscope readings have a large drift over just a few seconds to determine the heading [18], [132]. Another typical filtering method for reducing sensor drift rates and estimating current users' position is recommended to be employed in which includes a Kalman or particle filters [133], [134].
It's also important to keep in mind that an increasing number of smartphones include a pressure sensor that may be used to monitor air pressure and so estimate altitude. The sensor may be used to detect the current floor in multi-story structures, which is very valuable [135].

Optical Technology
Anything that uses light or vision to fulfil a certain purpose, whether visible light or infrared light, is referred to as optical technology. Signals in the visible or infrared (IR) spectrum are used in optical technology. This is electromagnetic radiation having wavelengths ranging from 380 nanometers to 10 micrometers [77]. IR signals and visible light, unlike radio signals, cannot pass through walls and other impediments, restricting localization to restricted environments. In general, Optical positioning systems are known for their inexpensive cost (IR infrastructure requires costly maintenance), short lifespan, and ease of installation in the workspace. Additionally, IR systems are harmed by fluorescent light as well as sunlight. IR systems are comprised of IR emitting devices including LEDs and IR sensors (e.g., photodiode). Thus, the target carries an infrared emitting device, that produces a signal with a unique identification; after the sensor senses the IR signal, the target's position is determined.
Regarding the VLC, it is a new unlicensed light-based short-range wireless communication technique. VLC transmitters are light-emitting diodes (LEDs), whereas receivers are photodiodes or digital cameras, depends on the requirements and hardware restrictions. LEDs, on the other hand, maybe utilized as both a transmitter and a receiver in situations where cost is a major factor. In comparison to other light detection sensors, LEDs are sensitive to a small range of wavelengths, are resistant to sunlight interference, and are readily accessible [136].
Authors in [137], [138] employ LED lighting for localization. When LEDs can be used to replace traditional lighting while transferring data to a smartphone since they can flash extremely fast without affecting human vision. Furthermore, most of the localization techniques can be used including fingerprinting, RSS, angulation [139], lateration [140] and so on. However, combined with other technologies have previously been proposed (e.g., light fidelity (Li-Fi) with Wi-Fi [141] VLC with 5G [128] and VLC with IMU [142], [143]) to eliminate certain intrinsic faults of light, such as its low range or potential obscuring.

Combined Technologies
A large variety of strategies are proposed to enhance localization accuracy by combining the beneficial characteristics of existing technologies and overcoming the limitations of a stand-alone technology. That includes the combination of (1) inertial sensors with Wi-Fi, Bluetooth, UWB and/or GNSS technologies [59], [129], [130], [134], UWB with Bluetooth [82] or with Wi-Fi technologies, satellite with cellular technology including LTE and 5G [61] and GNSS with BLE and inertial sensors [129]. Moreover, the cellular can be fused with Wi-Fi [121]. However, using more than one technology in a solution may increase the time and memory complexity and sometimes may or may not be costly.

VI. CHALLENGES AND PERSPECTIVES
For localization systems and to achieve the desired performance, the following challenges are needed to be considered in practice.

A. Multipath effect and obstacles
As it is obvious, the environmental complexity is considerably more than the vast open-air surroundings. For example, when the Wi-Fi signal is broadcast, numerous reflection signals together with the direct signal are also conveyed, as illustrated in Fig. 16. Further, when the Wi-Fi signals arrive at the receiver from different paths, a cross-path effect occurs which is called multi-path issue [144]. Mostly, the multi-path issue effects on the precision of indoor localization technologies due to existing complex indoors structures. Admittedly, most Wi-Fi signal path loss models currently use the Line of Sight (LOS) characteristic to transfer Wi-Fi signals from the transmitter to the receiver. However, in practice, Wi-Fi signals will face obstacles including trees, walls, doors, roofs, windows and other objects during signal transmission [145]. This makes the process of precise signal loss value calculation harder. Whereas some researchers look at signal loss values for different obstacles, as the signal loss value is influenced by the internal physical characteristics and thickness of the obstacles. The indoor localization system, which uses deterministic algorithms, performs significantly worse when obstacles block Wi-Fi signals. Fig. 16 presents the availability of the obstacles makes the signal power to be changed and sometimes make the signal to be reflected, diffracted and scattered. Reflection occurs whenever waves hit an obstacle and their direction is changed. The folding of signal waves around the obstacle's corners is known as diffraction. The diffracting item technically becomes the propagating wave's secondary source. Scattering occurs at interactions involving small-scale structures. When the signal wave exceeds the structure it encounters, it produces consistent amplitude in all directions with no or little reflection back to the transmitter. Thus, the signal may arrive to the target through different paths with different strength values.

B. Device heterogeneity
One of the most important issues in developing localization system is to utilize heterogeneous devices by the end users with different received signal attributes, which might decrease the performance of the localization as illustrated in Fig. 17. Wireless chipsets and sensor-receivers, antennas, hardware drivers, packaging materials, and operating systems are all heterogeneous elements in mobile devices. As a result, signal measurements changes from a device to another device. This heterogeneousness affects the accuracy of the localization solutions and makes the localization process to be limited. [146]

C. Big data
Big data can be defined as a collection of data that might be processed for extracting beneficial information. This is followed by utilizing this information in machine learning applications and other advanced statistical tasks. The collected data may be structured, semi-structured, and unstructured as well. The four V's letter are frequently used to describe big data [147]:  The big volume of data is generated and collected.  The large variety of separate data types that are often maintained in big database systems.  The velocity at which a large amount of data is generated, gathered and analyzed.  Variability of changes in other characteristics of the data. Big data analysis has received much interest in recent years because it can achieve a high value. Furthermore, with the invention of the IoT, each thing/object in a system is connected to all other objects. Because of the abundance of data generated and collected from various things in the IoT context, the significance of big data is expected to be highlighted. With the increased significance, specifically of the indoor environment, where most urban residents spend more than 80% of their time, big data involves users' indoor location coordinates. This is an essential resource for understanding users' indoor behavior patterns (e.g., customers' shopping behavior patterns in a large mall). However, there are some major challenges in the Localization regarding big data and IoT. This includes: (1) Data Management and Storage: The amount of data created by connected localization devices is rapidly rising, yet the storage capacity of most big data platforms is limited. Managing and storing a huge volume of data becomes a critical challenge (e.g., is the data to be stored in a server, distributed systems or cloud?). As a result, developing frameworks or techniques that can gather, store, and manage the massive amounts of data have become critical.
(2) Visualization of Data: Data from connected devices in the localization area are heterogeneous, consisting of structured, unstructured, and semi-structured data in various forms. It's not straightforward to visualize the collected data instantly. Thus, the data must be prepared for improved visualization and interpretation to achieve precise real-time decision-making and location prediction while improving the localization's accuracy.
(3) Privacy and Confidentiality: In localization systems, every IoT-enabled device that generates a large amount of data needs complete data safety and confidentiality. Because it may comprise users' sensitive information by tracking and analyzing the users' positions, the data gathered and stored should be kept private and confidential [148].
(4) Integrity: The engagement devices in the localization environment need to guarantee participants that there will be no data leakage or piracy. Data assembly techniques must work closely with standard systems and instructions in terms of scale and condition of integrity [149].
(5) Applicability in various environments: After the training, testing, and assessment phase, the localization solution must ensure that the system functions properly in different IoT-based environments.

D. Accurate measurements
Localization systems are heavily reliant on a variety of measures, all of which have a significant impact on localization accuracy. The researchers have a significant challenge in accurately reading and interpreting these measurements. These challenges will be comprehensively addressed in the following paragraphs.
In the WSN enabled localization systems, the devices' independent clock is used to record the TOA or TDOA readings. The devices' direct time measurements would be incorrect due to startup or clock drift [150]. The clock skew, on the other hand, is not constant and changes with operating conditions including temperature and voltage supply. Thus, in asynchronous time-based localization networks, the proposed time-related localization techniques are strongly dependent on time synchronization. Because each employed device in the time-based localization system has its own clock, the clock drifts within each participant device might be different. The devices hardware clocks might not be synced, even though they were synchronized once they were first set up [151]. Many localization systems operate inaccurately and inefficiently due to a lack of synchronized time.
As previously stated, in general, RSSI-based techniques provide several advantages in terms of localization. The RSSI based techniques do not necessitate the use of an additional localization hardware device. These kinds of techniques have received a lot of interest due to their high accuracy achieved, relatively inexpensive, and power efficiency. However, they are not without drawbacks. The conducted researches face the RSSI values fluctuation challenge owing to environmental changes and chipset issues in WAPs or BSs. [152] Environmental changes that occur during both the training and matching stages commonly affect the RSS variance issue in Wi-Fi fingerprinting based localization. Several calibration approaches have been devised to solve this type of issue in the literature [153], [154]. However, they all focus on the hardware-caused variation issue. Smartphones, on the other hand, must be assessed due to their widespread usage in fingerprinting-based localization. Environmental changes that occur during both the training and matching stages commonly affect the RSS variance issue in Wi-Fi fingerprinting based localization. Smartphone type, smartphone placement, user orientation, and environmental changes within time all contribute to the RSS variance issue when smartphones are used in fingerprinting localization [155]. The problem gets more significant in a smart city environment, since individuals may own a variety of smart devices and smartphones and carry them in a variety of places, including their pockets, bags, and hands.
Another challenge that researchers might consider is related to the techniques themselves. That belongs to how the technique follows to select the required parameters. For example, selecting an appropriate threshold value to remove outliers in RSSI-based localization is one of the major challenges that should be selected precisely. Another example in trilateration is determining the number of WAPs/BSs that must be deployed on the testbed area.

VII. CONCLUSIONS
Smart infrastructures can leverage the IoT to deliver improved services to users. New technological advancements can help users in their daily lives, easing duties in the health care system, workplace, and recreation sectors. Because of the vast range of services that may be provided by utilizing IoT, indoors/outdoors localization has lately gained popularity. In order to improve the services given to users, many solutions based on different technologies and techniques have been presented in the literature to improve the localization/positioning services. Unfortunately, a modern survey article that includes most of the currently proposed efficient and comprehensive localization solutions is lacking. Thus, thorough explanations are offered in this article to examine state-of-the-art solutions in terms of used methodologies and technologies. This study also provides a set of use case applications based on different localization solutions, specifically with the IoT enabled technologies. Apart from a comparison of current methodologies and technologies, the metrics that are important in positioning solutions are provided including accuracy, precision, cost, scalability, real time, security, and reliability. Consequently, the challenges and perspectives associated with existing solutions are discussed. Finally, authors of this study predict that using location information truly would be increased in industry with growing of using IoT devices anywhere, anytime, and on-the-go.