# Acoustic TDOA Measurement and Accurate Indoor Positioning for Smartphone
## 3 Robust TDOA Measurement Method
### Robust TDOA Measurement  
TOA and TDOA of signals are important parameters of trilateration in indoor positioning. TOA of an acoustic signal refers to the time from the signal sent by the acoustic node to the signal received by the microphone receiver. At present, TOA-based acoustic positioning systems require time synchronization between transmitting nodes and receivers. If TOA can be converted into distance information, the target can be located by the trilateral positioning method. TDOA is the difference in time taken between acoustic signals sent from different sources to the target. TDOA measurement does not require synchronization between acoustic nodes and receivers, only synchronization between acoustic nodes. Therefore, the microphone inside the smartphone can act as a receiver. Similarly, the TDOA can be converted into the distance difference, and then the distance difference is used to realize the target position estimation. The measurement accuracy of TOA and TDOA is the key to ensuring positioning accuracy. However, the signal is reflected by the wall and ground (i.e., multipath effect), and the accuracy of TOA and TDOA estimation is affected in  
Figure 5: Decoding by using cross-correlation operation: (**a**) s1 is cross-correlated with the combined signal; (**b**) s2 is cross-correlated with the combined signal; (**c**) s3 is cross-correlated with the combined signal; (**d**) s4 is cross-correlated with the combined signal. Figure 6: Scheduling scheme of acoustic nodes. practical applications. Therefore, reliable TDOA estimation is also an important work. As shown in Figure 7, the maximum peak obtained by the correlation operation lags behind the first path due to the influence of the multipath effect. Identifying reflected signals and direct signals is also the key to determining positioning accuracy. Since TDOA does not need the clock synchronization between the mobile phone and the acoustic node, we can use TDOA information to achieve indoor positioning for smartphones. The benefits of the TDOA positioning system have been described previously. For four acoustic nodes, we can obtain four TOAs. So we can obtain three TDOAs by the following formula:  
\[TDOA_{j}=TOA_{1}-TOA_{j+1}-0.2\text{s}\cdot j\quad j=1,2,3 \tag{2}\]  
According to the above formula, we can know the precondition for obtaining TDOA is to obtain the TOA of the signal. As mentioned above, acoustic signals will be reflected by glass, walls and other obstacles in the environment. Distinguishing reflected signals and direct signals is one of our research works. Based on the multipath problem, we have developed a reliable TOA detection method. The TOA detection process of the acoustic signal is as follows:  
In order to obtain the TOA of the corresponding signal emitted by the acoustic node, we follow the process shown in Figure 8. The effective acoustic data segment contains the corresponding signals of all acoustic nodes, and the length of the effective acoustic segment is 2 s. The whole process is divided into three steps, as shown in Figure 8 below. In step 1, we set four band-pass filters to remove environmental noise and other noise from other acoustic nodes. The four band-pass filters are of finite impulse response type, which is recorded as FIR1, FIR2, FIR3 and FIR4. The band pass range of FIR1 is 15-16 kHz. The band pass range of FIR2 is 16.5-17.5 kHz. The band pass range of FIR3 is 18-19 kHz. The band pass range of FIR4 is 19.5-20.5 kHz. When an effective acoustic segment passes through four filters, four filtered signals are obtained. Four filtered signals are recorded as F1, F2, F3, and F4, respectively. Figure 8: TOA detection process of acoustic signal. Figure 7: Multipath effects of chirp signal. In step 2, we use the cross-correlation operation to decode the signal and then extract the signal.