A nonlinear correction method for time-to-digital converter based on multi-delay chain switching
Through the TDC nonlinear correction method based on multi-delay chain switching, the problem that nonlinearity detection affects continuity during the TDC measurement process is solved, and the nonlinearity is monitored and corrected in real time without affecting the measurement, ensuring the measurement The continuity and accuracy of the system avoid the use of external sensors and improve the reliability of the system.
Patent Information
- Application Number
- CN202410047380.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-01-11
AI Technical Summary
During use, TDC performs code density testing on the nonlinearity of the delay chain to interrupt the normal measurement process, affects the continuity of the measurement and leads to data omission, and requires external sensors to judge environmental changes.
Using the TDC nonlinear correction method based on multi-delay chain switching, the main control module controls signal generation, delay chain, data storage and data comparison modules, performs code density tests and switches to a new delay chain when an abnormality occurs. , monitor and correct nonlinearity to ensure the continuity and accuracy of the measurement circuit.
It realizes real-time monitoring and correction of the nonlinearity of the TDC without affecting the normal operation of the measurement circuit, ensuring the continuity and accuracy of the measurement, avoiding the use of external sensors, and improving the reliability and performance of the system.
Smart Images

Figure CN118169996B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital measurement of time quantities, and specifically designs a TDC circuit nonlinear correction method based on multi-delay chain switching. Background Art
[0002] TDC is a time-to-digital converter, a technology used to measure the interval between two time events. TDC is widely used in laser radar, ultrasound, particle physics, frequency synthesis and other fields.
[0003] FPGA-based TDC often uses a combination of coarse counting and fine counting. Coarse counting is used to count the number of complete clock cycles between the Start signal and the Stop signal, while fine counting is used to measure the time interval of signal propagation within a clock cycle, that is, to count how many delay units have passed. The results of coarse counting and fine counting are added together to obtain the measured value of the time interval. The resolution of TDC mainly depends on the delay time of a single delay unit, while the measurement range mainly depends on the length of the delay chain; nonlinearity is mainly affected by factors such as inconsistent delay time of delay units, different chip process technology, voltage and temperature changes of the chip, and signal crosstalk.
[0004] Code density test is a method used to evaluate and calibrate the nonlinearity of TDC. It inputs a large number of random time intervals into TDC, counts the distribution of the output codes of TDC fine counts, and calculates the difference between the probability of occurrence of each code and the ideal probability, thereby obtaining the differential nonlinearity and integral nonlinearity of TDC. In the calibration stage of TDC, the nonlinearity of TDC needs to be calibrated and compensated to eliminate or reduce the impact of nonlinearity on the measurement results. In the use stage of TDC, the nonlinearity of TDC needs to be monitored and updated to ensure the performance and reliability of TDC, detect whether the nonlinearity of TDC changes or is abnormal, and the factors that affect nonlinearity, such as temperature change, voltage change, electromagnetic interference, etc. According to the results of code density test, the calibration parameters and coefficients of TDC can be updated and adjusted to adapt to different environments and conditions. However, code density test of delay chain nonlinearity in the use stage of TDC will interrupt the normal measurement process, affect the continuity of measurement, and cause omission of measurement data. To this end, the present invention proposes a TDC nonlinearity correction method based on multi-delay chain switching. Under the premise of not affecting the normal operation of the measurement circuit, the nonlinearity of the TDC is detected by the monitoring circuit, and when an abnormality occurs, the measurement circuit is switched to a new delay chain after recalibration to ensure the continuity and accuracy of the TDC operation. Summary of the invention
[0005] To solve the above problems, the purpose of the present invention is to provide a TDC nonlinear correction method based on multi-delay chain switching. The TDC nonlinear correction method proposed in the present invention adopts a TDC nonlinear correction system based on multi-delay chain switching, the system includes a main control module and multiple fine counting circuits, wherein the fine counting circuit includes a signal generation module, a delay chain module, a data storage module, a data comparison module, and an output module;
[0006] The signal generation module is connected to the delay chain module; the delay chain module is connected to the counting storage module; the delay chain module is connected to the comparison module; the main control module is connected to the signal generation module, the counting storage module and the comparison module respectively;
[0007] And the signal generating module includes an external trigger signal unit, a ring oscillator unit, a test signal generating unit, and a three-to-one signal selector switch for switching three signals; the external trigger signal unit is used to connect the external trigger signal to the signal generating module, the ring oscillator unit is used to generate a test clock signal required for code density testing, the test signal generating unit is used to generate a number of test signals of different lengths for testing the delay chain module, and the three-to-one signal selector switch, under the control of the main control unit, selects one signal from the above three units and outputs it to the subsequent delay chain module.
[0008] The delay chain module includes a delay chain unit, a sampling unit, and a decoding unit; the delay chain unit is composed of a plurality of identical delay components connected end to end; the sampling unit samples the delay chain unit according to a clock signal; the decoding unit decodes and outputs the data latched by the sampling unit;
[0009] The data storage module counts and stores the output data and performs a code density test when the three-select-one data selector switch selects the signal generated by the ring oscillator unit for output; when the three-select-one data selector switch selects an external trigger signal or a test signal, the input data is converted into data after the code density test through the data storage module and output;
[0010] The main control module controls multiple fine counting circuits to start code density testing at the same time, and the data generated by the test is accumulated and stored by the data storage module. After the code density test is completed, the main control module selects one fine counting circuit as the measurement circuit, and the remaining fine counting circuits are set as detection circuits;
[0011] After the code density test is completed, the main control module controls the signal generation module in the fine counting:
[0012] For the measurement circuit, the signal generation module continuously sends the external trigger signal to the subsequent circuit through the three-to-one data selector switch, and finally the measurement result is continuously output by the output module;
[0013] For the detection circuit, the delay module in the detection circuit is monitored according to the test signal generated by the test signal generating unit of the signal generating module. The specific steps are as follows:
[0014] S1: After the fine counting circuit is set as a detection circuit, when the signal generating module therein receives an external trigger signal input, under the control of the main control module, the test signal generated by the test signal generating unit is sent to the delay chain module;
[0015] S2: A module in the delay chain measures the test signal, and the measurement result is sent to the data comparison module via the data storage module;
[0016] S3: The data comparison module compares the measured result with the actual value stored in the data comparison module to obtain a deviation value N, and sends the deviation value N to the main control module;
[0017] S4: The main control module analyzes the deviation value N. When the deviation value N exceeds the set threshold value M, the main control module controls all detection circuits to re-perform the code density test;
[0018] S5: After all the detection circuit code density tests are completed, the main control module selects a detection circuit as a measurement standby circuit;
[0019] S6: After selecting the standby measurement circuit, the main control module detects the working state of the measurement circuit, and switches the two circuits when the working circuit is idle, switching the standby measurement circuit to the measurement circuit and switching the original measurement circuit to the detection circuit;
[0020] S7: After the switching is completed, the new measurement circuit continues to measure the external trigger signal, and the remaining fine counting circuits are set as detection circuits;
[0021] S8: After the above operations are completed, the main control circuit controls all detection circuits to start a new round of detection from step S1.
[0022] The present invention proposes a TDC nonlinearity correction method based on multi-delay chain switching, which monitors the nonlinearity of TDC by measuring and comparing test signals of fixed time length, without the need for external sensors such as temperature and humidity to judge changes in the external environment. The correction method of multi-channel delay chain switching adopted by the present invention can detect the nonlinearity of TDC by the monitoring circuit without affecting the normal operation of the measurement circuit, and when an abnormality occurs, the measurement circuit is switched to a recalibrated new delay chain to ensure the continuity and accuracy of TDC operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a block diagram of a TDC nonlinear correction method based on multi-delay chain switching according to an embodiment of the present invention;
[0024] Figure 2 It is a block diagram of the signal generating module of the embodiment of the present invention;
[0025] Figure 3 It is a block diagram of the delay chain module measuring an external trigger signal according to an embodiment of the present invention;
[0026] Figure 4 It is a block diagram of the delay chain module measuring the test signal according to the embodiment of the present invention;
[0027] Figure 5 The present invention is a flowchart of a TDC nonlinear correction method based on multi-delay chain switching according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] Example
[0030] A TDC nonlinear correction method based on multi-delay chain switching is constructed as follows: Figure 1 As shown, it includes N fine counting circuits consisting of a signal generation module, a delay chain module, a data storage module, a data comparison module, an output module, and a main control module.
[0031] The main control module reads and controls the signal generation module, the data storage module, and the data comparison module in the fine counting circuit.
[0032] The signal generation module is used to switch the trigger signal input to the delay unit.
[0033] The delay chain module uses delay components to construct a delay unit, and measures, samples and encodes the external input trigger signal, so that the number of measured delay components is converted into a binary number representation.
[0034] The data storage module stores the modules output by the delay chain module. In the code density test phase, the number of code values is accumulated according to the input code value, and the final accumulated value is stored.
[0035] The data comparison module is used in the detection circuit. When the signal generation module sends a test signal, the data comparison module compares the encoded measurement value with the value stored in the data comparison module and calculates the deviation N. When the deviation N exceeds the set threshold M, the main control module will control all detection circuits to enter the correction mode.
[0036] Output module, used to buffer the output data.
[0037] The signal generating module of the present invention is composed as follows: Figure 2 As shown, it includes a ring oscillator, a test signal generator, a three-to-one data selector switch, and an external input trigger signal.
[0038] When the signal generating module is working, the main control module controls the three-to-one selector switch to switch the three-way signals.
[0039] When the code density test is performed, the signal of the ring oscillator is sent to the subsequent circuit through a three-to-one selector switch.
[0040] When measuring a signal, the external trigger signal is sent to the subsequent circuit through a three-to-one selector switch.
[0041] When the circuit is calibrated, the test signal is sent to the subsequent circuit through the three-to-one selector switch.
[0042] The delay chain module involved in the present invention is composed of: Figure 3 and Figure 4 As shown, it includes a delay chain composed of delay components, a sampling unit, and a decoding unit.
[0043] The CARRY4 or CARRY8 carry chain in the FPGA can be used as a delay component, and a carry chain is formed by connecting multiple CARRY4 or CARRY8 carry chains end to end.
[0044] The sampling unit is generally composed of two stages of D flip-flops. Figure 3 In the Figure 4 It is controlled by the stop signal of the test signal and is used to latch the delay chain signal.
[0045] The latched signal passes through a decoding unit, which converts the number of latched delay chains into a binary number.
[0046] Figure 3 The structure shown is used in code density testing and signal measurement.
[0047] Figure 4 The structure shown is used for circuit calibration.
[0048] The working process of a TDC nonlinear correction method based on multi-delay chain switching of the present invention is as follows: Figure 5 As shown, its workflow is:
[0049] When starting to work, the main control module controls multiple fine counting circuits to start code density testing at the same time, and the data generated by the test is accumulated and stored by the data storage module.
[0050] After the code density test is completed, the main control module selects one fine counting circuit as a measurement circuit, and the remaining fine counting circuits are set as detection circuits.
[0051] After the code density test is completed, the main control module controls the signal generation module in the fine counting:
[0052] For the measurement circuit, the signal generation module continuously sends the external trigger signal to the subsequent circuit through a three-to-one data selector switch, and finally the measurement result is continuously output by the output module.
[0053] For the detection circuit, the delay module in the detection circuit is monitored according to the test signal generated by the test signal generating unit. The specific steps are as follows:
[0054] S1: After the fine counting circuit is set as a detection circuit, when the signal generating module therein has an external trigger signal input, under the control of the main control module, the test signal generated by the test signal generating unit is sent to the delay chain module.
[0055] S2: The delay chain module measures the test signal, and the measurement result is sent to the data comparison module via the data storage module.
[0056] S3: The data comparison module compares the measurement result with the actual value stored in the data comparison module to obtain a deviation value N, and sends the deviation value N to the main control module.
[0057] S4: The main control module analyzes the deviation value N. When the deviation value N exceeds the set threshold value M, the main control module controls all detection circuits to re-test the code density.
[0058] S5: After all the detection circuit code density tests are completed, the main control module selects a detection circuit as a measurement standby circuit.
[0059] S6: After selecting the measurement standby circuit, the main control module detects the working status of the measurement circuit, and switches the two circuits when the working circuit is idle, switching the measurement standby circuit to the measurement circuit and switching the original measurement circuit to the detection circuit.
[0060] S7: After the switching is completed, the new measurement circuit continues to measure the external trigger signal, and the remaining fine counting circuits are set as detection circuits.
[0061] S8: After the above operations are completed, the main control circuit controls all detection circuits to start a new round of detection from step S1 again.
Claims
1. A nonlinear correction method for a time-to-digital converter based on multi-delay chain switching, in, The method adopts a time-to-digital converter nonlinear correction system based on multi-delay chain switching, the system includes a main control module and multiple fine counting circuits, wherein the fine counting circuit includes a signal generation module, a delay chain module, a data storage module, a data comparison module, and an output module; The signal generation module is connected to the delay chain module; the delay chain module is connected to the counting storage module; the delay chain module is connected to the comparison module; the main control module is connected to the signal generation module, the counting storage module and the comparison module respectively; And the signal generating module includes an external trigger signal unit, a ring oscillator unit, a test signal generating unit, and a three-to-one signal selector switch for switching three signals; the external trigger signal unit is used to connect the external trigger signal to the signal generating module, the ring oscillator unit is used to generate a test clock signal required for code density testing, the test signal generating unit is used to generate a number of test signals of different lengths for testing the delay chain module, and the three-to-one signal selector switch, under the control of the main control unit, selects one signal from the above three units and outputs it to the subsequent delay chain module. The delay chain module includes a delay chain unit, a sampling unit, and a decoding unit; the delay chain unit is composed of a plurality of identical delay components connected end to end; the sampling unit samples the delay chain unit according to a clock signal; The decoding unit decodes and outputs the data latched by the sampling unit; The data storage module counts and stores the output data and performs a code density test when the three-select-one data selector switch selects the signal generated by the ring oscillator unit for output; when the three-select-one data selector switch selects an external trigger signal or a test signal, the input data is converted into data after the code density test through the data storage module and output; The main control module controls multiple fine counting circuits to start code density testing at the same time, and the data generated by the test is accumulated and stored by the data storage module. After the code density test is completed, the main control module selects one fine counting circuit as the measurement circuit, and the remaining fine counting circuits are set as detection circuits; After the code density test is completed, the main control module controls the signal generation module in the fine counting: For the measurement circuit, the signal generation module continuously sends the external trigger signal to the subsequent circuit through the three-to-one data selector switch, and finally the measurement result is continuously output by the output module; For the detection circuit, the delay module in the detection circuit is monitored according to the test signal generated by the test signal generating unit of the signal generating module. The specific steps are as follows: S1: After the fine counting circuit is set as a detection circuit, when the signal generating module therein receives an external trigger signal input, under the control of the main control module, the test signal generated by the test signal generating unit is sent to the delay chain module; S2: A module in the delay chain measures the test signal, and the measurement result is sent to the data comparison module via the data storage module; S3: The data comparison module compares the measured result with the actual value stored in the data comparison module to obtain a deviation value N, and sends the deviation value N to the main control module; S4: The main control module analyzes the deviation value N. When the deviation value N exceeds the set threshold value M, the main control module controls all detection circuits to re-perform the code density test; S5: After all the detection circuit code density tests are completed, the main control module selects a detection circuit as a measurement standby circuit; S6: After selecting the standby measurement circuit, the main control module detects the working state of the measurement circuit, and switches the two circuits when the working circuit is idle, switching the standby measurement circuit to the measurement circuit and switching the original measurement circuit to the detection circuit; S7: After the switching is completed, the new measurement circuit continues to measure the external trigger signal, and the remaining fine counting circuits are set as detection circuits; S8: After the above operations are completed, the main control circuit controls all detection circuits to start a new round of detection from step S1 again.
