Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
FIRST AND SECOND DIGITAL RATE CONVERTER SYNCHRONIZATION DEVICE AND METHOD
Document Type and Number:
WIPO Patent Application WO/1993/005598
Kind Code:
A1
Abstract:
A first and second digital rate converter device and method provides for synchronization between a first digital sample sequence and a second digital output sequence related to the first digital sample sequence for a rate converter pair (501, 511; 601, 611). The method typically utilizes at least one of: queue monitoring and zero-crossing with resetting to minimize sampling timing error.

Inventors:
LING FUYUN (US)
Application Number:
PCT/US1992/006353
Publication Date:
March 18, 1993
Filing Date:
August 03, 1992
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
CODEX CORP (US)
International Classes:
H04B14/04; H03H17/06; H04L7/00; H04L7/02; (IPC1-7): H04L7/00
Foreign References:
US4453259A1984-06-05
US4411006A1983-10-18
US4692931A1987-09-08
US4870661A1989-09-26
Other References:
See also references of EP 0556355A4
Download PDF:
Claims:
Claims:
1. A digital synchronization device for at least partially synchronizing at least first and second digital rate converters (DRCs), the first DRC having an input of at least some first digital sequence samples {xi (k)} sampled at a first sampling rate and the second DRC having an input of at least some second digital sequence samples {y2(n)} related to the first digital sequence samples and sampled at a second sampling rate different from the first sampling rate, wherein: the first DRC comprises at least: a first buffer, operably coupled to receive the first digital sequence samples {xi (k)J, for delaying and temporarily storing the first digital sequence samples {xi (k)J; a first digital resampler having at least a first delay unit, operably coupled to the first buffer, for shifting the first digital sequence samples into the first delay unit and for generating first output digital sequence samples {yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal mι (n) and a first desired normalized timing offset tι (n); and a first variable delay generating unit having a normalized timing input Dtι (n), Dtι (n) being a first sampling time advance, and being operably coupled to the first digital resampler, for providing the first desired normalized timing offset ti (n) and for providing the first shift control signal mι (n) determined from a previous normalized timing offset tι (n1); and the second DRC comprises at least: a second buffer, operably coupled to receive the second digital sequence samples {y2(n)} related to the first digital sequence samples {xi (k)}, for at least delaying and temporarily storing the second digital sequence samples Z<4 {y2(n)} and providing the delayed, temporarily stored samples to a second digital resampler; a second digital resampler having at least a second delay unit, operably coupled to the second buffer and to a second variable delay generating unit, for shifting the second digital sequence samples into the second delay unit and for generating second output digital sequence samples {x2(n)} at substantially the first sampling rate utilizing a selected sample timing in accordance with a second desirable normalized timing offset t2(k), and a second shifting control signal m2(n) from the second variable delay generating unit, the second variable delay generating unit having a normalized timing input D_2(k), D_2(k) being a second sampling time advance, and being operably coupled to the second digital resampler, for providing the second desired normalized timing offset _2(k) and for providing the second shift control signal m2(n) determined from a previous normalized timing offset t2(n1), the second variable delay generating unit being operably coupled at least to the second digital resampler, for providing shift and timing information in accordance with a second sampling time advance Dt2(k), such that timing differences between the first digital sequence samples and the second output digital sequence samples are substantially detected and variations in the timing differences are substantially reduced. 2S .
2. The device of claim 1 , wherein at least one of 2A2E: 2A) Dt2(k) is substantially equal to r, where r is a nominal rateconversion ratio; 2B) Dt2(k) is substantially equal to r2Dtι (n), where r is a nominal rateconversion ratio; 2C) the first sampling time advance Dtι (n) is preselected by an external controller; 2D) the first sampling time advance Dtι (n) is determined from a conversion ratio r such that Dtι (n) = 1/r; and 2E) the first digital resampler further comprises at least a sample shifting unit for providing delayed first digital sequence samples having a first selected rate, a first predetermined number of subfilters, and a linear interpolator for selecting a second predetermined number of subfilter outputs for generating a desired sample.
3. The device of claim 1 , further including one of 3A3E, and, where selected, 3F3I: 3 A) the second buffer being further operably coupled to the second variable delay generating unit for providing a first feedback signal for queuedepth monitoring; and 3B) an output buffer of the second DRC being operably coupled to the second variable delay generating unit for providing a second feedback signal for queuedepth monitoring; such that the second variable delay generating unit provides shifting and timing information utilizing at least queuedepth monitoring for monitoring a depth of at least one of: 3D) an output buffer of the second output digital sequence samples {x2(k)}( and 3E) an input buffer of the second digital sequence samples {y2(n)}, and, where selected, including: for a desired queuedepth D and a selected buffer being one of: the input buffer of {y2(n)} and the output buffer of X2(k), the second variable delay generating unit further provides for: 3F) where the queue depth of the selected output buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate smaller than the first sampling rate; 3G) where the queue depth of the selected output buffer is less than D, generating the second output digital sequence samples {x2(k)J at a rate greater than the first sampling rate; 3H) where the queue depth of the selected input buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; and where the queue depth of the selected input buffer is less than D, generating the second output digital sequence samples {x2(k)> at a rate smaller than the first sampling rate.
4. The device of claim 1 , further including at least a zero crossing checking and resetting unit, operably coupled to the first variable delay generating unit and to the second variable delay generating unit, for zerochecking the normalized timing offset tι (n), such that, for providing shifting and timing information for a first digital rate converter having a first conversion ratio r: the first digital rate converter is initialized to a normalized timing offset of tinit; the second digital rate converter is initialized to a normalized timing offset of (1rt.nit. modulo 1 ; and where zerocrossing occurs, the zerocrossing checking and resetting unit resets a second normalized timing offset _2(k) to one of: zn substantially 1rtι(n) where tι(n) is close to zero (crossing from oneside); and substantially r[1tι(n)] where a normalized timing offset ti (n) is near one (crossing from zero side). *& 2.
5. A modem for at least one of: transmitting and receiving information, such that at least first and second digital rate converters (DRCs) are at least partially synchronized, the first DRC having an input of at least some first digital sequence samples {xi (k)} sampled at a first sampling rate and the second DRC having an input of at least some second digital sequence samples {y2(n)} related to the first digital sequence samples and sampled at a second sampling rate different from the first sampling rate, comprising at least: 5A) an encoder/modulator unit, operably coupled to receive information, for at least providing encoded/modulated information; 5B) a transmission filter unit, operably coupled to the encoder/modulator unit, for at least filtering the encoded/modulated information to provide first digital sequence samples in a transmission form, {xi (k)}; 5C) a digital synchronization unit, operably coupled to the transmission filter unit, for providing output samples {x2(k)} at least partially synchronized with {xi (k)}, wherein: the first DRC comprises at least: a first buffer, operably coupled to receive the first digital sequence samples {xi (k)J, for delaying and temporarily storing the first digital sequence samples {xi (k)J; a first digital resampler having at least a first delay unit, operably coupled to the first buffer, for shifting the first digital sequence samples into the first delay unit and for generating first output digital sequence samples (yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal m| (n) and a first desired normalized timing tι (n); and a first variable delay generating unit having a normalized timing offse input Dti (n), Dti (n) being a first sampling time advance, and being operably coupled to the first digital resampler, for providing the first desired normalized timing offset tι (n) and for providing the first shift control signal m . (n) determined from a previous normalized timing offset tι (n1 ); and the second DRC comprises at least: a second buffer, operably coupled to receive the second digital sequence samples {y2(n)} related to the first digital sequence samples {xi (k)}, for at least delaying and temporarily storing the second digital sequence samples {y2 (n)} and providing the delayed, temporarily stored samples to a second digital resampler; a second digital resampler having at least a second delay unit, operably coupled to the second buffer and to a second variable delay generating unit, for shifting the second digital sequence samples into the second delay unit and for generating second output digital sequence samples {x2(n)} at substantially the first sampling rate utilizing a selected sample timing in accordance with a second desirable normalized timing offset t2(k), and a second shifting control signal m2(n) from the second variable delay generating unit, the second variable delay generating unit having a normalized timing input D_2(k), Dt2(k) being a second sampling time advance, and being operably coupled to the second digital resampler, for providing the second desired normalized timing offset _2(k) and for providing the second shift control signal m2(n) determined from a previous normalized timing offset t2(n1 ), the second variable delay generating unit being operably coupled at least to the second digital resampler, for providing shift and timing information in accordance with a second sampling time advance D_2(k), adjustment to the second variable delay generating unit further being provided by at least one of the following: 5a) one of: 0 the second buffer being further operably coupled to the second variable delay generating unit for providing a first feedback signal for queuedepth monitoring; and an output buffer of the second DRC being operably coupled to the second variable delay generating unit for providing a second feedback signal for queuedepth monitoring; such that the second variable delay generating unit provides shifting and timing information utilizing at least queuedepth monitoring for monitoring a depth of at least one of: an output buffer of the second output digital sequence samples {x2(k)_, and an input buffer of the second digital sequence samples {y2(n)}; and 5b) at least a zerocrossing checking and resetting unit, operably coupled to the first variable delay generating unit and to the second variable delay generating unit, for zerochecking the normalized timing offset tι (n), such that, for providing shifting and timing information for a first digital rate converter having a first conversion ratio r: the first digital rate converter is initialized to a normalized timing offset of tjnit; the second digital rate converter is initialized to a normalized timing offset of (1rtjnit. modulo 1 ; and where zerocrossing occurs, the zerocrossing checking and resetting unit resets a second normalized timing offset _2(k) to one of: substantially 1 rtι (n) where tι (n) is close to zero (crossing from oneside); and substantially r[1tι (n)] where a normalized timing offset tι (n) is near one (crossing from zero side); δ such that timing differences between the first digital sequence samples and the second output digital sequence samples are substantially detected and variations in the timing differences are substantially reduced; and 5D) a receiver unit, operably coupled to the digital synchronization unit, for at least receiving {x2(k)}.
6. The modem of claim 5, further including at least one of 6A6F: 6A) an echo canceller unit, operably coupled to the encoder/modulator unit, for at least providing an echo cancelling output; and a combiner, operably coupled to the echo canceller unit and to the digital synchronization unit, for substantially adding the echo cancelling output to an output of the digital synchronization unit, such that a substantially echo corrected input is provided to the receiver unit; 6B) one of: 6B1) Dt2(k) is substantially equal to r, where r is a nominal rateconversion ratio; and 6B2) Dt2(k) is substantially equal to r2Dtl (n), where r is a nominal rateconversion ratio; 6C) the first sampling time advance Dt| (n) is preselected by an external controller; 6D) the first sampling time advance Dtι (n) is determined from a nominal conversion ratio r such that Dtι (n) = 1/r; 6E) the first digital resampler further comprises at least a sample shifting unit for providing delayed first digital sequence samples having a first selected rate, a first predetermined number of subfilters, and a linear interpolator for selecting a second predetermined number of subfilter outputs for generating a desired sample; and 6F) the second variable delay generating unit provides shifting and timing information utilizing at least queuedepth monitoring for monitoring a depth of at least one of: an output buffer of the second output digital sequence samples (x2(k)} and an input buffer of the second digital sequence samples _y2(n)}.
7. The modem of claim 5, wherein, for a desired queue depth D and a selected buffer being one of: the input buffer of {y2(n)J and the output buffer of X2(k), where the second variable delay generating unit further provides for: 7A) where the queue depth of the selected output buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate smaller than the first sampling rate; 7B) where the queue depth of the selected output buffer is less than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; 7C) where the queue depth of the selected input buffer is greater than D, generating the second output digital sequence samples {x2(k)J at a rate greater than the first sampling rate; and 7D) where the queue depth of the selected input buffer is less than D, generating the second output digital sequence samples (x2(k)} at a rate smaller than the first sampling rate.
8. A method for at least partially synchronizing at least first and second digital rate converters (DRCs), the first DRC having an input of at least some first digital sequence samples {xi (k)} sampled at a first sampling rate and the second DRC having an input of at least some second digital sequence samples {y2(n)} related to the first digital sequence samples and sampled at a second sampling rate different from the first sampling rate, comprising the steps of at least: converting the first digital sequence samples by at least the steps of: delaying and temporarily storing the first digital sequence samples {xi (k)}; shifting the first digital sequence samples into a first delay unit and generating first output digital sequence samples {yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal mi (n) and a first desired normalized timing offset tι (n); and utilizing a nominal normalized timing input Dtι (n), being a first sampling time advance, to provide the first desired normalized timing offset tι (n) and to provide the first shift control signal mj (n) determined from a previous normalized timing offset tι (n1); and converting the second digital sequence samples by at least the steps of: at least delaying and temporarily storing the second digital sequence samples {y2(n)} and providing the delayed, temporarily stored samples to a second digital resampler; shifting the second digital sequence samples into the second delay unit and for generating second output digital sequence samples {x2(n)} at substantially the first sampling rate utilizing a selected sample timing in accordance with a second desirable normalized timing offset _2(k), and a second shifting control signal m2(n); utilizing a nominal normalized timing input Dt2(k), Dt2(k) being a second sampling time advance to provide the second desired normalized timing offset t2(k) and to provide the second shift control signal m2(n) determined from a previous normalized timing offset t2(n1 ), for providing shift and timing information in accordance with a second sampling time advance Dt2(k), such that timing differences between the first digital sequence samples and the second output digital sequence samples are substantially detected and variations in the timing differences are substantially reduced.
9. The method of claim 8, wherein at least one of 9A9G: 9A) Dt2(k) is substantially equal to r, where r is a nominal rateconversion ratio; 9B) Dt2(k) is substantially equal to r2Dtι (n), where r is a nominal rateconversion ratio; 9C) the first sampling time advance Dtι (n) is preselected by an external controller; 9D) the first sampling time advance Dti (n) is determined from a nominal conversion ratio r such that Dtι (n) = 1/r; 9E) further comprising the steps of providing delayed first digital sequence samples having a first selected rate, utilizing a first predetermined number of subfilters, and utilizing at least a linear interpolator for selecting a second predetermined number of subfilter outputs for generating a desired sample; 9F) further including the step of queuedepth monitoring a depth of at least one of: an output buffer of the second output digital sequence samples X2(k) and an input buffer of the second digital sequence samples y2(n), and, where selected, further including, for a desired queuedepth D and a selected buffer being one of: the input buffer of {y2(n)} and the output buffer of {x2(k)}, where the second variable delay generating unit further provides for: 9F1 ) where the queue depth of the selected output buffer is greater than D, generating the second output digital sequence samples (x2(k)} at a rate smaller than the first sampling rate; 9F2) where the queue depth of the selected output buffer is less than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; 3D 9F3) where the queue depth of the selected input buffer is greater than D, generating the second output digital sequence samples {x2 (k)} at a rate greater than the first sampling rate; and 9F4) where the queue depth of the selected input buffer is less than D, generating the second output digital sequence samples {x2(k)J at a rate smaller than the first sampling rate, and 9G) the steps are utilized in a modem.
10. The method of claim 8, further including the step of zerochecking the normalized timing offset tι (n), such that, for providing shifting and timing information for the first digital rate converter having a first conversion ratio r: the first digital rate converter is initialized to a normalized timing offset of tinit; the second digital rate converter is initialized to a normalized timing offset of (l rtjnit)modulo 1 ; and where zerocrossing occurs, resetting a second normalized timing offset _2(k) to one of: substantially 1 rtι (n) where ti (n) is close to zero (crossing from oneside); and substantially r[1t . (n)] where the normalized timing offset ti (n) is near one (crossing from zero side).
Description:
FIRST AND SECOND DIGITAL RATE CONVERTER SYNCHRONIZATION DEVICE AND METHOD

Field of the Invention

This invention relates generally to digital sampling rate conversion systems, and more particularly to synchronizing digital sampling rate conversion systems.

Background of the Invention

Various analog sampling rate conversion schemes that utilize a resampling approach are known in the art. Typically, a first (forward) digital-to-analog converter (DAC1) converts input data xi (k) to an analog form at a rate fi , a sample clock rate of xi (k). An output of DAC1 is then passed through a low- pass filter (LPF1) to remove high frequency components, the output of the LPF1 further being sent to a first analog-to- digital converter (ADC1) and sampled at a second rate f2, thereby generating digital samples yi (n).

An inverse converter almost identical to the forward converter, typically a second digital-to-analog converter (DAC2), converts a digital sample sequence y2(n) that is synchronous with yi (n) to an analog form at a clock rate of f2- An output of DAC2 is generally passed through a second low- pass filter ( PF2), and the output of that LPF2 is converted by a second analog-to-digital converter (ADC2) to a digital sequence X2(k) at a rate of fi . Where ADC2 is controlled by the same clock of x . (k), the ADC1 and DAC2 are operated with a clock that is synchronous with the sample clock, sequences x-| (k) and X2(k) are synchronous, and rate conversion is linear and time-invariant.

It has been shown that an analog rate converter substantially comprising a DAC-LPF-ADC may be realized

digitally. Hence, a pair of digital rate converters may be utilized to form forward-inverse rate conversion, allowing reduction of the number of required analog components and concomitant costs for rate conversion devices. However, since accuracy of input/output sampling rates and conversion ratios may vary with time and accuracy of digital number representations typically involve at least some degree of imprecision, exact synchronization between xi (k) and x2(k) in sampling timing is typically a problem where digital rate converters are implemented.

Summary of the Invention

A digital synchronization device and method are provided for at least partially synchronizing at least first and second digital rate converters (DRCs), the first DRC having an input of at least some first digital sequence samples (x . (k)} sampled at a first sampling rate and the second DRC having an input of at least some second digital sequence samples {y2(n)} related to the first digital sequence samples and sampled at a second sampling rate different from the first sampling rate, wherein: the first DRC comprises at least: a first buffer, operably coupled to receive the first digital sequence samples (x. (k)}, for delaying and temporarily storing the first digital sequence samples {x . (k)}. a first digital resampler having at least a first delay unit, operably coupled to the first buffer, for shifting the first digital sequence samples into the first delay unit and for generating first output digital sequence samples _yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal m-f (n) and a first desired normalized timing offset t-| (n); and a first variable delay generating unit having a nominal normalized timing input Dti (n), Dti (n) being a first sampling time advance, and being operably coupled to the first

digital resampler, for providing the first desired normalized timing offset tι (n) and for providing the first shift control signal m-| (n) determined from a previous normalized timing offset tι (n-1); and the second DRC comprises at least: a second buffer, operably coupled to receive the second digital sequence samples {y2(n)} related to the first digital sequence samples {xi (k)}, for at least, delaying and temporarily storing the second digital sequence samples {y2(n)} and providing the delayed, temporarily stored samples to a second digital resampler; a second digital resampler having at least a second delay unit, operably coupled to the second buffer and to a second variable delay generating unit, for shifting the second digital sequence samples into the second delay unit and for generating second output digital sequence samples {x2(n)} at substantially the first sampling rate utilizing a selected sample timing in accordance with a second desirable normalized timing offset t2(k), and a second shifting control signal m2(n) from the second variable delay generating unit, the second variable delay generating unit having a nominal normalized timing input Dt2(k), D_2(k) being a second sampling time advance, and being operably coupled to the second digital resampler, for providing the second desired normalized timing offset _2(k) and for providing the second shift control signal m2(n) determined from a previous normalized timing offset t2(n-1), the second variable delay generating unit being operably coupled at least to the second digital resampler, for providing shift and timing information in accordance with a second sampling time advance Dt2(k), such that timing differences between the first digital sequence samples and the second output digital sequence samples are substantially detected and variations in the timing differences are substantially reduced.

One exemplary embodiment provides additionally that one of: the second buffer is further operably coupled to the second

variable delay generating unit for providing a first feedback signal for queue-depth monitoring; and an output buffer of the second DRC being operably coupled to the second variable delay generating unit for providing a second feedback signal for queue-depth monitoring. Thus, the second variable delay generating unit provides shifting and timing information utilizing at least queue-depth monitoring for monitoring a depth of at least one of: an output buffer of the second output digital sequence samples {x2(k)}, and an input buffer of the second digital sequence samples {y2(n)}. Typically, for a desired queue-depth D and a selected buffer being one of: the input buffer of {y2(n)} and the output buffer of X2(k), the second variable delay generating unit further provides for: where the queue depth of the selected output buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate smaller than the first sampling rate; where the queue depth of the selected output buffer is less than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; where the queue depth of the selected input buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; and where the queue depth of the selected input buffer is less than D, generating the second output digital sequence samples (x2(k)} at a rate smaller than the first sampling rate.

Another exemplary embodiment, providing greater synchronization, further includes at least a zero-crossing checking and resetting unit, operably coupled to the first variable delay generating unit and to the second variable delay generating unit, for zero-checking the normalized timing offset tι (n), such that, for providing shifting and timing information for a first digital rate converter having a first conversion ratio r: the first digital rate converter is initialized to a normalized timing offset of tjnit; the second

digital rate converter is initialized to a normalized timing o let of (l-rtinit)modulo 1 ; and where zero-crossing occurs, the zero-crossing checking and resetting unit resets a second normalized timing offset _2(k) to: substantially 1-rt . (n) where t-| (n) is close to zero (crossing from one-side); and substantially r[1-tι (n)] where a normalized timing offset tι (n) is near one (crossing from zero side).

All modifications within the spirit and scope of the invention are intended to be included as defined in the appended claims.

Brief Description of the Drawings

FIG. 1 illustrates a timing diagram of a typical digital rate conversion.

FIG. 2 is a block diagram of a pulse code modulation (PCM) echo cancellation modem having a pair of forward and inverse analog rate converters as is known in the art.

FIG. 3 is a block diagram of a forward and inverse digital rate converter system that implements analog interpolation as is known in the art.

FIG. 4A is a block diagram of a digital resampler with a linear interpolator adapted for use in the present invention.

FIG. 4B is a block diagram of an implementation of a digital rate converter in accordance with the present invention wherein a sample shifter is utilized with a variable delay generating unit (VDGU) and a variable timing offset generator. FIG. 5 is a block diagram of a first exemplary implementation of a device in accordance with the present invention including operably coupling at least the second buffer with a second VDGU for at least queue-depth monitoring.

FIG. 6 is a block diagram of a best mode exemplary implementation of a device in accordance with the present invention including at least a first zero-crossing checking and resetting unit. FIG. 7A and 7B depict a first set of timing diagrams illustrating the zero-crossing and modulo operations in offset timing: for a rate converter frequency ratio p/q > 1, p and q being integers, wherein converter timing offset is decreasing (7A); and for a rate converter frequency ratio p/q < 1 wherein converter timing offset is increasing (7B), respectively.

FIG. 8A and 8B are second timing diagrams substantially depicting exemplary timing offset during zero-crossings for general rate converter frequency ratios, 8A depicting zero crossing from one side, 8B depicting zero crossing from zero side, respectively, wherein the method and device of the present invention are utilized.

FIG. 9 is a block diagram of an embodiment of a pulse code modulation (PCM) echo cancellation modem having a device in accordance with the present invention.

Detailed Description of a Preferred Embodiment

Where a first digital converter converts a digital sequence {xi (k)} into another sample sequence {yi (n)} with a different sampling frequency from {xi (k)}, and a second digital rate converter converts a digital sample sequence {y2(n)}, which is related to {xι (k)} and is synchronous to {yi (n)}, into a sample sequence {x2(k)}, the present invention substantially provides for timing synchronization between the first and second digital rate converters. Such synchronization, a matching in sample timing in addition to a matching of average frequency for a pair of first and second digital rate converters, is critical in implementing a rate converter pair. For example, in a pulse code modulation (PCM) echo

cancellation modem, where a channel is time-varying as echo path rate converters often have overall time-varying delay, which tends to degrade performance of echo cancellation. Thus, the present invention fills a need by providing a device and method that reduce timing error for first and second digital rate converters.

FIG. 1 illustrates the timing diagram of a typical digital rate converter. A digital rate converter converts a first digital sample sequence (xi (k)} at a first sampling rate fi = 1 T1 , into a second digital sample sequence {yi (n)} at a second sampling rate .2 = 1/T2. T1 and T2 are selected time delays. Where these sequences are viewed as though they were generated by sampling a common analog signal s(t) at different rates, {xι (k)} may be viewed as s(kT1) and yι (n) may be viewed as s(nT2), as shown in FIG.1. The conversion ratio r of the converter is defined to be equal to f2/fl .

FIG. 2 is a block diagram of a pulse code modulation (PCM) echo cancellation modem having a pair of forward and inverse analog rate converters as is known in the art. Typically, an encoder/modulator (202) performs at least one of: encoding/modulating local information bearing data bits to provide an input of encoded/modulated sequence (203) to a transmitter filter (204) that provides a digital sequence xi (k) at a particular sampling frequency fi with a spectrum suitable for transmission. A forward converter (206) is typically utilized to convert the digital sequence xi (k) into a digital sequence yi (n) at a second sampling frequency .2 , for example 8 kHz, convenient for transmission over a first PCM circuit to a remote modem (not shown). A received digital sequence y2(n), at the second sampling frequency f2, that contains a received remote signal from the remote modem and echoes is typically received from a second PCM circuit by an inverse converter (214) of the mode , y2(n) being synchronous with the transmitted sequence yi (n). The inverse converter (214) is

utilized to convert the received digital sequence y2(n) into a digital sequence X2(k) at the first sample frequency fi and synchronous to xι (k). The encoder/modulator (202) also provides the encoded/modulated sequence (203) to an echo canceller (208), and an echo canceller (208) output is substantially subtracted from the inverse converter (214) output, typically utilizing a combiner (212) to remove echo components in X2(k). The combiner output (211), which consists mainly of a received remote signal, is then generally sent to a receiver (210) that recovers remote information bearing data bits transmitted by the remote modem.

FIG. 3 is a block diagram of a typical forward and inverse digital rate converter system that implements analog interpolation as is known in the art. The digital sequence i (k) is typically input into a forward converter (302) comprising a first digital-to-analog converter (DAC) (306) having a sampling rate of fi , a first low pass filter (LPF) (308), and a first analog-to-digital converter (ADC) (310) having the sampling rate of f2, to provide an output sequence yi (n). An inverse converter (304) is utilized to receive the sequence y2(n), the inverse converter (304) typically comprising a second DAC (316) having a sampling rate of f2, a LPF (314), and a second ADC (312) having a sampling rate of f| _ FIG. 4A is a block diagram of a digital resampler with a linear interpolator adapted for use in the present invention. The operation of such a digital resampler used to implement a first rate converter is described below. It is clear that a second rate converter can also be implemented using such a digital resampler. The following digital resampler is an exemplary embodiment. It is clear that many other digital resamplers would also be suitable for implementing the present invention. A sample shifting unit (402) typically shifts digital samples into a delay line (404A, 404B, ...) having a delay of T, where T is a preselected time that is typically

equal to Ti , a sample time interval of xi (k), for the first converter. The sample shifting unit (402) receives a digital sample sequence (xi (k)} at a rate fi and stores the samples in the delay line. The delay line is operably coupled to a filter bank of subfilters that utilize multiplication elements (406A, 406B, ...) and summation elements (408A, 408B, ...) of selected delayed samples. To generate each sample of a converted sequence {yi (n)} at a rate f2, desired subfilters are selected, and the selected subfilter outputs are input into a linear interpolator (410) that generates the desired sample. In the present invention an exact timing position of each output sample yι (n) is controlled in three stages. A coarse stage positions the output sample yi (n) within a full input sample interval Ti of a desired position by shifting the input samples in the delay line. An intermediate stage further positions yi (n) within T-| /M of the desired position by selecting appropriate subfilters, M being a number of subfilters in the filter bank. A fine stage then utilizes corresponding linear interpolation coefficients to position yι (n) at the desired timing position within a T-| /M time segment.

To ensure an intermediate stage timing position within Ti , the M subfilters in the digital filter bank are designed to have a same magnitude response. The subfilter group delay responses differ from each other by a constant equal to Ti/M over an entire signal frequency range utilized. Thus, output timing positions of any two adjacent subfilters in the filter bank differ by T-| /M, the timing offset, provided that the same set of input samples are in the delay line. For a special case in which a first and a last subfilter in the filter bank are adjacent, the timing offset is T-| (M-1 )/M. In this case, a new sample is shifted into the delay line to compute an output of the subfilter that has a maximum delay, thereby advancing a timing position of the output sample of that filter by a whole Ti , and providing that subfilter with a T-| /M lead over the

other subfilter. Thus, to generate an output sample at a desired timing position, two subfilters are selected to determine two output samples y'(n) and y"(n) having a timing offset of Tι/M, and having timing positions such that the desired timing position of the converter output lies therebetween. The converter output is determined by forming a linear combination of the two selected filter outputs in a form of ay'(n) + (1-a)y"(n), where a and (1-a) are substantially a distance between a timing position of a desired converter output and the timing positions of y n (n) and y'(n), respectively, normalized by T-|/M.

The intermediate stage and the fine stage may be viewed as an integrated block of a variable timing offset generator that adjusts timing offsets of digital resampler outputs as is more clearly shown in FIG. 4B, described more particularly below. To change sampling time by more than a whole input sample interval, input samples are shifted into the delay line in addition to changing timing offset. Thus, arbitrary sampling times are achieved, allowing digital rate conversion at any selected ratio. It is clear that the variable timing offset generator used in the present invention may be implemented in many different forms other than the one described above without violating the spirit of this invention.

FIG. 4B is a block diagram of a digital rate converter in accordance with the present invention wherein a sample shifter is utilized with a variable delay generating unit (VDGU) and a variable timing offset generator. A digital resampler (420) is implemented as a first sample shifting unit (412) utilized with a variable timing offset generator (414). A desired normalized timing offset tι (n) and a shifting control signal mι (n) are supplied to the digital resampler (420) by a variable delay generating unit (VDGU)(416) that is more fully described below. A second digital rate converter is implemented in an inverse manner, similar to that of the first

I I

utilized digital rate converter so that at least a first rate converter and a second digital rate converter are used for full implementation of the invention. Detailed operation of the first rate converter is as follows: a first digital sequence xι (k) is input into a sample buffer (418) In accordance with the first variable delay generating unit (416), the samples in the buffer (418) are shifted into the data shifter (412) that has a delay line with T delay, where T is a preselected time that is equal to Ti , the sample time interval of xi (k) for the first digital rate converter. For each output digital sample yi (n), the sampling time is advanced by a certain amount , Dtι (n), with respect to the sampling time of the previous sample yi (n-1). The first sampling time advance Dtι (n) may be supplied by an external control device, or alternatively, simply computed as Dtι (n) = 1/r, where r is a nominal rate- conversion ratio of the first digital rate converter. The first VDGU (416) determines a shifting control signal mι (n) that is an integer part of Dtι (n) + Dtι (n-1 ), where tι (n-1) is a normalized timing offset of yi (n-1), and is supplied to the sample shifter (412) for shifting m-| (n) samples into the delay line, and determines a desired normalized timing offset tι (n), where 0 < t-| (n) < 1 , that is the fractional part of Dtι (n) + H (n- 1) and is supplied to the variable timing offset generator (414) for generating the first output digital sequence sample of yi (n). The first VDGU (416) then stores the normalized timing offset tι (n) for use in generating the (n+1)th sample yi (n+1 ).

FIG. 5 is a block diagram of a first exemplary implementation of a device in accordance with the present invention including operably coupling at least the second buffer with a second VDGU for at least queue-depth monitoring. A digital synchronization device is provided for at least partially synchronizing at least first (501) and second (511) digital rate converters (DRCs). Typically, the first DRC

(501) is operated at a nominal rate-conversion ratio of r. Generally, the first DRC (501) has at least an input of some first digital sequence samples (xi (k)} sampled at a first sampling rate and the second DRC (511) has at least an input of some second digital sequence samples {y2(n)J that are related to the first digital sequence samples and are sampled at a second sampling rate different from the first sampling rate. In one embodiment, the first DRC (501 ) comprises at least: a first buffer (BUFFER 1)(504), operably coupled to receive the first digital sequence samples {xi (k)J, for delaying and temporarily storing the first digital sequence samples (xi (k)}; a first digital resampler (506) having at least a first delay unit, operably coupled to the first buffer (504), for shifting the first digital sequence samples into the first delay unit and for generating first output digital sequence samples {yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal mι (n) and a first desired normalized timing offset tι (n); and a first variable delay generating unit (FIRST VDGU)(508) having a nominal normalized timing input Dtι (n), Dti (n) being a first sampling time advance, and being operably coupled to the first digital resampler (506), for providing the first desired normalized timing offset tι (n) and for providing the first shift control signal mι (n) determined from a previous normalized timing offset tι (n-1). A first sampling time advance Dt-| (n) may be preselected by an external controller, or alternatively, may be determined from a nominal conversion ratio r such that Dtt (n) = 1/r. The second DRC (511) comprises at least: the second buffer (520), operably coupled to receive the second digital sequence samples {y2(n)} related to the first digital sequence samples {xi (k)}, for delaying and temporarily storing the second digital sequence samples _y2(n)} and for providing a feedback signal to a second variable delay generating unit (SECOND VDGU)(518); a second digital

resampler (516) having at least a second delay unit, operably coupled to the second buffer (520) and to the second variable delay generating unit (SECOND VDGU)(518), for shifting the second digital sequence samples into the second delay unit and for generating second output digital sequence samples {x2(n)} at substantially the first sampling rate utilizing a selected sample timing in accordance with a second desirable normalized timing offset _2(k) and a second shifting control signal from the second variable delay generating unit (SECOND VDGU)(518), the second variable delay generating unit (SECOND VDGU) (518) having a nominal normalized timing input Dt2(k), Dt2(k) being a second sampling time advance, and being operably coupled to the second digital resampler (516), providing the second desired normalized timing offset _2(k) and for providing the second shift control signal m2(n) determined from a previous normalized timing offset _2(n-1 ), the second variable delay generating unit being operably coupled at least to the second digital resampler, for providing shift and timing information in accordance with a second sampling time advance Dt2(k), such that timing differences between the first digital sequence samples and the second output digital sequence samples are substantially detected and variations in the timing differences are substantially reduced. Dt2(k) is typically substantially set to Dt2(k) = r, or alternatively, D_2(k) = r 2 Dtι (n) . Due to utilization of a feedback signal, further described below, then timing differences between the first digital sequence samples and the second output digital sequence samples are minimized. In the implementation illustrated in FIG. 5, feedback is utilized from the second buffer (520). However, it is clear that feedback may alternatively be obtained from an output buffer of the second DRC (511) as described more fully below.

In one embodiment, further including one of: the second buffer (520) being operably coupled to the second variable

" 4 generating unit (518) and an output buffer of the second DRC being operably coupled to the second variable delay generating unit, queue-monitoring feedback is provided for shifting and timing offset information to the second digital resampler (516) that may be selected to include include queue monitoring of a depth of at least one of: an input buffer of the second digital sequence samples {y2 (n)} and an output buffer of the second output digital sequence {x2(k)}. Typically, for a desired queue-depth D and a selected buffer being one of: the input buffer of {y2(n)} and the output buffer of X2(k), the second variable delay generating unit further provides for: where the queue depth of the selected output buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate smaller than the first sampling rate; where the queue depth of the selected output buffer is less than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; where the queue depth of the selected input buffer is greater than D, generating the second output digital sequence samples {x2(k)} at a rate greater than the first sampling rate; and where the queue depth of the selected input buffer is less than D, generating the second output digital sequence samples {x2(k)} at a rate smaller than the first sampling rate. Queue monitoring thus provides that the conversion ratio of the second digital resampler (516) is, on an average, equal to a reciprocal of the conversion ratio of the first digital resampler (508) and limits an instantaneous timing variation to no more than the larger of Ti and T2, where Ti and T2 are as defined for FIG. 1 , and provides for synchronization of the first and second rate converters.

Certain applications require more precise synchronization of first and second rate converters than that in the queue-depth monitoring described above. The device and method of the present invention also provides for selection of

J 5

a more precise synchronization, where desired, set forth in FIG. 6 and described more fully below. This synchronization enhances conventional digital rate converters by allowing direct accessing and adjustment of rate converters. In a best mode exemplary embodiment, FIG 6, a device in accordance with the present invention includes at least a first zero-crossing checking and resetting unit (614). Again, the device provides for at least partially synchronizing at least first and second digital rate converters (DRCs), the first DRC having an input of at least some first digital sequence samples {xi (k)} sampled at a first sampling rate and the second DRC having an input of at least some second digital sequence samples {y2(n)} related to the first digital sequence samples and sampled at a second sampling rate different from the first sampling rate. Typically the first digital rate converter (601) has a first conversion ratio of r that is utilized to perform rate conversion, and a second converter (611) is utilized to perform second rate conversion. In this embodiment, the first digital rate converter (601) comprises: a first buffer(FIRST BUFFER)(602), operably coupled to receive the first digital sequence samples {xi (k)}, for delaying and temporarily storing the first digital sequence samples {xi (k)}; a first digital resampler (604), operably coupled to the first buffer (602) for shifting the first digital sequence samples into the first delay unit and for generating first output digital sequence samples {yi (n)} at substantially the second sampling rate utilizing a first selected sample timing in accordance with a first shift control signal mi (n) and a first desired normalized timing offset tι (n); and a first variable delay generating unit (FIRST VDGU)(606) having a nominal normalized timing input Dtι (n), Dtι (n) being a first sampling time advance, and being operably coupled to the first digital resampler (604) and to a zero-crossing checking and resetting unit (614), for providing the first desired normalized timing

\ (P offset ti (n) and for providing the first shift control signal mι (n) determined from a previous normalized timing offset tι (n-1). A first sampling time advance Dt-| (n) may be preselected by an external controller, or alternatively, may be determined from a nominal conversion ratio r such that Dtι (n) = 1/r. The second digital rate converter (611), being the second DRC, comprises at least: the second buffer (610), operably coupled to receive the second digital sequence samples {y2(n)} from the first digital resampler (604) that are related to the first digital sequence samples; a second digital resampler

(608), operably coupled to the second buffer (610), to a second variable delay generating unit (SECOND VDGU)(612), and to provide second output digital sequence samples; the zero- crossing checking and resetting unit (614) being operably coupled to the FIRST VDGU (606) and to the SECOND VDGU (612); and the SECOND VDGU (612) being operably coupled to the second digital resampler (608) and to the zero-crossing checking and resetting unit (ZCCRU)(614). The functions of the buffers, the resamplers and the VDGUs are similar to the functions of the corresponding elements described in the previous embodiment using queue-monitoring and feedback. However, the ZCCRU (614) is utilized instead of queue- monitoring and feedback to achieve a more precise synchronization between the first and second digital rate converters.

In the best mode implementation, the first converter (601) is initialized to a normalized timing offset of tι (0) = Unit, and the second digital rate converter (611) is initialized to a normalized timing offset of .2(0) = (1-rtjnit) modulo 1 • To simplify description of the implementation, but without loss of generality, assuming tinit β 0, that is, ti (0) =0 and _2(0) = 0 in the sequel. Advances in sample timing Dti (n) of the first converter (601) are typically provided by an outside controller, or alternatively, determined as Dti (n) = 1/r, with

π

sample timing of the second digital rate converter (611) being advanced according to one of: the nominal conversion ratio such that Dt2(k) - r and the advance value of the sampling time advance of the first converter output sample yi (n), such that D_2(k) = r 2 Dtι (n) , where n is a current time index of the first converter output samples that does not necessarily have a one-to-one correspondence for every k. For every n, the FIRST VDGU (606) determines a shift control signal mι (n) and determines a normalized timing offset tι (n) from each Dtι (n) as described above. Generally, where n increases, the normalized timing offset tι (n) monotonically increases for r < 1 and decreases for r > 1 , in a range of 0 to 1. However, there are two special cases for the present invention. In a first special case, at n, where r < 1 and tι (n-1) is a large value that is close to one, at n the FIRST VDGU (606) generates a value of t-| (n) that is less than t. (n-1) and is close to zero. This first special case is defined to be a zero-crossing from one-side, and an additional shift signal is sent to the first digital resampler (604) to shift one more sample xi (k) into the first delay unit. In a second special case, at n, where r > 1 and t. (n-1) is a small value that is close to zero, the FIRST VDGU (606) generates a value of ti (n) that is greater than M (n-1 ) and is close to one. This second special case is defined to be a zero-crossing from the zero-side, and the FIRST VDGU (606) transmits a signal to the first digital resampler (604) to shift one less sample into the first delay unit than would generally be shifted.

In a first example, where a first converter has a rate- conversion ratio that is a rational number, for example, for r= f2/fl = 10/9, a normal timing advance for the first DRC is equal to Dtι (n) = 1/r = 0.9. As described above, an integer mι (n) and a fractional number tι (n) are determined by the FIRST VDGU and are transmitted to the first digital resampler for generating the nth output sample yi (n). For an initial

/β normalized timing offset t (0) = 0, consecutive offsets and corresponding required input delay unit shifts are: ti(1) = 0.9, mι(1) = 0; tι(2) = 0.8, mι(2) = 1; tl(3) = 0.7, mι(3) = 1; ti(4) = 0.6, mι(4) = 1; ... ;tι(9) = 0.1, mι(9) = 1; H(10) = 0, mι(10) = 1; and tι(11) = 0.9, mι(11) = 0. Thus, where a conversion ratio r > 1, the time-offset is decreasing by (1-1/r) = (r-1 )/r for each output sample in a modulo 1 fashion, and the input delay unit generally shifts by one position. However, for n»11, where a modulo 1 operation occurs, that is where tι(n-1) is a small value that is close to zero and ti (n) is close to one, the input delay unit remains unchanged from an (n-1)th output sample to an nth output sample. This describes zero-crossing from the zero-side. FIG. 7A illustrates sample-timing change and offset as in this first sample where a zero-crossing from the zero-side occurs.

In a second example, for a rational conversion ratio r= 9/10, a normal timing advance 1/r = 10/9, and an initial normalized timing offset starting from tι(0) = 0, consecutive offsets and corresponding required input delay unit shifts are: tl(1) = 0.111..., mι(1) = 1; M(2) = 0.222..., mι(2) = 1; tl(3) = 0.333..., mι(3) = 1; M(4) = 0.444..,, m-|(4) = 1; ... ; M(8) = 0.888..., mι(8) = 1; M(9) » 0, mι(9) =2; and tl(10) = 0.111..., mι(10) = 1. m-|(n) is defined as an integer part of tι(n-1) +1/r and M (n) is its fractional part with 0 < ti (n) < 1. Thus, where the conversion ratio r is less than one, the time offset increases by (1/r-1) for every output sample, also in a modulo 1 fashion, and the input delay unit generally shifts by one position. However, for n = 9, where a modulo 1 operation occurs, that is where ti (n-1 ) is close to one and ti (n) is close to zero, the input delay unit shifts by two positions from an (n-1)th output sample to an nth output sample. This describes zero-crossing from the one-side. FIG. 7B illustrates sample- timing change and offset as in this second example where a zero-crossing from the one-side occurs.

FIG. 8A and 8B are another set of timing diagrams substantially depicting exemplary normalized timing offset during zero-crossings for irrational conversion ratios, 8A depicting zero-crossing from the one-side, and 8B depicting zero-crossing from the zero-side, respectively, wherein the method and device of the present invention are utilized.

According to this invention, the ZCCRU (614) utilizes the above two cited special cases by detection of the zero- crossing and performing resetting of the second rate converter (611) to achieve a more precise synchronization.

The function of the ZCCRU (614) is further described as follows: as a zero crossing occurs in the first DRC (601), a zero crossing of an opposite type must also occur in the second DRC (602) for the time index increasing from k-1 to k. Denoting a normalized timing offset of the first converter by t-| (n), the normalized timing offset of the second DRC (611) is set to be 1-rtι (n), where tι (n) is close to zero, that is, zero- crossing from the one-side, the normalized timing offset of the second DRC (611) is set to be r[ 1-tι (n)] where tι (n) is close to one, that is, zero-crossing from the zero-side, and the number of output samples generated by the second digital resampler (604) is held equal to the number of input samples that have been shifted into the first delay unit of the first digital resampler (606). Where r is substantially in a neighborhood of one, for example 0.7 < r < 1.4, but not equal to one, the best mode implementation is easily utilized. However, for r very close to one, it is clear that rate converter synchronization necessarily involves some error accumulation. Thus, for maximum benefit, error accumulation for r very close to one is generally monitored in this implementation.

Where r is outside the suggested range [0.7,1.4] , one of the converters may be selected to have a decimator of an integer ratio followed by a rate converter within the

suggested range, thus providing for universal synchronization of a pair of first and second digital rate converters.

FIG. 9 is a block diagram of an embodiment of a pulse code modulation (PCM) echo cancellation modem having a device in accordance with the present invention, the device generally being a digital synchronization unit (DIGITAL SYN UNIT) (906) of a form of the digital synchronization device described above. Typically, an encoder/modulator unit (902) performs at least one of: encoding/modulating local information bearing data bits to provide an input of encoded/modulated sequence (903) to a transmitter filter unit (904) that provides a digital sequence xι (k) at a particular sampling frequency fi with a spectrum suitable for transmission. A first DRC (not shown) of the digital synchronization unit (DIGITAL SYN UNIT) (906), described above, typically as set forth in one of: FIGs. 5 and 6, is utilized to convert the digital sequence xi (k) into a digital sequence yi (n) at a second sampling frequency .2 , for example 8 kHz, convenient for transmission over a first PCM circuit to a remote modem (not shown). In the preferred embodiment, the device of FIG. 6 is utilized. A received digital sequence y2(n), at the second sampling frequency f2, that contains a received remote signal from the remote modem and echoes is typically received from a second PCM circuit by a second DRC (not shown) of the digital synchronization unit (DIGITAL SYN UNIT) (906) of the modem. y2(n) is typically synchronous with the transmitted sequence yi (n). The second converter of the digital synchronization unit (DIGITAL SYN UNIT) (906) is utilized to convert the received digital sequence y2(n) into a digital sequence X2(k) at the first sample frequency fi and synchronous to xι (k). The encoder/modulator (902) also provides the encoded/modulated sequence (903) to an echo canceller unit (908), and an echo canceller unit (908) output is combined with the output of the second DRC of the digital

2.1

synchronization unit (DIGITAL SYN UNIT) (906), typically utilizing an adder (912) to remove echo components in X2(k). The adder output (911), which consists mainly of a received remote signal, is then generally sent to a receiver unit (910) that recovers remote information bearing data bits transmitted by the remote modem.

The method of the present invention (not illustrated) provides for at least partial synchronization of at least first and second digital rate converters (DRCs), the first DRC having at least some first digital sequence samples and the second DRC having at least some second digital sequence samples related to the first digital sequence samples, comprising the steps of at least: first converting the first digital sequence samples by: receiving and shifting the first digital sequence samples {xi (k)} to obtain a first delay for each sample; providing a first desired variable timing offset for each first delay such that the first output digital sequence samples {yi (n)J are obtained with first selected sampling times and such that first conversion of the first digital sequence samples is instantaneously measurable at a first instantaneous conversion rate, typically nominal; and converting the second digital sequence samples by: receiving and shifting the second digital sequence samples {y2(n)J related to the first digital sequence samples {xi (k)J, for shifting desired second digital sequence samples to obtain a second delay for each sample; providing a second desired variable timing offset for each second delay; and determining second output digital sequence samples {x2(k)} having second selected sampling times; utilizing at least one of feedback and zero-crossing checking and resetting for detecting and reducing timing differences between first digital sequence samples and second output digital sequence samples. Feedback and zero-crossing checking resetting implementations include at least those set forth above for the device of the present

invention. Implementation of this method is in accordance with the spirit and scope of the description of the device of the invention.

Although exemplary embodiments are described above, it will be obvious to those skilled in the art that many alternations and modifications may be made without departing from the invention. Accordingly, it is intended that all such alterations and modifications be included within the spirit and scope of the invention as defined in the appended claims. I claim: