CC-DTW: An Accurate Indoor Fingerprinting Localization Using Calibrated Channel State Information and Modified Dynamic Time Warping

Indoor wireless local area network (WLAN) based positioning technologies have boomed recently because of the huge demands of indoor location-based services (ILBS) and the wide deployment of commercial Wi-Fi devices. Channel state information (CSI) extracted from Wi-Fi signals could be calibrated and utilized as a fine-grained positioning feature for indoor fingerprinting localization. One of the main factors that would restrict the positioning accuracy of fingerprinting systems is the spatial resolution of fingerprints (SRF). This paper mainly focuses on the improvement of SRF for indoor CSI-based positioning and a calibrated CSI feature (CCF) with high SRF is established based on the preprocess of both measured amplitude and phase. In addition, a similarity calculation metric for the proposed CCF is designed based on modified dynamic time warping (MDTW). An indoor fingerprinting method based on CCF and MDTW, named CC-DTW, is then proposed to improve the positioning accuracy in indoors. Experiments are conducted in two indoor office testbeds, and the performances of the proposed CC-DTW, one time-reversal (TR) based approach and one Euclidean distance (ED) based approach are evaluated and discussed. The results show that the SRF of CC-DTW outperforms the TR-based one and the ED-based one in both two testbeds in terms of the receiver operating characteristic (ROC) curve metric, and the area under curve (AUC) metric.


Introduction
With an increase in the demand for ubiquitous location-based services (LBS), localization and navigation applications have become more important in daily life [1]. Considering the fact that people today spend more than 80% of their time in indoor environments [2], indoor location-based services have gained considerable attention recently, with a market value predicted to reach US $10 billion by 2020 [3]. Although widely used global navigation satellite systems (GNSS) could provide a relatively high positioning accuracy outdoors, it does not perform well indoors due to the coverage limitation of satellite signals. Therefore, various indoor positioning technologies have been proposed in order to enable high-accuracy localization in indoors over the past two decades, including infrared [4], ultrasonic [5], ultra-wideband (UWB) [6], pseudolite [7], acoustic signals [8], Wi-Fi [9,10], Bluetooth [11], etc. However, indoor high-accuracy positioning is still an open but challenging issue, which has been proved by the conclusion "the indoor location problem is not solved" from the recent indoor localization competitions hosted by Microsoft [12].
Among all the technologies employed for indoor positioning, Wi-Fi is still considered one of the most promising schemes due to its ubiquity and flexible deployment. The received signal strength

•
A new type of fingerprint named Calibrated CSI Feature (CCF) is proposed with the aim of improving the SRF. The CSI amplitude is denoised based on the mode value, and the CSI phase is denoised based on linearization after unwarping. Both the processed amplitude and phase information are integrated based on the formation of original CSI, which is called CCF, in order to reduce computational complexity in feature matching. • A new similarity calculation metric based on modified dynamic time warping (MDTW) is established to compute the similarity between the proposed CCF. To our knowledge, this is the first time that the DTW method has been introduced into fingerprints' similarity calculation. • A fine-grained fingerprinting method based on CCF fingerprint and MDTW metric, named CC-DTW is then proposed and implemented in a mainstream 2.4 GHz Wi-Fi system with 20 MHz bandwidth and three receiving antennas in two indoor office environments. The performance of CC-DTW is evaluated compared with one TR-based approach and one ED-based approach.
The remainder of this paper is arranged as follows: Section 2 presents the preliminaries and establishes the CCF; Section 3 studies the MDTW metric and designs the CC-DTW method; the experiments and results are presented in Section 4; finally, Section 5 concludes our work.

Preliminaries and the Calibrated CSI Feature
This section firstly presents some preliminaries about CSI amplitude and phase information. Then the preprocessing method for both CSI amplitude and phase are analyzed, followed by the formation of CCF.

CSI Introduction
The wireless signals travel through multiple paths from transmitters to receivers in indoor environments, which is referred as multipath effects. The time delay, amplitude decay and the phase shift are different at each path. The wireless channel is usually modeled as a spatial linear filter [33], which can be described using channel impulse response (CIR). The CIR of one wireless channel can be formulated as Equation (1).
where h(τ) stands for the CIR, and N is the number of transmission paths. α i , θ i , and τ i are amplitude, phase and delay for the ith path, respectively. By applying fast Fourier transformation (FFT) to the CIR, the channel frequency response (CFR) can be derived as in Equation (2).
where H(ω) stands for the CFR, and α i , θ i also stand for amplitude and phase, respectively. In the orthogonal frequency division multiplexing (OFDM) and multiple in multiple out (MIMO) systems, the CFR can be sampled at predetermined intervals and represented by the amplitude and phase values at multiple subcarriers, which introduces the definition of CSI data. The CSI data collected in a Wi-Fi OFDM system can be given as follows.
where H( f ) stands for the CSI data and k is the number of subcarriers. H( f k ) is the CSI data for subcarrier wave f k , which is combined with amplitude and phase information. The expression of H( f k ) is given in Equation (4).
where H( f k ) and ∠H( f k ) are CSI amplitude information and phase information respectively. CSI is the information that represents the channel properties of a transmission link and describes how the wireless signals propagate from a transmitter to a receiver. The CSI data contains the effects of fading, power decay and scattering with distance, hence it can be utilized for indoor positioning.

CSI Used in This Paper
This paper mainly focuses on indoor Wi-Fi fingerprinting, and thanks to the IEEE 802.11n protocol [34] and Intel, the CSI data can be obtained and extracted using the commodity Wi-Fi devices and IWL 5300 NIC. In consideration of the limited bandwidth of commonly used devices and the flexibility of system deployment, this paper only utilizes a single 20MHz channel at 2.4 GHz Wi-Fi frequency band together with three receiving antennas and one transmitting antenna. The experimental settings are simple, but accurate localization under such a situation is still a challenge. The measured CSI data is formed into a CSI matrix with the size of P × A × K for processing and positioning, where P, A and K are the number of data packages, antennas and subcarriers, respectively. Specifically, A equals to 3 and K equals to 30 in this paper.

CSI Amplitude Preprocessing
The CSI amplitude information is location-specific because the multipath conditions differ at positions, so as the amplitude of paths. In order to intuitively show the location-specific characteristic of CSI amplitude, we measured the CSI data at two test positions with an interval of 1.6m and calculated the amplitude of each package for all subcarriers and antennas. Figure 1 shows the measured CSI amplitude values at these two positions extracted from the same antenna in about 1000 packages. From Figure 1a,b it can be concluded that CSI amplitude has an obvious difference between different positions. Figure 1 also shows that the raw measured CSI amplitude usually has noises and cannot be used for localization without preprocessing.
In order to preprocess the CSI amplitude, the boxplot diagram is firstly utilized to analyze the outliers of amplitude values, which is shown in Figure 2. It can be concluded that the amplitude at same subcarrier is nearly stable at different packages except for the influence of outliers, since the range between the upper quartile and the lower quartile is small, for example 0.43 dB for position 1 and 0.85 dB for position 2. This motivates us to propose a mode value-based amplitude denoising and feature extracting method, which could reduce the computational complexity at the same time.

CSI Amplitude Preprocessing
The CSI amplitude information is location-specific because the multipath conditions differ at positions, so as the amplitude of paths. In order to intuitively show the location-specific characteristic of CSI amplitude, we measured the CSI data at two test positions with an interval of 1.6m and calculated the amplitude of each package for all subcarriers and antennas. Figure 1 shows the measured CSI amplitude values at these two positions extracted from the same antenna in about 1000 packages. From Figure 1a,b it can be concluded that CSI amplitude has an obvious difference between different positions. Figure 1 also shows that the raw measured CSI amplitude usually has noises and cannot be used for localization without preprocessing.
In order to preprocess the CSI amplitude, the boxplot diagram is firstly utilized to analyze the outliers of amplitude values, which is shown in Figure 2. It can be concluded that the amplitude at same subcarrier is nearly stable at different packages except for the influence of outliers, since the range between the upper quartile and the lower quartile is small, for example 0.43 dB for position 1 and 0.85 dB for position 2. This motivates us to propose a mode value-based amplitude denoising and feature extracting method, which could reduce the computational complexity at the same time. The mode value of the CSI amplitude stands for the value which has the largest occurrence number in the whole packages for one subcarrier. Since the CSI amplitude for each subcarrier is stable

CSI Amplitude Preprocessing
The CSI amplitude information is location-specific because the multipath conditions differ at positions, so as the amplitude of paths. In order to intuitively show the location-specific characteristic of CSI amplitude, we measured the CSI data at two test positions with an interval of 1.6m and calculated the amplitude of each package for all subcarriers and antennas. Figure 1 shows the measured CSI amplitude values at these two positions extracted from the same antenna in about 1000 packages. From Figure 1a,b it can be concluded that CSI amplitude has an obvious difference between different positions. Figure 1 also shows that the raw measured CSI amplitude usually has noises and cannot be used for localization without preprocessing.
In order to preprocess the CSI amplitude, the boxplot diagram is firstly utilized to analyze the outliers of amplitude values, which is shown in Figure 2. It can be concluded that the amplitude at same subcarrier is nearly stable at different packages except for the influence of outliers, since the range between the upper quartile and the lower quartile is small, for example 0.43 dB for position 1 and 0.85 dB for position 2. This motivates us to propose a mode value-based amplitude denoising and feature extracting method, which could reduce the computational complexity at the same time. The mode value of the CSI amplitude stands for the value which has the largest occurrence number in the whole packages for one subcarrier. Since the CSI amplitude for each subcarrier is stable  The mode value of the CSI amplitude stands for the value which has the largest occurrence number in the whole packages for one subcarrier. Since the CSI amplitude for each subcarrier is stable enough as shown in Figure 2, extracting the mode value and utilizing it as the feature of CSI amplitude for the corresponding subcarrier is noise-insensitive and feasible. Meanwhile, the computational complexity of mode value calculation is lower than clustering-based approaches used in [29,35], which makes the mode value an efficient and lightweight candidate for CSI amplitude fingerprint. The proposed mode value of CSI amplitude can be formulated by Equation (5).
where Mode( f k ) stands for the amplitude mode value of kth subcarrier, and η stands for the occurrence number of measured amplitude values.Âmp f k,u stands for the uth unique value of the measured amplitude for kth subcarrier, and u is the number of unique values for kth subcarrier. After mode value extraction, the amplitude mode values of the whole 30 subcarriers at one position are formed into one fingerprint, called the calibrated amplitude. The general expression of the calibrated amplitude is given in Equation (6).
The calibrated amplitude based on mode value of the above two test positions are shown in Figure 3. It can be concluded that the calibrated amplitude remains the trend of original amplitude and the location-specific characteristic and removes the noise in the same time. enough as shown in Figure 2, extracting the mode value and utilizing it as the feature of CSI amplitude for the corresponding subcarrier is noise-insensitive and feasible. Meanwhile, the computational complexity of mode value calculation is lower than clustering-based approaches used in [29,35], which makes the mode value an efficient and lightweight candidate for CSI amplitude fingerprint. The proposed mode value of CSI amplitude can be formulated by Equation (5).
where ( ) stands for the amplitude mode value of kth subcarrier, and stands for the occurrence number of measured amplitude values. ̂( , ) stands for the uth unique value of the measured amplitude for kth subcarrier, and u is the number of unique values for kth subcarrier.
After mode value extraction, the amplitude mode values of the whole 30 subcarriers at one position are formed into one fingerprint, called the calibrated amplitude. The general expression of the calibrated amplitude is given in Equation (6).
The calibrated amplitude based on mode value of the above two test positions are shown in Figure 3. It can be concluded that the calibrated amplitude remains the trend of original amplitude and the location-specific characteristic and removes the noise in the same time.

CSI Phase Preprocessing
The measured CSI phase information could also not be used for indoor localization directly. Except for the measured noise, the measured phase is folded due to the recurrence characteristic of phase [24]. In order to show this characteristic, the measured phase values at the same two positions as in Section 2.2 of three receiving antennas are plotted in Figure 4. It is noticeable that the measured phase is folded with the increase of subcarrier index and the phase ranges fromto . In order to analyze the true phase changing trend and turn the measured phase into one positioning feature, we firstly unwrap the measured phase. The unwrapped phase values for these two positions are given in Figure 5.

CSI Phase Preprocessing
The measured CSI phase information could also not be used for indoor localization directly. Except for the measured noise, the measured phase is folded due to the recurrence characteristic of phase [24]. In order to show this characteristic, the measured phase values at the same two positions as in Section 2.2 of three receiving antennas are plotted in Figure 4. It is noticeable that the measured phase is folded with the increase of subcarrier index and the phase ranges from −π to π. In order to analyze the true phase changing trend and turn the measured phase into one positioning feature, we firstly unwrap the measured phase. The unwrapped phase values for these two positions are given in Figure 5.  It is noticeable in Figure 5 that the unwrapped phase values during all the subcarriers have the same changing trend, but the phase values decrease with the subcarrier index. The reason is that the carrier frequency offset (CFO) and the sampling frequency offset (SFO) exist in phase information. In general, the unwrapped phase can be expressed as follows [23].
where is the true phase and ̂ is the measured phase; is the time lag due to SFO, and is the unknown phase offset due to CFO; is the subcarrier index of kth subcarrier, is the FFT size, and is the measurement noise. The value of and is hard to evaluated, so we adopt a linear transformation [24] to mitigate the effects of these two errors approximately. The slope and offset value for phase linear calibration used in this paper are given as follows.  It is noticeable in Figure 5 that the unwrapped phase values during all the subcarriers have the same changing trend, but the phase values decrease with the subcarrier index. The reason is that the carrier frequency offset (CFO) and the sampling frequency offset (SFO) exist in phase information. In general, the unwrapped phase can be expressed as follows [23].
where is the true phase and ̂ is the measured phase; is the time lag due to SFO, and is the unknown phase offset due to CFO; is the subcarrier index of kth subcarrier, is the FFT size, and is the measurement noise. The value of and is hard to evaluated, so we adopt a linear transformation [24] to mitigate the effects of these two errors approximately. The slope and offset value for phase linear calibration used in this paper are given as follows. It is noticeable in Figure 5 that the unwrapped phase values during all the subcarriers have the same changing trend, but the phase values decrease with the subcarrier index. The reason is that the carrier frequency offset (CFO) and the sampling frequency offset (SFO) exist in phase information. In general, the unwrapped phase can be expressed as follows [23].
where ϕ k is the true phase andφ k is the measured phase; δ is the time lag due to SFO, and β is the unknown phase offset due to CFO; l k is the subcarrier index of kth subcarrier, M is the FFT size, and Z is the measurement noise. The value of δ and β is hard to evaluated, so we adopt a linear transformation [24] to mitigate the effects of these two errors approximately. The slope and offset value for phase linear calibration used in this paper are given as follows.
Sensors 2019, 19, 1984 8 of 26 where k stands for the slope and b stands for the offset of calibration.φ k and l k have the same definition as the one in Equation (7). The calibrated phase through the linear calibration above can be expressed as follows.
where ϕ k is the phase value after calibration. The calibrated phase values of at the two test positions are shown in Figure 6. It can be concluded that after unwarping and linearization, the calibrated phase information is unfolded and remains the location-specific characteristics, which can be utilized as fingerprints. The general expression of the calibrated phase is given in Equation (11), which would be integrated with calibrated amplitude to form the proposed CCF. where k stands for the slope and b stands for the offset of calibration. ̂ and have the same definition as the one in Equation (7). The calibrated phase through the linear calibration above can be expressed as follows.
where ̃ is the phase value after calibration. The calibrated phase values of at the two test positions are shown in Figure 6. It can be concluded that after unwarping and linearization, the calibrated phase information is unfolded and remains the location-specific characteristics, which can be utilized as fingerprints. The general expression of the calibrated phase is given in Equation (11), which would be integrated with calibrated amplitude to form the proposed CCF.

Formation of CCF
After the preprocess of CSI amplitude and phase in Section 2.2 and Section 2.3, the locationspecific positioning features, called the calibrated amplitude and the calibrated phase, are obtained. Instead of directly use these two features to construct the positioning fingerprint, this paper proposes to integrate these features into one fingerprint, called CCF. The CCF is formulated in Equation (12).
where ( ) is the proposed positioning feature, ( ) and ℎ ( ) are the calibrated amplitude and phase, respectively.
There are several reasons for this integration of CCF. One is that through the amplitude and phase integration, both the two positioning features could be used in location estimation at the same time. Compared with the methods using only one feature, the CCF introduces multi-dimensions for the fingerprints, which could improve the SRF and the positioning accuracy. However, higher dimensions always mean larger computational complexity in fingerprint matching. Suppose that there are N dimensions for each fingerprint, such as amplitude and phase. For each fingerprint matching procedure, the computational complexity of the methods using amplitude and phase separately is about O(2 × N). The CCF could perform the matching of amplitude and phase through one calculation because of the integration, and the computational complexity for CCF is about O(N). In other words, the CCF could reduce the complexity of fingerprint matching when comparing with the methods using amplitude and phase separately. The last, but not least reason is that this integration tries to remain the original expression of channel information as far as possible, which could ensure the feasibility of this integration. The performance of the CCF in the SRF improvement will be evaluated in Section 4.

Formation of CCF
After the preprocess of CSI amplitude and phase in Sections 2.2 and 2.3, the location-specific positioning features, called the calibrated amplitude and the calibrated phase, are obtained. Instead of directly use these two features to construct the positioning fingerprint, this paper proposes to integrate these features into one fingerprint, called CCF. The CCF is formulated in Equation (12).
where CCF( f k ) is the proposed positioning feature, Amp C ( f k ) and Pha C ( f k ) are the calibrated amplitude and phase, respectively. There are several reasons for this integration of CCF. One is that through the amplitude and phase integration, both the two positioning features could be used in location estimation at the same time. Compared with the methods using only one feature, the CCF introduces multi-dimensions for the fingerprints, which could improve the SRF and the positioning accuracy. However, higher dimensions always mean larger computational complexity in fingerprint matching. Suppose that there are N dimensions for each fingerprint, such as amplitude and phase. For each fingerprint matching procedure, the computational complexity of the methods using amplitude and phase separately is about O(2 × N). The CCF could perform the matching of amplitude and phase through one calculation because of the integration, and the computational complexity for CCF is about O(N). In other words, the CCF could reduce the complexity of fingerprint matching when comparing with the methods using amplitude and phase separately. The last, but not least reason is that this integration tries to remain the original expression of channel information as far as possible, which could ensure the feasibility of this integration. The performance of the CCF in the SRF improvement will be evaluated in Section 4.

CC-DTW: Fine-Grained Indoor Fingerprinting Based on CCF and MDTW
This section firstly gives an overview of the fine-grained indoor fingerprinting method named CC-DTW based on the formation of CCF. A new similarity calculation metric named MDTW is then proposed, which is used in CC-DTW to compute the similarity between CCF fingerprints. Finally, two evaluation indicators are introduced in order to evaluate the SRF improvement performance of the CC-DTW.

Overview of CC-DTW
The flowchart of the proposed CC-DTW fingerprinting method is shown in Figure 7. Like other indoor fingerprinting methods, the CC-DTW consists of two stages: the offline training stage and the online matching stage. As shown in Figure 7, in the offline training stage, the CSI data is collected at certain positions and both the amplitude and phase data are preprocessed using the method in Section 2. Then the calibrated amplitude and phase are integrated in the form of CCF for each position and stored as fingerprints in the database. In the online matching stage, the CSI data is measured at unknown positions, and the CSI phase is preprocessed using the unwarping and linearization method proposed in Section 2.3. After phase calibration, the measured CSI is transformed into measured CCF according to the formation in Section 2.4, and the similarity calculation metric based on MDTW is applied to compute the similarity between measured CCF and the CCF in database in order to perform position estimation. The similarity calculation metric used in CC-DTW is explained in detail in the following subsections.

CC-DTW: Fine-Grained Indoor Fingerprinting Based on CCF and MDTW
This section firstly gives an overview of the fine-grained indoor fingerprinting method named CC-DTW based on the formation of CCF. A new similarity calculation metric named MDTW is then proposed, which is used in CC-DTW to compute the similarity between CCF fingerprints. Finally, two evaluation indicators are introduced in order to evaluate the SRF improvement performance of the CC-DTW.

Overview of CC-DTW
The flowchart of the proposed CC-DTW fingerprinting method is shown in Figure 7. Like other indoor fingerprinting methods, the CC-DTW consists of two stages: the offline training stage and the online matching stage. As shown in Figure 7, in the offline training stage, the CSI data is collected at certain positions and both the amplitude and phase data are preprocessed using the method in Section 2. Then the calibrated amplitude and phase are integrated in the form of CCF for each position and stored as fingerprints in the database. In the online matching stage, the CSI data is measured at unknown positions, and the CSI phase is preprocessed using the unwarping and linearization method proposed in Section 2.3. After phase calibration, the measured CSI is transformed into measured CCF according to the formation in Section 2.4, and the similarity calculation metric based on MDTW is applied to compute the similarity between measured CCF and the CCF in database in order to perform position estimation. The similarity calculation metric used in CC-DTW is explained in detail in the following subsections.

The MDTW Similarity Calculation Metric
The similarity calculation metric is also one of the factors that can influence the SRF as well as the positioning accuracy of indoor fingerprinting systems. The generally used metric is based on the Euclidean distance. A TR-based similarity calculation metric has recently been proposed and utilized to compute the similarity between two fingerprints, which has been proven to outperform its traditional Euclidean distance-based counterparts in [29,31,32]. However, the performance of TRbased approaches would deteriorate with the limited channel bandwidth. In order to propose an accurate as well as suitable for limited bandwidth similarity calculation metric, this paper established the MDTW metric inspired by the dynamic programming and the dynamic time warping algorithm.
The DTW algorithm is widely used in speech signal recognition and matching. It can also be used to calculate the similarity between two features [35]. Based on the dynamic programming, the DTW algorithm could find the minimum warping path between two sequences, and the cumulated distance of the warping path can be used as an indicator to evaluate the similarity. The DTW algorithm can be formulated as Equation (13).

The MDTW Similarity Calculation Metric
The similarity calculation metric is also one of the factors that can influence the SRF as well as the positioning accuracy of indoor fingerprinting systems. The generally used metric is based on the Euclidean distance. A TR-based similarity calculation metric has recently been proposed and utilized to compute the similarity between two fingerprints, which has been proven to outperform its traditional Euclidean distance-based counterparts in [29,31,32]. However, the performance of TR-based approaches would deteriorate with the limited channel bandwidth. In order to propose an accurate as well as suitable for limited bandwidth similarity calculation metric, this paper established the MDTW metric inspired by the dynamic programming and the dynamic time warping algorithm.
The DTW algorithm is widely used in speech signal recognition and matching. It can also be used to calculate the similarity between two features [35]. Based on the dynamic programming, the DTW algorithm could find the minimum warping path between two sequences, and the cumulated distance of the warping path can be used as an indicator to evaluate the similarity. The DTW algorithm can be formulated as Equation (13).
where DTW(Q, T) is the dynamic time warping path between two sequences Q and T. R is the length of the warping path, which can be used to compensate the difference between warping paths. r is the rth node in the path, which can be expressed as r = (i, j) r , and i, j stands for the ith and jth element in sequences Q and T, respectively. This paper utilizes the cumulated distance of two fingerprints' warping path obtained from DTW as the reference of the similarity of these fingerprints. Considering that the fingerprints used in CC-DTW are complex values, which consists amplitude and phase, this paper modified the distance matrix in DTW as the 2-norm of the difference vector between two CCF fingerprints, instead of the subtraction. The general expression of the modified distance matrix of two CCF fingerprints is shown as follows.
where d Q i , T j stands for the modified distance of two CCF fingerprints Q and T. Q i and T j are the ith and jth elements in the two CCF fingerprints, which can be expressed as CCF Q ( f i ) and CCF T f j , respectively. Based on the modified distance matrix, the cumulated distance of the minimum warping path of two CCF fingerprints using MDTW algorithm can be expressed as in Equation (15).
where γ(i, j) stands for the cumulated distance from (1, 1) node to (i, j) node in the warping path. d Q i , T j is the modified distance, which can be calculated according to Equation (14). Since each CCF fingerprint has 30 subcarriers, the cumulated distance between two CCF fingerprints can be derived as γ(K, K), where K equals to 30. Since the cumulated distance stands for the shortest distance between two CCF fingerprints based on dynamic programming, the similarity between CCF fingerprints should be inversely proportional to the cumulated distance. Using the derived cumulated distance between two CCF fingerprints with MDTW algorithm, the similarity of these two fingerprints can be calculated as follows.
where µ Q,T is the similarity between CCF fingerprint Q and T based on MDTW. γ(K, K) is the cumulated distance derived in Equation (15), and ε is an infinitesimal in case that the denominator is zero. The CC-DTW utilizes this similarity calculation metric for fingerprint matching and location determination.

SRF Evaluation Indicators
This paper proposes two approaches to improve the SRF as well as the positioning accuracy for indoor fingerprinting systems. One is to form a new fingerprint feature named CCF, and the other is to establish a new fingerprint similarity calculation metric named MDTW. In order to evaluate the performance of the proposed methods in the improvement of SRF, two evaluation indicators are introduced and utilized.
The receiver operating characteristic (ROC) curve and the area under curve (AUC) value are two indicators that can evaluate the performance of classifiers, which has been widely used in machine learning. It can also be introduced into fingerprinting systems to evaluate the similarity of two fingerprints [32]. The ROC curve represents the relationship between the false positive rate (FPR) and the true positive rate (TPR), and the closer the curve is to the TPR-axis, the larger the SRF is. The AUC value is the integral area of ROC curve, and the larger the AUC is, the larger the SRF is. The ROC and AUC indicators can be expressed as follows.
where FP, TN, TP, FN stands for the "False Positive", "True Negative", "True Positive" and "False Negative", respectively. This paper utilizes the ROC and AUC to evaluate the performance of the proposed CCF and MDTW metric, and the experimental results are shown in Section 4.

Experiments and Results
This section shows the experiments and results. The experimental scenarios together with the system implementation are introduced firstly. The performance of the proposed CCF and MDTW metric in the SRF improvement is then evaluated and discussed, and finally the positioning performance of CC-DTW method is presented and compared with one TR-based approach and one ED-based approach.

Experimental Scenario and Implementation
Experiments are conducted in two real indoor environments in our laboratory. One is in the Room 523 at Main Building of Beijing University of Posts and Telecommunications (BUPT), named Test-bed 1, and the other is in our laboratory at the 9th floor of BUPT Research Building, named Test-bed 2. The Test-bed 1 is with an area of 8 m by 4 m, which consists of tables, chairs, file cabinets and exhibition cabinets. One transmitter as fixed access point and one receiver as mobile device are deployed in Test-bed 1 and 20 test points with an interval of 0.8 m are designed for the experiments. Figure 8 shows the real environment and the planer graph of the Test-bed 1. The red five-pointed star in Figure 8b indicates the position of transmitter, and the red dots indicate the test points.
where , , , stands for the "False Positive", "True Negative", "True Positive" and "False Negative", respectively. This paper utilizes the ROC and AUC to evaluate the performance of the proposed CCF and MDTW metric, and the experimental results are shown in Section 4.

Experiments and Results
This section shows the experiments and results. The experimental scenarios together with the system implementation are introduced firstly. The performance of the proposed CCF and MDTW metric in the SRF improvement is then evaluated and discussed, and finally the positioning performance of CC-DTW method is presented and compared with one TR-based approach and one ED-based approach.

Experimental Scenario and Implementation
Experiments are conducted in two real indoor environments in our laboratory. One is in the Room 523 at Main Building of Beijing University of Posts and Telecommunications (BUPT), named Test-bed 1, and the other is in our laboratory at the 9th floor of BUPT Research Building, named Testbed 2. The Test-bed 1 is with an area of 8 m by 4 m, which consists of tables, chairs, file cabinets and exhibition cabinets. One transmitter as fixed access point and one receiver as mobile device are deployed in Test-bed 1 and 20 test points with an interval of 0.8 m are designed for the experiments. Figure 8 shows the real environment and the planer graph of the Test-bed 1. The red five-pointed star in Figure 8b indicates the position of transmitter, and the red dots indicate the test points. In order to evaluate the influence of multiple transceivers, as well as the robustness of the proposed methods against different environments, we conducted experiments in Test-bed 2. The Test-bed 2 is with an area of 16.46 m by 8.4 m, which consists of an office room and a meeting room separated by a glass wall. There are plenty of tables and chairs, together with exhibition cabinets and servers in Test-bed 2, which can be regarded as a complex environment with multi-room layout for indoor localization. Due to the hardware limitation, we deployed four receivers as fixed access points and one transmitter as the mobile device that needs to be located, which is contrary to the deployment in Test-bed 1. Fifty-nine test points with an interval of 1.2 m is selected in the public areas in Test-bed 2 for SRF improvement evaluation and positioning test. The experimental environment and the planer graph of Test-bed 2 is shown in Figure 9. The red five-pointed stars in Figure 9 stand for the four receivers in Test-bed 2 and the red dots stand for the test points. (a)

Cabinet
Cabinet Table  Table   File  In order to evaluate the influence of multiple transceivers, as well as the robustness of the proposed methods against different environments, we conducted experiments in Test-bed 2. The Test-bed 2 is with an area of 16.46 m by 8.4 m, which consists of an office room and a meeting room separated by a glass wall. There are plenty of tables and chairs, together with exhibition cabinets and servers in Test-bed 2, which can be regarded as a complex environment with multi-room layout for indoor localization. Due to the hardware limitation, we deployed four receivers as fixed access points and one transmitter as the mobile device that needs to be located, which is contrary to the deployment in Test-bed 1. Fifty-nine test points with an interval of 1.2 m is selected in the public areas in Test-bed 2 for SRF improvement evaluation and positioning test. The experimental environment and the planer graph of Test-bed 2 is shown in Figure 9. The red five-pointed stars in Figure 9 stand for the four receivers in Test-bed 2 and the red dots stand for the test points. In order to evaluate the influence of multiple transceivers, as well as the robustness of the proposed methods against different environments, we conducted experiments in Test-bed 2. The Test-bed 2 is with an area of 16.46 m by 8.4 m, which consists of an office room and a meeting room separated by a glass wall. There are plenty of tables and chairs, together with exhibition cabinets and servers in Test-bed 2, which can be regarded as a complex environment with multi-room layout for indoor localization. Due to the hardware limitation, we deployed four receivers as fixed access points and one transmitter as the mobile device that needs to be located, which is contrary to the deployment in Test-bed 1. Fifty-nine test points with an interval of 1.2 m is selected in the public areas in Test-bed 2 for SRF improvement evaluation and positioning test. The experimental environment and the planer graph of Test-bed 2 is shown in Figure 9. The red five-pointed stars in Figure 9 stand for the four receivers in Test-bed 2 and the red dots stand for the test points. (a)

Cabinet
Cabinet Table  Table   File   Considering the stability of Wi-Fi signals as well as the flexibility of deployment, all the transceivers used in this paper are industrial personal computers (IPCs) equipped with IWL 5300 NICs, instead of wireless routers and laptops. It should be noted that since the Wi-Fi CSI data cannot be analyzed using most of the commodity mobile phones currently, the IPC is a potential candidate for CSI data measuring and processing. Comparing with laptops, the IPC is small and lightweight, which can also be regarded as a mobile device in indoor localization. The transceivers used in this paper is shown in Figure 10. One antenna is configured for each transmitter and three antennas are configured for each receiver in both the test-beds in our experiments. The transmitter in Test-bed 1 is placed on the top of one worktable at a height about 2 m, and the receiver is carried by a robot at a height about 1.5 m, as shown in Figure 8. The robot used in Test-bed 1 is for the measurements of fingerprints. The receivers in Test-bed 2 are fixed on the wall at a height about 2.4 m, and the transmitter is carried by one of our researchers at a height about 1.2 m. Considering the stability of Wi-Fi signals as well as the flexibility of deployment, all the transceivers used in this paper are industrial personal computers (IPCs) equipped with IWL 5300 NICs, instead of wireless routers and laptops. It should be noted that since the Wi-Fi CSI data cannot be analyzed using most of the commodity mobile phones currently, the IPC is a potential candidate for CSI data measuring and processing. Comparing with laptops, the IPC is small and lightweight, which can also be regarded as a mobile device in indoor localization. The transceivers used in this paper is shown in Figure 10. One antenna is configured for each transmitter and three antennas are configured for each receiver in both the test-beds in our experiments. The transmitter in Test-bed 1 is placed on the top of one worktable at a height about 2 m, and the receiver is carried by a robot at a height about 1.5 m, as shown in Figure 8. The robot used in Test-bed 1 is for the measurements of fingerprints. The receivers in Test-bed 2 are fixed on the wall at a height about 2.4 m, and the transmitter is carried by one of our researchers at a height about 1.2 m. Considering the stability of Wi-Fi signals as well as the flexibility of deployment, all the transceivers used in this paper are industrial personal computers (IPCs) equipped with IWL 5300 NICs, instead of wireless routers and laptops. It should be noted that since the Wi-Fi CSI data cannot be analyzed using most of the commodity mobile phones currently, the IPC is a potential candidate for CSI data measuring and processing. Comparing with laptops, the IPC is small and lightweight, which can also be regarded as a mobile device in indoor localization. The transceivers used in this paper is shown in Figure 10. One antenna is configured for each transmitter and three antennas are configured for each receiver in both the test-beds in our experiments. The transmitter in Test-bed 1 is placed on the top of one worktable at a height about 2 m, and the receiver is carried by a robot at a height about 1.5 m, as shown in Figure 8. The robot used in Test-bed 1 is for the measurements of fingerprints. The receivers in Test-bed 2 are fixed on the wall at a height about 2.4 m, and the transmitter is carried by one of our researchers at a height about 1.2 m. With the help of Linux CSI tool [36], we modified the NIC's device driver to read the recorded CSI values over 30 subcarriers for each packet reception. We utilized the 2.4GHz Wi-Fi OFDM signals at a bandwidth of 20 MHz to measure the CSI data. The CSI data is measured at all the test points in the two test-beds twice, one for offline training and the other for testing. We measured CSI data at a sampling rate of 100 packages per second, and at each test point, the CSI data was recorded for about one minute. That is 6000 × 3 × 30 CSI data packages for each position. It should be noticed that during the measurements of CSI data, the experimental environments had little changes and the transmitters were kept working. We find that the restart of transmitters could have a huge influence on the stability of CSI data at the same position. In order to evaluate the time stability of Wi-Fi CSI data and the distribution of measurements over time, experiments are conducted in Test-bed 1. Without loss of generality, we select two points in Test-bed 1 and measure the CSI data continuously for three days, with a sampling rate of 30 packages per minute. The CSI data is measured at one of the two points without restart of the transmitter and at the other point with several restarts at the same time. During the measuring stage, the environment remains little change. Both the amplitude and phase are measured and preprocessed using the method in Section 2. Without loss of generality, we select the measurements from one antenna to show the time stability of CSI data and the results are shown in Figure 11. Figure 11a,b show the measurements of amplitude and phase over time without restart of the transmitter, and Figure 11c,d show the measurements with several restarts. The sudden changes in Figure 11c,d indicate the restarts. It can be concluded that the CSI data remains the same trend at the same point over a relatively long time, which indicates that the CSI data could be time stable under the circumstance that the environments remain little change and the transmitters keep working without restart. Therefore, we keep the transmitters working during the experiments in this paper, and it is also easy to achieve even using the commodity Wi-Fi devices. With the help of Linux CSI tool [36], we modified the NIC's device driver to read the recorded CSI values over 30 subcarriers for each packet reception. We utilized the 2.4GHz Wi-Fi OFDM signals at a bandwidth of 20 MHz to measure the CSI data. The CSI data is measured at all the test points in the two test-beds twice, one for offline training and the other for testing. We measured CSI data at a sampling rate of 100 packages per second, and at each test point, the CSI data was recorded for about one minute. That is 6000 × 3 × 30 CSI data packages for each position. It should be noticed that during the measurements of CSI data, the experimental environments had little changes and the transmitters were kept working. We find that the restart of transmitters could have a huge influence on the stability of CSI data at the same position. In order to evaluate the time stability of Wi-Fi CSI data and the distribution of measurements over time, experiments are conducted in Test-bed 1. Without loss of generality, we select two points in Test-bed 1 and measure the CSI data continuously for three days, with a sampling rate of 30 packages per minute. The CSI data is measured at one of the two points without restart of the transmitter and at the other point with several restarts at the same time. During the measuring stage, the environment remains little change. Both the amplitude and phase are measured and preprocessed using the method in Section 2. Without loss of generality, we select the measurements from one antenna to show the time stability of CSI data and the results are shown in Figure 11. Figure 11a,b show the measurements of amplitude and phase over time without restart of the transmitter, and Figure 11c,d show the measurements with several restarts. The sudden changes in Figure 11c,d indicate the restarts. It can be concluded that the CSI data remains the same trend at the same point over a relatively long time, which indicates that the CSI data could be time stable under the circumstance that the environments remain little change and the transmitters keep working without restart. Therefore, we keep the transmitters working during the experiments in this paper, and it is also easy to achieve even using the commodity Wi-Fi devices.

SRF Improvement Evaluation and Analysis
In order to evaluate the SRF improvement performance of the proposed method, all the measured CSI data of the training measurement and the testing measurement are preprocessed according to the method in Section 2. The amplitude information and phase information are extracted from the CSI data, calibrated and stored in separated fingerprint database. Meanwhile, the CCF is also formed based on the calibrated amplitude and phase, and stored in another database. In order to describe the databases concise and explicit, we called the amplitude, phase and CCF database extracted from the training measurement "Amp_train", "Pha_train" and "CCF_train", respectively. The similar names for the amplitude, phase and CCF database from the testing measurement are "Amp_test", "Pha_test", and "CCF_test". These database names would be used for the following analysis.
This paper evaluates the SRF improvement of the proposed method in three aspects: the aspect of fingerprints which means the improvement of CCF over amplitude and phase features, the aspect of similarity calculation metric which means the improvement of MDTW over TR-based and EDbased approach, and the aspect of system which means the improvement of CC-DTW.

SRF Improvement of the CCF
In this subsection, the SRF improvement is evaluated and analyzed in the aspect of fingerprints. We select the amplitude, phase and CCF as three positioning features and calculate the similarity

SRF Improvement Evaluation and Analysis
In order to evaluate the SRF improvement performance of the proposed method, all the measured CSI data of the training measurement and the testing measurement are preprocessed according to the method in Section 2. The amplitude information and phase information are extracted from the CSI data, calibrated and stored in separated fingerprint database. Meanwhile, the CCF is also formed based on the calibrated amplitude and phase, and stored in another database. In order to describe the databases concise and explicit, we called the amplitude, phase and CCF database extracted from the training measurement "Amp_train", "Pha_train" and "CCF_train", respectively. The similar names for the amplitude, phase and CCF database from the testing measurement are "Amp_test", "Pha_test", and "CCF_test". These database names would be used for the following analysis.
This paper evaluates the SRF improvement of the proposed method in three aspects: the aspect of fingerprints which means the improvement of CCF over amplitude and phase features, the aspect of similarity calculation metric which means the improvement of MDTW over TR-based and ED-based approach, and the aspect of system which means the improvement of CC-DTW.

SRF Improvement of the CCF
In this subsection, the SRF improvement is evaluated and analyzed in the aspect of fingerprints. We select the amplitude, phase and CCF as three positioning features and calculate the similarity between each training database and testing database of the two test-beds, such as the "Amp_train" and the "Amp_test", using the same similarity calculation metric, respectively. Afterwards, the similarity values of these three features are presented and compared, according to the ROC curve and AUC value mentioned in Section 3. Without loss of generality, the MDTW similarity calculation metric is used for all of the three features. The similarities of fingerprints are shown in the form of color map for two test-beds in Figure 12, and the ROC curves together with the AUC values are shown in Figure 13 and Table 1. between each training database and testing database of the two test-beds, such as the "Amp_train" and the "Amp_test", using the same similarity calculation metric, respectively. Afterwards, the similarity values of these three features are presented and compared, according to the ROC curve and AUC value mentioned in Section 3. Without loss of generality, the MDTW similarity calculation metric is used for all of the three features. The similarities of fingerprints are shown in the form of color map for two test-beds in Figure 12, and the ROC curves together with the AUC values are shown in Figure 13 and Table 1.
(e) (f)   Figure 12 shows the similarity of the three features in the form of color map for two test-beds. In Figure 12, the color of each grid indicates the similarity of each pair positions in training database and testing database, and the closer the grid's color is to red, the closer the similarity is, which in other words is that the corresponding two positions are harder to distinguish using the corresponding feature. Therefore, it can be concluded from Figure 12 that the similarity of CCF has the least red girds in two test-beds, which means the SRF of CCF is better than the others. It can also be concluded from Figure 12 that for the same feature, the SRF in Test-bed 2 is better than that in Test-bed 1, take Figure 12e,f for example. The reason is that in Test-bed 2, there are four receivers used for fingerprinting, which means the increase of feature dimensions in Test-bed 2. However, high   Figure 12 shows the similarity of the three features in the form of color map for two test-beds. In Figure 12, the color of each grid indicates the similarity of each pair positions in training database and testing database, and the closer the grid's color is to red, the closer the similarity is, which in other words is that the corresponding two positions are harder to distinguish using the corresponding feature. Therefore, it can be concluded from Figure 12 that the similarity of CCF has the least red girds in two test-beds, which means the SRF of CCF is better than the others. It can also be concluded from Figure 12 that for the same feature, the SRF in Test-bed 2 is better than that in Test-bed 1, take Figure 12e,f for example. The reason is that in Test-bed 2, there are four receivers used for fingerprinting, which means the increase of feature dimensions in Test-bed 2. However, high dimensions of fingerprints also increase the computational complexity of positioning, which should be balanced when considering indoor localization. Figure 13 and Table 1 shows the ROC curve and the AUC values of the three features, which can evaluate the SRF quantitatively. It can be concluded from Figure 13a,b that the ROC curve of CCF is the closest to the TPR-axis, which indicates that the CCF has the best SRF for both two test-beds. For a fixed FPR as 0.2, the TPR is increased from 0.95 with amplitude feature to 1 with CCF, and from 0.8 with phase feature to 1 with CCF in Test-bed 1, which is 0.9746 to 0.9831 and 0.9492 to 0.9831 in Test-bed 2. The results show that the CCF has about 5.3% and 25% improvement of SRF in ROC when compared with amplitude feature and phase feature in Test-bed 1, and about 0.8% and 3.6% in Test-bed 2, respectively. Figure 13c,d also shows that the AUC values for amplitude, phase and CCF are 0.9778, 0.8889 and 0.99 in Test-bed 1, and are 0.9911, 0.9649 and 0.9933 in Test-bed 2, which is an improvement of 2.1% and 11.4% using CCF compared with amplitude and phase feature in Test-bed 1 and 0.2% and 2.9% in Test-bed 2.

SRF Improvement of the MDTW Metric
The SRF improvement is evaluated in the aspect of similarity calculation metric in this subsection. Without loss of generality, we select the proposed CCF feature to evaluate the SRF under different similarity calculation metrics. The MDTW metric proposed in this paper is compared with one TRRS metric used in [29,32] and one ED-based metric used in [28]. The similarities for CCF are calculated based on MDTW, TRRS and ED, respectively. The color maps of similarity for each metric of CCF are shown in Figure 14. Meanwhile, the ROC curves and AUC values are shown in Table 2 and Figure 15. dimensions of fingerprints also increase the computational complexity of positioning, which should be balanced when considering indoor localization. Figure 13 and Table 1 shows the ROC curve and the AUC values of the three features, which can evaluate the SRF quantitatively. It can be concluded from Figure 13a,b that the ROC curve of CCF is the closest to the TPR-axis, which indicates that the CCF has the best SRF for both two test-beds. For a fixed FPR as 0.2, the TPR is increased from 0.95 with amplitude feature to 1 with CCF, and from 0.8 with phase feature to 1 with CCF in Test-bed 1, which is 0.9746 to 0.9831 and 0.9492 to 0.9831 in Testbed 2. The results show that the CCF has about 5.3% and 25% improvement of SRF in ROC when compared with amplitude feature and phase feature in Test-bed 1, and about 0.8% and 3.6% in Testbed 2, respectively. Figure 13c,d also shows that the AUC values for amplitude, phase and CCF are 0.9778, 0.8889 and 0.99 in Test-bed 1, and are 0.9911, 0.9649 and 0.9933 in Test-bed 2, which is an improvement of 2.1% and 11.4% using CCF compared with amplitude and phase feature in Test-bed 1 and 0.2% and 2.9% in Test-bed 2.

SRF Improvement of the MDTW Metric
The SRF improvement is evaluated in the aspect of similarity calculation metric in this subsection. Without loss of generality, we select the proposed CCF feature to evaluate the SRF under different similarity calculation metrics. The MDTW metric proposed in this paper is compared with one TRRS metric used in [29,32] and one ED-based metric used in [28]. The similarities for CCF are calculated based on MDTW, TRRS and ED, respectively. The color maps of similarity for each metric of CCF are shown in Figure 14. Meanwhile, the ROC curves and AUC values are shown in Table 2 and Figure 15.    The color maps in Figure 14 shows that using MDTW metric can improve the SRF compared to TRRS metric and ED-based metric, since there are less grids which color is close to red in Figure 14e Figure 15a, It can also be concluded from Figures 14 and 15 that the SRF in Test-bed 2 is better than that in Test-bed 1 because of the increase of receivers' number, no matter what similarity calculation metric is applied.

SRF Improvement of the CC-DTW
Since the results in the above subsections have shown that the CCF outperforms amplitude feature and phase feature in SRF and the MDTW metric outperforms TRRS metric and ED metric in SRF, we integrate the CCF and MDTW into CC-DTW, and evaluate the SRF improvement compared with one TR-based approach used in [29] and one ED-based approach used in [28]. The TR-based approach utilized the preprocessed CSI amplitude and phase information from one antenna, and used the TRRS product of amplitude and phase as the similarity calculation metric. The ED-based approach utilized the Euclidean distance between the processed amplitude and phase from three antennas as the similarity calculation metric. The gaps between the proposed method and the TR-based approach or the ED-based approach are the CSI feature processing method and the similarity calculation metric. In order to compare the SRF of these three approaches, the same training database and testing database with three antennas in the two test-beds are applied, and the CC-DTW, TR-based and ED-based approaches are performed. The SRF of these three approaches are calculated and compared for two test-beds. The results are shown in Figures 16 and 17, and Table 3.   Table 3 that the CC-DTW outperforms the TR-based approach and the ED-based approach in the experiments, and have an improvement of about 33.3% and 8.1% in ROC, and about 14.3% and 4.1% in AUC values over TR-based approach and ED-based approach in Test-bed 1, respectively. Meanwhile, in Test-bed 2, the CC-DTW outperforms the TRbased and the ED-based approach by about 0.9% and 1.2% in ROC, and about 1.5% and 1.5% in AUC, respectively. According to the results in Figures 12, 14 and 16, we can conclude that the improvement in SRF of the proposed CC-DTW approach is obtained by two aspects: one is the CCF processing and the other is the MDTW similarity calculation metric. It can also be noted that the performance of these three approaches are better in Test-bed 2 than in Test-bed 1, and the increase of the receivers' number could also obtain an improvement of SRF for indoor fingerprinting.
Since the TR-based approach used in this paper as a competitor only utilized one receiving antenna in the literature, in order to compare with this approach more fairly, we also evaluate the It can be concluded from Figures 16 and 17 and Table 3 that the CC-DTW outperforms the TR-based approach and the ED-based approach in the experiments, and have an improvement of about 33.3% and 8.1% in ROC, and about 14.3% and 4.1% in AUC values over TR-based approach and ED-based approach in Test-bed 1, respectively. Meanwhile, in Test-bed 2, the CC-DTW outperforms the TR-based and the ED-based approach by about 0.9% and 1.2% in ROC, and about 1.5% and 1.5% in AUC, respectively. According to the results in Figures 12, 14 and 16, we can conclude that the improvement in SRF of the proposed CC-DTW approach is obtained by two aspects: one is the CCF processing and the other is the MDTW similarity calculation metric. It can also be noted that the performance of these three approaches are better in Test-bed 2 than in Test-bed 1, and the increase of the receivers' number could also obtain an improvement of SRF for indoor fingerprinting.
Since the TR-based approach used in this paper as a competitor only utilized one receiving antenna in the literature, in order to compare with this approach more fairly, we also evaluate the influence of antenna number between the proposed method and the TR-based one. Experiments are conducted in Test-bed 1 with single transmitting antenna and single receiving antenna, and both the SRF of the CC-DTW and the TR-based one are calculated based on the same database. The results are shown in Figure 18. It can be concluded from Figure 18 that the CC-DTW could outperform the TR-based approach in SRF improvement. Meanwhile, comparing Figure 18 with Figure 16a,b it can be concluded that the increase of antenna's number could also bring an improvement in SRF for both the CC-DTW and the TR-based approach. influence of antenna number between the proposed method and the TR-based one. Experiments are conducted in Test-bed 1 with single transmitting antenna and single receiving antenna, and both the SRF of the CC-DTW and the TR-based one are calculated based on the same database. The results are shown in Figure 18. It can be concluded from Figure 18 that the CC-DTW could outperform the TRbased approach in SRF improvement. Meanwhile, comparing Figure 18 with Figure 16a,b it can be concluded that the increase of antenna's number could also bring an improvement in SRF for both the CC-DTW and the TR-based approach.
(a) (b) Figure 18. The SRF comparison between CC-DTW and TR-based approach using one antenna. (a) The color map of SRF using CC-DTW. (b) The color map of SRF using the TR-based approach.

Positioning Performance Evaluation and Analysis of CC-DTW
In order to prove that the improvement of SRF could bring the improvement of positioning accuracy for indoor fingerprinting systems, we conducted experiments to evaluate the positioning performance of the proposed CC-DTW method. We measured the CSI data in the two test-beds and performed the location estimation based on the "CCF_train" database, the MDTW metric and the weighted k nearest neighbor (WKNN) matching algorithm. We select 50 positions out of all the 79 positions in two test-beds for location estimation, 10 for Test-bed 1 and 40 for Test-bed 2, and the CSI data is collected about 100 packages at each position. The CC-DTW together with the fingerprint matching are performed for each data package. The TR-based and the ED-based approaches are also applied for the comparison, and the cumulative distribution function (CDF) of positioning errors together with the mean positioning error are shown in Figure 19.

Positioning Performance Evaluation and Analysis of CC-DTW
In order to prove that the improvement of SRF could bring the improvement of positioning accuracy for indoor fingerprinting systems, we conducted experiments to evaluate the positioning performance of the proposed CC-DTW method. We measured the CSI data in the two test-beds and performed the location estimation based on the "CCF_train" database, the MDTW metric and the weighted k nearest neighbor (WKNN) matching algorithm. We select 50 positions out of all the 79 positions in two test-beds for location estimation, 10 for Test-bed 1 and 40 for Test-bed 2, and the CSI data is collected about 100 packages at each position. The CC-DTW together with the fingerprint matching are performed for each data package. The TR-based and the ED-based approaches are also applied for the comparison, and the cumulative distribution function (CDF) of positioning errors together with the mean positioning error are shown in Figure 19. influence of antenna number between the proposed method and the TR-based one. Experiments are conducted in Test-bed 1 with single transmitting antenna and single receiving antenna, and both the SRF of the CC-DTW and the TR-based one are calculated based on the same database. The results are shown in Figure 18. It can be concluded from Figure 18 that the CC-DTW could outperform the TRbased approach in SRF improvement. Meanwhile, comparing Figure 18 with Figure 16a,b it can be concluded that the increase of antenna's number could also bring an improvement in SRF for both the CC-DTW and the TR-based approach.
(a) (b) Figure 18. The SRF comparison between CC-DTW and TR-based approach using one antenna. (a) The color map of SRF using CC-DTW. (b) The color map of SRF using the TR-based approach.

Positioning Performance Evaluation and Analysis of CC-DTW
In order to prove that the improvement of SRF could bring the improvement of positioning accuracy for indoor fingerprinting systems, we conducted experiments to evaluate the positioning performance of the proposed CC-DTW method. We measured the CSI data in the two test-beds and performed the location estimation based on the "CCF_train" database, the MDTW metric and the weighted k nearest neighbor (WKNN) matching algorithm. We select 50 positions out of all the 79 positions in two test-beds for location estimation, 10 for Test-bed 1 and 40 for Test-bed 2, and the CSI data is collected about 100 packages at each position. The CC-DTW together with the fingerprint matching are performed for each data package. The TR-based and the ED-based approaches are also applied for the comparison, and the cumulative distribution function (CDF) of positioning errors together with the mean positioning error are shown in Figure 19. The results in Figure 19b shows that the mean positioning error is 0.83 m, 1.17 m and 1.36 m for CC-DTW, the TR-based and the ED-based approach in Test-bed 1, and the error is 0.86 m, 1.96 m, 1.91 m in Test-bed 2, respectively. It can be concluded that the CC-DTW outperforms the TR-based and the ED-based approach in terms of positioning accuracy, and the CC-DTW is robust for the two test-beds.

Discussion of the Proposed Methods
In this section, experiments are conducted to evaluate the performance of the proposed method, and results are shown together with the comparison over other methods in recent literatures. We evaluated the performance of the proposed CC-DTW in two aspects: the aspect of SRF improvement and the aspect of positioning accuracy improvement.
In the aspect of SRF improvement, we evaluated the performance of the proposed CCF feature over CSI amplitude and phase features, the performance of the proposed MDTW metric over TRRS and ED-based metrics, and the performance of the proposed CC-DTW over TR-based and ED-based approaches, respectively. The CCF outperforms the CSI amplitude and phase features in SRF mainly because that the CCF integrates the information of both amplitude and phase in the formation of original CSI, which has also been proved in Section 4.2.1. The MDTW outperforms the TRRS and the ED-based metrics with the reason that MDTW metric considers not only the trend of positioning features over multiple subcarriers, but also the tolerance of measuring noise, which can be robust in indoor environments. The improvement of SRF using CC-DTW can be achieved since the CC-DTW integrates the advantages of both CCF and MDTW metric, which has been proved in Section 4.2.3.
With respect to the improvement of positioning accuracy, we evaluated the positioning performance of the proposed CC-DTW, one TR-based approach and one ED-based approach in both two test-beds. Since that the SRF is an important factor in fingerprinting systems, the improvement of SRF should also bring an improvement in positioning accuracy. The results in Section 4.3 have proved from the experimental aspect that the improvement of SRF could actually bring accuracy improvement for indoor fingerprinting system. The studies of SRF improvement in this paper could also constitute guidance when implementing a CSI-based positioning system.

Conclusions
In this paper, a fine-grained indoor Wi-Fi CSI-based fingerprinting localization method named CC-DTW is proposed, analyzed and evaluated. Since the SRF could influence the positioning accuracy of fingerprinting systems, this paper proposed two means in order to improve the SRF both in the aspect of positioning features and the aspect of similarity calculation metric. As for the positioning features, a new type of fingerprint named CCF is proposed and evaluated, which consists both the calibrated CSI amplitude and phase information. As for the similarity calculation metric, a new metric named MDTW is established and evaluated, inspired by the dynamic time warping algorithm. Meanwhile, the proposed CCF feature and the MDTW metric is integrated in the CC-DTW method to improve the SRF as well as the positioning accuracy. Experiments are conducted in two indoor office environments, and the performance of the proposed CCF, MDTW and CC-DTW are all evaluated. The improvements of SRF for all of the proposed methods are evaluated and discussed with the ROC curve and AUC indicators, and the results show that the CC-DTW outperforms the TR-based approach and the ED-based approach by about 33.3% and 8.1% in ROC curve, and 14.3% and 4.1% in AUC value under a limited bandwidth of 20MHz. The positioning performance of the CC-DTW is also evaluated through fixed-point testing, and the results indicate an improvement in positioning accuracy when compared with the TR-based and the ED-based approach. Our work could be helpful for the analysis and improvement of SRF in indoor fingerprinting systems and it could also be a guidance for performance improvement of indoor positioning systems.