Abstract:
A method and system for an optimal one-shot estimate of phase and frequency for timing acquisition employ a maximum a posteriori (MAP) formulation to calculate a cost function that is a function of an estimated frequency and an estimated phase. A plurality of cost functions are calculated each using a different estimated frequency and a different estimated phase, and the minimum value cost function is selected. The estimated frequency and estimated phase values are selected from a range of frequency and phase values. The minimum value cost function corresponds to the optimum frequency and the optimum phase.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
   This application claims the benefit of Provisional Application No. 60/428,507, filed Nov. 22, 2002, and Provisional Application No. 60/434,584, filed Dec. 17, 2002. This application incorporates these provisional applications by reference. 

   BACKGROUND OF THE INVENTION 
   1. Field of the Invention 
   The present invention relates generally to timing acquisition in a data stream. More particularly, the invention is directed to a method and apparatus for estimating the phase and the frequency for timing acquisition of a data stream. 
   2. Description of the Related Art 
   In electronic communications systems, during signal transmission, transmitted signals may be subject to noise. The received signal will be a combination of the original signal and the noise. The received signal data may be represented as the sum of the original signal and a noise component as follows:
 
 x=f ( t )+ n ( t )   EQ 1
 
where: f(t) is the original signal, and n(t) is noise.
 
   The electronic communications system must be able to extract the information contained in the transmitted signal, even in the presence of noise. 
   In communications channels, data often is preceded by a preamble which has a fixed length of a known bit sequence. Sampling the preamble provides timing characteristics of the communications channel to enable receipt of the digital data. 
   The sampled preamble,  X , may be represented by the following:
 
  X =[x O  . . . x N ]  EQ 2
 
where
 
   
     
       
         
           
             
               
                 
                   x 
                   k 
                 
                 = 
                 
                   
                     A 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       sin 
                       ⁡ 
                       
                         ( 
                         
                           Φ 
                           + 
                           
                             k 
                             · 
                             f 
                             · 
                             
                               π 
                               2 
                             
                           
                         
                         ) 
                       
                     
                   
                   + 
                   
                     n 
                     k 
                   
                 
               
             
             
               
                 EQ 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 3 
               
             
           
         
       
     
       
       
         
           A is the signal amplitude, 
           k is a sample point, 
           Φ is the phase of the data signal, 
           f is the frequency, and 
           n k  is channel noise. 
         
       
     
  
   The sampled preamble is then estimated, resulting in the following approximation,  Y  being the estimated preamble:
 
  Y =[y O  . . . y N ]  EQ 4
 
where
 
   
     
       
         
           
             
               
                 
                   y 
                   k 
                 
                 = 
                 
                   
                     A 
                     ^ 
                   
                   ⁢ 
                   
                     sin 
                     ⁡ 
                     
                       ( 
                       
                         
                           Φ 
                           ^ 
                         
                         + 
                         
                           k 
                           · 
                           
                             f 
                             ^ 
                           
                           · 
                           
                             π 
                             2 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
             
               
                 EQ 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 5 
               
             
           
         
       
     
       
       
         
           Â is an estimated signal amplitude, 
           {circumflex over (Φ)} is an estimated phase, and 
           {circumflex over (f)} is an estimated frequency. 
         
       
     
  
   Data may be transmitted reliably over the data channel when, after processing the preamble samples, the phase estimate is within 1% of the actual phase, and the frequency estimate is within 0.1%, preferably within 0.05% of the actual frequency. Traditionally, in the presence of a large frequency offset (a difference between the frequency estimate and the actual frequency), a preamble of sufficient length is required in order to have good frequency acquisition before the channel switches into the data mode. Often it is necessary to engage in a trade-off between timing loop bandwidth and the preamble length regarding the frequency acquisition. However there is a limit to such a compromise. For example, stability is a problem when the bandwidth is too large, especially when the timing loop delay cannot be ignored. Also, large bandwidth admits more noise, causing large jitters in the timing loop. 
   To improve the format efficiency of the digital data, it is desirable to have the preamble be as short as possible. 
   SUMMARY OF THE INVENTION 
   A Maximum Likelihood Estimation (MLE) technique may determine the components of the estimated preamble. Assuming the communication channel noise is white and has a normal distribution, then the MLE of the amplitude, phase and frequency involves finding Â, {circumflex over (Φ)}, and {circumflex over (f)} so as to minimize the squared difference between the sampled preamble and the estimated preamble. 
   
     
       
         
           
             
               
                 
                   
                      
                     
                        
                       
                         
                           X 
                           ^ 
                         
                         - 
                         
                           Y 
                           ^ 
                         
                       
                        
                     
                      
                   
                   2 
                 
                 = 
                 
                   
                     ∑ 
                     
                       k 
                       = 
                       0 
                     
                     
                       N 
                       - 
                       1 
                     
                   
                   ⁢ 
                   
                       
                   
                   ⁢ 
                   
                     
                       ( 
                       
                         
                           x 
                           k 
                         
                         - 
                         
                           y 
                           k 
                         
                       
                       ) 
                     
                     2 
                   
                 
               
             
             
               
                 EQ 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 6 
               
             
           
         
       
     
   
   The accuracy of the MLE of the frequency is dependent upon the number of samples and the communication channel signal-to-noise ratio (SNR). However, the MLE does not utilize any pre-knowledge regarding the distribution of the random frequency. As a result, a longer preamble is necessary. That is, the MLE assumes that all frequencies are equally probable, which is not true in practical cases. As a result, a long preamble may be necessary. 
   It is also possible to address the problem of efficient frequency estimation with a maximum a posteriori (MAP) formulation where the frequency has a normal distribution and a mean of zero. Mathematically, the MAP estimation can be expressed as follows: a symbol a, belonging to the set A, is transmitted according to a probability of P A (a), and an output, y, is observed. Then the MAP estimation involves finding a possible transmitted symbol, â, to maximum the following probability. 
                     P     A   ❘   Y       ⁡     (       a   ^     ❘   y     )       =           P     Y   ❘   A       ⁡     (     y   ❘     a   ^       )       ⁢       P   A     ⁡     (     a   ^     )             P   Y     ⁡     (   y   )                 EQ   ⁢           ⁢   7               
Since P Y (y) is not a function of â, it only is necessary to maximize P Y|A (y|â)P A (â) as a function of â.
 
   EQ 1 expresses the received samples of the preamble waveform, and EQ 2 expresses the estimated samples of the preamble waveform. The MAP estimation of the frequency involves choosing {circumflex over (f)} to maximize the following: 
   
     
       
         
           
             
               
                 
                   
                     P 
                     
                       F 
                       ❘ 
                       X 
                     
                   
                   ⁡ 
                   
                     ( 
                     
                       
                         f 
                         ^ 
                       
                       ❘ 
                       
                         X 
                         ~ 
                       
                     
                     ) 
                   
                 
                 = 
                 
                   
                     
                       
                         P 
                         
                           X 
                           ❘ 
                           F 
                         
                       
                       ⁡ 
                       
                         ( 
                         
                           
                             X 
                             _ 
                           
                           ❘ 
                           
                             f 
                             ^ 
                           
                         
                         ) 
                       
                     
                     ⁢ 
                     
                       
                         P 
                         F 
                       
                       ⁡ 
                       
                         ( 
                         
                           f 
                           ^ 
                         
                         ) 
                       
                     
                   
                   
                     
                       P 
                       X 
                     
                     ⁡ 
                     
                       ( 
                       
                         X 
                         ⇀ 
                       
                       ) 
                     
                   
                 
               
             
             
               
                 EQ 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 8 
               
             
           
         
       
     
   
   By assuming the channel noise has a normal distribution with a mean of zero, the frequency also has a normal distribution. Each of P X|F (  X ) and P F ({circumflex over (f)}) are represented as follows: 
                   P     X   |   F       =         1       σ   N     ⁢         (     2   ⁢   π     )     N           ·     exp   (     -                     X   _     -       Y   _     ⁡     (     f   ^     )                   2       2   ⁢           ⁢     σ   2           )       ⁢           ⁢   and             EQ   ⁢           ⁢   9                     P   F     ⁡     (     f   ^     )       =       1       σ   f     ⁢       2   ⁢   π           ·     exp   (     -         (       f   ^     -     f   _       )     2       2   ⁢     σ   f   2           )         ,           EQ   ⁢           ⁢   10               
where  f  is the nominal frequency. The term, {circumflex over (f)}−  f , is the frequency offset.
 
   The cost function, C({circumflex over (f)}), is found by taking the logarithm of both sides of EQ 10 and discarding any terms that are independent of {circumflex over (f)}, as follows:
 
 C ( {circumflex over (f)} )=In( P   F|X ( {circumflex over (f)}|     X |   {circumflex over (f)} ))+In( P   F ( {circumflex over (f)} ))   EQ 11
 
and
 
                   C   ⁡     (     f   ^     )       =                       X   _     -       Y   _     ⁡     (     f   ^     )                   2       σ   2       +           (       f   ^     -     f   _       )     2       σ   f   2       .               EQ   ⁢           ⁢   12               
Therefore the MAP estimation of the frequency is transformed into choosing {circumflex over (f)} to maximize the cost function, C({circumflex over (f)}).
 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  shows a block diagram of one embodiment of parallel optimization of the frequency and the phase values. 
       FIG. 2  shows a more detailed embodiment of the processing units shown in  FIG. 1 . 
       FIG. 3  shows a block diagram of a second embodiment of parallel optimization of the frequency and the phase values. 
       FIG. 4  contains a flow chart showing the steps of one embodiment. 
       FIG. 5  shows a schematic representation of a disk drive system having a communications channel for estimating the phase and frequency of a preamble. 
       FIG. 6  shows a block diagram of a communication channel for estimating the phase and frequency of a preamble. 
   

   DETAILED DESCRIPTION OF EMBODIMENTS 
   As shown on  FIG. 5 , an exemplary hard disk drive system comprises a disk  506 . A motor  507  spins the disk  506  at a substantially constant speed and under control of a motor controller  508 . An actuator  504  positions a recording head  505  over the proper data track on the disk  506 . Data is transmitted through the recording head  505  via a communications channel  503 . A clock  501  responsive to a reference frequency  509  provides timing signals to the communications channel  503 . The sector timing controller  502  synchronizes the clock  501  with the disk rotation. Skilled practitioners in the art will recognize that other disk drive configurations are possible. 
   When a digital communication channel is a read channel for a hard disk drive, a signal preamble may comprise a known series of bits written at the beginning of each data sector. The series of bits, comprising one or more preamble words, enables quick and accurate determination of frequency and phase information. For example, preamble word “0011” will provide a single cycle of a sinusoidal waveform. A number of preamble words, read as a data stream, will provide a preamble having a sinusoidal waveform. Because the preamble comprises a sinusoidal waveform derived from a known bit stream rather than random data bits, the frequency and phase values are more easily determined. The frequency and phase information are required to accurately read data from the disk. 
   Preambles take up space on a disk surface. As a result, the shorter the preamble, the more room there is for data storage. Therefore, it is important to determine the frequency and phase values to the required accuracy from a preamble having the shortest possible length. 
   The preamble is sampled at the communication channel clock rate, that is, a sample of the preamble is taken each time a bit is transmitted. Therefore, the preamble word “0011” will be sampled four times, and the total preamble sample size, N, will be four times the number of preamble words. The sampled preamble then is used to estimate the waveform, and the estimated waveform provides estimates for the phase and frequency. 
   The MAP estimation of the frequency cost function presented in EQ 12 may be rewritten and expanded to include the estimated variables for the amplitude and the phase as follows: 
                   C   ⁡     (       A   ^     ,     Φ   ^     ,     f   ^       )       =                       X   _     -       Y   _     ⁡     (       A   ^     ,     Φ   ^     ,     f   ^       )                   2     +         σ   2     ·       (       f   ^     -     f   _       )     2         σ   f   2         =           ∑     k   =   0       N   -   1       ⁢           ⁢       (       x   k     -       A   ^     ⁢     sin   ⁡     (       Φ   ^     +     k   ·     f   ^     ·     π   2         )           )     2       +         σ   2     ·       (       f   ^     -     f   _       )     2         σ   f   2         =         ∑     k   =   0       N   -   1       ⁢           ⁢     x   k   2       +         A   ^     2     ⁢       ∑     k   =   0       N   -   1       ⁢           ⁢       sin   2     ⁡     (       Φ   ^     +     k   ·     f   ^     ·     π   2         )           -     2   ⁢     A   ^     ⁢       ∑     k   =   0       N   -   1       ⁢           ⁢       x   k     ⁢     sin   ⁡     (       Φ   ^     +     k   ·     f   ^     ·     π   2         )             +         σ   2     ·       (       f   ^     -     f   _       )     2         σ   f   2                     EQ   ⁢           ⁢   13               
The first term is not a function of the parameters under consideration, and is omitted when calculating a value for the cost function.
 
   The amplitude estimate, Â, may be determined by the square root of the sum of the squares of the average of the even samples and the average of the odd samples. The amplitude estimate, Â, may be represented as follows: 
                     s   =       2   N     ·       ∑     k   =   0         N   2     -   1       ⁢           ⁢         (     -   1     )     k     ·     x     2   ⁢   k               ,   ,     (     average   ⁢           ⁢   of   ⁢           ⁢   the   ⁢           ⁢   even   ⁢           ⁢   samples     )       ⁢                   EQ   ⁢           ⁢   14                   c   =       2   N     ·       ∑     k   =   0         N   2     -   1       ⁢           ⁢         (     -   1     )     k     ·     x       2   ⁢   k     +   1               ,     (     average   ⁢           ⁢   of   ⁢           ⁢   the   ⁢           ⁢   odd   ⁢           ⁢   samples     )       ⁢                   EQ   ⁢           ⁢   15               
and
 Â=√{square root over (s 2   +c   2 )}  EQ 16         where x is a preamble sample as shown in EQ 2.       
   The cost function of EQ 13 is evaluated over a range of possible phase values and a range of possible frequency, preferably substantially simultaneously, to determine the combination of phase and frequency that yield the minimum value of the cost function.  FIG. 1  shows one embodiment. 
     FIG. 4  shows a flowchart containing the steps to implement one embodiment of the invention. As the N bits of the preamble are read from the communications channel, each bit is sampled and simultaneously processed by an array of L×M processing units. Each processing unit processes a respective sampled bit as it arrives, and evaluates the cost function using a different frequency and phase value. After reading the sampled preamble, each processing unit has calculated the cost function for a particular combination of phase and frequency. Once the cost functions are calculated, a minimum cost function is selected for each phase value. The overall minimum cost function is selected from this subset of minimum value cost functions, thereby providing an optimum value for frequency and for phase. 
   Referring now to  FIG. 1 , N samples of the preamble, x k    101 , are received from the communication channel and are processed in parallel by processing units  105  to evaluate the cost function as described in EQ 13. The cost function is evaluated for each of L distinct and different frequency values and M distinct and different phase values. There are L×M processing units  105 , each capable of evaluating the cost function for a distinct value for the phase and a distinct value for the frequency. The range of values for the frequency is −4σ f  to +4σ f  with steps of 
               σ   f     4     .         
The phase value has a range of 0 to 2π with 5% increments. Therefore, the embodiment of  FIG. 1  has 33 different frequency values and 21 different phase values. Other values for L and M are possible. The chosen increments need not be equal.
 
   When the N samples of the preamble are processed, each of the L phase comparison means  110  will examine the M processing units  105  having the same frequency value, and will select the processing unit having a first minimum cost function. Then, the frequency comparison means  115  will examine the plurality of L processing units having the first minimum cost functions, and will select a second minimum cost function. This second minimum cost function has the optimum estimated values  120  for both the frequency, {circumflex over (f)} opt , and phase, {circumflex over (Φ)} opt . These optimum values then will be used to receive the remainder of the data stream. 
     FIG. 6  shows a block diagram of an embodiment for determining the optimum estimates for the phase and frequency of a preamble. A sampler  601  samples each bit of the preamble (the preamble being a string of predetermined bits resulting in a sinusoidal waveform.) A first calculator  602  reads the preamble samples and estimates the preamble amplitude, Â. A second calculator  603  then computes the value of the cost function, C(Â, {circumflex over (Φ)}, {circumflex over (f)}), for each of L different frequency values and M different phase values. Alternatively, the first calculator  602  and the second calculator  603  may operate substantially in parallel. A selector  604  the selects the cost function having the minimum value, thereby determining the optimum frequency and phase values. 
     FIG. 2  shows further detail for each processing unit P(i,j)  105  of  FIG. 1  for determining the cost function for each of the distinct frequency values f i , and phase values Φ j . The frequency value f i    204  is multiplied by the integer k  205  and the scalar 
           π   2         
at the multiplier  224 . The result is summed with the phase value Φ j    203  at the adder  226 . The result of the adder  226  is the input to the sine function  228 , whose result is squared at the square function  230 , and is multiplied with the k th  sample of the preamble waveform, x k    202 , at multiplier  210 . The results of the square function  230  are summed for all k values  205  at the summer  232  and summation loop  234 . The scalar Â  201  is squared at the square function  236  and is multiplied with the result of the summer  232  and summation loop  234  at multiplier  238 . The result of multiplier  238  represents
 
   
     
       
         
           
             
               A 
               ^ 
             
             2 
           
           ⁢ 
           
             
               ∑ 
               
                 k 
                 = 
                 0 
               
               
                 N 
                 - 
                 1 
               
             
             ⁢ 
             
                 
             
             ⁢ 
             
               
                 
                   sin 
                   2 
                 
                 ⁡ 
                 
                   ( 
                   
                     
                       Φ 
                       ^ 
                     
                     + 
                     
                       k 
                       · 
                       
                         f 
                         ^ 
                       
                       · 
                       
                         π 
                         2 
                       
                     
                   
                   ) 
                 
               
               . 
             
           
         
       
     
   
   The result of the multiplier  210  is summed for all k values at summer  212  and summation loop  214 . The results of the summer  212  and summation loop  214  are multiplied with the scalar Â and the scalar  2  at multiplier  216 . The result of the multiplier  216  is changed in sign at the sign complement  218 . The result of the sign complement  218  represents 
   
     
       
         
           
             - 
             2 
           
           ⁢ 
           
             A 
             ^ 
           
           ⁢ 
           
             
               ∑ 
               
                 k 
                 = 
                 0 
               
               
                 N 
                 - 
                 1 
               
             
             ⁢ 
             
                 
             
             ⁢ 
             
               
                 x 
                 k 
               
               ⁢ 
               
                 
                   sin 
                   ⁡ 
                   
                     ( 
                     
                       
                         Φ 
                         ^ 
                       
                       + 
                       
                         k 
                         · 
                         
                           f 
                           ^ 
                         
                         · 
                         
                           π 
                           2 
                         
                       
                     
                     ) 
                   
                 
                 . 
               
             
           
         
       
     
   
   The nominal frequency,  f ,  239  is subtracted from the frequency value, f l ,  204  at summer  240 . The result of summer  240  is first squared at the square function  241 , and then the result is multiplied by the scalar 
             σ   2       σ   f   2           
at multiplier  222 . The cost function, C(f i , Φ j ), is the result of summer  220 , which sums the results of multiplier  222 , the sign complement  218 , and the multiplier  238 . The scalars σ and σ f  represent parameters of the communication channel; σ is the standard deviation of the noise, and σ f  is the standard deviation of the frequency. Both are assumed to have normal distributions with a mean of zero.
 
   In another embodiment, shown in  FIG. 3 , when the N preamble samples  301  are processed, each of the L frequency comparison means  310  will examine the M processing units  305  having the same phase value, and will select the processing unit having the first minimum cost function. The phase comparison means  315  then will examine each of the M processing units  305  having a first minimum cost function, and will select the processing function having the second minimum cost function. The second minimum cost function has the optimum estimated values  320  for the frequency; {circumflex over (f)} opt , and phase, {circumflex over (Φ)} opt . This embodiment differs from the previous embodiment in that for each frequency value, the minimum cost function is selected first as a function of phase, and then as a function of frequency. Those skilled in the art will recognize other possible means to select the processing unit having the minimum cost function representing the optimal estimates for the frequency, {circumflex over (f)} opt , and phase, {circumflex over (Φ)} opt . 
   To demonstrate that minimizing the cost function as a function of frequency and phase will provide an improvement in the acquisition of an estimated frequency, a MATLAB simulation was performed, wherein the channel noise, length of the preamble sample, and the standard deviation of the frequency were varied. The following table presents the results of the simulation. 
   
     
       
             
             
             
             
             
           
             
             
             
             
             
           
         
             
               TABLE 1 
             
             
                 
             
             
                 
                 
                 
               Initial 
               Residual 
             
             
                 
                 
                 
               Frequency 
               Frequency 
             
             
               Bit Error Rate 
               Number of 
               Number of 
               Offset Standard 
               Offset Standard 
             
             
               (BER) 
               Samples 
               Trials 
               Deviation (σ f ) 
               Deviation ({circumflex over (σ)} f ) 
             
             
                 
             
           
           
             
                 
             
           
        
         
             
               1e-4 
               32 
               10,000  
               0.03% 
               0.0300% 
             
             
               1e-4 
               64 
               10,000  
               0.03% 
               0.0285% 
             
             
               1e-4 
               128 
               1,000 
               0.03% 
               0.0210% 
             
             
               1e-4 
               32 
               1,000 
               0.3% 
               0.2000% 
             
             
               1e-4 
               64 
               1,000 
               0.3% 
               0.0844% 
             
             
               1e-4 
               128 
               1,000 
               0.3% 
               0.0326% 
             
             
               1e-3 
               32 
               1,000 
               1.0% 
               0.28% 
             
             
               1e-3 
               64 
               1,000 
               1.0% 
               0.10% 
             
             
               1e-3 
               128 
               1,000 
               1.0% 
               0.0465% 
             
             
                 
             
           
        
       
     
   
   The BER is related to the standard distribution of the communication channel noise. For example, if the binary bits are taken from the se { 0 , 1 }, and the communications channel has a transfer function of T(D)=4+3D−2D 2 −3D 3 −2D 4 , then a BER OF 1e-4 corresponds to a σ of 0.7131, and a BER of 1e-3 corresponds to a σ of 0.8562. The residual frequency standard deviation is the standard deviation of the resultant frequency estimates, {circumflex over (f)}, for the number of simulation trials run at the various conditions. The simulation results indicate that MAP estimation provides substantial improvement in the presence of large frequency standard deviations. 
   While the foregoing describes embodiments of the invention in detail, various omissions, substitutions, and changes in the form and details of the invention are possible for those skilled in the art, without departing from the spirit of the invention. Skilled practitioners will recognize that the invention may be implemented using hardware, software, or a combination of both to achieve the results as described above.