An improved indoor positioning based on crowd-sensing data fusion and particle filter

Duetothelackofglobalpositioningsystem(GPS)signalsinsomeenclosedareas,indoorlocalizationhasrecentlygainedsignificantimportanceforacademics.However,indoorlocalizationhasanumber ofchallengesanddefects,includingaccuracy,cost,coverage,andeaseofuse.Thispaperexplorestheintegrationbetweentheinertialmeasurementunit(IMU)andWi-Fi-basedreceivedsignalstrength indicator(RSSI)measurements,demonstratingtheircombinedpotentialforrobustindoorlocalization.IMUsexcelatcapturingpreciseshort-termmotiondynamics,offeringinsightsintoanobject’s accelerationandorientation.Conversely,RSSImeasurementsserveasvaluableindicatorsforrelativepositioningwithinindoorenvironments.Byfusingdatafromthesesources,ourapproachcompensates fortheinherentweaknessesofeachsensortype.Toachieveaccurateindoorpositioning,weemploytechniquessuchassensorfusion,Wi-Fifingerprinting,anddeadreckoning.Wi-Fifingerprinting allowsustocreateadatabasethatmapsRSSImeasurementstospecificlocations,whiledeadreckoninghelpsmitigatedriftandinaccuracies.Bycombiningthesemethods,weestimateadevice’s positionwithincreasedprecision.Throughexperimentalevaluation,weassesstheperformanceandefficiencyofourintegratedapproach,comparingtheestimatedpathornewlocationwithapredefined referencepath.Thefindingsemphasiseasignificantimprovementinaccuracy,withtheintegrationofcrowd-sensing,particlefiltering,andmagneticfingerprintingtechniquesresultinginanotableincrease from80.49%to96.32%accuracy.

synchronizing data and information from different sensors and feeding them into an estimation algorithm.Comparisons between the estimated path or new location and a predefined reference path are performed to assess the performance and efficiency of the proposed method.
Designing an indoor localization system with the aforementioned characteristics requires careful consideration and innovative approaches to address the challenges associated with accuracy, flexibility, cost-effectiveness, and usability [5].The proposed method aims to overcome these challenges and demonstrate superior performance and efficiency compared to existing approaches.This paper introduces an enhanced indoor localization system that utilises a particle filter algorithm and incorporates crowd-sensing or multisensor fusion techniques.The aim is to achieve a low-cost system that maintains high accuracy and robustness.The proposed system combines traditional positioning technologies with innovative approaches to overcome limitations and improve performance.
Our proposed system aims to enhance the accuracy of indoor positioning by leveraging a combination of technologies.It integrates inertial navigation, utilising data from an inertial measurement unit (IMU), with a prior training phase and a carefully constructed magnetic map created using fingerprinting techniques.This integration serves to mitigate the inherent drift-related inaccuracies associated with IMUbased systems.Additionally, our system utilises the pedestrian dead reckoning (PDR) method [6], which allows for unrestricted data collection.To determine the user's position accurately, our positioning algorithm takes into account two data sources: the magnetic field and received signal strength (RSS) data from Wi-Fi devices [7,8].These data are compared to a fingerprint map database that has been preestablished.This comprehensive approach offers a robust solution for predicting the user's movements within a defined test area.By combining IMU data, PDR, and magnetic field or RSS data with a fingerprint map, the system minimises positioning errors and provides reliable indoor localization.
The system constructs a magnetic fingerprint database specific to the test area by fusing all available data and feeding it into the particle filter algorithm.The positioning results are promptly transmitted to the server, enabling real-time responsiveness to dynamic changes within the test area.To prove the validation of the proposed method, ultra-wideband (UWB) anchors are utilised to compute the reference trajectory, which closely approximates the actual path of the user equipment (UE).This reference trajectory is computed using the trilateration method and then compared with the predicted trajectory computed by the particle filter, demonstrating the effectiveness of the proposed technique.
The proposed framework offers several significant contributions, which can be summarised as follows: 1.The proposed framework provides a comprehensive exploration and analysis of various techniques, methods, technologies, and algorithms employed in indoor positioning.Through an extensive evaluation and comparison, it offers a profound understanding of the effectiveness and performance of different positioning methods and algorithms.This in-depth analysis serves as a valuable resource for researchers in the field, providing them with valuable insights that can drive innovation and the development of more accurate algorithms to meet the evolving requirements of indoor positioning in the future.
2. The proposed approach introduces a cost-effective mobile mapping and reliable indoor positioning system that combines crowd-sensing data fusion with a particle filter.It utilises fingerprinting to incrementally construct a comprehensive database for the test area, employing an infrastructure-free or PDR method to collect data and determine Wi-Fi device-equipped region's RSS values.For accurate performance evaluation, the positions of deployed UWB devices are leveraged for trilateration-based trajectory computation of the UE, which is then compared to the estimated trajectory using the proposed approach.
3. Finally, this paper employs a particle filter algorithm to enhance indoor localization accuracy through the fusion of data from various sources, including Wi-Fi, RSS, magnetic field measurements, UWB, and smartphone inertial sensors (i.e., IMUs).synchronizing the Wi-Fi access points with particles posed a challenge in achieving high granularity and precise timing.The

61
For ease of understanding, the acronyms used in this paper 62 are listed in Table 1.

63
This paper is organised into the following sections: Sec-64 tion 2 discusses related work.Section 3 covers preliminary 65 concepts, providing a foundation for the subsequent sections.66 Section 4 presents the system and scheme modelling.Sec-67 tion 5 presents and discusses the experimental results.Lastly, 68 Section 6 provides the conclusions.

87
The first technique discussed is the RSSI-based method, 88 which stands out due to its simplicity, affordability, and 89

Technique
Advantages Disadvantages RSSI [9, 10] Simple to do, affordable, and can be used with a number of technologies.
Prone to multipath fading and environmental noise, Fingerprinting may be necessary at lower localization accuracy.

CSI [11]
More resilient to indoor noise and multi-trajectories.On commercially available NICs, it is not always accessible.

AoA [12]
Can provide high localization accuracy, does not require any fingerprinting.
Might require directional antennas and complex hardware, requires comparatively complex algorithms and performance deteriorates with increase in distance between the transmitter and receiver.
ToF [13] Provides high localization accuracy, does not require any fingerprinting.
Require time stamps and multiple antennas at the transmitter and receiver to ensure that the transmitters and receivers are in synchronization with one another.Line of Sight is mandatory for accurate performance.
TDoA [14] Does not need any fingerprinting, does not require clock synchronization among the device and RN.Requires clock synchronization, processing delay can have an impact on short-range measurement performance.

PoA [16]
Can be used in conjunction with RSS, ToA, TDoA to improve the overall localization accuracy.
reduced performance when the line of sight is not present.
Even when there is a slight change in the space, new fingerprints are necessary.
compatibility with diverse technologies.Nonetheless, its directional antennas and complex hardware may be required, and the involved algorithms tend to be relatively intricate.

14
Additionally, the performance of AoA deteriorates as the 15 distance between the transmitter and receiver increases [22].This study incorporates a range of techniques that utilise diverse technological approaches, encompassing radio communication technologies such as IEEE 802.11 (Wi-Fi) [24], UWB [25], radio frequency identification devices (RFID) [26], Bluetooth [27], ultrasound [22], and visible light [28].Moreover, the utilisation of visible light and acoustic-based technologies [29] is also prominent.For a comprehensive comparison between these technologies, Table 3 presents a summary of the merits and drawbacks associated with these technologies, as reported in references [30].This table presents a comparison of various localization technologies based on their maximum range, power consumption, advantages, and disadvantages.Wi-Fi is a widely available technology that offers high accuracy and does not require complex additional hardware.However, it is prone to noise and necessitates complex processing algorithms.UWB technology provides immunity to interference and delivers high accuracy.Nonetheless, it has a shorter range, requires extra hardware on different user devices, and comes with a higher cost.RFID has a wide range and low power consumption.However, its localization accuracy is relatively low.Bluetooth offers high throughput, reception range, and low energy consumption.Yet, it exhibits weak positioning accuracy and is susceptible to noise.Ultrasound technology covers a range of a few tens of meters and has comparatively less absorption.However, its effectiveness heavily relies on sensor placement.Visible Light technology can achieve a range of

Preliminaries
This section introduces the formulation techniques (Subsections 3.1 and 3.2) and outlines the performance evaluation method (Subsection 3.3) for the proposed system.

Spatial fingerprinting technique
The Wi-Fi technology explored in this work are widely employed and straightforward method for indoor positioning [34].In this study, the PDR approach is employed in conjunction with the inertial sensors of the smartphone, including the accelerometer, gyroscope, and magnetometer.
This allows for the collection of real-time data while the user is walking.The collected magnetic readings are compared with the magnetic fingerprint of an offline map.The output of the PDR approach serves as the motion model in the fusion process to determine the user's position, while the magnetic data is utilised in the monitoring model [26,23].
The fingerprint based on the indoor localization system includes two main stages: 1. Offline stage: In this stage, the RSS samples are gathered at predefined locations known as reference points (RPs).Due to the dependence of the indoor localization strategy 36 on the magnetic fingerprint, which is utilised to calibrate 37 the results of the PDR approach, Wi-Fi fingerprinting is 38 typically conducted in two phases: 1.The offline phase (survey): In this phase, the vector of 40   of all detected Wi-Fi signals from  number 41 of access points   , ∀ = {1, ⋯ , }, at multiple 42 reference points of recognized positions are collected 43 during a site assessment.Hence, the fingerprint of 44 each RP is used to represent it [35,36].The finger-45 prints of the site are formed by aggregating all the 46 RSS vectors, which are then stored in a database for 47 subsequent online queries.samples or measures an RSS vector, the server com-50 pares it with the stored fingerprints using a similarity 51 metric in the signal space, such as the Euclidean 52 distance.This allows the server to identify the "neigh-53 bouring" fingerprints that are most similar to the re-54 ceived RSS vector [37].The target position is then 55 calculated based on these neighbouring fingerprints, 56

PDR-based site surveying technique
The PDR technique is a highly effective approach for in-  magnetic field, as discerned by the magnetometer within the 57 IMU sensors.Notably, this magnetic field data demonstrates 58 a remarkable level of measurement stability that persists over 59 time, thereby establishing it as a viable and apt choice for 60 facilitating assisted localization endeavours.
where    demonstrates the RSS from the     and    1 signify the space from the     during the step .The 2 parameter  0 is the RSS at a reference distance  0 , which 3 is typically one meter [33].Typically,  0 is considered 4 equivalent to the power transmitted from the UWB device.

5
The trajectory loss exponent is represented by  and its value 6 is considered to range from 1.5 to 7.2 for a complex indoor 7 environment.So, by utilising (1), the distance    can be 8 defined as:

9
= 10 In the Cartesian coordinates, it can be expressed as where    2. Signal measurement: Employing devices equipped with Wi-Fi receivers, such as smartphones, to measure the RSS from nearby  at predefined locations.
3. Data recording: Recording the measured signal characteristics alongside the corresponding location details to establish the reference fingerprint dataset.

Stage 2: Location estimation
Upon the collection of reference fingerprints, the process of localizing a target device goes through the following typical steps: 1. Signal sampling: The target device, often a smartphone, continually scans and samples the Wi-Fi signals in its vicinity.

Signal matching:
The sampled Wi-Fi signal characteristics are compared to the reference fingerprints stored within the dataset, with the objective of identifying the closest match based on signal similarity.

Location estimation:
Upon discovering a match, the associated location information linked to the reference fingerprint is designated as the estimated location of the target device.

System modelling
The system comprises two primary components, Wi-Fi devices and smartphone inertial sensors integrated within the UE.For testing, ultra-wideband devices are employed to calculate the reference or actual trajectory of the UE within the designated test area.Each device has a specific role defined as follows.
1. Wi-Fi devices: These devices, as part of the system, play a significant role in facilitating wireless connectivity and data exchange.They utilise Wi-Fi technology to establish communication within the system and contribute to the localization process.These devices provide additional information such as signal strength and connectivity patterns, which are utilised for positioning and tracking purposes in conjunction with other devices.
2. Smartphone inertial sensors: Smartphones are equipped with various sensors, such as the accelerometer, magnetometer, and gyroscope, that can measure different physical quantities related to the smartphone's movement and orientation.The measurements of these sensors are used as input to the PDR technique to estimate the user's position and track their movement.3. Pozyx ultra-wideband devices: In the system, the UWB devices, also referred to as anchors and rover devices operate in conjunction with a network of devices placed at fixed and predetermined locations.The tag, connected to the smartphone's inertial sensors, captures UWB measurements and timestamps throughout the designated experimental area.Trilateration is employed to calculate the distances between

Particle filter fusion algorithm
Fig. 5 depicts the flowchart of the proposed system, which highlights the process of matching various data derived from crowdsensing through the PDR approach.These data are subsequently fed into the particle filter algorithm to predict the new location and generate a path.The generated path is then compared with the reference trajectory obtained from UWB anchors.Furthermore, the system leverages Wi-Fi devices positioned at strategic locations within the test area to construct a magnetic map.This map is pre-drawn and computed to capture acceleration data using a set of  access points.The magnetic map serves as a fingerprinting database, enabling synchronization to identify the access point with the highest RSS within the test area.This data is then utilised to update the particle filter and enhance the accuracy of localization.By comparing the particle filter's trajectory with the reference path, the closest match is determined for evaluation.Additionally, the mutual information method is employed to facilitate a comprehensive comparison and assessment of the results.

The positioning algorithm
The particle filter (PF) plays a crucial role in the proposed system as it serves as a probabilistic estimator capable of handling non-Gaussian and nonlinear processes.This estimation technique relies on random samples, known as particles, to recursively approximate the target distribution.In order to gain a deeper understanding of the PF's operation 5 within the proposed system, it is important to discuss its key where  , is the weight factor.After sampling x, the equation of prediction can be expressed as 3. Update step: In this step, the algorithm evaluates the likelihood or probability of the RSS measurements given the predicted state of the system.Then, we undertake the computation of likelihood values, while taking into account the inherent noise and uncertainties, to establish a quantitative assessment of the degree of concordance between estimated and actual measurements.To refine the accuracy of our particle filter fusion algorithm, we then proceed to update the weights of the individual particles based on their respective likelihood values, assigning higher weights to those particles that exhibit measurements in closer proximity to the actual sensor measurements.In situations where the probability is primarily concentrated on a limited set of state values, the weights associated with these values can diminish significantly, leading to extremely low probabilities.To mitigate this challenge, we employ a resampling procedure aimed at substituting a particle with a substantial weight, which has a higher likelihood of being selected multiple times, while a particle with a low weight is unlikely to be chosen at all.The resultant equations governing the update step can be expressed as

Particle resample step:
The degeneracy problem, which occurs when only a few particles have a high weight while the rest have very low weights, can be solved by using the resampling step.This problem can be identified using an effective sample size estimate from the following equation:

RSS-based reference trajectory estimation algorithm
This algorithm employs the received data to predict the user's current position and generates a reference trajectory

Experimental Results and Discussion
This section presents the experimental findings of the proposed scheme.In this experiment, the Pozyx UWB devices are positioned within the test area to establish a reference trajectory through the utilisation of the trilateration method.This reference path serves as a basis for comparison with the 40 predicted trajectory generated using the particle filter and 41 mutual information method.In this experiment, a total of 42 11 UWBs are employed.Subsequently, the user proceeds to 43 carefully traverse back and forth in the corridor adjacent to 44 the CIRGEO lab.This movement generates three distinct 45 tracks: one in the centre of the hallway, another adjacent 46 to the wall, and a third in close proximity to the windows.47 The sampling rate of the IMU in LG Android smartphones 48 can range from 100  to 200 .The IMU features inte-49 grated within the smartphone are leveraged to momentarily 50 pause at the conclusion of each run before recommencing, 51 allowing for the collection of data using the PDR method.52 Measurements of the magnetic field from Wi-Fi RSS are also 53 obtained, enabling the creation of a magnetic map using fin-54 gerprinting techniques.Subsequently, a magnetic database 55 is constructed specifically tailored to the test region.

56
The acquired data, encompassing the UWB, IMU, and 57 magnetic field measurements, are then synchronized, fused, 58 and conveyed to the particle filter.This filtering mechanism 59 facilitates the prediction of the new position and draws a tra-60 jectory that closely aligns with the reference path, enabling 61 subsequent comparison and evaluation.Table 4 lists the 62 localization algorithm implemented in the proposed system, 63 outlining the complete sequence of operations involving the 64 particle filter and crowd-sensing on the designated test area.65 Fig. 6 illustrates the reference trajectory computed using 66 the trilateration method with UWB anchors (    , ∀ = 67 {1, ⋯ , 11}).The green solid line represents the reference 68

J o u r n a l P r e -p r o o f
Journal Pre-proof

Table 4
Positioning Algorithm based on the particle filter.
Step 1 : Utilising Pozyx UWB anchors and IMU to collect data by PDR method.
Step 2 : Utilising Matlab to preprocess data and then load the processed data.
Step 3 : Representing the phase one (3 tracks) and the 2D trajectory predicted by UWB.
Step 4 : Displaying points of the initial to the third path in stage one (which is split into 6 sub-paths).
Step 5 : Defining Wi-Fi measurements and displaying the RSS vs. time relationship.
Step 7 : Creating the fingerprinting database for the test of area.
Step 8.1 : State representation or initialisation using (5) Step 8.2 : Applying the Prediction step using (8) Step 8.3 : Applying the Update step: using (10) Step 8.4 : Applying the Particle Resample step using (11) Step 9 : Particle filter loop to compute the predicted location and drawing trajectory.
Step 10 : Utilising the mutual information and reference trajectory for matching and comparing with the particle filter's predicted trajectory.
The resampling process effectively addresses the degeneracy problem, wherein only a few particles possess significant weights while the majority of particles have exceedingly small weights.During resampling, particles with substantial weights are selected multiple times, while those with low weights are unlikely to be chosen.In the context of our experiment, the resampling process exhibits two distinct behaviours contingent upon the particle's weight, as presented in the third column of Fig. 8 and Fig. 9. Specifically, when the weight exceeds or equals the threshold of -70, the particle is deemed eligible for consideration in our experimental analysis.Conversely, particles failing to meet this weight criterion are excluded from further consideration.
Following the completion of all the operations and steps described earlier, the particle filter can predict and estimate the magnetic path by fusing all the data obtained from crowd-sensing, as illustrated in Fig. 10.Table 5 summarises the performance metrics of different methods.These methods are evaluated in terms of enhanced accuracy and average error.The first method corresponds to the IMU and PDR approach without a magnetic fingerprinting database, achieving an enhanced accuracy of 80.49% with an average error of 0.3.In contrast, the second method presents results for the IMU and PDR approach when incorporating a magnetic fingerprinting database, showing an enhanced accuracy of 85.86% and an average error of 0.32.Finally, the proposed method employs a particle filter with 1000 particles and a magnetic fingerprinting database.This method demonstrates a significantly improved enhanced accuracy of

Table 5
Comparison between the root mean square error (RMSE) values for the trajectory states obtained using the IMU, PDR, and particle filter and magnetic fingerprinting with reference trajectory using UWB. it does come at the expense of a slightly higher average 8 error.The choice of which approach is "best" depends on the 9 specific trade-off between accuracy and average error that 10 aligns with the application's objectives and requirements.11

Conclusions
This paper provides an overview of indoor positioning technologies, methodologies, strategies, and contemporary applications.Additionally, the paper presents a lowcost, reliable, and highly accurate indoor localization system based on crowdsensing, particle filter, and the test region's infrastructure.Furthermore, the system relies on the RSS signals from Wi-Fi devices equipped in the test area, and the signals from access points are synchronized to build a magnetic fingerprinting database used for acceleration.This approach overcomes the limitations of traditional magnetic

J
o u r n a l P r e -p r o o f Journal Pre-proof Physical Communications

69 2 .
Related Works70This paper specifically examines the utilisation of Wi-71 Fi technology based on the RSS fingerprinting technique 72 for indoor positioning.In this context, it is essential to 73 acquire a comprehensive understanding of the diverse range 74 of techniques and technologies currently employed in indoor 75 positioning.Furthermore, it is crucial to assess the merits, 76 drawbacks, and key characteristics associated with each 77 technique and technology in order to obtain a comprehension 78 of indoor positioning.Generally, indoor positioning methods 79 incorporate a variety of localization resources, including the 80 received signal strength indicator (RSSI) [9, 10], angle of 81 arrival (AOA)[11], channel state information (CSI)[12], 82 fingerprinting/scene analysis, time of flight (ToF)[13], time 83 difference of arrival (TDoA)[14], return time of flight 84 (RToF)[15], and phase of arrival (PoA)[16].

1 susceptibility to multipath fading and environmental noise 2 poses a challengeanteed in commercially available network interface cards 9 (
to its accuracy.In certain scenarios, the 3 utilisation of fingerprinting becomes necessary to achieve 4 higher localization accuracy[20].The second technique 5 examined is the CSI-based method, which exhibits greater 6 resilience to indoor noise and multi-trajectories compared to 7 RSSI.However, the accessibility of CSI is not always guar-8 NICs)[21].Next, the AoA-based technique is explored, 10 which offers a high level of localization accuracy without the 11 need for fingerprinting.Nevertheless, the implementation of 12

J
o u r n a l P r e -p r o o f Journal Pre-proof Physical Communications

2 .Figure 1 :
Figure 1: An overview of fundamental system flow for indoor localization through fingerprinting.

48 2 .
The online phase (query): When the user (or object) 49

J o u r
n a l P r e -p r o o f Journal Pre-proof Physical Communications taking into consideration their similarities to the measured RSS vector.Finally, pure Wi-Fi-based indoor positioning may introduce considerable errors, which can be mitigated by incorporating IMU data and employing position estimation techniques such as particle filtering.To achieve highly accurate indoor localization using RSS estimates, certain principles and guidelines need to be followed.For instance, the reference points should be easily identifiable with at least one access point and strategically positioned throughout the area of interest to ensure accurate and reliable data collection during user movement.Additionally, generating an offline magnetic field fingerprint map and performing online positioning involve comparing the observed magnetic field with the fingerprints stored in the database [38].These measures contribute to enhancing the precision and correctness of Wi-Fi-based indoor localization systems.The proposed method focuses on the generation of an RSSI chart for the specified test area, serving as a viable alternative to the extraction of personalized fingerprints for each user.
door positioning, involving three main stages: (I) step detection, (II) step length estimation, and (III) walking direction determination, as depicted in Fig. 2. Fig. 2(a) illustrates the 2D coordinates associated with each step undertaken during the process of data collection, whereas Fig. 2(b) depicts the distinction between the path-based and point-based methodologies employed in data collection.In the path-based approach, data is collected systematically along predefined paths or trajectories within the environment.These paths can be specific routes or walkways.On the other hand, the pointbased approach involves the collection of data at discrete, strategically selected locations within the environment, with the selection of these points often guided by the attributes or parameters being measured.The proposed algorithm employs the path-based methodology for site surveying, primarily chosen for its exceptional accuracy and reliability.The PDR technique offers advantages such as simplifying the path loss model and improving reliability, particularly in large areas.Unlike fingerprinting, which requires a lengthy training process, the PDR approach leverages measurements from integrated IMU sensors in a smartphone, including magnetometers, accelerometers, gyroscopes, and barometers.These sensors enable the measurement of direction, acceleration, rotational velocity, and altitude.If the initial location is known, the device can be tracked using dead reckoning.The accelerometer is utilised for step counting and estimating step length, while the accelerometer, magnetometer, and gyroscope are utilised to measure the differences between two consecutive steps[39, 40].It is important to highlight that magnetic field data, despite its inherent noise when employed for localization, presents significant advantages for positioning due to its capacity to detect even minor alterations in the three-dimensional behaviour of the 2D coordinates representation for each step.Path-based: Collect data along paths Point-based: Collect data at points (b) The two types for the data collection approach.

Figure 2 :
Figure 2: Location estimation and data gathering with UWB and IMU by PDR approach.

Figure 3 :
Figure 3: Position computation utilising trilateration method based on RSS measurements.

15 4 .
System and scheme modelling 16This section introduces the system model and provides a 17 comprehensive discussion of the proposed scheme.

19
For a clear understanding of the proposed approach, it 20 consists of two stages: collecting reference fingerprints and 21 performing location estimation.

22 4. 1 . 1 . 28 1.
Stage 1: Collection of reference fingerprints 23 Reference fingerprints constitute a dataset of Wi-Fi sig-24 nal characteristics gathered from different locations within 25 the test area, serving as reference points for subsequent local-26 ization.This collection process encompasses the following 27 steps: Placement of access points: Strategically positioning Wi-Fi access points across the test area to ensure sufficient coverage.

J o u rFigure 4 :
Figure 4: The proposed method architecture and the evaluation method.theUE and anchors, yielding a near-actual trajectory

6Fig. 4 ,
Fig. 4, that introduces an enhanced indoor positioning so-8 lution characterised by improved reliability, cost-efficiency, 9 and accuracy.The proposed system leverages the particle 10 filter algorithm and integrates data obtained from various 11 sensors or crowd-sensing techniques.The data collection 12 process occurs within the designated test area, as previously 13 mentioned.The system involves the meticulous scanning of 14 the test area by the user.The IMU features embedded in the 15 user's smartphone are utilised to enable positioning using the 16 PDR method.Additionally, measurements of the magnetic 17 field obtained from Wi-Fi RSS are captured to construct a 18 magnetic map employing fingerprinting techniques.Conse-19 quently, a magnetic database specific to the test region is de-20 veloped.The collected data from the aforementioned sources 21 are synchronized, fused, and subsequently transmitted to 22 the particle filter algorithm.In this context, we discuss in 23 detail the particle filter fusion algorithm and the positioning 24 method used in the proposed scheme.

JFigure 5 :
Figure 5: The flowchart of the proposed system and the evaluation process.The PF offers several advantages, including the ability to 1 estimate full probability density functions (PDFs), efficiency 2 in concentrating particles in high probability regions, and the 3 capability to handle non-linear state and observation models. 4

J 2 𝜎 2 𝑟 ( 14 )
o u r n a l P r e -p r o o f Journal Pre-proof Physical Communications that closely aligns with the UE's actual path for further comparative analysis.UWB devices are strategically deployed within the test area to establish a reference trajectory through the implementation of the trilateration method.Subsequently, this reference path serves as a basis for comparison with the anticipated trajectory generated by employing the particle filter algorithm in conjunction with the mutual information method.The dynamic model for computing the reference trajectory can be presented as: [ x( + Δ) ŷ( + Δ) where [ x(), ŷ()]  and [ x( + Δ), ŷ( + Δ)]  are the 2D positions at times  and  + Δ, respectively, [ v (), v ()]  are the two dimension velocity at time , [ ê (), ê ()]  are the difference variable at time , and Δ is the time interval between two sequential UWB transceiver devices.The optimisation equation for obtaining the reference trajectory of UWB devices in the trilateration problem, assuming a fixed altitude of the device in the z direction, can be expressed as [ x() ŷ()] = arg min   ,  ∑  ∑  ( d () −   () 2 ) d () = √ (   −  ℎ, ) 2 + (   −  ℎ, ) 2 (15) where [ x() ŷ()] represents the calculated coordinates corresponding to the     time sample,   () denotes the measurement obtained from the  ℎ anchor at the     time sample,   represents the uncertainty associated with UWB measurements (assuming a zero-mean Gaussian distribution for simplicity), and [ ℎ,  ℎ, ] denote the location of the  ℎ anchor.
Firstly, the experiment is conducted in a pair of corridors on the second level of a building at the University of Padua in Italy.One corridor measures approximately 40 meters in length, while the other corridor is approximately 12 meters long.The experiment area is equipped with 11 Pozyx ultra-wideband devices and eighteen Wi-Fi devices (i.e.,  = 18 access points) positioned on the tops of the two corridors.The map of the corridors is illustrated in Fig. 6.

Figure 6 :
Figure 6: The map of the test area and the reference trajectory using UWBs.

1 11
UWB devices, each accompanied by a number (    ) 2 indicating the UWB anchor.

35. 1 .
Fig.7presents a comprehensive overview of the data col-

25 5. 2 .
The particle filter process26    The inclusion of the particle filter in the proposed 27 method enhances the accuracy and effectiveness of pre-28 dicting the position and trajectory within the trial region.29This improvement is achieved by leveraging data obtained 30 through the PDR approach and IMU, along with continual 31 updates from the magnetic fingerprint database.Subse-32 quently, the computed trajectory is compared to the refer-33 ence trajectory with a high probability of matching.This 34 process involves utilising particles and connecting them to 35 the synchronized 18 access points.These access points are 36 synchronized with the central server.Fig. 8 and 9 provide 37 visual representations of the RSS estimates, the distribution of particles, and the resampling step of the particle filter, specifically for the best 13 out of the 18 access points.

J
o u r n a l P r e -p r o o f of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (a) RSS of  1 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (b) RSS of  2 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (c) RSS of  3 vs.time () .The -particles distribution.The particle filter resampling.Diffusion of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (d) RSS of  4 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (e) RSS of  5 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the initialization process IN PHASE 1 press any button to continue of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (f) RSS of  6 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (g) RSS of  7 vs. time () .The -particles distribution.The particle filter resampling.

Figure 8 :
Figure 8: The particle filter process linked with the synchronized access points for each   , ∀ = 1 → 7.

J o u r
n a l P r e -p r o o f of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (a) RSS of  8 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (b) RSS of  9 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (c) RSS of  10 vs. time () .The -particles distribution.The particle filter resampling.Diffusion of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (d) RSS of  11 vs. time () .The -particles distribution.The particle filter resampling. of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (e) RSS of  12 vs.time () .The -particles distribution.The particle filter resampling.
of a number of particles into the test area or the initialization process IN PHASE of a number of particles into the test area or the Resampling process process plotted with different colors depending on the weight of particles press any button to continue weight < -70 -70 <= weight < -60 -60 <= weight < -50 weight >= -50 (f) RSS of  13 vs. time () .The -particles distribution.The particle filter resampling.

Figure 9 :
Figure 9: The particle filter process linked with the synchronized access points for each   , ∀ = 8 → 13.
field-based localization techniques, which are heavy in terms of comparison workload and insufficient in analysing magnetic field signals that do not change easily over time.The system also employs continuous updating of the particle filter with data collected by the IMU, using the PDR method to obtain motion data such as acceleration, stride size, and direction to estimate the predicted trajectory.Finally, the wireless technologies.Sensors, (2020

Table 1
List of Acronyms.
findings presented in this paper demonstrate the re-56 markable capability of the proposed system to sig-57 nificantly improve performance.The results indicate 58 an enhancement from 80.49% to 96.32% accuracy 59 by integrating crowd-sensing, particle filtering, and 60 magnetic fingerprinting techniques.
Table 2 pro-85 vides a brief overview of the advantages and disadvantages 86 of these localization techniques [18, 19].
[31,32,33]onditions.Acoustics technology operates within a range of a few meters and can provide high accuracy for proprietary applications.However, it is affected by sound pollution and necessitates extra anchor points or hardware.These localization technologies offer a range of capabilities and trade-offs, making them suitable for different use cases depending on the specific requirements and constraints of the application[31,32,33].