The invention relates to a phase detection device and method, and in particular to a phase detection device and method for detecting the phase of the zero crossing point after the analog to digital conversion.
The electronic apparatus always has to convert the analog signal to a digital signal for the following signal processing. In the process of the analog-to-digital conversion, an analog-to-digital converter samples the analog signal once at every rising edge of a sampling clock. Under ideal conditions, zero-cross (ZC) points of the analog signal match the rising edges of the sampling clock. However, due to the defective wave shape of the analog signal or the problems happened in the electronic apparatus, the phase difference between one ZC point and the corresponding rising edge of the sampling clock are appeared. The phase difference is called jitter. The jitter affects the quality of the digital signal. Thus, a Phase detection device is required to detect the jitter or the ZC point of the analog signal, and the digital signal could be adjust accordingly.
An exemplary embodiment of a phase detection device comprises an analog-to-digital converter, an interpolator, and a determining unit. The analog-to-digital converter receives an analog signal and converts the analog signal to a digital signal according to a plurality of digital sampling points. The interpolator calculates a plurality of interpolation points between two digital sampling points. The determining unit obtains a phase of a zero-cross (ZC) point according to the interpolation points or the digital sampling points.
The interpolator outputs a plurality of selection signals according to signs of the values of the interpolation points or the digital sampling points, and the determining unit obtains the phase of the ZC point according to the selection signals.
In some embodiments, the determining unit generates the selection signals with an XOR operation to obtain the phase of the ZC point.
In some embodiments, the determining unit is implemented by a lookup table, and the lookup table collects a plurality of phases and selects one phase corresponding to the ZC point according to the selection signals.
In some embodiments, the determining unit comprises a calculator receiving the selection signals and the phase of the two digital sampling points adjacent to the ZC point, and the calculator calculates the phase of the ZC point according to the selection signals.
The phase detection device can further comprise a phase looked loop (PLL) circuit. The PLL circuit receives the digital signal and generates a clock synchronized with the digital signal to serve as a sampling clock of the analog-digital converter. When the PLL circuit is implemented in the phase detection device, the phase of the ZC point obtained by the determining unit is equal to a jitter of the ZC point.
In some embodiments, the phase detection device is applied in an optical disc drive. The jitter can be used to regulate write strategy of the optical disc drive The jitter can be used to calibrate servo parameters of the optical disc drive.
The invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings, given by way of illustration only and thus not intended to be limitative of the invention.
a and 7b depicts an embodiment of a determining unit.
Phase detection devices are provided. In some embodiments, as shown in
Since the ZC point Pzc is between digital sampling points P6 and P7, the interpolator 11 calculates a plurality of interpolation points between the digital sampling points P6 and P7.
The interpolator 11 can utilize many kinds of interpolation algorithms, such as multi-points interpolation. The multi-point interpolation means the interpolator 11 obtains a plurality of boundary points to generate an interpolation point in between the two target boundary points. As shown in
The interpolator 11 can also change the boundary points when each time executing the interpolation. For example, as shown in
In some embodiments, the interpolator 11 can use a multi-points interpolation algorithm for the first section of the analog signal SA and use a two-points interpolation algorithm for the second section thereof. That's due to the first interpolation is highly affect the result of the interpolation. When we get the accurate first interpolation point, the curve between the first interpolation point and the corresponding boundary point is always nearly a linear curve. Then we can use the two-points interpolation method to get the following interpolation points.
The interpolator 11 can also generate an interpolation point at a target position. For example, the interpolator 11 can generated the interpolation point in the half position between the two target boundary points. It can also generate the interpolation point at the ¼ position. When the interpolator 11 generates the interpolation point at the half position of each two target boundary points at each time executing the interpolation, this method is called a bisection interpolation method.
In order to explain the present invention more clearly, the interpolator 11 uses a two-points interpolation algorithm with a bisection method to generate the interpolation points in the following embodiment description. The interpolator 11 also determines signs of the values of the interpolation points and generates a plurality of selection signals Sel according to the determined result. The determining unit 12 obtains a phase of the ZC point Pzc according to the selection signals Sel.
In each detection unit, the first and second input terminals respectively receive values of first and second boundary points. Each detection unit generates an interpolation point between the first and second boundary points and outputs the value of the interpolation point from the first output terminal to serve as the value of the first boundary point of the next detection unit. Each detection unit also outputs the value of one of the first and second boundary points to serve as the value of the second boundary point of the next detection unit. Each detection unit further determines the signs of the values of the interpolation points and generates a selection signal according to the determined result. The value of one interpolation point may be positive or negative. The sign is “+” when the value is positive, and the sign is “−” when the value is negative. Because the interpolator 11 generates interpolation points between the digital sampling points P6 and P7, the first detection unit 110 receives the values of the digital sampling points P7 and P6 to respectively serve as the values of the first and second boundary points thereof.
hPin0=(hP7+hP6)/2
wherein, hpin0 represents the value of the interpolation point Pin0, hP6 represents that of the boundary point P6, and hp7 represents that of the boundary point P7.
So that, in the assumption,
hPin0=(2−1)/2=0.5
The interpolation unit 110a then outputs the value of hPin0. The ZC selection unit 110b receives the value of hPin0 and the value of hP7 and determines whether the signs of the values of hPin0 and hP7 are the same. The signs of the values of hPin0 and hP7 are “+”, meaning that there is no ZC point between the interpolation point Pin0 and the interpolation point P7. In other words, there is a ZC point between the interpolation point Pin0 and the interpolation point P6. The ZC selection unit 110b outputs a selection signal Sel4 to the multiplexer 110c according to the determined result. In this embodiment, the selection signal is logic “0” when the signs are the same, and the selection signal is logic “1” when the signs are different. Thus, in the assumption, the selection signal Sel4 is logic “0”.
The multiplexer 110c receives the values of hP6 and hP7 and outputs the value of hP6 according to the selection signal Sel4 to serve as the value of the second boundary point of the next detection unit 111. Moreover, the interpolation unit 110a also outputs the value of hPin0 to serve as the value of the first boundary point of the detection unit 111.
Similarly, the interpolation unit 111a of the detection unit 111 receives the values of hPin0 and hP6 respectively by the input terminals IN11 and IN12 and generates an interpolation point Pin1 which is the middle point between the interpolation point Pin0 and the digital sampling point P6, as shown in
hPin1(hPin0+hP6)/2
wherein, hPin1 represents the value of the interpolation point Pin1.
So that
hPin1=(0.5−1)/2=−0.25
The interpolation unit 111a then outputs the value of hPin1. The ZC selection unit 111b receives the values of hp and hPin0 and determines whether the signs of the values of hPin1 and hPin0 are the same. The sign of the value of hPin0 is “+” while the sign of the value of hPin1 is “−”, meaning that there is a ZC point between the interpolation points Pin1 and Pin2. The ZC selection unit 111b outputs a selection signal Sel3 of logic “1” to the multiplexer ilic according to the determined result.
The multiplexer 111c receives the values of hPin0 and hP6 and outputs the value of hPin0 according to the selection signal Sel3 to serve as the value of the second boundary point of the next detection unit 112. Moreover, the interpolation unit 111a also outputs the value of hPin1 to serve as the value of the first boundary point of the detection unit 112.
Similarly, the detection units 112 to 114 perform the above interpolation operation with a bisection method to generate interpolation points Pin2 to Pin4. The interpolation point Pin4 is the point nearest the ZC point Pzc among the interpolation points Pin0 to Pin4, thus, serves as the ZC point Pzc. The detection units 112 to 114 also determine the signs of the values of the interpolation points Pin2 to Pin4 and output the selection signals Sel2 to Sel0.
The determining unit 12 receives the selection signals Sel4 to Sel0 and obtains the phase of the ZC point Pzc according to the selection signals Sel4 to Sel0. In some embodiments, as shown in
τZC=24×b4+23×b3+22×b2+21×b1+20×b0
wherein, τZC represents the phase of the ZC point Pzc. For example, when Sel4=0, Sel3=1, Sel2=0, Sel1=1, and Sel0=0, the decoder 60 obtains b4=0, b3=1, b2=1, b1=0, and b0=0, thus, the phase of the ZC point Pzc (τZC) is 12(t).
The decoder 60 can be implemented by XOR logic gates 600 to 603, as shown in
In some embodiments, the determining unit 12 comprises a calculator 70. The calculator 70 receives the selection signals Sel4 to Sel0 and the phases of the digital sampling points P6 and P7 (τP6 and τP7). The calculator 70 calculates the phase of the interpolation points Pin0 to Pin4 and indicates the position of the ZC point Pzc according to the selection signals Sel4 to Sel0. Referring to
In some embodiments, the determining unit 12 comprises a lookup table, as shown in
When the phase of the ZC point Pzc is obtained, the jitter between the ZC point Pzc and the digital sampling point P6 can be calculated by:
τjit=τZC−τP6
wherein, τjit represents jitter between the ZC point Pzc and the digital sampling point P6, and τP6 represents the phase of the digital sampling point P6.
In some embodiments, as shown in
In some embodiments, the jitters τjit can be applied as the index of write strategy of an optical disc drive. Referring to
In some embodiments, the jitter is generated when the servo is improper, so the jitters τjit can be also applied in the servo control of an optical disc drive. As shown in
The determining unit 12 obtains the position or phase of the ZC point is determined according to the selection signals (step S13). In some embodiments of the step S13, the determining unit 12 can calculate the selection signals with an XOR operation to obtain the phase of the ZC point. In some embodiments of the step S14, the determining unit 12 can selects one of a plurality of phases which are collected in a lookup table according to the selection signals to serve as the ZC point. Referring to FIGS. 10 and 13, the phase looked loop (PLL) circuit 90 generates a clock synchronized with the digital signal to serve as the sampling clock (step S14). Accordingly, the obtained phase of the ZC point is equal to a jitter related to the ZC point. Referring
While the invention has been described in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.