This invention relates generally to receivers and more particularly, but not exclusively, provides a method and apparatus for packet detection using cross-correlation in the presence of frequency offset.
Packet detection may be done via autocorrelation, which is correlation of a received signal with its delayed version; and cross-correlation, which is correlation of the received signal with an expected signal. The expected signal is the transmitted reference signal that is complex conjugated and order-reversed.
Autocorrelation is more robust to echoes, but its peak is not adequately sharp and it is susceptible to any periodic signal with the same period as the delay of the autocorrelation. On the other hand, cross-correlation is sensitive to channel echoes and frequency offset but its peak is distinctive.
Accordingly, a new apparatus and method are needed for packet detection.
Embodiments of the invention provide a method and apparatus for packet detection using cross-correlation in the presence of frequency offset. The method comprises: segmenting a received signal; and cross-correlating each segment with an expected signal. The apparatus (a packet detector or a device, such as a receiver, incorporating a packet detector) comprises a slicer that segments a received signal; and a cross correlator that cross-correlates each segment with an expected signal.
Non-limiting and non-exhaustive embodiments of the present invention are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
The following description is provided to enable any person having ordinary skill in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the embodiments will be readily apparent to those skilled in the art, and the principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles, features and teachings disclosed herein.
In an embodiment, packet detection is done via cross-correlation of a received signal with a Long Sequence (LS). The cross-correlation is done by calculating the squared absolute value of the standard cross-correlation, which is given by
where r is the received signal and s is the expected signal. The cross-correlation goes through an absolute value to mitigate an unknown phase of the received signal.
The standard cross-correlation output of the received signal with the expected LS is reduced when the received signal has a frequency offset. The maximum possible frequency offset for the Multimedia Over Coax Alliance (MoCA) 2.0 standard is 325 kHz. It's obtained for the RF center frequency of 1625 MHz and Rx clock offset of 200 ppm relative to the transmission signal.
Δfmax=2·100e−6·1625e6=325 kHz
The effect of the frequency offset can be revealed from the maximum phase offset generated within the LS duration. Note that only half of the phase offset should be considered because the initial phase offset can be the negative of the half of the previous maximum phase offset. The phase offset for N=128 samples and sampling clock of 100 MHz (Δt=1/(100 MHz)=1e−8) is given by:
Simulation shows that this phase offset causes degradation of 2.6 dB to the cross-correlation peak.
In order to mitigate the effect of the frequency offset, the cross-correlation peak can be searched in 2 dimensions, time and frequency. The cross-correlation can be calculated for a couple of possible values of frequency offset corrections. The cross-correlation peak is the maximum of all the possible cross-correlation results, each performed with different frequency offset correction. The cross-correlation as a function of a frequency offset correction, Δf, is given by:
As illustrated in
The partial cross-correlation of each segment can be approximated by using a constant phase value which is the phase offset at the beginning of each segment. Note that the phase offset can be taken from any time index because the absolute value cancels out any fixed phase offset.
Replacing the cross-correlation of each segment by x(n), where n=−(K−1)/2, . . . , 0, . . . , +(K−1)/2, and assuming, without limiting the generality of the embodiment, that the number of segments, K, is an odd number, yields:
Multiplying all the variables inside the squared absolute value by a constant of:
yields:
Note that the multiplication by the constant does not change the result because its absolute value is 1.
The cross-correlation is calculated for a number of known values of frequency offsets.
where
Δfmax=1625 MHz·200 ppm=325 kHz
is calculated for the maximum RF center frequency of 1625 MHz and maximum frequency offset of 200 ppm between the Tx and the Rx. The optimal three values of frequency offsets above were selected to cover the frequency range of (−Δfmax,+Δfmax) optimally. A maximum frequency error of Δfmax/3 occurs for Δf=±Δfmax or Δf=±Δfmax/3.
The values of cosine and sine are constants, which can be further approximated to simplify the multiplications by complex values. For the above embodiment of three values of frequency offsets and three segments (K=3):
For each Δf, there are only two constants, cosine and sine:
For the three possible frequency offset values:
After simplification, there is a need for two multipliers of a real constant by a complex value only, or four simple multipliers of a real value by a constant.
The cross-correlation computation is very complex because it requires a new cross-correlation value for every sample. In order to simplify the implementation, one of the following approximations can be done:
The cross-correlation may be normalized by the received signal power. Or, equivalently, the threshold may be multiplied by the received signal power. There is no need to normalize by the received signal power when the sign of the received signal is used.
In an embodiment, there are three segments K=3 and three frequency offsets. The three phase offsets are ±Δf_max*⅔=±325 kHz*⅔, and the center is 0. The maximum frequency error is Δf_max/3. The embodiment of the cross-correlation is shown in FIG. 4. Note that when the expected signal, s, uses a Binary Phase-Shift Keying (BPSK) constellation in the time domain, it can be assumed that s is a real signal with values of ±1. However, when the expected signal, s, uses the BPSK constellation in the frequency domain, the time domain signal, s, can be represented by complex values from the set of {−1, 0, 1}.
Accordingly, the packet detector 230b is substantially similar to the packet detector 230a except for the multipliers 410 and 420, which are for cosine and sin multiplication, respectively.
This written description uses examples to disclose the invention, including the best mode, and also to enable any person skilled in the art to practice the invention, including making and using any devices or systems and performing any incorporated methods. The patentable scope of the invention is defined by the claims, and may include other examples that occur to those skilled in the art. Such other examples are intended to be within the scope of the claims if they have structural elements that do not differ from the literal language of the claims, or if they include equivalent structural elements with insubstantial differences from the literal languages of the claims.
This application claims benefit of and incorporates by reference U.S. patent application Ser. No. 61/323,483, entitled “Cross-Correlation in the Presence of Frequency Offset,” filed on Apr. 13, 2010, by inventors Yehuda Azenkot et al.
Number | Name | Date | Kind |
---|---|---|---|
4346461 | Muir | Aug 1982 | A |
7672405 | Lin et al. | Mar 2010 | B2 |
20030137996 | Roh et al. | Jul 2003 | A1 |
20090257483 | French et al. | Oct 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20110249778 A1 | Oct 2011 | US |
Number | Date | Country | |
---|---|---|---|
61323483 | Apr 2010 | US |