• No results found

Methods of Detecting Arriving Packets

Every ToA/TDoA approach to wireless localization relies on determining the time of flight of a packet transmitted between the transmitter and receiver. This is accomplished by knowing when the packet was transmitted as well as when it was received and removing any known errors. Having an accurate time of flight allows the distance to be calculated, as electromagnetic signals travel at the known speed of light. Much research has focused on achieving very precise estimates of the arrival time, using a variety of hardware and software based approaches. A hardware implementation is needed to keep measurement error small or constant, indicating that the chosen approach is to be implemented on the USRP2‘s FPGA.

2.6.1 Peak Detection Using RSSI

When no packets are present in the medium, the magnitude of the measured signal solely depends on environmental noise. The presence of a packet increases the RSSI [35]. The simplest method for detecting the arrival of a packet is to compare the received signal strength with a known threshold and signal the packet‘s arrival once the threshold is exceeded. This method has the additional advantage of being easy to implement using an analog comparator, producing an asynchronous digital signal. The asynchronous signal can then be used as an input to the high- resolution timestamping methods discussed in [7], making sub-nanosecond resolution possible. However, it is important to choose an appropriate threshold when using this method. The noise power is generally unknown, unpredictable, and subject to change. Path loss also affects the RSSI [35]. IEEE 802.11 implements power control [33], which means that the transmitter output power may change over time as well.

According to [6], the peak of the received signal energy indicates the correct time of arrival for the first symbol of the packet. This approach is not dependent on the magnitude of the

28 total received power [35]. The rate of change in the RSSI can be used to help determine when a peak is detected and the timestamp should be recorded. To reduce the system‘s sensitivity to noise, digital implementations can employ a double sliding window approach. Two values for the RSSI are calculated by taking the sums of two adjacent time intervals. As new samples arrive, old values are discarded. This is implemented using Equation 5.

Equation 5: RSSI [22]

This equation uses to indicate the output value of the sliding window, rn to indicate an

individual RSS measurement, and L is the length of the sliding window.

Larger values of L improve noise resilience, at the expense of a longer algorithm-induced time delay and increased processing requirements. Since the delay is constant it does not present a significant issue, but both sliding windows need to be able to update once every clock cycle. Since a larger sliding window requires more memory [35], the size of the sliding window is limited by the capabilities of the FPGA hardware.

2.6.2 Matched Filter Correlation

Matched filtering is a well-known technique for determining when a signal arrived, and is commonly used in noisy environments [30]. Given a known pattern within the transmitted signal, a matched filter can be created by reversing the pattern in time and multiplying it by the arriving signal. A fixed time delay equal to the length of the pattern being correlated must be introduced to ensure the filter is causal [30]. The matched filter can be represented with Equation 6.

Equation 6: Matched filter

29 This equation gives the result of a matched filter when s(t) is the known waveform, τ is the length of the known waveform in the time domain, and A is a filter gain.

The output of the filter, h(t)*s(t), is a correlation function that maximizes the SNR of its output. The peak values of this correlation function indicate the strongest matches between the received signal and the anticipated signal. When a strong correlation appears, a timestamp can be created. If the matched filter method is used, care must be taken to select an appropriate known waveform that will indicate the arrival of the packet. IEEE 802.11 provides a known preamble at the beginning of every packet consisting of ―scrambled ones‖ [33], allowing matched filters to be created using part of or the entire known signal.

2.6.3 MUSIC-based Correlation Algorithms

An algorithm known as MUSIC was developed as an improved correlation method for determining the time of arrival. Reference [39] presents an improved version of this algorithm known as Root-MUSIC in the context of an 802.11a/g system. Reference [1] presents and

compares three very similar algorithms known as TD-MUSIC, FD-EigenValue, and FD-MUSIC. Due to the similarity of these algorithms, TD-MUSIC is presented below. This algorithm was shown to have the best performance of the three variants discussed.

TD-MUSIC creates a pseudospectrum similar in appearance to a Fourier transform that may be used to isolate individual peaks when determining the time at which the direct path arrived. The pseudospectrum F(τ) is generated using the following steps:

1) Formulate an autocorrelation matrix for the received signal. 2) Perform Eigenvalue decomposition on the autocorrelation matrix.

30 3) Estimate the signal subspace dimensions. This is crucial to the performance of the TD-

MUSIC algorithm [1].

4) Separate the signal subspace using the magnitudes of the Eigen values. 5) Pass the new signal subspaces through the function defined in Equation 7.

Equation 7: TD-MUSIC algorithm

Many of these quantities represent standard quantities in digital signal processing. τ is the time offset between the current value in the sample and the first value of the sample, while s(n-τ) is the generalized signal vector. UN represents the noise subspace.