# Acoustic TDOA Measurement and Accurate Indoor Positioning for Smartphone
## 3 Robust TDOA Measurement Method  
### Signal Design  
It has been noted that the chirp signal has good autocorrelation characteristics, which can improve ranging resolution and reception sensitivity. In the meanwhile, the chirp signal can resist a certain degree of multipath fading, and multiple reflected acoustic signals can be distinguished with an appropriate signal processing model. Therefore, we choose the chirp signal as the signal emitted by the acoustic node. chirp signal is defined as follows:  
\[\mathrm{s}(t)=\mathrm{A}e^{i(2\pi(f_{0}t+\frac{f_{c}-f_{0}}{2}t^{2}))},0\leq t \leq\mathrm{T} \tag{1}\]  
where \(f_{0}\) is the starting frequency and \(f_{c}\) is the cut-off frequency. A is the amplitude of the signal. T is the duration of the chirp signal. Let's make \(k=f_{c}-f_{0}\). If \(k>0\), the chirp signal is up-chirp. If \(k<0\), the chirp signal is down-chirp. In order to distinguish four acoustic  
Figure 1: Acoustic positioning system for smartphone.  
Figure 2: Hardware frame diagram (**a**) Acoustic node hardware architecture; (**b**) Scheduler hardware architecture.  
nodes, we design four chirp signals with different frequency bands. In order to reduce the impact of environmental noise, all acoustic nodes transmit signals with frequencies above 15 kHz. The frequency of the signal transmitted by acoustic node 1 is 16-15 kHz. The frequency of the signal transmitted by acoustic node 2 is 16.5-17.5 kHz. The frequency of the signal transmitted by acoustic node 3 is 19-18 kHz. The frequency of the signal transmitted by acoustic node 4 is 19.5-20.5 kHz.  
Figure 3 shows the time-frequency distribution of signals corresponding to each acoustic node. We design chirp signals according to the following principles: (1) up-chirp and down-chirp are distributed in adjacent frequency bands. For example, if s1 is up-chirp, s2 should be down-chirp. If s1 is down-chirp, s2 should be up-chirp. (2) Adjacent coding frequency band interval 500 Hz. (3) The time length of each signal is 10 ms to avoid complex calculations. It should be noted that the encoding method in Figure 3 is advantageous for decoding. We only use cross-correlation to detect the received signals. In order to illustrate the effect on decoding by using cross-correlation functions, Figure 4 shows the sequentially received signals defined as _s(t)_, which include s1, s2, s3 and s4.  
We use different prior signals (s1, s2, s3, and s4) to correlate with the received signal s(t). After cross-correlation, the signals can be decoded and the time delay of the signals can be estimated as well, which is shown in Figure 5.  
In practice, acoustic nodes transmit signals in turn to avoid signal aliasing. All acoustic nodes in this paper can be scheduled by the scheduler for scheduling time. In this paper, the scheduler transmits a wireless trigger signal every two seconds and when the acoustic nodes receive the trigger signal, acoustic nodes transmit chirp signals in turn every 200 ms. The specific scheduling diagram is shown in Figure 6.  
Figure 4: Schematic diagram of combined signal.  
Figure 3: Time-frequency distribution of different coded chirp signals.