Disclosure of Invention
In view of at least one of the deficiencies of the prior art, the present invention provides a dynamic threshold timing circuit comprising:
a comparator having a first input adapted to receive an external input signal, a second input adapted to receive a detection threshold, and an output;
a time-to-digital converter coupled to an output of the comparator to obtain time information of an output signal of the comparator;
a controller configured to receive the external input signal, generate the detection threshold from the external input signal, and provide the detection threshold to a second input of the comparator, wherein the detection threshold is related to noise in the external input signal.
According to an aspect of the invention, the dynamic threshold timing circuit further includes an analog-to-digital converter coupled to the controller, and the external input signal is provided to the controller after being converted by the analog-to-digital converter.
According to an aspect of the invention, the controller is configured to generate the detection threshold by:
obtaining noise data in the external input signal;
obtaining a mean value V of the noise database;
Obtaining a parameter σ characterizing a dispersion of the noisy database(ii) a And
according to the mean value VbaseAnd the parameter sigmabaseAnd determining the detection threshold.
According to an aspect of the invention, said parameter σbaseThe detection threshold is (V) as the standard deviation of the noise database+n*σbase) Wherein n is a positive integer.
According to an aspect of the present invention, the dynamic threshold timing circuit further includes a digital-to-analog converter, an input end of the digital-to-analog converter is coupled to the controller and receives the detection threshold, and an output end of the digital-to-analog converter is coupled to the second input end of the comparator and provides the detection threshold to the second input end of the comparator after performing digital-to-analog conversion.
According to one aspect of the invention, the sampling frequency of the analog-to-digital converter is less than or equal to 100 MHz.
According to one aspect of the present invention, the dynamic threshold timing circuit further comprises a selection switch having a first position and a second position, the selection switch, when in the first position, causing the external input signal to be coupled to the input of the analog-to-digital converter, the input of the analog-to-digital converter being disconnected from the output of the digital-to-analog converter; when in the second position, the selection switch disconnects the external input signal from an input of the analog-to-digital converter, which is coupled to an output of the digital-to-analog converter.
According to one aspect of the invention, the controller is configured to calibrate the detection threshold by sampling an output of the digital-to-analog converter with the analog-to-digital converter when the selector switch is in the second position.
According to one aspect of the invention, the controller calibrates the detection threshold by:
controlling the digital-to-analog converter to output a first detection threshold DAC _1, and sampling the first detection threshold through the analog-to-digital converter to obtain a first detection threshold measurement value ADC _ 1;
controlling the digital-to-analog converter to output a second detection threshold DAC _2, and sampling the second detection threshold through the analog-to-digital converter to obtain a second detection threshold measurement value ADC _ 2;
setting a detection threshold value input to the digital-to-analog converter to be (V)base+n*σbase)*(DAC_2-DAC_1)/(ADC_2-ADC_1)+DAC_1。
According to an aspect of the invention, the dynamic threshold timing circuit further comprises an amplifier, an input of the amplifier is capable of receiving the external input signal, and an output of the amplifier is coupled to the first input of the comparator and the analog-to-digital converter, so that the external input signal is amplified by the amplifier, the amplified external input signal is provided to the first input of the comparator, and the amplified external input signal is provided to the controller after being converted by the analog-to-digital converter.
The invention also provides a laser radar, which comprises a photoelectric detector and the dynamic threshold timing circuit;
the photoelectric detector is suitable for receiving a detection echo reflected by an obstacle;
the dynamic threshold timing circuit is coupled to the photodetector and is adapted to receive a signal output by the photodetector as the external input signal.
According to an aspect of the invention, the lidar further comprises a transmitting device, wherein the transmitting device is adapted to transmit laser pulses;
the controller is coupled with the emitting device and is suitable for obtaining the time information of the laser pulse emitted by the emitting device and calculating the distance between the laser radar and an external obstacle based on the time information of the laser pulse and the time information of the echo received by the photoelectric detector.
The present invention also provides a method for acquiring time information of an external input signal, comprising:
generating a detection threshold from an external input signal, wherein the detection threshold is related to noise in the external input signal;
comparing the external input signal with the detection threshold to generate an output signal;
time information of the output signal is obtained.
According to one aspect of the invention, the method further comprises: and performing analog-to-digital conversion on the external input signal.
According to one aspect of the invention, the detection threshold is generated by:
obtaining noise data in the external input signal;
obtaining a mean value V of the noise database;
Obtaining a parameter σ characterizing a dispersion of noisy data of the external input signalbase(ii) a And
according to the mean value VbaseAnd the parameter sigmabaseAnd determining the detection threshold.
According to an aspect of the invention, said parameter σ base is a standard deviation of said noisy data, said detection threshold is (V)base+n*σbase) Wherein n is a positive integer.
According to one aspect of the invention, the method further comprises: and D/A converter is used for carrying out D/A conversion on the detection threshold value and then providing the detection threshold value to the comparator.
According to one aspect of the invention, the sampling frequency of the analog-to-digital converter is less than or equal to 100 MHz.
According to one aspect of the invention, the method further comprises: and sampling the output of the digital-to-analog converter by using the analog-to-digital converter, and calibrating the detection threshold.
According to one aspect of the invention, the detection threshold is calibrated by:
controlling the digital-to-analog converter to output a first detection threshold DAC _1, and sampling the first detection threshold through the analog-to-digital converter to obtain a first detection threshold measurement value ADC _ 1;
controlling the digital-to-analog converter to output a second detection threshold DAC _2, and sampling the second detection threshold through the analog-to-digital converter to obtain a second detection threshold measurement value ADC _ 2;
setting a detection threshold value input to the digital-to-analog converter to be (V)base+n*σbase)*(DAC_2-DAC_1)/(ADC_2-ADC_1)+DAC_1。
According to one aspect of the invention, the method further comprises: the external input signal is amplified and,
wherein the step of generating a detection threshold value according to an external input signal comprises: performing analog-to-digital conversion on the amplified external input signal through an analog-to-digital converter;
the step of comparing the external input signal with a detection threshold comprises: comparing the amplified external input signal to the detection threshold.
The embodiment of the invention combines the advantage of low power consumption of the TDC time measurement circuit and realizes the dynamic threshold circuit capable of dynamic calibration. Compared with a TDC time measuring circuit with a fixed threshold value, the TDC time measuring circuit can monitor the baseline state, dynamically adjust the trigger threshold value, realize dynamic calibration of the threshold value and reduce the amplitude requirement on a signal to be measured. Thanks to the lower power consumption compared to the ADC time measurement method, the method is more suitable for compact, power-consumption-limited measurement devices like Lidar.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the description of the present invention, it should be noted that unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection, either mechanically, electrically, or in communication with each other; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, "above" or "below" a first feature means that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact with each other via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly above and obliquely above the second feature, or simply meaning that the first feature is at a lesser level than the second feature.
The following disclosure provides many different embodiments or examples for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples, such repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. In addition, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art may recognize applications of other processes and/or uses of other materials.
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
FIG. 1 illustrates a dynamic threshold timing circuit 100 according to one embodiment of the present invention, referenced below
Fig. 1 is described in detail.
As shown in fig. 1, the dynamic threshold timing circuit 100 includes a comparator 101, a time-to-digital converter 102, and a controller 103. Wherein the comparator 101 has a first input terminal (e.g., the non-inverting input terminal + of the comparator 101 in fig. 1), a second input terminal (e.g., the inverting input terminal of the comparator 101 in fig. 1), and an output terminal. Wherein the first input terminal can receive an external input signal, the external input signal can be, for example, a signal output by a photodetector (such as an avalanche photodiode APD) of a laser radar, and the dynamic threshold timing circuit 100 can be used to obtain time information of the external input signal; the second input may receive a detection threshold. According to an embodiment of the present invention, when the external input signal is higher than the detection threshold, the output terminal of the comparator 101 outputs a high level; when the external input signal is lower than the detection threshold, the output terminal of the comparator 101 outputs a low level. The skilled person will readily understand that the opposite arrangement is also possible.
The time-to-digital converter 102 is coupled to the output of the comparator 101 to obtain the time information of the timing signal output by the comparator. The signal output by the comparator 101 carries time information during the transition between high and low levels. The time-to-digital converter 102 may obtain the time point of the high-low level transition, i.e. obtain the digitized time information, and output the digitized time information, e.g. to the controller 103. The controller 103 calculates the distance between the laser radar and the external obstacle using a time of flight method (TOF), for example, based on the time information of the laser pulse transmission and the time information of the echo (i.e., the external input signal) received by the photodetector.
The controller 103 is configured to receive the external input signal, generate the detection threshold according to the external input signal, and provide the detection threshold to the second input terminal of the comparator 101. As shown in fig. 1, an external input signal is inputted to the first port 1031 of the controller 103 in addition to the first input terminal of the comparator 101, and the controller 103 generates a detection threshold value from the external input signal and supplies the detection threshold value to the second input terminal of the comparator 101 through the second port 1032.
In the present invention, the detection threshold is related to noise in the external input signal, for example, related to parameters such as an average of the noise data, a dispersion of the noise data, and the like. In this way, the detection threshold can be dynamically adjusted during the circuit operation, so that the comparison threshold of the comparator is dynamically adjusted according to the noise in the external input signal, and therefore, even in the application with lower signal-to-noise ratio, such as the remote measurement application of laser radar (Lidar), the false triggering of the noise can not be caused, and the time information of the tiny signal can be accurately obtained.
Fig. 2 shows a circuit schematic of a dynamic threshold timing circuit 100 according to a preferred embodiment of the present invention. Described in detail below with reference to fig. 2.
As shown in fig. 2, the dynamic threshold timing circuit 100 further includes an analog-to-digital converter (ADC)104 in accordance with a preferred embodiment of the present invention. As shown in fig. 2, the external input signal is further coupled to an input terminal of the analog-to-digital converter 104, and an output terminal of the analog-to-digital converter 104 is coupled to the first port 1031 of the controller 103, so that the external input signal is provided to the controller 103 after analog-to-digital conversion by the analog-to-digital converter 104.
As described above, the detection threshold is related to noise in the external input signal. A method of obtaining a detection threshold according to a preferred embodiment of the present invention is described below.
The controller 103 may generate the detection threshold after receiving the external input signal by:
step 1: noise data in the external input signal is obtained. After the controller 103 receives the sampled data from the analog-to-digital converter 104, the signal waveform data in the sampled data may be removed (for example, by using an a priori preset threshold for removing the signal waveform data), and only the noise data in the external input signal is retained.
Fig. 3 shows an exemplary external input signal including a signal waveform and noise, where the horizontal axis represents time and the vertical axis represents amplitude, and the noise is calculated after a plurality of sampling by an analog-to-digital converter, and is referred to as baseline noise, and its mean value reflects a baseline value and its standard deviation reflects a baseline noise intensity. When removing the signal waveform data in the sampling data, the signal waveform data with the amplitude value higher than the preset threshold value in the external input signal may be removed according to the preset threshold value. The threshold may also be selected based on the measured scenario. This preset threshold may be set higher, for example, when measurements are taken during the day, to preserve as much noise data as possible; when the measurement is performed at night, the preset threshold may be set lower so as to remove the signal waveform data as much as possible. In addition, the "removing the signal waveform data in the sample data" referred to in the present invention does not necessarily remove all the signal waveform data in the sample data, and some signal waveform data with a low amplitude (close to noise) may be retained, which are all within the protection scope of the present invention. Step 2: obtaining a mean value V of the noise database. On the basis of the noise data obtained in step 1, for example, averaging the noise data, the mean value V of the noise data can be obtainedbase。
And step 3: obtaining a parameter σ characterizing a dispersion of the noisy database. On the basis of the noise data obtained in step 1, a parameter σ capable of characterizing the dispersion thereof is obtainedbaseThe parameter may be, for example, the standard deviation of the noise data.
And 4, step 4: according to the mean value VbaseAnd the parameter sigmabaseAnd determining the detection threshold. According to a preferred embodiment of the invention, when the parameter σ isbaseThe detection threshold is V when the standard deviation of the noise data isbase+n*σbaseWherein n is a positive integer.
When measuring signals with low signal-to-noise ratio, the controller calculates a lowest threshold value of the low-noise false triggering probability in order to make full use of the signal-to-noise ratio. For lidar applications, ambient light noise is the dominant noise in light scenarios. Ambient light noise is shot noise, conforming to the poisson distribution. When the mean value of the Poisson distribution is high, the Poisson distribution can be approximately considered to be Gaussian distribution, and the mean value is lambda and standard deviation
Therefore, the relation between the noise threshold-crossing probability and the threshold voltage can be obtained according to a Gaussian distribution model. In order to realize a noise false trigger probability lower than p, it is necessary to set the trigger threshold to be equal to or higher than n σ (n needs to be set in consideration of laser radar single pulse/multi-pulse transmission and the like). The controller may then calculate that the detection threshold should be set to V
base+n*σ
base. The controller provides the calculation result to the comparator, and the signal timing measurement of the dynamic threshold value can be realized.
In accordance with a preferred embodiment of the present invention, as shown in fig. 2, the dynamic threshold timing circuit 100 further comprises a digital-to-analog converter (DAC)105, an input terminal of the DAC 105 is coupled to the second port 1032 of the controller 103 and receives the detection threshold, the DAC 105Is coupled to the second input of the comparator 101, and provides the detection threshold to the second input of the comparator 101 after performing digital-to-analog conversion. As described above, the controller may calculate that the detection threshold should be set to Vbase+n*σbase. The controller sends the digital sequence with the detection threshold to the digital-to-analog converter as the setting value of the digital-to-analog converter DAC. The threshold voltage output by the digital-to-analog converter is connected to the comparator through the driver, and then the signal timing measurement of the dynamic threshold can be realized.
In the embodiment of fig. 2, the controller 103 may dynamically update the detection threshold according to the noise condition of the external input signal, so as to provide a reference for comparison for the comparator 101.
In one embodiment of the invention, the analog-to-
digital converter 105 may sample at a lower sampling rate, for example, the sampling frequency may be less than or equal to 100MHz, which is much lower than the 500MHz required in the prior art, which is very advantageous for applications such as lidar. Assuming that the noise of the external input signal conforms to the Gaussian distribution, the mean value is mu and the standard deviation is sigma, the noise is sampled for N times, the obtained sampling mean value conforms to the Gaussian distribution, the mean value is mu and the standard deviation is
That is, the higher the sampling number of the gaussian random number is, the smaller the sampling error is, and the more the sampling mean value can represent the true distribution mean value. When N is present>At 25, the sample standard deviation can be approximated as a mean, with a standard deviation of σ
A gaussian distribution of (a). It can be calculated from this how large the number of samples should be chosen to meet the sufficient baseline mean and baseline standard deviation measurement accuracy. For example, when the number of samples reaches 50, the mean measurement error is ± 28.3% σ (95.4% confidence level), and the standard deviation measurement error is ± 20.1% (95.4% confidence level); when the number of samples reached 100, the mean measurement error was ± 20% σ (95.4% confidence level), and the standard deviation measurement error was ± 14.2% (95.4% confidence level).Thus 50 to 100 samples can be achieved with considerable accuracy. Assuming that the measurement time is 1us (50-100 times of sampling of ADC in one measurement), ADC from 50MHz to 100MHz can be selected for measurement. The frequency is significantly reduced compared to the 500M sampling frequency of the prior art, thus greatly reducing power consumption.
Fig. 4 shows a dynamic threshold timing circuit 100 according to a preferred embodiment of the present invention. The following focuses on the differences from the embodiment of fig. 2.
As shown in FIG. 4, the dynamic threshold timing circuit 100 also includes a selection switch 106, such as a single pole double throw switch. The selection switch 106 has a first position and a second position, when in the first position, the selection switch 106 causes the external input signal to be coupled to the input of the analog-to-digital converter 104, the input of the analog-to-digital converter 104 being disconnected from the output of the digital-to-analog converter 105; when in the second position, the selection switch 106 disconnects the external input signal from the input of the analog-to-digital converter 104, which is coupled to the output of the digital-to-analog converter 105, and the input of the analog-to-digital converter 104 is coupled to the output of the digital-to-analog converter 105. The selector switch 106 is shown in a first position in fig. 4. When in the first position, the dynamic threshold timing circuit 100 operates in substantially the same manner as the scheme shown in FIG. 2. Although not shown, it is easily understood by those skilled in the art that the selection switch 106 can be controlled by the controller 103 to switch between the first position and the second position. In addition, the dynamic threshold timing circuit 100 further includes an ADC driver and a DAC driver. The digital-to-analog converter 105 performs digital-to-analog conversion after receiving the detection threshold, and then sends the converted signal to the second input terminal of the comparator 101 after being driven by the DAC driver, so as to be used as a reference for comparison. The external input signal is driven by the ADC driver, provided to the analog-to-digital converter 104 for analog-to-digital conversion, and then provided to the first port 1031 of the controller 103. And will not be described in detail herein.
The inventor of the present invention found that since the ADC driver, the DAC driver, and the baseline value have a certain deviation and temperature drift, the scales of the analog-to-digital converter 104 and the digital-to-analog converter 105 have inconsistency, and thus the detection threshold is performedWith open loop settings, the accuracy of the detection threshold cannot be guaranteed. The scheme of the embodiment of fig. 4 may calibrate the detection threshold setting. When the selector switch 106 is in the second position, as shown in fig. 4, the output of the digital-to-analog converter 105 is connected to the input of the analog-to-digital converter 104, and the detection threshold of the digital-to-analog converter output can be sampled. Since the threshold is less noisy, an accurate threshold can be measured with a smaller number of samples. The calibration procedure was as follows: firstly, the controller controls the digital-to-analog converter to output a first detection threshold DAC _1, then controls the selection switch to be switched to a second position within a short time, and acquires the output of the first detection threshold through the analog-to-digital converter 104 to obtain a first detection threshold measurement value ADC _ 1. When the next threshold measurement window is reached, the controller sets the digital-to-analog converter 105 to output the second detection threshold DAC _2, and similarly, the second detection threshold measurement value ADC _2 is obtained through the back sampling of the analog-to-digital converter 104. It can therefore be calculated that when the mean value of the measured noise data is VbaseStandard deviation of noise is σbaseWhen the controller sets the detection threshold value to be (V)base+n*σbase) (DAC _2-DAC _1)/(ADC _2-ADC _1) + DAC _ 1. Therefore, the detection threshold is calibrated in real time before being sent into the comparator, and the setting deviation of the detection threshold caused by offset, temperature drift and scale inconsistency can be eliminated.
Therefore, in the scheme of the embodiment in fig. 4, the controller may control to calibrate the detection threshold by sampling the output of the digital-to-analog converter 105 with the analog-to-digital converter 104 when the selection switch 106 is located at the second position.
As shown in fig. 4, the dynamic threshold timing circuit 100 further includes an amplifier 104 for amplifying the external input signal. It will be readily appreciated by those skilled in the art that the amplifier 104 typically performs an equal-scale amplification, and the amplified external input signal, which has only a change in amplitude from the original external input signal, can still be considered the same signal. The amplifier 104 may have an input for receiving the external input signal and an output coupled to subsequent circuitry for providing an amplified external input signal, e.g., to the controller. The output of the amplifier 104 is further coupled to a first input of the comparator 101.
In addition, those skilled in the art will readily appreciate that amplifier 104 is not a necessary circuit component of dynamic threshold timing circuit 100. The amplifier 104 may be omitted, for example, when the external input signal is a voltage signal and is moderate in strength. In addition, according to a preferred embodiment of the present invention, if the external input signal is a current signal, for example, a current signal output by a photodetector, the amplifier 104 may be a trans-impedance amplifier (TIA), so as to convert the current signal into a voltage signal.
The present invention also provides a lidar including a photodetector and a dynamic threshold timing circuit 100 shown in fig. 1, 2, and 4. Wherein the photodetector is adapted to receive a detected echo reflected by an obstacle. The dynamic threshold timing circuit is coupled to the photodetector and is adapted to receive a signal output by the photodetector as the external input signal.
In addition, the lidar may further comprise a transmitting device adapted to transmit laser pulses. The controller is coupled with the emitting device and is suitable for obtaining the time information of the laser pulse emitted by the emitting device and calculating the distance between the laser radar and an external obstacle based on the time information of the laser pulse and the time information of the echo received by the photoelectric detector.
The present invention also provides a method 200 for collecting time information of an external input signal, and the method 200 may be implemented by the dynamic threshold timing circuit 100 shown in fig. 1, fig. 2, and fig. 4, for example. Described in detail below with reference to fig. 5.
As shown in fig. 5, in step 201: generating a detection threshold from an external input signal, wherein the detection threshold is related to noise in the external input signal.
The detection threshold may be generated, for example, by: obtaining noise data in the external input signal; obtaining a mean value V of the noise database(ii) a Obtaining noise data characterizing the external input signalParameter σ of dispersion of (2)base(ii) a And according to said mean value VbaseAnd the parameter sigmabaseAnd determining the detection threshold. Wherein according to a preferred embodiment of the invention said parameter σbaseThe detection threshold is V for the standard deviation of the noise database+n*σbaseWherein n is a positive integer.
In step 202: comparing the external input signal with the detection threshold to generate an output signal. After the external input signal is compared with the detection threshold value by the comparator, high and low level transitions can be generated, wherein the high and low level transitions include time information of the external input signal.
In step 203: time information of the output signal is obtained.
The time-to-digital converter can obtain the digitalized time information according to the transition of the high-low pulse.
According to one aspect of the invention, the method further comprises: and performing analog-to-digital conversion on the external input signal through an analog-to-digital converter, and then generating the detection threshold. Especially, in the case that the external input signal is an analog signal, it is often necessary to perform analog-to-digital conversion on the external input signal to form a digital signal, and then to generate the detection threshold.
According further to an aspect of the invention, the method further comprises: and D/A converter is used for carrying out D/A conversion on the detection threshold value and then providing the detection threshold value to the comparator.
By the method, the sampling frequency of the analog-to-digital converter can be less than or equal to 100MHz, and compared with the sampling frequency of 500MHz in the prior art, the sampling frequency of the analog-to-digital converter is obviously reduced, so that the heat productivity and the power consumption of the analog-to-digital converter are also obviously improved.
According to one aspect of the invention, the method further comprises calibrating the detection threshold by sampling the output of the digital-to-analog converter with the analog-to-digital converter. The detection threshold may be calibrated, for example, as follows:
controlling the digital-to-analog converter to output a first detection threshold DAC _1, and sampling the first detection threshold through the analog-to-digital converter to obtain a first detection threshold measurement value ADC _ 1;
controlling the digital-to-analog converter to output a second detection threshold DAC _2, and sampling the second detection threshold through the analog-to-digital converter to obtain a second detection threshold measurement value ADC _ 2;
setting a detection threshold value input to the digital-to-analog converter to be (V)base+n*σbase)*(DAC_2-DAC_1)/(ADC_2-ADC_1)+DAC_1。
In addition, in method 200, the external input signal may be first amplified, and after amplification, used to generate a detection threshold and used for comparison. The step of generating a detection threshold from an external input signal therefore comprises: performing analog-to-digital conversion on the amplified external input signal through an analog-to-digital converter; the step of comparing the external input signal with a detection threshold comprises: comparing the amplified external input signal to the detection threshold.
The embodiment of the invention solves the technical problem that a time measurement circuit based on a time-to-digital converter cannot eliminate noise false triggering and measure a tiny signal at the same time.
An example is the Lidar application based on Avalanche Photodiodes (APDs). The light noise intensity of Lidar is not constant, and the higher the ambient light power in the field of view of the detector, the stronger the ambient light noise. Specifically, the standard deviation of the ambient light noise can be approximately calculated as:
wherein q is an electron charge amount constant, I
DBIs the photoelectric reaction current of the APD, M is the gain of the APD, F is the extra noise factor, and B is the system bandwidth. The stronger the intensity of ambient light entering the APD photosurface, I
DBThe larger the noise, the stronger the noise. Therefore, in any environment, the noise false triggering probability is lower than p, or the fixed threshold value is set to be n × i
n,maxX G, where N is such that it follows a normal distribution N (0, i)
n,max) X of (a) satisfies P (x)>ni
n,max)<N value of p, i
n,maxGenerated for ambient light energyThe maximum photoelectric reaction current, G is the circuit gain; or using dynamic thresholds, with the thresholds set to n x i
nX G, wherein i
nIs the photoelectric reaction current generated on the APD by ambient light at any time. In the former method, when the light is in a low-ambient-light working condition, the signal amplitude is required to pass through a threshold to realize detection, so that active luminous energy in the low-ambient-light working condition is wasted, and the efficiency of the detector is reduced. There are two main existing low ambient light conditions: one is low ambient light source power, such as cloudy days or at night, and the other is low target object reflectivity, such as probing the tire. In particular, when the low ambient light condition is the latter, the Lidar requires more energy to trigger the threshold by the detection signal, which increases the laser emission power consumption. The second dynamic threshold setting method can reduce the trigger threshold when the noise is low, and correspondingly reduces the signal amplitude requirement of the detector, thereby avoiding the waste of emission energy and improving the efficiency of the detector.
Because the analog-to-digital converter collects the full waveform of the signal to be measured, the time measurement of the signal to be measured by the time measurement circuit based on the analog-to-digital converter is completely digitalized. It is therefore very convenient to deploy dynamically adjusted thresholds on the analog-to-digital converter based time measurement circuit. But as described above, a time measurement circuit based on a separate analog-to-digital converter has an analog-to-digital converter sampling frequency much higher than twice the nyquist frequency of the signal and also much higher than that required to meet baseline sampling accuracy. And the power consumption of the analog-to-digital converter is positively correlated with the sampling frequency. Therefore, in order to achieve the same time measurement accuracy, the method of measuring time by using the analog-to-digital converter alone consumes more power, and is not suitable for the application of compact equipment.
The invention combines the advantage of low power consumption of the TDC time measuring circuit and realizes the dynamic threshold circuit which can be dynamically calibrated. Compared with a TDC time measuring circuit with a fixed threshold, the TDC time measuring circuit can monitor the baseline state and the noise, dynamically adjust the trigger threshold, realize the dynamic calibration of the threshold and reduce the amplitude requirement on a signal to be measured. Compared with a time measurement method adopting an analog-to-digital converter alone, the method is more suitable for compact and power consumption-limited measurement equipment such as Lidar due to lower power consumption.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.