Method and apparatus for packet detection via cross-correlation in the presence of frequency offset

Information

  • Patent Grant
  • 8238492
  • Patent Number
    8,238,492
  • Date Filed
    Thursday, May 20, 2010
    14 years ago
  • Date Issued
    Tuesday, August 7, 2012
    12 years ago
Abstract
An apparatus and method 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 comprises a slicer that segments a received signal; and a cross correlator that cross-correlates each segment with an expected signal.
Description
TECHNICAL FIELD

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.


BACKGROUND

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.


SUMMARY

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.





BRIEF DESCRIPTION OF THE DRAWINGS

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.



FIG. 1 is a block diagram illustrating a network system;



FIG. 2 is a block diagram illustrating a receiver according to an embodiment of the invention;



FIG. 3 is a block diagram illustrating a packet detector of the receiver according to an embodiment of the invention;



FIG. 4 is a block diagram illustrating a packet detector according to an embodiment of the invention; and



FIG. 5 is a flowchart illustrating a method of packet detection according to an embodiment of the invention.





DETAILED DESCRIPTION OF THE ILLUSTRATED EMBODIMENTS

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.



FIG. 1 is a block diagram illustrating a network system 100. The system 100 comprises a transmitter 110, a receiver 120 and a device (e.g., computer, set top box, digital video recorder, etc.) 130. The transmitter is communicatively coupled, wired or wirelessly, to the receiver 120, which is in turn communicatively coupled, wired or wirelessly, to the device 130. The transmitter 110 transmits an analog signal to the receiver 120, which converts the analog signal into a digital signal for the device 130.



FIG. 2 is a block diagram illustrating the receiver 120 according to an embodiment of the invention. A signal enters a receiving block 200 (e.g., receiving antenna or cable, etc.), which is coupled to an analog front end 210. The analog front end 210 produces in-phase and quadrature (I/Q) signals which enter an analog-to-digital converter (ADC) 220. The ADC 220 is coupled to a packet detector 230 that detects the presence of a packet and establishes symbol boundaries. The packet detector 230 is coupled to a frame synchronization block 240. After frame synchronization is established, the signal enters a signal processing block 250, which can include such functions as fast Fourier transform, channel equalization, and decoding in an embodiment. The output of this block 250 is the decoded data.


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










X





C





O





R

=







i
=
1

N




r
i

·

s
i
*





2





Equation





1







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:






Δθ
=






1
2

·
2



π
·
Δ







f
·
N
·
Δ






t

=




1
2

·
2



π
·

(



2
·
100


e

-
6

)

·
1625


e






6
·

128
/
100



e





6

=

2


π
·
0.21








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:







y


(

Δ





f

)


=







i
=
1

N




r
i

·

s
i
*

·





-
j2π

·
Δ







f
·
Δ







t
·
i







2





As illustrated in FIG. 3, an embodiment of the invention splits the cross-correlation into a finite number (K) of segments and calculates the cross-correlation of each segment separately. The phase of the cross-correlation of each segment can be corrected by de-rotation according to the expected phase offset due to the assumed frequency offset. Then, the partial cross-correlations after phase de-rotation of the K segments are summed coherently. After the summation, a square of the absolute value is calculated to mitigate the unknown received phase offset. The squared-absolute cross-correlation as a function of the assumed frequency offset correction, Δf, is given by:







y


(

Δ





f

)


=







i
=
1


N
/
K





r
i

·

s
i
*

·





-
j2π

·
Δ







f
·
Δ







t
·
i





+




i
=


N
/
K

+
1



2
·

N
/
K






r
i

·

s
i
*

·





-
j2π

·
Δ







f
·
Δ







t
·
i





+

+




i
=



(

K
-
1

)

·

N
/
K







2


N




r
i

·

s
i
*

·





-
j2π

·
Δ







f
·
Δ







t
·
i












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.







y


(

Δ





f

)












(




i
=
1


N
/
K





r
i

·

s
i
*



)

·





-
j2π

·
Δ







f
·
Δ







t
·
0
·

N
K





+


(




i
=


N
/
K

+
1



2
·

N
/
K






r
i

·

s
i
*



)

·





-
j2π

·
Δ







f
·
Δ







t
·
1
·

N
K





+







+


(




i
=



(

K
-
1

)

·

N
/
K


+
1


N




r
i

·

s
i
*



)

·





-
j2π

·
Δ







f
·
Δ







t
·

(

K
-
1

)

·

N
K











2





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:













y


(

Δ





f

)













x


(

-


K
-
1

2


)


·




j2π
·
Δ







f
·
Δ







t
·
0
·

N
K





+

x



(


-


K
-
1

2


+
1

)

·





-
j2π

·
Δ







f
·
Δ







t
·
1
·

N
K






+



















x


(


-


K
-
1

2


+
2

)


·





-
j2π

·
Δ







f
·
Δ







t
·
2
·

N
K












+


x


(


K
-
1

2

)


·





-
j2π

·
Δ







f
·
Δ







t
·

(

K
-
1

)

·

N
K








2







Multiplying all the variables inside the squared absolute value by a constant of:










j2π
·
Δ







f
·
Δ







t
·

N
K

·


K
-
1

2




.




yields:










y


(

Δ





f

)










n
=

-


K
-
1

2





K
-
1

2





x


(
n
)


·





-
j2π

·
Δ







f
·
Δ







t
·

N
K

·
n







2





Equation





2







y


(

Δ





f

)











x


(
0
)


+




n
=
1



K
-
1

2






(


x


(

-
n

)


+

x


(
n
)



)

·
cos



(

2


π
·
Δ







f
·
Δ







t
·

N
K

·
n


)



+






j
·

(


x


(

-
n

)


-

x


(
n
)



)

·

sin


(

2


π
·
Δ







f
·
Δ







t
·

N
K

·
n


)








2





Equation





3







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.



FIG. 3 is a block diagram illustrating a packet detector 230a implementing the embodiment of the invention discussed above. The detector 230a includes a slicer 310 coupled to a shift register 320. The slicer 310 receives an I/Q signal and slices it into K segments for storage in the shift register 320. The segments are then each multiplied with the expected signal (LS) by multipliers 330, which are coupled to the shift register 320. The results are summed by adders 340, which are coupled to the multipliers 330. The summed results are then multiplied by a frequency offset, which can be a constant, by multipliers 350, which are coupled to the adders 340. These results are then summed by adders 360, which are coupled to the multipliers. Blocks 370 then take the absolute value and square the results. Block 380 then finds the maximum and block 390 determines if the maximum is greater than a threshold, in which case, cross-correlation is achieved indicating a packet has been detected. The multipliers 330 through the threshold block 390 can be referred to as a cross correlator.



FIG. 4 is a block diagram illustrating a packet detector 230b according to an embodiment of the invention. For three value of frequency offset, there are three optimal values:







Δ





f

=

{






-

2
3


·
Δ







f
max






0







2
3

·
Δ







f
max










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):










y


(

Δ





f

)







x


(
0
)


+



(


x


(

-
1

)


+

x


(
1
)



)

·
cos



(

2


π
·
Δ







f
·
Δ







t
·

N
K



)


+














j
·

(


x


(

-
1

)


-

x


(
1
)



)

·

sin


(

2


π
·
Δ







f
·
Δ







t
·

N
K



)





2







For each Δf, there are only two constants, cosine and sine:








C
1



(

Δ





f

)


=

cos


(

2


π
·
Δ







f
·
Δ







t
·

N
K



)










C
2



(

Δ





f

)


=

sin


(

2


π
·
Δ







f
·
Δ







t
·

N
K



)






For the three possible frequency offset values:







y


(



-
2

/
3


Δ






f
max


)











x


(
0
)


+



(


x


(

-
1

)


+

x


(
1
)



)

·
cos



(

2


π
·

2
/
3



Δ







f
max

·
Δ







t
·

N
K



)


-






j
·

(


x


(

-
1

)


-

x


(
1
)



)

·

sin


(

2


π
·

2
/
3



Δ







f
max

·
Δ







t
·

N
K



)








2








y


(
0
)








x


(
0
)


+

(


x


(

-
1

)


+

x


(
1
)



)




2








y


(


2
/
3


Δ






f
max


)











x


(
0
)


+



(


x


(

-
1

)


+

x


(
1
)



)

·
cos



(

2


π
·

2
/
3



Δ







f
max

·
Δ







t
·

N
K



)


+






j
·

(


x


(

-
1

)


-

x


(
1
)



)

·

sin


(

2


π
·

2
/
3



Δ







f
max

·
Δ







t
·

N
K



)








2





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:

    • 1. Using the sign of the received signal, r, and 1.5 bits for the expected samples, s. The expected samples, s, can have values from the set {−1, 0, 1}.
    • 2. Using the sign of the received signal, r, and the expected samples, s
    • 3. Using the sign of the expected samples, s, only
    • 4. Using the sign of the received signal, r, only


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.



FIG. 5 is a flowchart illustrating a method 500 of packet detection according to an embodiment of the invention. First, a signal is sliced (segmented) (510) into segments. Then, each segment is multiplied (520) by the expected signal and summed. After, each sum is multiplied (530) by frequency offset over time (a constant) and summed (540). The absolute value is taken (550) and squared and the maximum determined (560). If greater than a threshold (570), then a packet has been detected and the method 500 continues to frame synchronization (580), signal processing, etc. Otherwise, the method 510 repeats.


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.

Claims
  • 1. A method implemented with a packet detector, comprising: segmenting, with a segmenter of the packet detector, a received signal;cross-correlating, with a cross-correlator of the packet detector, each segment with an expected signal; andcorrecting a phase of each correlated segment, with the cross-correlator, by de-rotation according to an expected phase offset due to assumed frequency offset,wherein the cross correlation as a function of frequency offset is:
  • 2. The method of claim 1, wherein the expected phase offset is a constant at a beginning of each segment.
  • 3. The method of claim 1, wherein the expected phase offset is a constant at any same location of each segment.
  • 4. The method of claim 1, wherein 3 values of Δf are used and and the values are a fraction of a maximum frequency offset.
  • 5. The method of claim 4, wherein the maximum frequency offset is approximately 325 kHz.
  • 6. The method of claim 1, further comprising coherently summing the cross-correlations after the de-rotation.
  • 7. The method of claim 1, wherein a sign of the expected signal is used in place of the expected signal.
  • 8. A packet detector, comprising: a slicer that segments a received signal; anda cross correlator that cross-correlates each segment with an expected signal,wherein the cross correlator corrects a phase of each correlated segment by de-rotation according to an expected phase offset due to assumed frequency offset,wherein the cross correlation as a function of frequency offset is:
  • 9. The detector of claim 8, wherein the expected phase offset is a constant at a beginning of each segment.
  • 10. The detector of claim 8, wherein the expected phase offset is a constant at any same location of each segment.
  • 11. The detector of claim 8, wherein 3 values of Δf are used and wherein the values are a fraction of a maximum frequency offset.
  • 12. The detector of claim 11, wherein the maximum frequency offset is approximately 325 kHz.
  • 13. The detector of claim 8, further comprising coherently summing the cross-correlations after the de-rotation.
  • 14. The detector of claim 8, wherein a sign of the expected signal is used in place of the expected signal.
  • 15. A receiver, comprising: a receiving block that receives a signal;an analog front end coupled to the receiving block that produces I and Q signals from the received signal;an analog-to-digital converter coupled to the front end that converts the I and Q signals to digital form;a packet detector coupled to the analog-to-digital converter, the packet detector comprising a slicer that segments the I and Q signals; and a cross correlator that cross-correlates each segment with an expected signal;a frame synch block coupled to the packet detector that established frame synchronization; anda signal processing block coupled to the frame synch block that processes the signal,wherein the cross correlator corrects a phase of each correlated segment by de-rotation according to an expected phase offset due to assumed frequency offset,wherein the cross correlation as a function of frequency offset is:
PRIORITY REFERENCE TO PRIOR APPLICATION

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.

US Referenced Citations (4)
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
Related Publications (1)
Number Date Country
20110249778 A1 Oct 2011 US
Provisional Applications (1)
Number Date Country
61323483 Apr 2010 US