Abstract:
The present invention helps derive accurate clock and carrier translation presets in the presence of noise and various line shapes. The invention provides an adaptive algorithm that optimizes the calculations of clock slew (ΔT s ) and frequency offset (Δf) over the specific line conditions encountered at each connection by choosing an optimal subset of the communication device&#39;s probing frequencies that minimizes the effect of line losses and noise.

Description:
FIELD OF THE INVENTION 
     This invention relates in general to the field of communications and more specifically to the field of data communications. 
     BACKGROUND OF THE INVENTION 
     Data communication devices such as modems which conform to the International Telecommunication Union&#39;s (ITU) V.34 standard, follow a start-up procedure which is divided into four main phases in order to establish a communication link between a local modem and a remote modem. Phase one of the start-up procedure comprises the network interaction phase, phase two the line probing/ranging phase, phase three the equalizer and echo canceller training phase, and phase four comprises the final training phase. 
     During the line probing phase, channel characteristics such as line shape, line noise, line delays, etc. are determined and are used to determine data mode modulation parameters and presets for the modems. Modem presets which are set during this probing phase include presets for the modem&#39;s carrier recovery phase-lock-loop (&#34;PLL&#34;), clock recovery PLL, etc. These parameters and presets in turn have an effect upon the subsequent carrier recovery, echo-cancellation training, equalizer training and clock acquisition performed by the modem. 
     Two line probing signals, L1 and L2, are used to analyze channel characteristics in V.34 modems. The L1 signal is a periodic signal with a repetition rate of 150+0.01% Hz which consists of a set of tones (cosines) spaced 150 Hz apart at frequencies from 150 Hz to 3750 Hz. Tones at 900 Hz, 1200 Hz, 1800 Hz, and 2400 Hz are omitted leaving 21 probing tones each at a particular frequency. The L1 probing signal is transmitted for 160 ms (24 repetitions) at 6 dB above the nominal power level. The L2 probing signal is the same as the L1 signal but is transmitted for at least 550 ms plus a round-trip delay at the nominal power level. A more complete discussion of the line probing signals can be found in the ITU V.34 standard entitled, &#34;A Modem Operating At Data Signaling Rates Of Up to 28, 800 bit/s for use on the general switched telephone network and on leased point-to-point 2-wire telephone-type circuits&#34;, and which is hereby incorporated by reference. 
     A need thus exists in the art for a method and apparatus which can help provide a good estimate for clock slew and in turn not only help reduce the training time of data communication devices such as modems, but also help in providing more accurate presets (e.g., carrier translation (frequency offset) preset, etc.) which can help minimize the adverse effects of line noise and various other communication line characteristics. 
     SUMMARY OF THE INVENTION 
     The present invention helps derive accurate clock and carrier translation presets in the presence of noise and various line shapes using the a signal received by a data communication device, such as a line probing sequence received by a modem. The invention provides an adaptive algorithm that optimizes the calculations of clock slew (ΔT s ) and frequency offset (Δf) over the specific line conditions encountered at each connection by choosing an optimal subset of the received signal that minimizes the effect of the line loss and noise. 
     In other embodiments of the invention, once the clock slew estimate is made between the local and remote communication devices, the clock slew information is then used to establish a more accurate estimate for carrier translation. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a block diagram of two communication devices in accordance with the invention. 
     FIG. 2 shows a V.34 probing signal divided into temporal windows in accordance with the invention. 
     FIG. 3 shows the temporal windows of FIG. 2 organized into sets of two windows per set. 
     FIG. 4 shows a flow chart of the steps taken in order to calculate clock slew in accordance with the invention. 
     FIG. 5 shows a block diagram of a modem in accordance with the invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, a first communication device such as a local modem 102 and a second communication device such as a remote modem 104 are shown connected over the public switched telephone network (PSTN) 106. In order to accomplish fast clock acquisition in accordance with the present invention, the difference (ΔT s ) in the time periods, known as the clock slew, between the clocks of the local data communication device&#39;s 102 receiver and the remote data communication device&#39;s 104 transmitter is determined. 
     Although the description of the preferred embodiment which follows will focus on modems, such as modems which conform to the V.34 standard, the present invention is not limited only to modem applications but can be used for other data communication devices which can benefit from having a good estimate for clock slew. 
     In accordance with the preferred embodiment, once the clock slew between the local modem&#39;s 102 receiver and the remote modem&#39;s 104 transmitter is determined, the clock slew information is then used to preset the local receiver&#39;s clock recovery phase locked loop (PLL). Similarly, the remote transmitter to local receiver carrier translation (i.e., frequency offset, Δf), after correction for clock slew can be used to preset the carrier recovery PLL, and the bi-directional frequency offset can be used to preset the far-echo canceller&#39;s PLL in other aspects of the invention. 
     Preferably, the quantities ΔT s  and Δf, are determined from the change (φ) in the phase (Θ) versus frequency curve of the Discrete Fourier Transform (DFT) of the receive modem&#39;s probing sequence samples over successive temporal windows (time frames). The accuracy of the above calculations are significantly affected however, by the signal-to-noise ratio (SNR) at the individual probing frequencies, which in turn depend on the specific line (channel) frequency response and the noise power spectral density encountered at each connection. In the preferred embodiment, the V.34 standard&#39;s L2 line probing signal is used to determine the clock slew estimate. Those skilled in the art will realize that alternatively, the L1 line probing signal or both the L1 and L2 signals could be used to make the appropriate clock slew estimate using the method of the present invention. 
     Given that the probing sequence used by modems which operate using the V.34 standard is periodic with frequency f 0  Hertz(Hz), the probing sequence in accordance with the preferred embodiment is conceptually divided into temporal windows or time frames of duration T obs  =P/f 0  seconds, where P is the number of periods in each such temporal window (time period) as shown in FIGS. 2 and 3 and discussed below. 
     Letting the variables &#34;N&#34;, &#34;f s  &#34; and &#34;T s  &#34; denote the number of samples in each window, the sampling frequency, and the sampling time interval, respectively, and the variable &#34;S&#34; be an integer that indices these windows, then S and S+Q represent two windows separated in time by &#34;Q&#34; windows. The S dependent phase of the DFT value at the k th  probing frequency of samples over the S th  temporal window can then be readily derived as explained below. 
     The discrete sequence corresponding to the 1 th  tone, with frequency f 1 , of the received V.34 probing signal can be represented as: 
     
         x n!=r.sub.1 *exp (jθ.sub.1)*exp (j2 πf.sub.1 T.sub.s n),(1) 
    
     where r 1  and θ 1  are the initial real amplitude and phase of the 1 th  tone, respectively. In the presence of clock slew and frequency offset, Equation 1 becomes: 
     
         x n!=r.sub.1 *exp (jθ.sub.1)*exp (j2 π f.sub.1 +Δf! T.sub.s +ΔT.sub.s !n).                                      (2) 
    
     The DFT of x n! over the S th  temporal window of N samples is then: ##EQU1## Setting f k  =f 1  in equation 3 above and summing the geometric series on the right hand side (RHS) leads to: 
     
         X.sub.S  k!=r.sub.1 *exp (jθ.sub.1)*exp (j2 πθ* (S-1)*N+1!)*{1-exp (j2 πθ*N)}/{1-exp (j2 πθ)},                                            (4) 
    
     where θ=Δf*T s  +f k  *ΔT s  +Δf*ΔT s . Retaining the S dependent part of the phase then leads to: 
     
         Θ.sub.k (S)=2 π* Δf*T.sub.s +f.sub.k *ΔT.sub.s +Δf*ΔT.sub.s !*S*N,                           (5) 
    
     where f k  is the frequency of the k th  probing tone. It should be noted that taking the limit as θ→0, reduces the RHS of Equation 4 to N*r 1  *exp(jθ 1 ), as expected. Note that the limits of ##EQU2## as θ→0 is N. In Equation 5, the first, second and third terms represent the contributions of the frequency offset, clock slew and the frequency offset-clock slew combination, respectively. The difference, φ k  (Q), between Θ k  evaluated for windows S and S+Q is then: 
     
         φ.sub.k (Q)=2 π* Δf*T.sub.s +f.sub.k *ΔT.sub.s +Δf*ΔT.sub.s !*Q*N                            (6) 
    
     Equation 6 thus models the φ k  (Q) versus f k  curve obtained from DFT values of the V.34 probing waveform. The equation represents a straight line and the clock slew, ΔT s .spsb.-, is estimated by computing the slope of this line. It is worth noting that in the subsequent discussion, the scalars φ k  (Q) (k=1 . . . K), where K is the size of the subset of V.34 probing tone set used, are together denoted by the vector φ. 
     In order to improve the accuracy of the estimated clock slew in the presence of random noise in accordance with the invention, an interleaved averaging process over many temporal windows is implemented by dividing the received temporal windows into R sets. The R sets preferably have M windows in each set. Also, the M windows in each set are Q windows apart. Each set yields (M-1) vectors φ, whose components are the values φ k  (Q) (k=1 . . . K), where K is the size of the subset of V.34 probing tone set used. The M-1 vectors of each set are then averaged to form R averaged vectors. These R averaged vectors are further averaged to form one final averaged vector &lt;φ&gt;. 
     The line frequency response (non-constant loss over the V.34 probing tone set) can lead to significantly less SNRs at specific frequencies such as, f k , thus degrading the clock slew estimate when such frequencies are included in the subset used to compute &lt;φ&gt;. In order to optimize the accuracy of the estimate over different lines which change with each new telephone line connection that is established, several frequency pairs (e.g., f i ,f j ) from the V.34 probing frequency set are preferably considered in accordance with the invention. An averaged SNR value offered by each pair is computed from measurements of the noise power spectral density values at those frequencies. 
     In general, frequencies with larger separation will yield larger values of 2 π*(f j  -f i )*ΔT s  *Q*N which forms the actual &#34;signal&#34; for clock slew estimation which is a portion of the transform of the line probing signal. Thus, the above line shape dependent SNR is converted into an &#34;effective&#34; SNR offered by each frequency pair by weighing it with an experimentally determined, and separation dependent factor. Finally, the frequency pair with the maximum effective SNR is chosen, e.g., components of &lt;φ&gt; corresponding to this pair are used to estimate the clock slew (i.e., ΔT s ). The details of calculating the clock slew from &lt;φ&gt; are described below. 
     The K components of &lt;φ&gt; are represented by Equation 6, for k=1,2, . . . K. The two components of &lt;φ&gt; that yield the maximum effective SNR are then chosen. For example, assuming that the components which yield the maximum effective SNR are found to be the ith and the jth components which correspond to the frequencies f i  and f j . These ith and jth components are obtained from Equation 6 as: 
     
         φ.sub.j (Q)=2 π* Δf*T.sub.s +f.sub.j *ΔT.sub.s +Δf*ΔT.sub.s !*Q*N                            (7) 
    
     and, 
     
         φ.sub.i (Q)=2 π* Δf*T.sub.s +f.sub.i *ΔT.sub.s +Δf*ΔT.sub.s !*Q*N,                           (8) 
    
     respectively. 
     Subtracting Equation 7 from Equation 8, thus retaining the slope of the line, yields, 
     
         φ.sub.j (Q)-φ.sub.i (Q)=2 π*(f.sub.j -f.sub.i)*ΔT.sub.s *Q*N.                                                     (9) 
    
     From Equation 9, the clock slew readily follows as: 
     
         ΔT.sub.s =(φ.sub.j (Q)-φ.sub.i (Q))/(2 π*(f.sub.j -f.sub.i)*Q*N)                                            (10) 
    
     The process of interleaved averaging to combat noise and choosing frequencies that offer a high effective SNR to optimize over line shapes, as described above in relation to clock slew, is also applied in the estimation of the frequency offset (Δf). 
     Under the constraint of a fixed maximum duration of the V.34 probing sequence, the choice of the parameters &#34;P&#34;, &#34;R&#34;, &#34;M&#34; and &#34;Q&#34; is based upon the trade-off between the number of averages performed and the maximization of the quantity φ k  (Q). The following choice of parameters were experimentally determined to yield an accuracy better than 5 parts-per-million (ppm) in the clock slew estimate in the presence of additive white noise at a SNR of 35 db: P=2 (this makes N=128 at a sampling frequency of 9600 Hz), Q=16 and R=16. Successive windows were used as the first elements of the R sets of windows, with M=2 windows in each set. In the absence of additive noise (SNR better than 60 db) the maximum error observed was 1 ppm. Also, accuracy&#39;s of the order of 20 ppm were obtained for a SNR of 25 db. 
     In order to better understand the present invention an example is provided immediately below. 
     EXAMPLE 
     In this example, the variables are set at R=16, Q=16 and M=2. The first step is to take the V.34 probing signal, which is periodic with period 1/f 0 , and divide it into temporal windows or time frames, each of duration P=2 as illustrated in FIG. 2. This step is also shown as step 402 in the flowchart of FIG. 4. Next, in step 404, and as illustrated in FIG. 3, the temporal windows indexed by &#34;S&#34; are organized into R=16 sets of M=2 windows per set. The two windows in each set are then separated from each other by Q=16 windows. In step 406, the phase vectors for each set are determined. In this particular example, each set yields M=2 phase vectors Θ, the components of which, Θ k , (k=1 . . . K) are the DFT phases at a subset of the V.34 probing frequencies. In this example, where R=16, the first set includes windows 1 and 17, which gives 2 phase vectors Θ, one from each window as illustrated in FIG. 3. The second set, comprises windows 2 and 18, again giving 2 phase vectors Θ. This process is repeated for all 16 sets. 
     After the windows have been separated, in step 408, the differences between the two phase vectors Θ from each set yields 1(=M-1) vector φ, in this particular example. In step 408, for each set, 
     
         φ=Θ of 2nd window-Θ of 1st window 
    
     In this example there are 16 vectors φ. The components of each vector are φ k  (k=1 . . . K), 
     
         φ= φ.sub.1 φ.sub.2 . . . φ.sub.k !. 
    
     The sixteen vectors φ, are then averaged, 
     
         &lt;φ&gt;= &lt;φ.sub.1 &gt;&lt;φ.sub.2 &gt; . . . &lt;φ.sub.k &gt;! 
    
     in step 410, in order to form one averaged vector &lt;φ&gt;. The clock slew and frequency estimates are then derived from the components of &lt;φ&gt;, as described in the discussion of equations 7-10 above. In step 412, the two components of the average vector which yield the maximum effective SNR are chosen. Preferably the maximum effective SNRs are determined from measurements of the noise power spectral density values at the particular frequencies. In step 414, the two components chosen are then used to calculate the clock slew using equation 10 above. 
     It is worth noting that if the variable M is set to a number greater than 2, the number of phase vectors from each set will equal (M-1) vectors φ. For example, if M=3, then there will be two vectors φ per set which are determined by taking the difference between adjacent phase vectors Θ from each set. 
     Estimating frequency offset using the clock slew estimate 
     In the absence of an estimate for clock slew, an estimate of the frequency offset is derived by discarding the effect of clock slew on it. This is equivalent to neglecting the contribution of the clock slew (i.e., the second order term 2 πΔf*ΔT s  Q*N in Equation (6) to the intercept of the straight line represented by Equation 6. However, when ΔT s  is estimated as discussed above, it is not necessary to neglect this term, and the estimate of Δf can be improved in accordance with the invention by accounting for the contribution of ΔT s  to the intercept as follows: 
     
         Δf=(φ.sub.k (Q)/(2 π*Q*N)-f.sub.k *ΔT.sub.s)/(T.sub.s +ΔT.sub.s).                                         (11) 
    
     Expressing clock slew in parts per million: 
     The clock slew, ΔT s , can be expressed as a deviation n ppm  in parts per million (ppm) over the nominal value of T s  as: 
     
         n.sub.ppm =10.sup.6 * &lt;φ.sub.k &gt;-&lt;φ.sub.j &gt;!/ 2 π(f.sub.k -f.sub.j)*T.sub.s *Q*N!,                                  (12) 
    
     where &lt;φ k  &gt; and &lt;φ j  &gt; are the components of the vector &lt;φ&gt; at frequencies f k  and f j , respectively. In Equation 12, the angle per ppm, i.e., x=2 π(f k  -f j )*T s  *Q*N*10 -6 , is for practical numbers, of the order of the quantization error encountered in 16 bit machines. Thus a quantization error Δx in x leads to an error Δn ppm  in n ppm . These quantities are related as shown below: 
     
         (n.sub.ppm +Δn.sub.ppm)=(&lt;φ.sub.k &gt;-&lt;φ.sub.j &gt;)/(x+Δx).(13) 
    
     A first order estimate of Δn ppm  can be obtained by doing a Taylor series expansion of the RHS and retaining terms up to the first order yielding: 
     
         Δn.sub.ppm ≈-n.sub.ppm Δx/x≈-(n.sub.ppm +Δn.sub.ppm)Δx/x                              (14) 
    
     This estimate is subtracted from n ppm  +Δn ppm  to obtain an improved value of n ppm . It is worth noting that replacing n ppm  by the available quantity n ppm  +Δn ppm  is a higher order correction and leads to an error in Δn ppm  of the order of Δn ppm  Δx/x. 
     Referring to FIG. 5, a block diagram of a communication device such as a modem 500 which can perform the clock slew estimation and frequency offset estimation in accordance with the present invention is shown. Modem 500 comprises a controller 508 such as a 68302 microcontroller manufactured by Motorola, Inc. The controller 508 is coupled to external memory 518 which takes the form of conventional RAM, EEPROM, etc. The controller 508 executes appropriate control software and is responsible for the overall operation of modem 500. 
     In the preferred embodiment, the modem&#39;s data pump is implemented using two TMS320C51 digital signal processors 504 and 506 manufactured by Texas Instruments, Inc. A conventional RS-232 interface circuit 512 provides interface between a diagnostic port 514 and a data terminal equipment (DTE) port 516 and the modem electronics. A digital-in/digital-out (DIDO) ASCIC device 510 provides digital interface between the digital signal processors (DSPs) 504 and 506, the RS-232 interface 512, and controller 508. 
     An input port 524 which takes the form of a telephone line connector connects the modem 500 with the PSTN. Coupled to the input port 524 is a conventional telephone interface circuit 522 which provides the appropriate line interfacing between the PSTN and modem electronics. A universal mode analog front-end (UMAFE) circuit 520 which can take the form of a ST7544 integrated circuit manufactured by SGS-Thompson, Inc. provides filtering, digital-to-analog and analog-to-digital conversions, transmit and receive clocks, and proper line interface between the telephone line interface 522 and the DIDO digital circuit 510. Finally, a front panel 502 provides for user interface with modem 500. 
     The clock slew and frequency offset estimations algorithms of the present invention are executed by the signal processors 504 and 506 which are under the control of controller 508. The incoming line probing signal is received at port 524 and are filtered and converted from analog to digital by UMAFE 520. The signal is then sent through DIDO 510 prior to being acted on by the DSPs 504 and 506. 
     While the invention has been described in conjunction with specific embodiments, it is evident that many alternatives, modifications, permutations and variations will become apparent to those skilled in the art in light of the foregoing description. Accordingly, it is intended that the present invention embrace all such alternatives, modifications and variations as fall within the scope of the appended claims.