DETECTING MULTIPATH EFFECTS ON SMARTPHONE GNSS MEASUREMENTS USING CMCD AND ELEVATION-DEPENDENT SNR SELECTION TECHNIQUE

: Regarding increasing smartphone receivers' usage in science and industry, they must improve their positioning algorithms to increase positioning accuracy and location-based software's productivity. For this goal, various studies have been presented to remove or adjust the errors in the GNSS signal received by smartphones. Nevertheless, so far, no study has been conducted to investigate the effect of the multipath effect on smartphone observations. Various algorithms have been performed to study the effect of multipath, from detecting and removing this effect by correcting errors in the signal processing step to weighting the measurements to reduce the effect of multipath on the observations in the positioning step. In this article, an attempt has been made to compare the results of two different algorithms, CMCD and Selection Signal, based on SNR elevation-dependent in detecting the effect of multipath on smartphones to check their performance for detecting measurements contaminated with multipath.


INTRODUCTION
Smartphone receivers' positioning accuracy should be improved to meet the requirements of future applications in science and industry.In urban environments, considering the weaker antennas of smartphones, compared to geodetic receivers using L5 waves in GPS and E5 in Galileo, which are more resistant to multipath errors, is very appropriate (Aggrey, Bisnath, et al. 2020).Furthermore, the second frequency in this receiver can help create an ionosphere-free equation and reduce this effect.However, not all smartphones can track observations in two frequency bands.In single-frequency smartphone receivers, only two solutions exist to increase the accuracy: the Single Difference positioning (between a receiver and two satellites considering a reference satellite) or using mathematical models to reduce measurement errors and biases (Dabove et al., 2020).As mentioned in (Zangenehnejad and Gao, 2021), there has been no research on detecting the multipath effect on GNSS signals and its impact on the smartphone's GNSS chipset positioning so far.Therefore, this paper studies this effect on GNSS signals and the accuracy of Pixel4 smartphone GNSS chipset positioning.The monitoring criteria investigated in this research are CMCD (Carrier Minus Code Delta range), which does not have to estimate integer phase ambiguity (Beitler, Tollkühn, et al., 2015), and Selecting NLOS signals based on elevationdependent SNR.The CMCD criterion can estimate the multipath error by using observations of code rate and phase rate without jumps in the time epochs that do not have any cycle slips in tracking phase measurement (Pirsiavash et al., 2018).
Multipath error in urban conditions is mainly caused by nonline-of-sight (NLOS) satellite signal reception due to the low or high elevation angle and signal blockage by an obstacle leading to receiving a combined direct and reflected signal.In this situation, the signal strength is reduced due to multiple reflections and the signal-to-noise ratio (SNR), which indicates the quality of the signal, affecting the positioning accuracy (Uaratanawong, Satirapod et al. 2021).So we decided to evaluate the performance of signal selection method based on SNR measurement and used it to reduce multipath error.NLOS signals received through reflections from tall buildings can lead to more than one-kilometer errors, even when geodetic receivers are used in positioning (Groves 2013).In this article, an attempt has been made to compare the acceptable values for the multipath errors on the satellite signals received in each epoch using the CMCD index and the acceptable SNR values after applying a threshold based on the elevation angle on the measured SNRs in each epoch of measurements.The possibility of using SNR values as an indicator for NLOS signal detection in smartphones is also investigated (Uaratanawong et al., 2021).In this paper, we start by introducing two indicators for detecting the multipath effect on GNSS measurements, i.e., signal selection based on elevation-dependent SNR and CMCD, then the performance of each of these two algorithms on Pixel4 smartphone measurements is reviewed.Finally, the performance of these two indicators in detecting signals affected by multipath error has been investigated, and the similarity of these two criteria in detecting signals contaminated by multipath has been compared.

RELATED WORK
Due to the increasing use of the receivers of these devices in science and industry, the need to improve algorithms is felt to increase their positioning accuracy; this will increase the productivity of smartphone-based location software.Different researches have been done in the field of increasing the accuracy of positioning by smartphones.However, none of them mentioned the importance of multipath effect on smartphone observations in kinematic conditions.According to (Dabove et al., 2020), the only method to increase the accuracy of positioning with a single-frequency smartphone is to use positioning error modeling.Nevertheless, since multipath error depends on the surrounding of the receiver and its modeling is impossible, we need to use some methods to remove or reduce the effect of this error on positioning by these types of receivers (Pirsiavash et al., 2018).In monitoring and studying GNSS measurements in the raw observation stage, in addition to code and phase measurements, the signal-to-noise ratio is also used to check the quality of the measurements, which helps to check the multipath effect.These methods are based on two general approaches: 1) Using the random model of measurements based on the weighting : In this method, weighting models are used as a criterion to reduce the effect of errors.The well-known quality control criteria used in this method are based on the elevation angles of the satellites and the signal-to-noise ratio of the measurements, which are respectively known as SIGMA  − and SIGMA −models (Groves and Jiang, 2013, Wieser et al.,   2005, Luo, 2013, Kuusniemi, 2005, Hartinger and Brunner,  1999).
2) Calculation of multipath error and correction from measurements: The monitoring criteria in this method are generally based on a combination of noisy but unambiguous code observation and accurate but ambiguous phase observation.The most famous of these measures is observing the phase minus code (CMC), which is used to detect and measure multipath code errors (Hilla and Cline, 2004, Misra and Enge, 2006, Braasch, 1994).In addition, this criterion can be used to remove multipath.An important issue in this method is determining the integer phase ambiguity (Caamano et al., 2020).In (Beitler et al., 2015, Caamano et al., 2020), code and phase observation rate difference (Code Minus Carrier phase) has been introduced to overcome this problem.

FUNDAMENTALS
If signal differs from multipath, it sometimes reduces the signal strength.This effect can make a large positioning error.Multipath is an error source caused by refraction and reflection of GNSS signals at the end of signal path.It depends on the surrounding of the receiver and the relative motion between receiver and satellite.In addition, a combined or differential equation cannot remove the effect of this error.So even if other sources of error are removed, the multipath error can significantly affect positioning error.Since it is impossible to use additional tools such as choke rings in the mobile phone receiver, this research tries to use methods to deal with this effect in the signal processing stage.

Multipath in urban scenario
Geodetic receivers have the possibility of choosing a righthanded polarized signal.But smartphone receivers do not have the possibility of distinguishing line of sight from none line of sight observations due to the linearity of their receiver antennas.For this reason, the receivers' signals are strongly affected by the multipath effect.In dense urban scenarios, There are three types of multipath.First, any signal cannot receive by the receiver.This situation degrades satellite geometry and sometimes makes positioning impossible.The second type occurs when the receiver receives a signal by reflected or refraction path, and the direct signal is blocked.This type of signal that receiver can track is called NLOS.Third when both LOS and NLOS signals are received.In this situation, errors can have positive and negative directions (Kubo, Kobayashi et al. 2020).All types of Multipath that can happen in the urban scenario have been shown in figure1.

Selecting NLOS signals based on elevation-dependent SNR
One of the most used methods is to select the signal based on the SNR measurement to avoid getting involved with the complexities of processing and using additional data (Uaratanawong et al., 2021).SNR values are affected by the elevation angle of the satellite.Since, in low-elevation satellites, the probability of encountering obstacles and blocking the satellite signal is higher, the measured SNR can be used to determine and remove multipath and NLOS to provide more accuracy in the positioning solution.
There are many effective techniques for multipath reduction based on signal filtering (Dammalage et al., 2010, Hsu et al., 2015, Iwase et al., 2013, Uaratanawong et al., 2021).Separating direct and non-line of sight signals based on SNR measurements is one of the most widely used methods to reduce the multipath effect .
Elevation of satellites can affect SNR strength, and low elevation causes a decrease in signal strength due to obstructing obstacles and reflection from the surface of these obstacles to the receiver.For this reason, a conventional method for removing NLOS and multipath is to use SNR at each elevation angle as a mask to exclude NLOS and Multipath contaminated signals (Uaratanawong et al., 2021).
A basic method to remove multipath from the positioning process is to remove satellites with low elevation angles and low SNR.A low SNR always originates from a low elevation, and a high probability causes multipath signal contamination.Furthermore, By using a cut of angle between 0 and 20 degrees or mask SNR between 10 and 20 dB-Hz, Multipath error can be reduced (Kubo et al., 2020).
To find NLOS or multi-path contaminated signals based on elevation-dependent SNR method, the average SNR values for each 5 degrees bin of elevation angles were calculated.Then, signals with SNR lower than the threshold defined based on GDOP and residual positioning results were considered NLOS or a multipath contaminated observation.
Signal selection methods reduce the multipath error with a significant improvement in positioning accuracy.Multipath is usually caused by NLOS satellites with high elevation angles in realistic complex environmental conditions due to collisions with tall buildings, so one of the methods of interest in signal classification is based on signal strength characteristics (Kubo, Kobayashi et al. 2020).

Code Minus Carrier-Phase Delta-range (CMCD)
Multipath is one of the errors that cannot be dealt with using existing models.Therefore, it is necessary to use methods to remove or decrease the effect of this error from observations.Unfortunately, detection of this effect by the usual CMC (Code Minus Carrier phase) method requires phase ambiguity estimation.So in this research, CMCD method is selected, which does not need to solve the ambiguity of the phase observation.This criterion uses the time difference of two code and phase observations (both in meter units) to investigate the multipath effect.Thus, there is no need to solve the phase ambiguity for the observations continuously sampled and without cycle slip.CMCD is obtained by Equation1 (Beitler, Tollkühn et al. 2015, Pirsiavash, Broumandan et al. 2018, Caamano, Crespillo et al. 2020). is observation noise.
ionosphere changes in the observation sampling rate (1 second) are practically equal to 0 (Beitler et al., 2015, Pirsiavash et al., 2018).Therefore, if the observations are continuous and without any cycle slip, the CMCD value will equal multipath changes.
In a continuous tracking time window, the CMCD index estimates value of multipath rate and measurement noise in the desired time interval according to Equation 3. By Applying ionosphere rate, noise parameter is an unknown that is still impossible to estimate.Therefore, a threshold is needed to separate the multipath value from observation noise (Beitler et al., 2015, Pirsiavash et al., 2018). (3) Applying ionosphere rate makes noise parameter to an unknown that is still not estimated.Therefore Equation 3 needs a threshold to separate the multipath value from observation noise (Beitler et al., 2015, Pirsiavash et al., 2018).
For this purpose, according to (Caamano et al., 2020), the estimated CMCD values for satellites are categorized based on their elevation angles, and their standard deviation is calculated using Equation 4 in each elevation bin: 2 ( ) Where q CMCD  is standard deviation of the CMCD measurements in the elevation bin q, i CMCD is CMCD value for i-th satellite, CMCD is average of the CMCDs in the selected height bin, and N is the number of samples in the desired height category .
If Equation 5 holds, the value of CMCD is accepted as the multi-path rate at that time epoch Where in this equation is an experimental coefficient and chosen based on environmental conditions and measurement (Beitler et al., 2015, Pirsiavash et al., 2018).In Studying the multipath effect on code observations, it is vital to determine the value of this effect in each measurement epoch.Therefore, with using Equation 6, the value of CMCD can be removed from the code observation rate and used corrected code rate to calculate the corrected pseudo-distance using Equation 7. Finally, if the calculated code differs from the observed code, the signal has been contaminated with multipath by comparing the measured and calculated pseudo range in each epoch.In data collecting process with the Pixel4 smartphone GNSS chipset, the mobile phone was placed on the car's dashboard, and the geodetic antenna that used for data validation was located on the car's roof (Kaggel 2020).In San Francisco Bay area roads, even under normal conditions, traffic is very non-linear and spreads rapidly from traffic bottlenecks to all road arteries.Therefore, considering the traffic situation and urban density in this area, it is expected that a mobile GNSS receiver will have problems for receiving GNSS signals due to numerous obstacles.These problems are mainly definite in receiving the signal due to the presence of obstacles, high multipath error due to refraction or reflection of the signal in this environment, and high noise due to the presence of many influencing factors such as the sea level, telecommunications masts, and interference of different signals.
To check the performance of these two introduced indices for specific epochs when the receiver was surrounded by a large number of trees around the receiver, the multipath detection Equations using introduced factors were applied to the measurements, and the observations obtained from each measurement were compared.
Figure 3 shows all types of road network configurations in the San Francisco Bay area; this figure can compare traffic on roads.
To check the performance of two introduced indices in the epoch, when the receiver was surrounded by a large number of trees around the receiver's position, the multipath detection Equations using introduced factors were applied to the measurements, and the observations were obtained from each measurement were compared.

Result
To check the CMCD performance on smartphone code measurements, equations from 1 to 7 were used, and considered k=1 in equation5 as an acceptable threshold according to the observations residuals.Figures 4 to 7 show the results of multi-path detection applying CMCD to various GNSS data obtained by the smartphone receiver.In these figures, if the signal have a CMCD value that is bigger or smaller than the threshold (red line) will be accepted as a multipath signal.The rate of code and phase difference values related to consecutive time epochs with a 1second interval for 20 minutes of measuring with the smartphone was taken into account and applying the threshold according to the residual code values were applied.In above results, the red lines represent the defined threshold, and the coloured dots represent the estimated values for CMCD.These images are marked based on the elevation angle of each satellite.
For studying the selection of NLOS signals based on the elevation-dependent SNR performance on our data, the average SNR values were calculated in 5-degree elevation bins, and all the satellites with SNR values lower than SNR-10 for each bin were considered as multipath or NLOS.
In figures 8 and 9, results of SNR classification of satellite signals into elevation bins 35° to 40° and 70° to 75° and the average SNR of these categories can be viewed.If the SNR of each signal is less than the defined threshold (red line) in each bin, this signal is detected as a multipath contaminated signal.That is important to note there are observations among the measurements not included in the CMCD determination due to the absence of both code and phase observations in the measurement epoch, but still present in signal selection based on SNR (as a method for pre-processing measurements).If observations can pass signal selection step, they can join to CMCD test step.Also, the use of signal selection based on the elevationdependent SNR, can help the receiver to recognize none line of sight signals.In this case, the CMCD confidence interval is more limited, and if it predicts the occurrence of multipath incorrectly and signal is not identified as a contaminated observation in the signal selection process based on SNR, it will be removed from the investigations as a mistake.However, in general it is impossible to accept the use of signal selection method as an alternative method for the CMCD in smartphones because the use of the CMCD algorithm also provides the possibility to estimate the value of multipath.That means CMCD determines the value of multipath on signal, while Selecting NLOS signals based on elevation-dependent SNR can only detect the multipath or NLOS signal.
Correcting code observation can increase the number of acceptable observations to determine the position by increasing the number of equations.According to our investigations, signal selection based on SNR depending on elevation angle can be used as a suitable method for data pre-processing.This method helps the receiver identify direct signals by introducing signals that have NLOS or multipath errors.If there is a suitable number of observations, the receiver can use only direct signals for positioning.And Since the SNR is existence in RINEX file as an observation, using a method based on this observation will not require much time and energy, and just with good GDOP, this method can be applied to positioning.

Figure 1 .
Figure 1.Types of Multipath that can occur in urban scenario (The left one present signal blockage, the middle one happens when NLOS signals are received, and the right one shows when NLOS and LOS are received simultaneously.)Inurban conditions, the receiver continuously receives MP and NLOS signals, which can cause more than 100 meters of error on the measured pseudorange in harsh MP conditions.Also, the received NLOS signals resulting from the crash of the signal with tall buildings can increase the pseudorange error to more than 1 km.One helpful method for checking the impact of multipath and NLOS signals is based on SNR (signal-to-noise ratio) measurement.According to(Uaratanawong, Satirapod et al. 2021), usually, the direct signal in a multipath-free environment should have more than 42 dB-Hz strength, and when the receiver receives the reflected signal or the signal is blocked, the signal strength will drop suddenly.This condition can be reduced signal strength to about a few dB-Hz.Therefore, SNR measurement can help remove Multipath and non-line of sight signals to achieve more accurate results(Tokura, Yamada et al.  2014, Fang, Hong et al. 2015, Tokura and Kubo 2017).
For gathering the data in this research GNSSLogger application were used for recording code, carrier phase, Doppler, and signal-to-noise ratio on RINEX 3.0.3for L1, L5, E1B, E1C, and E5A signals from 17:59:26.4297477on 09/04/2020 (Kaggel 2020).The Google navigation team published these data in an observational campaign on highways in the San Francisco Bay area of the United States with a sampling rate of 1 second and contains 1200 measurement epochs(Fu et al. 2021).

Figure 2 .©
Figure 2. © Placement and position of the receivers relative to each other (Kaggel, 2020) (The left picture in figure2 shows the car's dashboard and smartphone's place, and the right one presents a geodetic antenna placed on the car's roof and the lever arm between this antenna and smartphones.)

Figure 3 .
Figure 3. © Road Network Configuration of San Francisco Bay area, USA (Esri, 2022).(Magenta lines show Primary and secondary roads, and green lines show All other roads in San Francisco Bay area)

Figure 4 .Figure 5 .Figure 6 .Figure 7 .
Figure 4. Coloured dots that bigger or smaller values than red values are accepted as GPS CMCD measurements (Cyan dots are GPS CMCDs and red lines are acceptable threshold)

Figure 8 .Figure 9 .
Figure 8. Elevation-dependent SNR values and applied Threshold for 35°-40° elevation binning (Blue dots are satellites SNRs and red line is SNR threshold in 35°-40° elevation bin, this threshold is chosen using the average of the SNRs in each height bin minus 10)

Figure 22 .
Figure 22.Locations of receiver for epoch 300 to epoch 400 (Red circle shows receiver's location for epoch 354 to epoch 358) , ) R mul is multipath effect changes in two consecutive epochs,