Measuring Time-of-Flight in an Ultrasonic LPS System Using Generalized Cross-Correlation
">
<p>Block diagram of the ultrasonic LPS.</p> ">
<p>Block diagram of the receiver.</p> ">
<p>Block diagram of the proposed positioning system model.</p> ">
<p>Block diagram of the estimation process of the arrival instant for a sequence <span class="html-italic">j</span> based on GCC.</p> ">
<p>Position of the beacons and the receiver for the analysis of the detection process.</p> ">
<p>Beacon detection in the absence of noise by applying the cross-correlation (CC) method in the time domain.</p> ">
<p>Beacon detection in the absence of noise, by applying generalised cross-correlation (GCC) with PHAT filtering.</p> ">
<p>Beacon detection with a signal-noise ratio of 0 dB, by applying generalised cross-correlation (GCC) with PHAT filtering.</p> ">
<p>Beacon detection by applying CC, for a modulation symbol formed by four carrier cycles (<span class="html-italic">m</span> = 4).</p> ">
Abstract
: In this article, a time-of-flight detection technique in the frequency domain is described for an ultrasonic Local Positioning System (LPS) based on encoded beacons. Beacon transmissions have been synchronized and become simultaneous by means of the DS-CDMA (Direct-Sequence Code Division Multiple Access) technique. Every beacon has been associated to a 255-bit Kasami code. The detection of signal arrival instant at the receiver, from which the distance to each beacon can be obtained, is based on the application of the Generalized Cross-Correlation (GCC), by using the cross-spectral density between the received signal and the sequence to be detected. Prior filtering to enhance the frequency components around the carrier frequency (40 kHz) has improved estimations when obtaining the correlation function maximum, which implies an improvement in distance measurement precision. Positioning has been achieved by using hyperbolic trilateration, based on the Time Differences of Arrival (TDOA) between a reference beacon and the others.1. Introduction
The term LPS (Local Positioning System) refers to a system used for location and positioning in indoor (or at least reduced) environments where the use of positioning techniques based on GPS is very limited due to the weakness of the GPS signals. These kinds of systems are the keystone for the implementation of intelligent spaces able to interact with people and robots. Nowadays there are a lot of applications that can be developed in modern buildings with an effective LPS [1]. As examples the guidance of people inside buildings [2], the study of the people’s behavior in some contexts [3], the development of healthcare and entertainment applications [4] or some indoor robot applications [5] can be highlighted.
LPSs have been developed using different technologies such as infrared [6], RF [7], or ultrasound [8], when ultrasonic signals are used there are several beacons emitting in the covered area and different mobile devices whose positions are going to be calculated. In this process, the system measures the time of arrival (TOA) or the time-differences of arrival (TDOA) to estimate the distance or distance difference between each mobile node and the different beacons. TDOA permits that the emitters and each receiver to not be synchronized by means of radio-frequency or infrared signals (asynchronous detection), which simplifies the hardware; the disadvantage is that it is necessary to use one more beacon as reference. Due to the existence of several emitters sharing the same channel, it is essential to use a method to avoid the interferences between them, like frequency division for multiple access (FDMA), time division for multiple access (TDMA) or code division for multiple access (CDMA). The last one is a spread spectrum technique that consists of codifying each emission with a different code, and then allowing the identification of each beacon code at the receiver among all the received signals. CDMA is well known and widely used in ultrasonic applications [9].
The determination of TOA (or TDOA) implies the measurement of time delay in the arrival of a signal (or difference of delays in the arrival of two signals) to a receiver. In the case of natural sounds, including speech, intense work has been developed during the last years. The methods used deal with the random nature of these signals and their high relative bandwidth. Different algorithms have been compared in [10] in terms of the suitable sampling frequency to implement them, in the time domain (standard cross correlation -CC-, generalized cross correlation -GCC-) and in the frequency domain and envelope analysis (generalized phase spectrum -GPS-, envelope combined with GPS). In the case analyzed in this paper, the signals used are in the ultrasonic frequencies band for air with a lower relative bandwidth than sound. They are also coded and modulated before they are transmitted. Additionally different signals emitted from different beacons share simultaneously the same channel and are received with only one receiver.
This paper presents an ultrasonic LPS, such as that shown in Figure 1, based on a group of transmitter beacons located at known positions, which transmit simultaneously and periodically by using DS-CDMA (Direct-Sequence Code Division Multiple Access) technique [11]. Each beacon emits a BPSK-modulated 255-bit Kasami code with a 40 kHz carrier [12]. The modulation symbol is formed by one or several carrier cycles (m) in order to provide more energy to the channel. An important feature of this LPS is the absence of synchronization between the beacons and the receiver. This means that it becomes necessary to use a positioning algorithm based on hyperbolic trilateration, by using as distance measurement the time differences of arrival (TDOA) between a reference beacon and the others, given the asynchronous feature of the LPS described. In order to estimate every signal’s instant of arrival at the receiver, the received signal is sampled and stored in a temporary buffer with enough sample size to store at least one complete transmission period (approximately 40 ms).
As has been mentioned, each beacon has assigned a code or sequence for encoding the emission. The arrival instant for each emission is often determined by the correlation between the received signal and the code to be detected. This process is known as matched filtering, and it is based on detecting at what instant it provides a correlation maximum. A block diagram of the receiver is shown in Figure 2, which basically consists of an acquisition system based on an 8-bit ADC (fs = 400 kHz) and a high-speed processing unit based on a DSP or FPGA [13].
The Inter-Symbol Interference (ISI) caused by the fact that the Auto-Correlation (AC) function of the sequences used, and the Cross-Correlation (CC) between them, is not null near the maximum, implies that it is sometimes difficult to detect the real position of the maxima [14]. In order to improve the detection process, without applying typical communications algorithms as MAI (Multiple Access Interference) or ISI cancellation, which usually involve a high computational load, the use of generalized cross-correlation (GCC) is proposed [15], which is widely employed in acoustics to estimate the delay time between signals [16,17].
This article is organized as follows: in Section 2 the positioning system model reported here is described, and the classical detection process based on cross-correlation. In Section 3, GCC is explained, as well as its application to detect sequences or codes assigned to each beacon. In Section 4, some results obtained for the detection process by applying GCC are provided, and compared with those obtained from CC. Finally, some conclusions are discussed in Section 5.
2. Positioning System Model
In the positioning system model (see Figure 3) the beacons are considered as a set of K transmitters. Every emitted signal, xj(t), is the encoded emission of the beacon j and is the result of the BPSK modulation of a binary code cj with a carrier pm(t), and the convolution of this modulated signal with the impulse response of the transmitter, ht(t). Considering that hj(t, τj) is the response of the channel for the beacon j, τj is the delay in receiving the sequence assigned to beacon j and η(t) is a zero-mean Gaussian noise and variance σ2, the received signal y(t) is given by Equation (1):
Considering the detection process of a beacon j, it is necessary to carry out the correlation between the received signal y[n] and the sequence (or code) to be detected sj[n]. The correlation function is given by Equation (4):
Both the auto-correlation function of the sequence transmitted by the beacon j (when xi = xj) and the cross-correlations between the sequence transmitted by the beacon j and the other beacons can be identified in Equation (4). The last term in Equation (4) represents the cross-correlation between the sequence to be detected and the noise. The function is maximum for n = Dj which corresponds to the arrival instant of the sequence assigned to the beacon j. The second term in Equation (4) is the cross-correlation between all the other sequences i (i ≠ j) or beacons and the received signal y[n], and represents the interference due to multiple access (MAI). The last term means the correlation between noise and the sequence assigned to the beacon j. The arrival instant of the sequence j, in samples, is provided by Equation (5):
The time difference of arrival (TDOA) between a reference beacon i and another beacon j, considering the sampling time Ts, is given by Equation (6):
3. Generalized Cross-Correlation
Another method for computing the arrival instant of a sequence j assigned to a beacon is based on the inverse Fourier transform of the cross-spectral density between the received signal and the sequence to be detected. This method is known as Generalized Cross-Correlation (GCC), and it is widely used by many authors as a method for estimating the delay in reception of a signal at two receivers positioned at a specific distance from a communication source [15]. In particular, it is commonly used for the detection of an acoustic signal source and for locating it in a determined environment. In this case, the receivers are a set of microphones [18].
If it is considered that the received signal y(t) and the signal to be detected x(t), have been filtered prior to carrying out the cross-correlation process by using the filters Hy(f) and Hx(f), respectively, the cross-spectral density, related to the cross-correlation, is defined by Equation (7):
Regarding a discrete-time analysis, the generalised cross-correlation in discrete time, between the received signal y[n] and the sequence sj[n] to be detected, is given by Equation (9):
Note that if Φj[k] = 1, the GCC function Equation (10) becomes the standard version of the cross-correlation of the two signals obtained from the inverse Fourier transform for their cross-spectral density. An approximation to the expression gives an estimation of the GCC function by considering a limited number N of samples. The estimated instant n = Dj corresponds to the maximum of the function in Equation (10), and represents the arrival of the sequence j at the receiver, which is given by Equation (11):
Filtering has two objectives. First, it accentuates the signal to be correlated in those frequencies where the signal-to-noise ratio is higher; therefore, Φj(f) depends on the signal spectrum and noise. Secondly, the filtering yields the most accentuated peak possible at the correct instant for obtaining a good temporary resolution. However, the accentuated maxima are more sensitive to errors produced by finite observation times, particularly in the case of low signal-to-noise ratios. The choice of the filter is thus a trade-off between temporary resolution and stability. The way in which this calculation is carried out has been studied by several authors, taking into account two criteria: temporary resolution and error due to noise. Several filtering expressions have been analysed in [15].
The filtering function known as PHAse Transform (PHAT filtering), is widely used to estimate signal delay between two receivers located at a given distance from the acoustic source or transmitter. Its expression in this case, considering beacons as transmitters whose signal is sj[n], and the received signal y[n], is provided in Equation (12):
The advantage over the other filtering functions analysed in [15] is that it notably improves estimation in environments with a certain level of reverberation. Assuming that the noise is completely uncorrelated, peaks in the correlation function are much narrower, near a true delta function at the instant of arrival of the sequence, with an absence of sidelobes. This is because the delay information is present in certain frequency phases and it is not affected by the transform, since the applied filtering enhances the real instant of arrival of the sequence or delay, and eliminates spurious delays, to a greater or lesser extent, depending on noise power.
Detection of the Signal from the Beacons
Since beacons are considered as emitters whose transmitted signal is sj[n], and the received signal y[n], the estimation of the arrival instant for each beacon, when applying the GCC with PHAT filtering, requires a more complex analysis in order to apply the correlation between the received signal and the sequence to be detected, as the received signal is a composition of as many emitting sources or signals as available beacons. Figure 4 shows the estimation process of the arrival instant of sequences for GCC with a pre-filtering function, in time domain.
Let consider the received signal from the beacons, defined as Equation (13):
In this case, it is possible to state Equation (18):
Thus, is not an ideal delta, but an attenuated delta at instant Dj and some sidelobes. This is provided by the other sequences that interfere in the correlation process due to their pseudo-orthogonality. Furthermore, the more the signal-to-noise ratio reduces, the more the detection process worsens due to the spectral contribution of the noise power. An alternative is to use, as a PHAT filter, the inverse module of the Fourier transform of the auto-correlation of the sequence to be detected. This is:
As the auto-correlation spectrum is a real and positive function:
It becomes:
As can be observed, the searched sequence becomes a unitary delta, whereas the deltas for the other sequences are weighted by Equation (22). Since the sequences are pseudo-orthogonal, their values become much less than one.
4. Results
4.1. Simulation Results
In order to compare the sequence detection method based on cross-correlation (CC) between the received signal and the sequence assigned to each beacon with the method based on generalised cross-correlation (GCC) and on applying phase transform (PHAT) filtering, a LPS with two beacons have been considered. The beacons have been located in a 2D system at positions (x1 = 0, y1 = 300 cm) and (x2 = 300 cm, y2 = 300 cm), whereas the receiver is located at (rx = 0, ry = 151 cm). In other words, the receiver is practically equidistant from both beacons (see Figure 5). For the emission, 255-bit Kasami codes, with one carrier cycle as modulation symbol (m = 1), have been used.
Figure 6 shows the detection process in the absence of noise and considering ideal beacons, based on cross-correlation between the received signal and the sequences to be detected in the time domain. It can be observed the correlation function maxima, as well as the appearance of sidelobes as a consequence of the ultrasonic signal modulation process, which generates a widening of the spectrum.
Figure 7 shows how the method based on GCC with PHAT filtering noticeably improves detection: sidelobes have practically disappeared, and the detection instant becomes almost a delta.
Prior filtering of the signals based on phase transform (PHAT) accentuates the frequencies around the carrier. Then, when the Fourier transform-based correlation is applied, a delta is obtained at the sequence arrival instant. Figure 8 shows the detection process for a signal-to-noise ratio of 0 dB, where the GCC method still improves detection, despite the appearance of sidelobes in the frequency response generated by noise, which implies high values around the carrier frequency.
In the case of a modulation symbol consisting of four carrier cycles (m = 4), to increase the energy transmitted by the beacons and concentrate the transmission spectrum around the carrier frequency, the edge effects caused by modulation when CC is applied are shown in Figure 9, whereas the detection corresponding to sequence arrival instant when GCC is applied is illustrated in Figure 10.
4.2. Real Results
In order to analyse the GCC behaviour with real signals a practical set-up with a geometric configuration similar to that used for simulations has been arranged and tested. A Prowave (328ST160) transducer [19] has been selected to implement the beacons. The measured impedance/phase angle versus frequency for this transducer can be seen in Figure 11(a) and the sound pressure level (SPL) versus frequency in Figure 11(b). The transducer has been used working around the frequency of 40 kHz in order to have enough bandwidth (8 kHz) and to minimize the phase distortion in the emitted signal.
Two beacons have been used for transmission and the receiver has been positioned on the floor. Figure 12 shows the experimental setup diagram. The beacons are excited by a dual-channel Tabor 5062 Arbitrary Waveform Generator followed by a Tabor 9200 voltage amplifier. The receiver is a Brüel & Kjaer 4939 microphone with a 2670 preamplifier which output has been captured by an UltraSoundGate 116 Hm, an Avisoft ultrasonic signal acquisition system [20]. A computer enables the acquisition at 400 kHz sampling frequency and performs all the post processing using Matlab.
When the receiver is in the position 1 (according to the diagram shown in Figure 12), the detection process results for a modulation symbol with one carrier cycle (m = 1) by applying CC and GCC, are shown in Figure 13(a,b), respectively.
In the same position 1, the results obtained when using a modulation symbol with four carrier cycles (m = 4) by applying CC and GCC, are shown in Figure 14(a,b), respectively.
In both cases (with m = 1 in Figure 13 and with m = 4 in Figure 14), it can be observed that the use of the GCC provides a significant enhancement of the peaks regarding the lateral values affected by the modulation process and the characteristics of the transmission channel.
Figure 15 shows the results obtained, using standard correlation (CC) and GCC, in the measurement of the DTOA between the signals emitted from the beacons 1 and 2 when they are received in positions 1 and 2 (according to Figure 12). The results are expressed in samples (the sampling period used is 2.5 μs), as the difference between the maximum peaks of both correlations, the corresponding to beacons 1 and 2. The test has been repeated 20 times, and the values of the mean and the standard deviation have been included for every case. The expected values for position 1 and 2 have been measured by using a laser distance meter.
For the position 1, in which both signals arrive with a considerable delay, CC gives a most repetitive result (although looking at Figures 13 and 14, the main peak in the correlations is clearer for GCC). Nevertheless, for the position 2, in which both signals arrive almost simultaneously, the interference between them affects more to the CC, giving an erroneous result in the computation of the DTOA. In this case the GCC allows computing the DTOA correctly. Figure 16(a,b) show the output of the correlation process for the signals received in this position 2 by using CC and GCC respectively. It can be verified how the use of GCC gives better results because the main peaks in every representation have less secondary peaks around.
5. Conclusions
A method based on the GCC for obtaining the TDOA of two signals coming from different beacons to the same receiver has been proposed in this work. It has been applied to an ultrasonic LPS, whose beacons emit encoded signals by means of Kasami sequences. The detection algorithm is based on the cross-spectral density between the received signal and the modulated sequences to be detected (each one related to its corresponding beacon).
The proposed algorithm provides a significant reduction in the lateral lobe effects, when compared with standard correlation, caused by the modulation process, the interference between emissions and the characteristics (attenuation, multipath, etc.) of the channel. The detection of the maximum peak to determine the arrival instant of each sequence is then easier.
The algorithm has been tested with simulated and real data comparing its performance with that obtained when a basic correlation (CC) is used. GCC gives always a clearer maximum peak than CC with less significant secondary peaks around the main one. When the signals arrive to the receiver with a considerable delay (milliseconds) the performance of both detection algorithms, CC and GCC, is similar, being the CC less sensible to the noise and distortion introduced by the transducer. On the other hand, when the signals arrive to the receiver almost simultaneously (very low DTOA), the GCC allows to compute the DTOA while the CC fails (because the interference between both signals and its influence in the secondary peaks).
Acknowledgments
This research was supported by the Spanish Ministry for Science and Technology through the LEMUR project (ref. TIN2009-14014-CO4-01).
References
- Kolodziej, K.W.; Hjelm, J. Local Position Systems—LBS Applications and Services; CRC: Boca Raton, FL, USA, May 2006.
- Sukaviriya, N.; Podlaseck, M.; Kjeldsen, R.; Levas, A.; Pingali, G.; Pinhanez, C. Embedding interactions in a retail store environment: The design and lessons learned. Proceedings of the 9th IFIP International Conference on Human-Computer Interaction, Zurich, Switzerland, 1–5 September 2003.
- Kälin, T.; Müller, L.; Rüegg, M. Evaluating the behaviour of museum visitors using RFID. Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Zurich, Switzerland, 15–17 September 2010.
- Rob, D.W.; Griesser, M.; Gereke, A. Realizing an emergency call system on a real-time location application platform for healthcare. Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Zurich, Switzerland, 15–17 September 2010.
- Choi, B.S.; Lee, J.W.; Lee, J.J.; Park, K.T. A hierarchical algorithm for indoor mobile robots localization using RFID sensor fusion. IEEE Trans. Ind. Electron 2011, 58, 2226–2235. [Google Scholar]
- Manley, E.D.; Nahas, H.A.; Deogun, J.S. Localization and tracking in sensor systems. Proceedings of the IEEE International Conference on Sensor Networks, Ubiquitous and Trustworthy Computing, SUTC ’06, Taiwan, 5–7 June 2006; pp. 1–6.
- Gigl, T.; Janssen, G.J.M.; Dizdarevic, V.; Witrisal, K.; Irahhauten, Z. Analysis of a UWB indoor positioning system based on received signal strength. Proceedings of the 4th Positioning, Navigation and Communication WPNC ’07, Hannover, Germany, 22 March 2007; pp. 97–101.
- Jimenez, A.R.; Seco, F. Precise localisation of archaeological findings with a new ultrasonic 3D positioning sensor. Sens. Actuat. A Phys 2005, 123–124, 224–233. [Google Scholar]
- Hazas, M.; Ward, A. A novel broadband ultrasonic location system. Proceedings of the 4th International Conference on Ubiquitous Computing, UbiComp ’02, Göteborg, Sweden, September 2002; pp. 264–280.
- Ouzid, O.M.; Tian, G.Y.; Neasham, J.; Sharif, B. Investigation of sampling frequency requirements for acoustic source localisation using wireless sensor networks. Appl. Acoust 2011. [Google Scholar] [CrossRef]
- Villadangos, J.M.; Ureña, J.; Mazo, M.; Hernández, A.; de Marziani, C.; Pérez, M.C.; Álvarez, F.; Jesús García, J.; Jiménez, A.; Gude, I. Ultrasonic local positioning system with large covered area. Proceedings of the IEEE International Symposium on Intelligent Signal Processing, WISP ’07, Alcala de Henares, Spain, 3–5 October 2007; pp. 1–6.
- Perez, M.C.; Ureña, J.; Hernandez, A.; Jimenez, A.; Ruiz, D.; Alvarez, F.J.; de Marziani, C. Performance comparison of different codes in an ultrasonic positioning system using DS-CDMA. Proceedings of the IEEE International Symposium on Intelligent Signal Processing, WISP ’09, Budapest, Hungary, 26–28 August 2009; pp. 125–130.
- Jiménez, A.; Hernández, A.; Ureña, J.; Alonso, M.; de Marziani, C.; Pérez, M.C.; Mazo, M.; Villadangos, J.M.; García, J.J.; Álvarez, F. FPGA-based implementation of an ultrasonic beacon for a local positioning system. Proceedings of the 32nd IEEE International Annual Conference on Industrial Electronics, Control and Instrumentation, IECON ’06, Paris, France, 6–10 November 2006; 1, pp. 43–46.
- Villadangos, J.M.; Ureña, J.; Mazo, M.; Hernández, A.; de Marziani, C.; Jiménez, A.; Álvarez, F. Improvement of cover area in ultrasonic local positioning system using cylindrical PVDF transducer. Proceedings of the International Symposium in Industrial Electronics, ISIE ’07, Vigo, Spain, 4–7 June 2007; pp. 1473–1477.
- Knapp, C.H.; Carter, G.C. The generalized correlation method for estimation of time delay. IEEE Trans. Acoust. Speech Signal Process 1976, 24, 320–327. [Google Scholar]
- Abutaleb, H.R.; Momenzadeh, H. An improved method for TDOA-based speech source localization. Proceedings of the 15th International Congress on Sound and Vibration, ICSV ’15, Daejeon, Korea, 6–10 July 2008; pp. 2939–2946.
- Hu, J.-S.; Yang, C.-H. Estimation of sound source number and directions under a multisource reverberant environment. EURASIP J. Adv. Signal Process 2010, 2010, 870756:1–870756:14. [Google Scholar]
- Chen, J.; Benesty, J.; Huang, Y. Time delay estimation in room acoustic environments: An overview. EURASIP J. Adv. Signal Process 2006, 2006, 26503:1–26503:19. [Google Scholar]
- Pro-Wave Electronics Corporation, Product Specification. Available online: http://www.prowave.com.tw/english/products/ut/open-type/328s180.htm (accessed on 14 August 2011).
- User’s Guide UltraSoundGate 116–200. Product Specification; Avisoft Bioacoustics: Berlin, Germany, 2005.
© 2011 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).
Share and Cite
Villladangos, J.M.; Ureña, J.; García, J.J.; Mazo, M.; Hernández, Á.; Jiménez, A.; Ruíz, D.; Marziani, C.D. Measuring Time-of-Flight in an Ultrasonic LPS System Using Generalized Cross-Correlation. Sensors 2011, 11, 10326-10342. https://doi.org/10.3390/s111110326
Villladangos JM, Ureña J, García JJ, Mazo M, Hernández Á, Jiménez A, Ruíz D, Marziani CD. Measuring Time-of-Flight in an Ultrasonic LPS System Using Generalized Cross-Correlation. Sensors. 2011; 11(11):10326-10342. https://doi.org/10.3390/s111110326
Chicago/Turabian StyleVillladangos, José Manuel, Jesús Ureña, Juan Jesús García, Manuel Mazo, Álvaro Hernández, Ana Jiménez, Daniel Ruíz, and Carlos De Marziani. 2011. "Measuring Time-of-Flight in an Ultrasonic LPS System Using Generalized Cross-Correlation" Sensors 11, no. 11: 10326-10342. https://doi.org/10.3390/s111110326