Method for obtaining phase detection signal in clock recovery circuit and phase detector
10554379 ยท 2020-02-04
Assignee
Inventors
Cpc classification
H04B10/6165
ELECTRICITY
H04L7/033
ELECTRICITY
International classification
H04L7/00
ELECTRICITY
H04L7/033
ELECTRICITY
Abstract
Embodiments of this application provide a method for obtaining a phase detection signal in a clock recovery circuit and a phase detector, configured to obtain a correct phase detection signal. A phase detector obtains sampling sequences sent by an analog to digital converter ADC, where the sampling sequences are obtained by the ADC by sampling, an electrical signal received by the ADC, and the electrical signal carries a pre-configured training sequence; the phase detector calculates a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location, where the first location and the second location are locations of a starting point of the training sequence in the sampling sequences; and the phase detector obtains a phase detection signal based on a difference parameter of the first location and the second location.
Claims
1. A method for obtaining a phase detection signal in a clock recovery circuit, the method comprising: receiving, by a phase detector, sampling sequences sent by an analog to digital converter (ADC), wherein the sampling sequences are obtained by the ADC by sampling, based on an actual sampling rate, an electrical signal received by the ADC, and the electrical signal carries a pre-configured training sequence; calculating, by the phase detector, a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location, wherein the first location and the second location are locations of a starting point of the training sequence in the sampling sequences, there is a difference of M1 training sequence periods (wherein M1 is a positive integer) between the first location and the second location in the sampling sequences, and the comparison sequence is generated by the phase detector based on the training sequence and a target sampling rate of the ADC; and obtaining, by the phase detector, a phase detection signal based on a difference parameter of the first location and the second location.
2. The method according to claim 1, wherein calculating, by the phase detector, a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location comprises: calculating, by the phase detector, a correlation between the comparison sequence and the sampling sequence based on a first formula, to determine the first location of the starting point of the training sequence; and calculating, by the phase detector, a correlation between the comparison sequence and the sampling sequence based on a second formula, to determine the second location of the starting point of the training sequence.
3. The method according to claim 2, wherein: the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
4. The method according to claim 2, wherein: the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
5. The method according to claim 1, wherein after obtaining, by the phase detector, a phase detection signal based on a difference parameter of the first location and the second location, the method further comprises: sending, by the phase detector, the phase detection signal to the ADC to enable the ADC to adjust the actual sampling rate based on the phase detection signal.
6. The method according to claim 1, wherein obtaining, by the phase detector, a phase detection signal based on a difference parameter of the first location and the second location comprises: comparing, by the phase detector, the first location with the second location to obtain the difference parameter; when the difference parameter indicates that the first location is greater than the second location, determining, by the phase detector, that the phase detection signal indicates the actual sampling rate is less than the target sampling rate; when the difference parameter indicates that the first location is less than the second location, determining, by the phase detector, that the phase detection signal indicates the actual sampling rate is greater than the target sampling rate; and when the difference parameter indicates that the first location is equal to the second location, determining, by the phase detector, that the phase detection signal indicates the actual sampling rate is equal to the target sampling rate.
7. A phase detector, comprising: a receiver, configured to receive sampling sequences sent by an analog to digital converter (ADC), wherein the sampling sequences are obtained by the ADC by sampling, based on an actual sampling rate, an electrical signal received by the ADC, and the electrical signal carries a pre-configured training sequence; and a processor, configured to: calculate a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location, wherein the first location and the second location are locations of a starting point of the training sequence in the sampling sequences, there is a difference of M1 training sequence periods (wherein M1 is a positive integer) between the first location and the second location in the sampling sequences, and the comparison sequence is generated by the phase detector based on the training sequence and a target sampling rate of the ADC, and obtain a phase detection signal based on a difference parameter the first location and the second location.
8. The phase detector according to claim 7, wherein the processor is further configured to: calculate a correlation between the comparison sequence and the sampling sequence based on a first formula, to determine the first location of the starting point of the training sequence; and calculate a correlation between the comparison sequence and the sampling sequence based on a second formula, to determine the second location of the starting point of the training sequence.
9. The phase detector according to claim 8, wherein the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
10. The phase detector according to claim 8, wherein the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
11. The phase detector according to claim 7, wherein the phase detector further comprises: a transmitter configured to send the phase detection signal to the ADC to enable the ADC to adjust the actual sampling rate based on the phase detection signal.
12. The phase detector according to claim 7, wherein the processor is further configured to: compare the first location with the second location to obtain the difference parameter; and when the difference parameter indicates that the first location is greater than the second location, determine that the phase detection signal indicates the actual sampling rate is less than the target sampling rate; when the difference parameter indicates that the first location is less than the second location, determine that the phase detection signal indicates the actual sampling rate is greater than the target sampling rate; or when the difference parameter indicates that the first location is equal to the second location, determine that the phase detection signal indicates the actual sampling rate is equal to the target sampling rate.
13. A phase detector, comprising: a bus; a transceiver coupled to the bus and configured to: receiving sampling sequences sent by an analog to digital converter ADC, wherein the sampling sequences are obtained by the ADC by sampling, based on an actual sampling rate, an electrical signal received by the ADC, and the electrical signal carries a pre-configured training sequence; and a processor coupled to the bus and configured to: calculate a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location, wherein the first location and the second location are locations of a starting point of the training sequence in the sampling sequences, there is a difference of M1 training sequence periods (wherein M1 is a positive integer) between the first location and the second location in the sampling sequences, and the comparison sequence is generated by the phase detector based on the training sequence and a target sampling rate of the ADC, and obtain a phase detection signal based on a difference parameter of the first location and the second location.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION
(6) The following clearly describes the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are merely some but not all of the embodiments of this application. All other embodiments obtained by a person skilled in the art based on the embodiments of this application without creative efforts shall fall within the protection scope of this application.
(7) In the specification, claims, and accompanying drawings of this application, the terms first, second, third, fourth, and so on (if existent) are intended to distinguish between similar objects but do not necessarily indicate a specific order or sequence. It should be understood that the data termed in such a way are interchangeable in proper circumstances so that the embodiments of the present disclosure described herein can be implemented in other orders than the order illustrated or described herein. Moreover, the terms include, contain and any other variants mean to cover the non-exclusive inclusion. For example, a process, method, system, product, or device that includes a list of steps or units is not necessarily limited to those units, but may include other units not expressly listed or inherent to such a process, method, product, or device.
(8) Embodiments of this application provide a method for obtaining a phase detection signal in a clock recovery circuit and a phase detector, configured to obtain a correct phase detection signal.
(9) Referring to a clock synchronization apparatus shown in
(10) The current phase detector usually calculates a phase detection signal of a signal based on a signal waveform. However, in coherent light communication, the signal waveform is affected by factors such as random polarization rotation, a polarization-dependent loss, polarization mode dispersion, chromatic dispersion, a channel bandwidth impairment, and a frequency offset between transmit and receive lasers in an optical fiber. Consequently, an error of the phase detection signal obtained by the phase detector through calculation based on the waveform is relatively large.
(11) To resolve this problem, the embodiments of this application provide the following technical solution: A phase detector receives sampling sequences obtained by an ADC by sampling an electrical signal based on an actual sampling rate, and calculates a correlation between the sampling sequences and a comparison sequence that is generated by the phase detector based on a training sequence and a target sampling rate of the ADC, to obtain a first location and a second location of the starting point of the training sequence in the sampling sequences in different periods. The phase detector uses a difference parameter of the first location and the second location as a phase detection signal.
(12) Specifically, referring to
(13) 201. An ADC obtains sampling sequences by sampling an electrical signal based on an actual sampling rate, where the electrical signal carries a training sequence.
(14) On a transmitter end, a digital signal carrying the training sequence is usually converted into an electrical signal, and the electrical signal is sent to a receiver end. On the receiver end, the ADC samples the received electrical signal based on the actual sampling rate of the ADC and converts the electrical signal into the digital signal. In other words, the sampling sequences are generated.
(15) In actual application, a specific value, a period, and a length of the training sequence may be agreed upon in a protocol by the transmitter end and the receiver end. In addition, the target sampling rate of the ADC is configured in advance. Generally, the target sampling rate is a positive integer multiple or a fraction multiple of a Baud rate at which the transmitter end sends a symbol. A fraction in the fraction multiple is greater than 1. For example, a rule of sending data by the transmitter end may be sending four pieces of training sequence data in every 256 pieces of data. To be specific, the length of the training sequence is 4 and the period is 256. If the target sampling rate of the ADC is one multiple of the Baud rate at which the transmitter end sends a symbol, and if the Baud rate at which the transmitter end sends a symbol is 1 Gbaud/s, the target sampling rate of the ADC of the receiver is 1 Gsample/s.
(16) 202. The ADC sends the sampling sequences to a phase detector.
(17) The ADC sends the sampling sequences obtained through sampling to the phase detector.
(18) 203. The phase detector calculates a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location of a starting point of the training sequence.
(19) The phase detector may learn the target sampling rate of the ADC and the training sequence in advance, and then the phase detector generates the comparison sequence based on the training sequence and the target sampling rate and stores the comparison sequence. After the phase detector receives the sampling sequences, the phase detector calculates a correlation between the sampling sequences and the comparison sequence, to determine a first location and a second location of a starting point of the training sequence in the sampling sequences. The first location and the second location herein are located in different periods, and the relationship between the first location and the second location is shown in
(20) the phase detector calculates a correlation between the comparison sequence and the sampling sequence based on a second formula, to determine the second location of the starting point of the training sequence.
(21) The first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
(22) the first location is:
(23) a data sequence number corresponding to i in max(C.sub.n.sub.
(24) the second location is:
(25) a data sequence number corresponding to i in max(C.sub.n.sub.
(26) r is the sampling sequence, P is the comparison sequence, n.sub.0 is the starting point of the sampling sequence, is a comparison sequence period, i is a data sequence number of the sampling sequence, n.sub.1 is the starting point of the sampling sequence after a delay of K.sub.1 N.sub.p.sub.
(27) In actual application, to specially reduce impact caused by some impairments, the phase detector may correspondingly change the first formula and the second formula. For example, to reduce impact caused by a frequency offset, the phase detector may change the first formula and the second formula to the following formulas: The first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
(28) the first location is:
(29) max(C.sub.n.sub.
(30) the second location is:
(31) a data sequence number corresponding to i in max(C.sub.n.sub.
(32) r is the sampling sequence, P is the comparison sequence, n.sub.0 is the starting point of the sampling sequence, N.sub.p is a comparison sequence period, i is a data sequence number of the sampling sequence, n.sub.1 is the starting point of the sampling sequence after a delay of K.sub.1 N.sub.p.sub.
(33) A formula used by the phase detector to calculate a correlation between the comparison sequence and the sampling sequences is not limited herein.
(34) In the foregoing embodiment, the phase detector may generate the comparison sequence based on the target sampling rate of the ADC and the training sequence by using the following solution: Assuming that a length L of the training sequence is 4, a period N is 256, and the target sampling rate of the ADC is one multiple of the Baud rate at which the transmitter end sends a symbol, the comparison sequence generated by the phase detector is {P.sub.1, P.sub.2, P.sub.3, P.sub.4, 0, 0, . . . , 0}.
(35) {P.sub.1, P.sub.2, P.sub.3, P.sub.4} is four pieces of training sequence data, and 252 zeros are added after {P.sub.1, P.sub.2, P.sub.3, P.sub.4}, so that the period of the comparison sequence is the same as that of the sampling sequences.
(36) If the target sampling rate of the ADC is a positive integer multiple of the Baud rate at which the transmitter end sends a symbol, for example, K multiples, L*(K1) zeros are interpolated in the training sequence used for synchronization. If K=2, that is, the target sampling rate of the ADC is two multiples of the Baud rate at which the transmitter end sends a symbol, the comparison sequence is {0,P.sub.1,0,P.sub.2,0,P.sub.3,0,P.sub.4,0,0, . . . ,0}. {0,P.sub.1,0,P.sub.2,0,P.sub.3,0,P.sub.4} is training sequence data in the comparison sequence, and there is a total of (NL)*K zeros behind {0,P.sub.1,0,P.sub.2,0,P.sub.3,0,P.sub.4}, namely, (2564)*2 zeros.
(37) If the target sampling rate of the ADC is a fraction multiple of the Baud rate at which the transmitter end sends a symbol, for example, a K1/K2 multiple, upsampling with zero interpolation may be first performed based on a K1 multiple, and then downsampling is performed based on a K2 multiple, to obtain the comparison sequence for a required sampling rate, or a corresponding comparison sequence is obtained in any proper resampling manner.
(38) 204. The phase detector obtains a phase detection signal based on a difference parameter of the first location and the second location.
(39) The phase detector compares the first location with the second location to obtain the difference parameter. If the difference parameter indicates that the first location is greater than the second location, the phase detection signal indicates that the actual sampling rate is less than the target sampling rate; if the difference parameter indicates that the first location is less than the second location, the phase detection signal indicates that the actual sampling rate is greater than the target sampling rate; or if the difference parameter indicates that the first location is equal to the second location, the phase detection signal indicates that the actual sampling rate is equal to the target sampling rate, and it indicates that the actual sampling rate of the ADC is a correct value. For example, in this embodiment, if the first location is 34, and the second location is 35, the difference parameter indicates that the first location is less than the second location by 1. In other words, it indicates that the actual sampling rate of the ADC is greater than the target sampling rate of the ADC.
(40) In actual application, after obtaining the phase detection signal, the phase detector feeds back the phase detection signal to a clock recovery circuit, so that the actual sampling rate of the ADC is adjusted in the clock recovery circuit, and the actual sampling rate of the ADC may be equal to the target sampling rate of the ADC. In addition, the actual sampling rate of the ADC may be adjusted in the clock recovery circuit in the following manners.
(41) A first possible implementation is: The phase detector sends the phase detection signal to the ADC, and then the ADC sends the phase detection signal to a voltage-controlled oscillator to adjust the actual sampling rate of the ADC.
(42) Another possible implementation is: The phase detector feeds back the phase detection signal to a numerically controlled oscillator, so that the numerically controlled oscillator performs numeral interpolation on the sampling sequences of the ADC. A specific manner is not limited herein provided that the sampling rate of data can be adjusted.
(43) In actual application, after the actual sampling rate of the ADC is adjusted based on the phase detection signal in the clock recovery circuit, step 201 to step 203 may be repeated again in the clock recovery circuit. In this way, it may be effectively ensured that the actual sampling rate of the ADC reaches the target sampling rate of the ADC.
(44) In this embodiment, the phase detector generates the comparison sequence by using the known training sequence and the target sampling rate of the ADC, and calculates a correlation between the comparison sequence and the sampling sequences of the received signal, to determine a location of the training sequence in the sampling sequences, so that a deviation of the actual sampling rate of the ADC from the target sampling rate of the ADC is determined, and interference from a waveform impairment to the phase detection signal is reduced. In this way, it is effectively ensured that a correct phase detection signal is obtained.
(45) The method for obtaining a phase detection signal in the embodiments of this application is described above, and the following describes a phase detector in the embodiments of this application.
(46) Specifically, referring to
(47) The receiving module 401 is configured to receive sampling sequences sent by an analog to digital converter ADC. The sampling sequences are obtained by the ADC by sampling, based on an actual sampling rate, an electrical signal received by the ADC, and the electrical signal carries a pre-configured training sequence.
(48) The processing module 402 is configured to: calculate a correlation between the sampling sequences and a comparison sequence, to determine a first location and a second location, where the first location and the second location are locations of a starting point of the training sequence in the sampling sequences, there is a difference of M.sub.1 training sequence periods (where M.sub.1 is a positive integer) between the first location and the second location in the sampling sequences, and the comparison sequence is generated by the phase detector based on the training sequence and a target sampling rate of the ADC; and obtain a phase detection signal based on a difference parameter of the first location and the second location.
(49) With reference to the foregoing embodiment, the processor 402 is further configured to: calculate a correlation between the comparison sequence and the sampling sequence based on a first formula, to determine the first location of a starting point of the training sequence; and calculate a correlation between the comparison sequence and the sampling sequence based on a second formula, to determine the second location of a starting point of the training sequence.
(50) With reference to the foregoing embodiment, the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
(51) the first location is:
(52) a data sequence number corresponding to i in max(C.sub.n.sub.
(53) the second location is:
(54) a data sequence number corresponding to i in max(C.sub.n.sub.
(55) is the sampling sequence, P is the comparison sequence, n.sub.0 is the starting point of the sampling sequence, N.sub.p is a comparison sequence period, i is a data sequence number of the sampling sequence, n.sub.1 is the starting point of the sampling sequence after a delay of K.sub.1 N.sub.p.sub.
(56) With reference to the foregoing embodiment, the first formula is:
C.sub.n.sub.
the second formula is:
C.sub.n.sub.
(57) the first location is:
(58) a data sequence number corresponding to i in max(C.sub.n.sub.
(59) the second location is:
(60) a data sequence number corresponding to i in max(C.sub.n.sub.
(61) r is the sampling sequence, P is the comparison sequence, n.sub.0 is the starting point of the sampling sequence, N.sub.p is a comparison sequence period, i is a data sequence number of the sampling sequence, n.sub.1 is the starting point of the sampling sequence after a delay of K.sub.1 N.sub.p.sub.
(62) With reference to the foregoing embodiment, the phase detector further includes a sending module 403, configured to send the phase detection signal to the ADC, so that the ADC adjusts the actual sampling rate based on the phase detection signal.
(63) Optionally, the processing module 402 is specifically further configured to: compare the first location with the second location to obtain the difference parameter; and if the difference parameter indicates that the first location is greater than the second location, determine that the phase detection signal indicates that the actual sampling rate is less than the target sampling rate; if the difference parameter indicates that the first location is less than the second location, determine that the phase detection signal indicates that the actual sampling rate is greater than the target sampling rate; or if the difference parameter indicates that the first location is equal to the second location, determine that the phase detection signal indicates that the actual sampling rate is equal to the target sampling rate.
(64) Further, the phase detector in
(65) In this embodiment, the processing module 402 generates the comparison sequence generated by using the known training sequence, and calculates a correlation between the comparison sequence and the sampling sequences of the electrical signal, to determine a location of the training sequence in the sampling sequences, so that a deviation of the actual sampling rate of the ADC from the target sampling rate of the ADC is determined, and interference from a waveform impairment to the phase detection signal is reduced. In this way, it is effectively ensured that a correct phase detection signal is obtained.
(66) Specifically, referring to
(67) The bus 503 may be a peripheral component interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent the bus in
(68) The processor 502 may be a central processing unit (CPU), a network processor (NP), or a combination of the CPU and the NP.
(69) The processor 502 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be one or any combination of a complex programmable logical device (CPLD), a field programmable gate array (FPGA), and a generic array logic (GAL).
(70) Referring to
(71) Optionally, the memory 504 may be further configured to store a program instruction. The processor 502 invokes the program instruction stored in the memory 504, and may perform one or more steps or optional implementations in the embodiment shown in
(72) With reference to the foregoing embodiment, the processor 502 performs step 203 and step 204 in the foregoing embodiment.
(73) The transceiver 501 receives sampling sequences sent by the ADC, and the transceiver 501 may further send a phase detection signal to the ADC.
(74) In this embodiment, the processor 502 generates the comparison sequence by using the known training sequence, and calculates a correlation between the comparison sequence and the sampling sequences of the electrical signal, to determine a location of a training sequence in the sampling sequences, so that a deviation of an actual sampling rate of the ADC from a target sampling rate of the ADC is determined, and interference from a waveform impairment to the phase detection signal is reduced. In this way, it is effectively ensured that a correct phase detection signal is obtained.
(75) It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing method embodiments, and details are not described herein again.
(76) In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
(77) The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
(78) In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software functional unit.
(79) When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present disclosure essentially, or the part contributing to the prior art, or all or some of the technical solutions may be implemented in the form of a software product. The software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of the present disclosure. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.
(80) The foregoing embodiments are merely intended for describing the technical solutions of the present disclosure, but not for limiting the present disclosure. Although the present disclosure is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some technical features thereof, without departing from the spirit and scope of the technical solutions of the embodiments of the present disclosure.