The present invention claims priority to TW 102142919, filed on Nov. 26, 2013.
1. Field of Invention
The present invention relates to a sample rate converter and a rate estimator thereof and a rate estimation method thereof; particularly, it relates to such sample rate converter, rate estimator and rate estimation method wherein a buffer for storing conversion data is not required.
2. Description of Related Art
In general, a sample rate converter is for converting a digital signal with a sample rate to another digital signal with a different sample rate. For example, a signal stored in a compact disc (CD) can be read with a sample rate of 44.1 kHz (so the signal is stored in a CD format); and another signal stored in a digital audio tape (DAT) can be read with a sample rate 48 kHz (so the signal is stored in a DAT format). If an audio signal stored in a CD is to be stored in a DAT, the audio signal with the CD format requires to be converted to the audio signal with the DAT format, otherwise the audio signal can not be heard properly.
A typical sample rate converter is an asynchronous sample rate converter (ASRC). The ASRC converts an input signal with an input sample rate to a conversion data with a relatively higher sample rate by interpolation, and stores the conversion data in a buffer. The conversion data is read from the buffer as an output signal with an output sample rate; as such, the input signal with the input sample rate is converted to the output signal with the output sample rate.
U.S. Pat. No. 7,948,405 discloses a sample rate converter including a buffer as indicated in
However, the aforementioned ASRC requires a buffer with a large capacity to store the conversion data, in order to prevent the output signal index from exceeding the input signal index, which may double generate the output signal or erase the unread conversion data.
In view of above, the present invention proposes a sample rate converter, a rate estimator thereof and a rate estimation method thereof, which do not require a buffer to thereby reduce the manufacturing cost and increase the conversion efficiency.
From one perspective, the present invention provides a sample rate converter for receiving an input signal with an input sample rate and generating an output signal with an output sample rate, the sample rate converter including: a rate estimator, for receiving an input clock signal and an output clock signal, and generating a rate signal, wherein the input clock signal corresponds to the input sample rate and the output clock signal corresponds to the output sample rate, and the rate signal is related to the input sample rate and the output sample rate; a polynomial interpolation calculation circuit, which is coupled to the rate estimator, for generating a polynomial interpolation signal according to a conversion data signal and the rate signal; an up sampling filter, which is coupled to the polynomial interpolation calculation circuit, for generating the conversion data signal according to the input signal; and a down sampling filter, which is coupled to the polynomial interpolation calculation circuit, for generating the output signal according to the polynomial interpolation signal; wherein the rate estimator includes: a substractor, for generating an error signal according to the input clock signal and a second order rate signal; a first order integrator, which is coupled to the subtractor, for generating a first order rate signal according to the error signal; and a second order integrator, which is coupled to the first order integrator, for generating the second order rate signal according to the first order rate signal.
From another perspective, the present invention provides a rate estimator of a sample rate converter, wherein the sample rate converter is for receiving an input signal with an input sample rate and generating an output signal with an output sample rate, and the rate estimator is for receiving an input clock signal and an output clock signal, and generating a rate signal, wherein the input clock signal corresponds to the input sample rate and the output clock signal corresponds to the output sample rate, and the rate signal is related to the input sample rate and the output sample rate, the rate estimator including: a substractor, for generating an error signal according to the input clock signal and a second order rate signal; a first order integrator, which is coupled to the subtractor, for generating a first order rate signal according to the error signal; and a second order integrator, which is coupled to the first order integrator, for generating the second order rate signal according to the first order rate signal.
In one preferable embodiment, the rate estimator further includes an input integrator, which is coupled to the subtractor, for receiving the input clock signal to generate a normalization signal which is inputted to the subtractor.
In one preferable embodiment, the rate estimator further includes an interception circuit, which is coupled to the subtractor, for receiving the second order rate signal to generate the rate signal.
In the aforementioned embodiment, the first order integrator preferably converts the error signal to the first order rate signal according to an equation listed below:
wherein Ti is the first order rate signal, Kp is a ratio gain, K
In the aforementioned embodiment, the second order integrator preferably converts the first order rate signal to the second order rate signal according to an equation listed below:
wherein Ti is the first order rate signal, z is a z-transformation constant, and ΣT is the second order rate signal.
In one preferable embodiment, the first order integrator includes: a first multiplier, which is coupled to the subtractor, for multiplying the error signal with a ratio gain to generate a ratio rate signal; a second multiplier, which is coupled to the subtractor, for multiplying the error signal with an integration gain to generate an integration rate signal; an adder, which is coupled to the first multiplier, for generating the first order rate signal according to the ratio rate signal and the integration rate signal; and a switch, which is coupled to the second order integrator, for determining whether or not to deliver the first order rate signal to the first order integrator according a switch control signal.
From another perspective, the present invention provides a rate estimation method of a rate estimator of a sample rate converter, wherein the sample rate converter is for receiving an input signal with an input sample rate and generating an output signal with an output sample rate, and the rate estimator is for receiving an input clock signal and an output clock signal, and generating a rate signal, wherein the input clock signal corresponds to the input sample rate and the output clock signal corresponds to the output sample rate, and the rate signal is related to the input sample rate and the output sample rate, the rate estimation method including: generating an error signal according to the input clock signal and a second order rate signal; generating a first order rate signal according to the error signal; and generating the second order rate signal according to the first order rate signal.
In one preferable embodiment, the step of generating the error signal according to the input clock signal and the second order rate signal further includes: generating a normalization signal according to the input clock signal.
In one preferable embodiment, the rate estimation method further includes: generating the rate signal according to the second order rate signal.
In the aforementioned embodiment, the step of generating the first order rate signal according to the error signal preferably converts the error signal to the first order rate signal according to an equation listed below:
wherein Ti is the first order rate signal, Kp is a ratio gain, K
In the aforementioned embodiment, the step of generating the second order rate signal according to the first order rate signal preferably converts the first order rate signal to the second order rate signal according to an equation listed below:
wherein Ti is the first order rate signal, z is a z-transformation constant, and ΣT is the second order rate signal.
In one preferable embodiment, the step of generating the error signal according to the input clock signal and the second order rate signal includes: multiplying the error signal with a ratio gain to generate a ratio rate signal; multiplying the error signal with an integration gain to generate an integration rate signal; generating the first order rate signal according to the ratio rate signal and the integration rate signal; and determining whether or not to deliver the first order rate signal to the first order integrator according a switch control signal.
The objectives, technical details, features, and effects of the present invention will be better understood with regard to the detailed description of the embodiments below.
Please refer to
signal which has been normalized to generate the error signal e. The first order integrator 124 generates a first order rate signal Ti according to the error signal e. The first order integrator 124 converts the error signal e to the first order rate signal Ti according to for example but not limited to an equation listed below:
wherein Kp is a ratio gain, K
The second order integrator 126 converts the first order rate signal Ti to the second order rate signal ΣT according to for example but not limited to an equation listed below:
wherein the output clock signal is inputted to for example but not limited to the first order integrator 124 or the second order integrator 126.
This embodiment is different from the prior art in that, this embodiment includes two orders of integrator loops (including the first order integrator and the second order integrator), whereby the error signal e is converged to zero in a stabilized state. Therefore, the rate signal can be kept in the first order integrator or the second order integrator, and a large capacity buffer for storing the conversion data is not required.
Please refer to
Please refer to
wherein the interception circuit 128 performs an operation to omit an integer part of the second order rate signal ΣT, and leave a fractional part of the second order rate signal ΣT, such that the rate signal has a value which is less than 1.
By control system theory, any control loop with an order higher than two can converge the error signal e to zero, and therefore the input integrator 127 is not absolutely required but can be omitted. However, the input integrator 127 is preferable because it can speed up the convergence of the error signal e. Because the rate signal (such as the second order rate signal ΣT) requires only a very small memory capacity to store, a buffer is not required and for example, the rate signal can be stored in the integrator. Further, because the error signal e will be converged to zero, signals which need to be operated according to the present invention are not limited by the bandwidth of the system. The above advantages show that the present invention is superior to the prior art.
The present invention has been described in considerable detail with reference to certain preferred embodiments thereof. It should be understood that the description is for illustrative purpose, not for limiting the scope of the present invention. Those skilled in this art can readily conceive variations and modifications within the spirit of the present invention. For example, a device or circuit which does not substantially influence the primary function of a signal can be inserted between any two devices or circuits shown to be in direct connection in the embodiments, such as a switch or the like, so the term “couple” should include direct and indirect connections. In view of the foregoing, the spirit of the present invention should cover all such and other modifications and variations, which should be interpreted to fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
102142919 | Nov 2013 | TW | national |