Resynchronization of sample rate converters
10097200 ยท 2018-10-09
Assignee
Inventors
- Miguel Usach Merino (Valencia, ES)
- Michael Hennessy (Limerick, IE)
- Anthony Evan O'Shaughnessy (Glounthaune, IE)
- Claire Croke (Aherla, IE)
Cpc classification
H03M1/00
ELECTRICITY
H04L7/0008
ELECTRICITY
H03M3/382
ELECTRICITY
International classification
Abstract
A device having a sample-rate converter that may be programmed to generate samples at different rates is synchronized to an external synchronization pulse by temporarily changing the sample rate to a temporary sample rate and then changing the sample rate back to the original sample rate. Synchronization in a reduced amount of time is achieved by determining the interval between the synchronization pulse and one of the output samples and determining a processing time of the device for generating the output samples at a new rate. The system calculates a temporary sample rate based on these calculations that tends to reduce an amount of time to achieve synchronization.
Claims
1. A method for synchronizing output samples of a device, including a programmable decimator, to a synchronization pulse, the method comprising: determining an interval between the synchronization pulse and a pulse of a signal indicating that output samples of the device are ready, the signal indicating that the output samples of the device are ready having a specified rate; in response to the interval, applying a temporary decimation factor to the programmable decimator to achieve a temporary output data rate, using the determined interval and a processing time of the device, to generate the output samples; and after a specified delay, applying a decimation factor to the programmable decimator to provide output samples at the specified rate.
2. The method of claim 1, further comprising determining the processing time and the interval based at least in part on one or more characteristics of the device.
3. The method of claim 2 wherein the device includes a sigma-delta modulator circuit having a filter and wherein the processing time includes a group delay of the filter.
4. The method of claim 3, wherein the filter includes an N.sup.th order sinc filter, where N is an integer, and wherein the specified delay includes N periods of the of the signal indicating that the output samples of the device are ready.
5. The method of claim 3, wherein the sigma-delta modulator is part of a sigma-delta analog-to-digital converter (ADC) circuit and the processing time includes a sum of the group delay of the filter and a calibration delay of the ADC and the filter.
6. The method of claim 3, further comprising: determining that the interval between the synchronization pulse and the signal indicating that output samples of the device are ready is less than or equal to one-half of the group delay of the filter and, in response to the determination, applying the decimation factor to the programmable decimator includes applying the decimation factor such that the temporary output data rate is greater than the specified rate.
7. The method of claim 3, further comprising: determining that the interval between the synchronization pulse and the signal indicating that output samples of the device are ready is greater than one-half of the group delay of the filter and, in response to the determination, applying the decimation factor to the programmable decimator includes applying the decimation factor such that the temporary output data rate is less than the specified rate.
8. The method of claim 1 wherein determining the interval between the synchronization pulse and the pulse of the signal indicating that output samples of the device are ready includes: counting pulses of an input clock signal by a counter generate a count output signal; receiving the count output signal as a first count value and resetting the counter responsive to a leading edge of the pulse of the signal indicating that output samples of the device are ready; receiving the count output signal as a second count value and resetting the counter responsive to a leading edge of the synchronization pulse; and responsive to the second count value indicating a time less than one half of a period of the signal indicating that output samples of the device are ready, determining the interval based on the second count value.
9. The method of claim 1 wherein determining the interval between the synchronization pulse and the pulse of the signal indicating that output samples of the device are ready includes: counting pulses of an input clock signal by a counter to generate a count output signal; receiving the count output signal as a first count value and resetting the counter responsive to a leading edge of the pulse of the signal indicating that output samples of the device are ready; receiving the count output signal as a second count value and resetting the counter responsive to a leading edge of the synchronization pulse; and responsive to the second count value indicating a time greater than one half of a period of the signal indicating that output samples of the device are ready, determining the interval based on the first count value.
10. An apparatus for synchronizing output samples of a device having a programmable decimator to a synchronization pulse, the apparatus comprising: circuitry configured to determine an interval between the synchronization pulse and a pulse of a signal indicating that output samples of the device are ready, the signal indicating that the output samples of the device are ready having a specified rate; and control circuitry configured to: apply a temporary decimation factor to the programmable decimator to achieve a temporary output data rate, wherein the temporary decimation factor is based on the determined interval and on a processing time of the device to generate the output samples; and after a specified delay, apply a decimation factor to the programmable decimator to change the output data rate to the specified rate.
11. The apparatus of claim 10 wherein the processing time is determined based at least in part on one or more characteristics of the device.
12. The apparatus of claim 11, wherein the device includes a sigma-delta modulator circuit having a filter and the processing time includes a group delay of the filter.
13. The apparatus of claim 12, wherein the filter is an Nth order-sine filter, where N is an integer, and wherein the specified delay includes N periods of the signal indicating that the output samples of the device are ready.
14. The apparatus of claim 12, wherein device includes a sigma-delta. analog-to-digital converter (ADC) including the sigma-delta modulator, and the processing time is a sum of the group delay of the filter and a calibration delay of the ADC and the filter.
15. The apparatus of claim 12, wherein the control circuitry is configured to apply the decimation factor such that the temporal).sup., output data rate is greater than the specified rate when the interval between the synchronization pulse and the signal indicating that output samples of the device are ready is less than or equal to one-half of the group delay of the filter.
16. The apparatus of claim 10, wherein the control circuitry is configured to apply the decimation factor such that the temporary output data rate is less than the specified rate when the interval between the synchronization pulse and the signal indicating that output samples of the device are ready is greater than one-half of the group delay of the filter.
17. The apparatus of claim 10 further comprising: a clock generator for generating an input clock signal for the programmable decimator; and timer circuitry including a counter configured to count clock pulses of the input clock signal to provide a count output signal, wherein the timer circuitry is configured to: receive the count output signal, the synchronization pulse, and the pulse of a signal indicating that output samples of the device are ready; store the count output signal as a first count value and reset the counter, responsive to the pulse of the signal indicating that output samples of the device are ready; and store the count output signal as a second count value and reset the counter, responsive to the synchronization pulse; wherein the apparatus includes circuitry configured to determine the interval based on the second count value when the second count value indicates a time less than one half of a period of the signal indicating that output samples of the device are ready.
18. The apparatus of claim 10 further comprising: a clock generator for generating an input clock signal for the programmable decimator; and timer circuitry including a counter configured to count clock pulses of the input clock signal to provide a count output signal. wherein the timer circuitry is configured to: receive the count output signal, the synchronization pulse, and the pulse of a signal indicating that output samples of the device are ready; store the count output signal as a first count value and reset the counter responsive to a the pulse of the signal indicating that output samples of the device are ready ; and store the count output signal as a second count value and reset the counter responsive to the synchronization pulse; wherein the apparatus includes circuitry configured to determine the interval based on the first count value when the first count value indicates a time greater than one half of a period of the signal indicating that output samples of the device are ready.
19. A non-transitory computer readable medium including program instructions that are configured to cause a processing element to synchronize output samples of a device to a synchronization pulse, the device including a programmable decimator, the program instructions being configured to cause the processing element to: determine an interval between the synchronization pulse and a pulse of a signal indicating that output samples of the device are ready, the signal indicating that the output samples of the device are ready having a specified rate; in response to the interval, apply a temporary decimation factor to the programmable decimator to achieve a temporary output data rate, using the determined interval and a processing time of the device, to generate the output samples; and after a specified delay, apply a decimation factor to the programmable decimator to provide output samples at the specified rate.
20. An apparatus for synchronizing output samples of a device, including a programmable decimator, to a synchronization pulse, the apparatus comprising: means for determining an interval between the synchronization pulse and a pulse of a signal indicating that output samples of the device are ready, the signal indicating that the output samples of the device are ready having a specified rate determined from an initial decimation factor applied to the programmable decimator; means for determining a temporary decimation factor based on the determined interval and a processing time of the device; means for applying the temporary decimation factor to the programmable decimator to achieve a temporary output data rate; and means for applying the initial decimation factor to the programmable decimator after a specified delay to provide output samples at the specified rate.
Description
(1)
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION
(7) The following detailed description refers to the accompanying drawings. The same reference numbers may be used in different drawings to identify the same or similar elements. In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular structures, architectures, interfaces, techniques, etc. in order to provide a thorough understanding of the various aspects of various embodiments. However, it will be apparent to those skilled in the art having the benefit of the present disclosure that the various aspects of the various embodiments may be practiced in other examples that depart from these specific details. In certain instances, descriptions of well-known devices, circuits, and methods are omitted so as not to obscure the description of the various embodiments with unnecessary detail. Furthermore, features of the drawings are not to scale but may be expanded or contracted to illustrate the disclosed embodiments.
(8) Synchronizing multiple sigma-delta ADCs to a common synchronization pulse may result in a prolonged interval with no valid samples. The most common way to synchronize a sigma-delta ADC is to reset the digital processing hardware of the ADC. Sigma-delta ADCs continuously sample the input signal and digitally process output signals of a sigma-delta to generate the output conversion samples. The generation of valid conversion samples occurs only after a predetermined number of modulator output samples have been processed.
(9) The digital processing removes high frequencies, and minimizes noise, typically by averaging samples to generate high resolution conversion samples. Optionally, the digital processing may also calibrate the conversion samples by compensating for offset and gain introduced in the conversion process.
(10) One method of synchronization is to control the point when the digital processing of an acquisition board starts to average samples, some sigma-delta ADCs include a feature, typically implemented in an external pin, to reset the digital signal processing. In distributed systems, a synchronization signal provided by a master acquisition board synchronizes all of the acquisition boards to the master board.
(11) Each acquisition board is configured to operate independently, that is to say, in response to an internally generated clock signal. To guarantee the correct synchronization, however, the acquisition boards may share a common synchronization signal generated by the master acquisition board, for example, once per second, such as is provided, for example, by a GPS system. Ideally, the local clock signal is aligned to be synchronous with the synchronization signal, but more importantly, the master board synchronizes the sigma-delta processors so that the modulator samples provided by each of the sigma-delta converters of all of the acquisition boards are aligned with the synchronization signal.
(12) One method of synchronization involves resetting the digital processing hardware of each acquisition board when the synchronization signal is not aligned with the output clock signal of the acquisition board. When a sigma-delta ADC is synchronized by resetting the digital processing hardware, however, there is a penalty in time until the digital processing hardware processes a sufficient number of input samples to generate a valid conversion sample. This is referred to as the settling time.
(13) The examples presented below describe a solution based on the use of a sample rate converter, but could be extrapolated to any other digital processor implementation that provides fine tuning capabilities in the number of modulator samples that are digitally processed so that no dynamic spurs (e.g. glitches), or saturation events occur when the number of samples is modified. The example digital processing includes a programmable decimator that provides for on-the-fly update of a decimation factor.
(14) The examples described below measure a time difference between the external synchronization signal and the output clock pulse of the sigma-delta ADC. Based on this measurement, the processor causes the sample rate converter to temporarily adjust the decimation rate to compensate this time difference. The processor then causes the sample rate converter to revert to its original rate so that, when the conversion to the original rate is complete, the ADC will be synchronized to the synchronization signal.
(15)
(16) The sigma-delta modulator 202 is driven at the input sample rate F.sub.S which is greater than the output sample rate of the ADC 200 by the decimation factor. The sigma-delta modulator 202 outputs one or more pulse trains at the clock frequency F.sub.S to one or more inputs of the integrator stage 215. For the sake of simplicity only a single signal path has been shown between the sigma-delta modulator 202 and the integrator stage 215. It is understood, however, that the signal path may include multiple data paths each providing samples at the sampling frequency F.sub.S. The example integrator stage 215 includes three cascade-connected integrators. The first integrator includes summing circuit 204 and delay element 206, the second integrator includes summing circuit 208 and delay element 210, the third integrator includes summing circuit 212 and delay element 214. Each of the summing circuits 204, 208 and 212 may include a modulo arithmetic adder having a respectively larger modulus. An output of the integration block 16, which may now be a multibit word is provided to the circuit 225.
(17) Circuit 225 includes multiple multiply-accumulator circuits 216, 218, 222, 224, 228 and 230; interpolators 220, 226 and 232; and controller 236. As described in the above-referenced patent, each multiply-accumulator circuit implements a third order finite impulse response (FIR) differentiation filter which, when the sinc filter has a decimation factor of 100 may be described by equation (1).
Output=1Z.sup.300+3Z.sup.2003Z.sup.100+1 (1)
Each multiply accumulator, therefore, implements a third order differentiator having a decimation factor of 100 to 1. The delays used by the FIR filter are changed to change the decimation factor of the programmable decimator. The multiply-accumulators are arranged in pairs, including an A multiply-accumulator and a B multiply-accumulator. In this arrangement the first channel is implemented as two multiply-accumulators 216 and 218, which may be regarded as sub-channels within a channel.
(18) Each multiply-accumulator in each pair of multiply-accumulators is connected to a combining circuit, such as an interpolator 220, which combines the outputs of the multiply-accumulators in a weighted manner. The weighting is adjustable in response to the controller 236. Such an arrangement allows fractional decimation values to be synthesized. Suppose, for example, that the integrator stage 215 outputs words at the input sample rate F.sub.S, and that each word is identified by an index P. The sample rate converter may receive a command to decimate by a factor of M as it starts this process upon receipt of a word P.sub.E, where E is an integer. The decimation factor M, however, may be a non-integer number, which can be divided up into an integer part I and a fractional or decimal part D. If, for example, M=233.33, then I=233 and D=0.33. The controller 236 loads the value I as the decimation factor into the first multiply-accumulator 216. Similarly the controller 236 loads the same decimation factor I into the second multiply-accumulator 218 of the first pair of multiply-accumulators.
(19) The controller 236, however, controls the multiply-accumulators 216 and 218 such that they operate on samples provided by the integrator stage 215 that are temporally offset from one another by one period of the sample frequency F.sub.S. Loading the channels with the same decimation factor I means that the channels maintain synchronism, i.e., the offset of one word, irrespective of how many output words they provide. The outputs of the two multiply accumulators 216 and 218 are combined at the interpolator 220 in a weighted fashion.
(20) The interpolator 220 receives the value D from the controller 236. The interpolators 220, 226 and 232 implement any of several interpolation methods. In one example, each of the interpolators is a bilinear interpolator which generates the interpolated value according to equation (2).
Output=S1+(S2S1)D (2)
where S1 and S2 are consecutive samples provided by the integrator stage 215 at the sample rate F.sub.S.
(21) The description of the operation of the first channel, including first pair of multiply accumulators 216 and 218 and the interpolator 220, applies to the second channel, including the second pair of multiply accumulators 222 and 224 and the interpolator 226, and to the third channel which includes the third pair of multiply accumulators 228 and 230 and the interpolator 232. The samples processed by the second and third channels are offset by I and 2*I samples, respectively, with respect to the samples processed by the first pair of multiply-accumulators 216 and 218. The multiplexer 234 selects output samples provided by the respective channels at times determined by the controller 236. Thus, each of the multiply-accumulators 222, 224, 228 and 230 includes a variable delay element (not shown) which is controlled by the controller 236.
(22)
(23) The sinc filter, including the integrator stage 215 and combined decimator and differentiator stage 225, may be provided as individual components or within a single integrated circuit package. The sample rate converter may be provided as part of an analog to digital converter (ADC), as shown in
(24)
(25)
(26) In one example, when the system determines that pulses of DRDY are not synchronized to the SYNC pulse, the system temporarily changes the ODR of the programmable decimator to a value that tends to synchronize DRDY with the SYNC pulse and then changes the ODR back to its original value.
(27) In one example embodiment, control circuitry coupled to the sigma-delta ADC uses the group delay, calibration and synchronization time values to determine the temporary ODR to be used to synchronize the sigma-delta ADC to the synchronization pulse. The temporary sampling rate, ODR.sub.TEMP or ODR.sub.TEMP, is given by equation (3), (4) when T.sub.SYNC1 is used or by equation (5) when T.sub.SYNC2 is used.
(28)
(29) Else
(30)
(31)
where N is the number of conversion sample intervals used by the sample-rate converter to adjust to a new output data rate. The temporary decimation rate is 1/ODR.sub.TEMP or 1/ODR.sub.TEMP. These values may be calculated directly by inverting equations (3), (4) and (5) as shown in equations (6), (7) and (8), respectively.
(32)
(33) Else
(34)
(35)
When the sample-rate converter is implemented in a third-order sinc filter, N is equal to 3. From equation (3) it can be seen that ODR.sub.TEMP is greater than ODR when t.sub.CAL+t.sub.SYNC is less than t.sub.GROUP.sub._.sub.DELAY/2 while ODR.sub.TEMP is less than ODR otherwise. Equations (3) and (4) represent corrections when the DRDY pulse occurs before the SYNC pulse and equation (5) represents a correction when the DRDY pulse occurs after the SYNC pulse. In one embodiment, the system uses the value T.sub.SYNC1 when the interval between the leading edge of a pulse of the signal DRDY and the following SYNC pulse is less than one-half period of the signal DRDY. Otherwise, the system uses the value T.sub.SYNC2 representing the interval between the leading edge of the SYNC pulse and the leading edge of the next pulse of the signal DRDY.
(36)
(37) As described above, the interval t.sub.SYNC1 shown in
(38) As described above with reference to
(39)
(40)
(41) The ADC 600 receives an analog input signal IN at the input of a programmable gain amplifier (PGA) 602. The amplifier 602 amplifies or attenuates the analog input signal to be in a range compatible with the sigma-delta modulator 604. The sigma-delta modulator generates a stream of digital samples at the sample rate F.sub.S. The samples are applied to a sinc filter 606 which processes the samples to remove noise. Filter 606 may include a sample rate converter 608, as described above with reference to
(42) The sample rate converter 608 may also be separate from the sinc filter 606. In this configuration, the sinc filter 606 may operate at the input sample rate F.sub.S. The sample rate converter 608 may include a programmable decimator that operates on digital samples provided by the sinc filter 606.
(43) In either configuration, the sample rate converter 608 receives a decimation rate value from a decimation rate register 610. The register 610 is controlled by the synchronization circuit 650. The synchronization circuit 650 may be implemented separately from the sigma-delta ADC 600 in an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), and/or a programmable logic array (PLA). Alternatively, the synchronization circuit 650 may be implemented in logic included in the sigma-delta ADC 600.
(44) The example synchronization circuit 650 includes a clock signal generator 652, timer circuitry 654, arithmetic logic 656 and a memory 658. As shown in
(45) Alternatively, the clock circuitry 652 may include a counter that counts clock pulses to generate a system clock value. In this embodiment, the timer circuitry may store a value of the system clock value when the leading edge of each SYNC pulse occurs and at the occurrence of the leading edge of each pulse of the signal DRDY. In this embodiment, the timer circuitry may generate a difference between successive stored values. When the difference between the clock value stored at the leading edge of the DRDY pulse and the leading edge of the SYNC pulse is less than one-half period of ODR, that difference is used as the value t.sub.SYNC1. When the difference is greater than or equal to one-half period of the signal DRDY, the system waits for the next DRDY pulse and uses the difference between the clock value coincident with the leading edge of the SYNC pulse and the clock value coincident with the leading edge of the next DRDY pulse as the value t.sub.SYNC2.
(46) The synchronization interval t.sub.SYNC1 or t.sub.SYNC2 is combined with stored values t.sub.GROUP.sub._.sub.DELAY and t.sub.CAL from the memory 658 to calculate the temporary decimation rate according to equations (6), (7) or (8) corresponding to ODR.sub.TEMP or ODR.sub.TEMP as shown in equations (3), (4) or (5), respectively. When ODR is not a preset value, the arithmetic logic 656 reads the current decimation rate, corresponding to ODR, from the decimation rate register 610, stores the value into the memory 658 and transfers the value ODR.sub.TEMP to the decimation rate register 610. After transferring ODR.sub.TEMP to the decimation rate register 610, the arithmetic logic 656 configures the counter 654 to count N pulses of the signal DRDY. After counting the N pulses of the signal DRDY, the arithmetic logic 656 retrieves the decimation rate corresponding to ODR from the memory 658 and transfers it to the decimation rate register 610 or resets the decimation rate to its preset value. The sigma-delta ADC is synchronized to the signal SYNC after N pulses of the signal DRDY.
(47) Although
(48) The software shown in
(49) As described above, it is possible to provide a synchronization mechanism for a sample rate converter that can be implemented using hardware and/or software and that allows for output data to be available throughout the synchronization process without settling considerations. Although several examples are described above, these examples are not intended to be limiting. The methods and apparatus described in this specification are limited only by the scope of the following claims.