Sample-rate converter with fast tracking
The sample-rate converter circuit addresses fast lock-time and jitter management issues by employing a two-part structure with an instantaneous estimator and adjustable low-pass filters, achieving rapid convergence and accurate jitter absorption.
Patent Information
- Application Number
- US18/987251
- Authority / Receiving Office
- US · United States
- Patent Type
- Patents(United States)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2026-12-01
- Estimated Expiration
- 2045-05-22
AI Technical Summary
Existing sample-rate converters face challenges in achieving fast lock-time with low estimation error and effective jitter management, particularly in asynchronous data processing, leading to glitches and increased settling times.
The sample-rate converter circuit is divided into two parts: an instantaneous rate-estimator circuit for a noisy estimate and an adjustable low-pass filter to filter noise, using an IIR filter architecture with adjustable time-constants to minimize glitches and overshoot, and a controlled low-pass filter with error-feedforward architecture to eliminate pointer offset.
The solution enables fast convergence to low error with a well-defined phase relationship between input and output pointers and improved jitter attenuation, reducing settling times and maintaining accuracy.
Smart Images

Figure US12819663-D00000_ABST
Abstract
Description
FIELD
[0001] The present invention relates a sample-rate converter circuit, for receiving a first signal at a first sampling frequency and for outputting a second signal, representative of said first signal, having a second sampling frequency.BACKGROUND
[0002] Such sample-rate converters that need to process data asynchronously are used in audio and voice systems to convert digital signals between different sample-rates. In audio and voice systems there are typically more than one sample-rates used in different standards, like for example 44.1 kHz and 48 kHz audio, 8 kHz and 16 kHz voice. Often signals from voice and audio need to be mixed, which means the sample-rates need to be the same. It is also common practice to convert signals from different audio sources to a common rate (e.g. 96 kHz) so that they can be processed by a digital signal processor operating at a constant clock-rate. Data sources are often asynchronous i.e. they derive from unrelated clock-domains. For example, data may be received from a Bluetooth receiver at a rate dependent on a remote Bluetooth transmitter and that data may need to be converted to a sample-rate linked to the local master clock, which is derived from a crystal oscillator.
[0003] This invention relates specifically to sample-rate estimation, which is a component in a sample-rate converter used to estimate a sample-rate ratio R between input and output data.
[0004] This sample-rate estimate is needed to adjust sample-rate filters to provide an effective conversion between an input sample-rate FSI and an output sample-rate FSO. FIG. 1 shows the block diagram of a sample-rate converter 1 according to the state of the art with a sample-rate estimator 2 and sample-rate filters 3. The sample-rate estimator 2 provides an estimation of the ratio R between the input sample-rate FSI and the output sample-rate FSO with ratio R=FSI / FSO. This estimated ratio R is passed to the sample-rate filters 3, which re-sample an input data signal DATA_IN at the output sample-rate FSO and provide the necessary anti-aliasing or anti-imaging filters. One of the main design considerations of the sample-rate estimator 2 is a lock-time. This is the time taken by the sample-rate estimator 2 to provide an estimate of sample-rate ratio R within a defined error. If the lock time is too long, the sample-rate converter 1 takes too long to start-up which impacts the responsiveness of the audio / voice system containing the sample-rate converter 1. High performance sample-rate converters (with e.g. THD+N<120 dB) require the estimation error to be small (within the same order of magnitude as the THD+N specification), but also have a low lock time, typically <50 ms. It is very challenging to design a sample-rate converter with high performance and low lock-time.
[0005] “A Stereo Asynchronous Digital Sample-Rate Converter for Digital Audio”, Robert Adams and Tom Kwan, IEEE Journal of Solid-state Circuits, Vol 29, No 4, April 1994] teaches a method to estimate the ratio R between the input sample-rate FSI and the output sample-rate FSO. FIG. 2 shows such a sample-rate converter 4 with a first integrator 5 clocked at the input sample-rate FSI and a second integrator 6 clocked at the output sample-rate FSO.
[0006] The loop tracks the difference between the slope of the output of the first and second integrators 5 and 6 and adjusts the slope of the FSO-domain second integrator 6 to match. The input to the second integrator 6 is the ratio R=FSI / FSO. This ratio R is passed to the sample-rate filters 3 of FIG. 1, which perform the sample-rate conversion of the data signal DATA_IN to DATA_OUT.
[0007] In designing the rate estimator 2, there is a tradeoff between lock speed and accuracy. In order to converge quickly, the time-constants of the sample-rate filter 3 must be fast. For accuracy, the time constants must be slow. It is common for time constants to be adjusted so the rate estimator 2 tracks quickly at start-up, then accuracy improves over time. In the method disclosed in above mentioned IEEE Journal, since the estimated sample-rate ratio R is at the output of a coefficient K, adjusting coefficient K instantaneously adjusts the value of ratio R, causing a glitch after which the loop has to re-settle.
[0008] A further prior art sample-rate converter disclosed in U.S. Pat. No. 7,948,405 solves this issue of the glitch with a second loop that biases the first loop to minimize the glitch, but since the loop is first-order, the convergence time is slow, what is a substantial drawback of this sample-rate converter.
[0009] Another problem that needs to be solved that impacts lock-time is the effective management of data buffering, particularly in the presence of clock jitter. Jitter is the instantaneous variation of clock edges that results from timing errors in the clock generation or transmission. Jitter causes the arrival time of the input data to vary with time and that variation needs to be absorbed. A common state of the art method of absorbing jitter is to use a circular buffer 7, as shown in FIG. 3. Circular buffer 7 is controlled by two pointers, an (input) write pointer 8 and an (output) read pointer 9. Write pointer 8 points to the location in the circular buffer 7 where DATA_IN is written and the read pointer 9 points to the location in the circular buffer 7 where DATA_OUT is read. The respective pointers 8 and 9 move in a circular fashion around the circular buffer 7 once data is written or read. To absorb jitter, the read pointer 9 moves at a constant rate whereas the write pointer 8 moves backwards and forwards in time relative to the read pointer 9. To avoid the two pointers 8 and 9 colliding, resulting in data loss, there must be a method of controlling the offset between the pointers 8 and 9. To maximize jitter tolerance, the average offset should be maintained at half the length of the circular buffer 7. The circular buffer 7 fits into the sample-rate converter on the input sample-rate FSI domain as shown in FIG. 4. It is also possible to fit the circular buffer 7 between the input sample-rate FSI domain and the output sample-rate FSO domain within the sample-rate filter block.
[0010] The method disclosed in above mentioned IEEE Journal estimating the sample-ratio between input sample-rate FSI and FSO is explained based on FIG. 2 with the two integrators 5 and 6 which are clocked at input sample-rate FSI and output sample-rate FSO. The loop tracks the error between the slope of the output of the integrators 5 and 6 and adjusts the slope of the output sample-rate FSO domain integrator 6 to minimize the error. The input to the integrator 6 is the ratio R=FSI / FSO, which is the estimate of the sample-rate ratio. The modulus (lower integer bits) of the integrators 5 and 6 can be used to drive the circular buffer 7 pointers 8 and 9, since they track each other and wrap after a defined number of increments as explained based on FIG. 5. But there are two problems with this architecture shown in FIG. 5.: The first problem is that although the loop minimizes frequency error between the two integrators 5 and 6, so that the pointers 8 and 9 increment at the same rate, the phase error is not minimized and as a result, the offset between the two pointers 8 and 9 is dependent on the sample-rate. This is apparent, because the output of the subtractor, which is the difference between the two integrators 5 and 6 driving the pointers, has the value R / K. Therefore, in the case that the circular buffer 7 has a length 8 memory spaces, the difference between the read pointer 9 and write pointer 8 is:Offset=R / K mod 8
[0011] A second problem with the state of the art architecture of FIG. 5 is that, to reduce lock time, the time constant of rate-estimator 2 is often set to enable rapid initial tracking, followed by gradual accuracy enhancement. In the setup shown in FIG. 5, this can be achieved by modifying the coefficient K. However, this causes a significant glitch, because the value of R, derived from coefficient K, will alter whenever coefficient K changes.
[0012] A known method to make the pointers 8 and 9 track is to introduce another integrator in the loop. The loop then tracks phase as well as frequency, which removes the offset between the slope of the integrators 5 and 6 and therefore ensures the offset between the two pointers 8 and 9 is also zero. A pointer offset of half the buffer length can then be added. An example using this idea of a 2nd-order filter is disclosed in prior art and an example filter architecture 10 is shown in FIG. 6.
[0013] However, this loop experiences overshoot, significantly increasing both settling and lock times. Each time the coefficients K are adjusted, the loop must resettle, making the overshoot issue worse. It is therefore difficult to use this prior art technique in designs that require fast locking.
[0014] Another prior art method disclosed in U.S. Pat. No. 7,948,405 uses a second loop that biases the first to minimize the error between the integrators. However, since the loop is first-order, a very low cutoff frequency must be used to gain sufficient jitter attenuation. This entails long time-constants which means lock time is slow.SUMMARY
[0015] The objective of this invention is to provide a sample-rate converter circuit with a rate estimation circuit and a method of rate estimation that converges fast with a low error. This objective is achieved with a sample-rate converter circuit according to claim 1 and a method according to claim 9.
[0016] The inventive concept is based on breaking-up of the rate-estimator circuit in two parts. The first part is an instantaneous rate-estimator circuit that produces a noisy estimate of ratio R=FSI / FSO. The second part is an adjustable low-pass filter that filters the noise from the output signal of the instantaneous rate-estimator circuit. This second part may be realized with a low-pass filter with conventional architecture, but implemented in a way to allow time-constant adjustments without glitches.
[0017] A preferred embodiment of this invention is a sample rate converter circuit that converges fast to low error and maintains a well-defined phase relationship between input and output pointers and has good levels of jitter attenuation.
[0018] These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter. The person skilled in the art will understand that various embodiments may be combined.BRIEF DESCRIPTION OF THE DRAWINGS
[0019] FIG. 1 shows the block diagram of a sample-rate converter circuit according to the state of the art.
[0020] FIG. 2 another sample-rate converter circuit according to the state of the art with a first integrator clocked at an input sample-rate and a second integrator clocked at an output sample-rate.
[0021] FIG. 3 shows a circular buffer according to the state of the art.
[0022] FIG. 4 shows a sample-rate converter circuit with a circular buffer according to the state of the art.
[0023] FIG. 5 shows a rate estimator circuit of the sample-rate converter circuit of FIG. 4 according to the state of the art.
[0024] FIG. 6 shows a filter architecture according to the state of the art.
[0025] FIG. 7 shows a block diagram of a first embodiment of rate estimator circuit according to the invention.
[0026] FIG. 8 shows the detailed block diagram of the instantaneous rate estimator circuit of FIG. 7.
[0027] FIG. 9 shows a diagram of an output value V of an integrator of the rate estimator circuit of FIG. 7.
[0028] FIG. 10 shows a diagram of a staircase output of the integrator of the rate estimator circuit of FIG. 7.
[0029] FIG. 11 shows the detailed block diagram of a low-pass filter of the rate estimator circuit of FIG. 7.
[0030] FIG. 12 shows the detailed block diagram of a time-constant controller of the rate estimator circuit of FIG. 7.
[0031] FIG. 13 shows a block diagram of another embodiment of a sample-rate converter circuit according to the invention.
[0032] FIG. 14 shows a detailed block diagram of a controlled low-pass filter of the sample-rate converter circuit of FIG. 13.
[0033] FIG. 15 shows a simulation result of the state of the art rate estimator circuit of FIG. 6.
[0034] FIG. 16 shows a simulation result of the inventive rate estimator circuit of FIG. 7.DETAILED DESCRIPTION OF EMBODIMENTS
[0035] FIG. 7 shows a block diagram of a rate estimator circuit 11 according to the invention in a principal set-up of a sample-rate converter circuit as shown in FIG. 1. The sample-rate converter circuit is built for receiving a first signal DATA_IN at a first sampling frequency and is built for outputting a second signal DATA_OUT, representative of said first signal DATA_IN, having a second sampling frequency.
[0036] Rate estimator circuit 11 is built for adjusting sample-rate filters 3 of the sample-rate converter circuit shown in FIG. 1, which rate estimator circuit 11 furthermore is built to receive a first clock signal of input sample-rate FSI with said first sampling frequency and a second clock signal of output sample-rate FSO with said second sampling frequency. Rate estimator circuit 11 furthermore is built to generate an estimate of a ratio R of the input sample-rate FSI to the output sample-rate FSO.
[0037] Rate estimator circuit 11 comprises an instantaneous rate-estimator circuit 12, built to process said first clock signal and said second clock signal to provide an instantaneous noisy estimate of the ratio R=FSI / FSO of the first sampling frequency to the second sampling frequency. Rate estimator circuit 11 furthermore comprises a low-pass filter 13, built to filter the noisy ratio R based on a filter coefficient K needed to adjust the time-constants, which filter coefficient K is provided by a time-constant controller 14 of said rate estimator circuit 11. In this preferred embodiment of the invention time-constant controller 14 is added to adjust the time-constants, that speeds-up convergence.
[0038] FIG. 8 shows the detailed block diagram of the instantaneous rate estimator circuit 12. This uses an integrator 15, running at input sample-rate FSI, which adds an increment with a value of 1 to an integrator output signal 19 on every clock pulse, followed by a differentiator 16, running at output sample-rate FSO. Between the two domains a double buffer 17 is arranged connected to an output pin of the integrator 15 and an input pin of the differentiator 16 to prevent clocking issues crossing the asynchronous clock domains as explained above with circular buffer 7. Differentiator 16 is built to subtract the integrator output signal 19 received at an input pin of the differentiator 16 and delayed by a clock pulse of the output sample-rate FSO with every clock pulse of the output sample-rate FSO from the actual integrator output signal 19 received at the input pin of the differentiator 16 to provide an output signal 20.
[0039] FIG. 9 shows a diagram of an output value V of an integrator output signal 19 of integrator 15 over time t. With every clock cycle of the input sample-rate FSI with a period T1=1 / FSI integrator 15 is built to produce a triangle of height increment 1. By similar triangles, after time T2=1 / FSO, the height increment is T2 / T1. This increment is calculated via differentiator 16 clocked at output sample-rate FSO. Output signal 20 of instantaneous rate estimator circuit 12 therefore is an estimate of R=T2 / T1=FSI / FSO.
[0040] Integrator 15 and differentiator 16 of instantaneous rate estimator circuit 12 are both integer implementations. As disclosed in FIG. 10, integrator 15 adds 1 on every clock pulse of input sample-rate FSI, producing a staircase output of the integrator 15 that is resampled at the input of differentiator 16 at output sample-rate FSO. In this example T2=(2 / 3)*T1, which means that 3 / 2 output samples are produced for every input sample. Following differentiation by differentiator 16, the output signal 20 has the repeating pattern {0, 1, 1, 0, 1, 1, . . . } with average value 2 / 3=FSI / FSO. As a result, output signal 20 of instantaneous rate estimator circuit 12 therefore oscillates between 2 values, corresponding to long term value R=FSI / FSO.
[0041] The low-pass filter 13 takes this noisy estimate of R=FSI / FSO and produces a clean estimate of R. There are many implementations of low-pass filters 13, but broadly they are classified as either Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters. In the preferred embodiment, an IIR filter is used, because it offers the best trade-off between attenuation and implementation complexity and can be easily parameterised to adjust the time-constant. An example low-pass filter 13 is shown in FIG. 11. This is a cascade of two 1st-order filters 21 and 22, which is chosen because the cascade offers a better attenuation than a 1st-order filter, and can easily be adjusted with coefficient K. The feedback loop of the IIR filter helps to produce glitch-free coefficient adjustment. The output of the first adder has an average value of zero (unlike R / K in the prior art), which means that when coefficient K changes, the loop does not have to re-settle. This means that fast convergence is possible with this sample-rate converter circuit with fast tracking.
[0042] FIG. 12 discloses an embodiment of time-constant controller 14 of rate estimator circuit 11 shown in FIG. 7. For the adjustment of coefficient K, time-constant controller 14 uses a counter 23 that outputs a ‘hit’ upon reaching predetermined values. The hit increments another counter 24, which indexes a look-up table 25 that stores the value of coefficient K. The coefficient initially has a large value (e.g. 2{circumflex over ( )}-3) which produces a fast time-constant so that the loop settles fast. The value of coefficient K is reduced in steps (e.g. 2{circumflex over ( )}-7, 2{circumflex over ( )}-11, 2{circumflex over ( )}-15) to gradually reduce the time-constant and produce a more accurate estimate of ratio R.
[0043] The output of the low-pass filter 13 is an accurate estimate of the ratio R=FSI / FSO. It is passed into the sample-rate filter 3, as known in the prior-art, which adjusts the filtering characteristics and resamples the first signal DATA_IN at the FSO output rate to provide the second signal DATA_OUT.
[0044] FIG. 13 shows a block diagram of another embodiment of the invention with a sample-rate converter circuit 26 that comprises above described rate estimator circuit 11 extended with a circular buffer 27. As explained above, said rate estimator circuit 11 produces an instantaneous, but noisy estimate of R=FSI / FSO, which is then filtered with an adjustable time-constant controlled low-pass filter 28.
[0045] When the rate estimator circuit 11 is followed by a read pointer integrator 29 which generates the read pointer, as the controlled low-pass filter 28 settles, there is an error E generated compared to the final value of RE=R−Flout
[0046] This error E is integrated by the read pointer integrator 29, resulting in a pointer offset that is dependent on the transient characteristics of the controlled low-pass filter 28.
[0047] The low-pass filter 13 of the earlier described rate estimator circuit 11 can be replaced with the controlled low-pass filter 28 with an error-feedforward architecture shown in FIG. 13 and FIG. 14. This architecture eliminates the pointer offset, whilst minimising overshoot, allowing much faster settling than a conventional low-pass filter 11 such as disclosed in FIG. 6.
[0048] FIG. 14 shows this embodiment of the controlled low-pass filter 28 in more detail. The input to the controlled low-pass filter 28 is the noisy estimate of R from the instantaneous rate-estimator 12. A first low-pass filter 30 produces a clean estimate of R, but with a transient error E at its output Flout, which impacts the pointer offset.
[0049] To compensate for the transient error, the error E is derived, which is the subtraction of the input of first low-pass filter 30 from its output. The error is filtered with a second filter low-pass filter 31 to reduce noise and the output of second low-pass filter 31 is subtracted from the output of first low-pass filter 30 to cancel the transient error of first low-pass filter 30. Unlike in the embodiment of FIG. 5, the pointers will track each other with zero phase offset.
[0050] First low-pass filter 30 does not need to be phase accurate and so simple low-overshoot filters can be used. The main property of first low-pass filter 30 is that it should be adjustable without introducing glitches.
[0051] The key feature of this second low-pass filter 31 is that any errors introduced by the second low-pass filter 31, such as quantization or coefficient adjustment are tracked and taken into account by the feedback loop of the second low-pass filter 31.
[0052] FIG. 13 furthermore discloses read and write pointer generation for circular buffer 27.
[0053] These comprise two modulo integrators, which produce the read- and write-pointers for the input buffer of circular buffer 27, which input buffer comprises a length L digits. A write-pointer integrator 32 increments by value of 1 every clock pulse of input sample-rate FSI and wraps, when it reaches a value of the length L. The read pointer integrator 29 increments by the value of R every clock pulse of the output sample-rate FSO and wraps, when it reaches a value of L. The rate of change of the output of the read pointer integrator 29 is R. Since R=FSI / FSO, the rate of change of the output of read pointer integrator 29 is equal to the clock pulse of input sample-rate FSI.
[0054] This means that the input and output pointers track each other. However, since the read-pointer is driven by the output of the controlled low-pass filter 28, jitter is attenuated and absorbed by the circular buffer 27.
[0055] In further preferred embodiment of controlled low-pass filter 28, the first low-pass filter 30 and the second low-pass filter 31 are replaced with 2nd-order low-pass filters to improve jitter attenuation.
[0056] FIG. 15 shows a simulation result of the convergence 33 of the state of the art rate estimator using the filter architecture 10 of FIG. 6. FIG. 16 shows a simulation result of the much better convergence 34 of the rate estimators 11 disclosed in FIG. 7 according to the invention. The output signal of rate-estimator 11 converges faster to a much lower error, whilst maintaining the correct offset between pointers.
[0057] Furthermore, above described sample rate converter circuit 26 is built to process the following steps of a method:
[0058] generate an estimate of a ratio R of the first sampling frequency to the second sampling frequency for adjusting sample-rate filters 3 of the sample-rate converter circuit 26;
[0059] process a first clock signal FSI corresponding to said first sampling frequency and a second clock signal FSO corresponding to said second sampling frequency to provide a noisy ratio R of the first sampling frequency to the second sampling frequency;
[0060] low-pass filter the noisy ratio R of the first sampling frequency to the second sampling frequency based on an adjustable filter coefficient K to provide said estimate of the ratio R of the first sampling frequency to the second sampling frequency for adjusting sample-rate filters 3.
Claims
1. A sample-rate converter circuit, for receiving a first signal at a first sampling frequency and for outputting a second signal, representative of said first signal, having a second sampling frequency, said sample-rate converter circuit comprises:a rate estimator circuit for adjusting sample-rate filters of the sample-rate converter circuit, which rate estimator circuit is built to receive a first clock signal with said first sampling frequency and a second clock signal with said second sampling frequency and built to generate an estimate of a ratio of the first sampling frequency to the second sampling frequency,wherein said rate estimator circuit comprises:an instantaneous rate estimator circuit built to process said first clock signal and said second clock signal to provide a noisy ratio of the first sampling frequency to the second sampling frequency; anda low-pass filter built to filter the noisy ratio of the first sampling frequency to the second sampling frequency based on a filter coefficient adjustable by a time-constant controller of said rate estimator circuit.
2. The sample-rate converter circuit according to claim 1, wherein said instantaneous rate estimator circuit comprises:an integrator built to add an increment with every clock pulse of the first clock signal and built to provide an integrator output signal at an output pin of the integrator;a differentiator built to subtract the integrator output signal received at an input pin of the differentiator and delayed by a clock pulse of the second clock signal with every clock pulse of the second clock signal from the actual integrator output signal received at the input pin of the differentiator; anda double buffer arranged between said output pin of the integrator and said input pin of the differentiator to prevent clocking issues between the asynchronous clock domains.
3. The sample-rate converter circuit according to claim 2, wherein said integrator is built to add an integer number 1 as increment.
4. The sample-rate converter circuit according to claim 1, wherein the low-pass filter is realized as an infinite impulse response filter with a cascade of two 1st-order filters.
5. The sample-rate converter circuit according to claim 1, wherein said time-constant controller comprises at least one counter and a look-up table that is built to store counter values of the at least one counter and for these counter values to be used filter coefficients.
6. The sample-rate converter circuit according to claim 5, wherein said time-constant controller is built to provide a reduced value of the filter coefficient with increasing counter values to generate a more accurate estimate of said ratio of the first sampling frequency to the second sampling frequency over time.
7. The sample-rate converter circuit according to claim 1, wherein said low-pass filter is realized with a further error tracking low-pass filter with a feed forward error control.
8. The sample-rate converter circuit according to claim 7, wherein a buffer is built to store data samples received from said first signal at a write pointer position in the buffer provided by an write pointer generation stage, which data samples may be read out for the generation of the second signal from the buffer at a read pointer position in the buffer provided by a read pointer generation stage.
9. A method of converting a received first signal with a first sampling frequency to a second signal, representative of said first signal, with a second sampling frequency, wherein the following steps are processed by a sample-rate converter circuit:generate an estimate of a ratio of the first sampling frequency to the second sampling frequency for adjusting sample-rate filters of the sample-rate converter circuit;process a first clock signal corresponding to said first sampling frequency and a second clock signal corresponding to said second sampling frequency to provide a noisy ratio of the first sampling frequency to the second sampling frequency; andlow-pass filter the noisy ratio of the first sampling frequency to the second sampling frequency based on an adjustable filter coefficient to provide said estimate of the ratio of the first sampling frequency to the second sampling frequency for adjusting sample-rate filters.
Citation Information
Patent Citations
Asynchronous sampling rate converter
US7345600B1
