Time-of-flight measurement method and apparatus, laser ranging device, and storage medium

By statistically analyzing the photon events of the detection unit and subtracting the ambient light value during time-of-flight measurement, the problem of the detector being affected by ambient light signals is solved, thus improving the accuracy of time-of-flight measurement.

CN120322699BActive Publication Date: 2026-06-12SUTENG INNOVATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUTENG INNOVATION TECHNOLOGY CO LTD
Filing Date
2022-12-21
Publication Date
2026-06-12

Smart Images

  • Figure CN120322699B_ABST
    Figure CN120322699B_ABST
Patent Text Reader

Abstract

A time-of-flight measurement method and device, a laser ranging device and a storage medium are suitable for the technical field of time-of-flight measurement. The method comprises: counting photon events of a detection unit in a first preset time period to generate an ambient light value (S11); counting photon events of the detection unit in a second preset time period to generate histogram data, wherein the histogram data comprises Z flight times and Z count values corresponding to the Z flight times respectively (S12); subtracting the ambient light value from the Z count values respectively to generate Z processing values corresponding to the Z count values respectively (S13); and determining a time of flight according to the Z processing values (S14). The method can keep the count values of the echo light signal in the histogram data substantially unchanged, attenuate the count values of the ambient light signal, improve the signal-to-noise ratio of the detection unit, facilitate determination of the correct time of flight, and effectively improve the accuracy of measuring the time of flight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of time-of-flight measurement technology, and particularly relates to a time-of-flight measurement method, device, laser rangefinder, and storage medium. Background Technology

[0002] Time-of-flight (TOF) measurement technology has important applications in fields such as autonomous driving, facial recognition, and 3D gesture recognition. In a TOF measurement system, a transmitter emits a pulse signal. A detector, such as a single-photon avalanche diode (SPAD), receives the echo signal, performs photoelectric conversion and the avalanche effect to generate a pulse electrical signal. The detector transmits this pulse electrical signal to a sampling circuit, such as a time-to-digital converter (TDC), which records the time of the pulse electrical signal. Histogram data is then obtained by statistically analyzing the recorded pulse electrical signal time and written to a storage unit. This histogram data is then output to a subsequent signal processing unit for further processing. The signal processing unit determines the time of flight based on the histogram data and calculates the distance between the laser and the object.

[0003] However, due to the high sensitivity of the detector, the light signal received by the detector may include ambient light signals in addition to echo signals. The detection unit may not be able to correctly distinguish which of the received signals are ambient light signals and which are echo signals, causing it to treat the ambient light signals as echo signals when calculating the time of flight, thus failing to identify the correct time of flight. Summary of the Invention

[0004] This application provides a time-of-flight measurement method, apparatus, terminal device, and computer-readable storage medium to solve the problem that the current time-of-flight measurement process is affected by ambient light signals, resulting in poor detection performance.

[0005] In a first aspect, this application provides a method for measuring time of flight, including:

[0006] The statistical detection unit generates ambient light values ​​based on photon events within a first preset time period.

[0007] The statistical detection unit generates histogram data for photon events within a second preset time period; wherein, the histogram data includes Z flight times and Z count values ​​corresponding to each of the Z flight times, where Z is a positive integer greater than 1;

[0008] Subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values;

[0009] Flight time is determined based on Z processing values;

[0010] The first preset time period and the second preset time period are located within a single detection cycle; during the first preset time period, the light-emitting unit corresponding to the detection unit does not emit pulse light signals; during the second preset time period, the light-emitting unit corresponding to the detection unit emits N pulse light signals, where N is a positive integer greater than 1.

[0011] Secondly, this application also provides a flight time measuring device, which employs the aforementioned flight time measuring method; the flight time measuring device includes:

[0012] The first statistical unit is used to count the photon events of the detection unit within a first preset time period and generate ambient light values.

[0013] The second statistical unit is used to count the photon events of the detection unit within a second preset time period and generate histogram data; wherein, the histogram data includes Z flight times and Z count values ​​corresponding to each of the Z flight times, where Z is a positive integer greater than 1;

[0014] A calculation unit is used to subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values.

[0015] A determination unit is used to determine the flight time based on Z processed values;

[0016] The first preset time period and the second preset time period are located within a single detection cycle; during the first preset time period, the light-emitting unit corresponding to the detection unit does not emit pulse light signals; during the second preset time period, the light-emitting unit corresponding to the detection unit emits N pulse light signals, where N is a positive integer greater than 1.

[0017] Thirdly, embodiments of this application provide a laser ranging device, including: a transmitter, a detector, a processor, a communication interface, a memory, and a communication bus; the processor communicates with the transmitter and the detector through the communication interface; the processor, the communication interface, and the memory communicate with each other through the communication bus; the transmitter includes one or more light-emitting units for emitting pulsed light signals; the detector includes one or more detection units for receiving light signals; the memory stores computer programs or instructions; the processor executes the computer programs or instructions in the memory to implement the time-of-flight measurement method described above.

[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing at least one executable instruction, which, when executed by a processor, implements the time-of-flight measurement method as described above.

[0019] Fifthly, embodiments of this application provide a computer program product that, when run on a laser ranging device, causes the laser ranging device to perform the aforementioned time-of-flight measurement method.

[0020] The beneficial effects of the embodiments in this application compared with the prior art are:

[0021] This application provides a time-of-flight measurement method, apparatus, terminal, and storage medium. It generates ambient light values ​​by statistically analyzing photon events within a first preset time period and histogram data by statistically analyzing photon events within a second preset time period. Then, it subtracts the ambient light values ​​from multiple count values ​​in the histogram data to obtain multiple processed values ​​corresponding to the count values. Finally, it determines the time of flight based on these processed values. This allows the echo light signal count values ​​in the histogram data to remain essentially unchanged, while the ambient light signal count values ​​are attenuated, improving the signal-to-noise ratio of the detection unit, facilitating the determination of the correct time of flight, and effectively improving the accuracy of time-of-flight measurement. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1A This is a schematic diagram of the architecture of the time-of-flight measurement device provided in an embodiment of this application;

[0024] Figure 1B This is a schematic diagram illustrating the principle of the flight time measurement device generating histogram data provided in the embodiments of this application;

[0025] Figure 2 This is a schematic flowchart of a time-of-flight measurement method provided in an embodiment of this application;

[0026] Figure 3 This is a timing diagram of the light emission unit emitting light signals and the detection unit receiving light signals in a time-of-flight measurement method provided in this application embodiment;

[0027] Figure 4 This is a schematic diagram of another structural block diagram of the time-of-flight measurement device provided in the embodiments of this application;

[0028] Figure 5 This is a schematic diagram of a structural block of the first statistical unit provided in an embodiment of this application;

[0029] Figure 6 This is a schematic diagram of a structure of the first statistical unit provided in an embodiment of this application;

[0030] Figure 7 This is a schematic diagram of a structure of the second statistical unit provided in an embodiment of this application;

[0031] Figure 8 This is another schematic diagram of the flight time measuring device provided in the embodiments of this application;

[0032] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0033] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0034] It should be noted that when a unit is referred to as being "connected to" another unit, it can be directly connected to the other unit or indirectly connected to it. It should be understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items, and all possible combinations, including such combinations. Furthermore, in the description of this specification and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0035] It should also be understood that references to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0036] Please see Figure 1A , Figure 1A This application provides an architecture diagram of a time-of-flight measurement system. As shown in Figure 1, the time-of-flight measurement system includes a transmitter 60, a detector 10, a sampling module 20, and a storage module 40; the transmitter 60 includes a light-emitting unit 601, the detector 10 includes a detection unit 101, the sampling module includes a sampling unit 201, and the storage module 40 includes a storage unit 401.

[0037] In some embodiments, the transmitter 60 includes one or more light-emitting units 601, each corresponding to one or more detector units 601, for emitting pulsed light signals. The detector 10 includes one or more detector units 101, which may be single-photon avalanche diodes (SPADs) or silicon photomultipliers (SIPMs), for detecting echo light signals. A sampling unit 201 is connected to the detector units 101 and is used for time-of-flight data. The sampling unit 201 may be a time-to-digital converter (TDC).

[0038] The basic process of time-of-flight (TOF) measurement in the above-mentioned time-of-flight (TOF) measurement system is as follows: The emitting unit 601 emits a pulsed light signal into the detection area; the detection unit 101, corresponding to the emitting unit 601, receives the echo light signal and converts it into an echo electrical signal. The echo light signal is the light signal reflected back by an obstacle within the detection area after the pulsed light signal emitted by the emitting unit 601 is reflected; the sampling unit 201, connected to the detection unit 101, generates time-of-flight (TOF) data based on the output electrical signal from the detection unit 101. The TOF data indicates each flight moment and the number of photons corresponding to each flight moment, thus indicating the arrival time of the echo light signal. The storage unit 401 stores the arrival time of the echo light signal. The TOF is obtained based on the emission time of the pulsed light signal and the arrival time of the echo light signal. Then, the distance to the obstacle can be calculated based on the constant speed of light and the TOF.

[0039] Theoretically, when the detection unit 101 does not receive an echo light signal at a certain flight moment in the flight time statistics period, the detection unit 101 will not output an echo electrical signal to the sampling unit 101. Accordingly, the number of photons corresponding to that flight moment output by the sampling unit 101 is 0. However, when the detection unit 101 receives an echo light signal at a certain flight moment, the detection unit 101 will output an echo electrical signal to the sampling unit 201 at that flight moment. Accordingly, the number of photons corresponding to that flight moment output by the sampling unit 101 is >0. The flight moment corresponding to the number of photons >0 is the arrival time of the echo light signal.

[0040] However, in actual measurement processes, due to the high sensitivity of the detection unit 101, the optical signal received by the detection unit 101 may include ambient light signals in addition to echo signals. The detection unit 101 cannot effectively distinguish which received signals are ambient light signals and which are echo signals. To reduce the influence of ambient light signals on the time-of-flight measurement results, related technologies employ Time-Correlated Single Photon Counting (TCSPC) to measure the time of flight. Its main principle is that a single detection period includes multiple time-of-flight statistical periods T. tof The light-emitting unit 601 operates in multiple flight time statistical periods T tof The starting time of each pulse light signal is emitted, that is, the light-emitting unit 601 emits pulse light signals multiple times within a single detection cycle. Correspondingly, the detection unit 101 emits pulse light signals in multiple flight time statistical cycles T. tofEcho light signals are detected multiple times within a single detection cycle, meaning that detection unit 101 detects echo light signals multiple times within a single detection cycle. Since the speed of the obstacle is much less than the speed of light, the distance to the obstacle can be considered constant within the same detection cycle, i.e., the time of flight (TOF) remains constant. Therefore, the arrival time of the echo light signals exhibits coherence or consistency across multiple TOF statistical cycles. tof In this context, the arrival time of the ambient light signal is random, occurring over multiple time-of-flight statistical periods T. tof Then, the echo light signal can stand out from the ambient light signal.

[0041] For example: a single detection period includes N flight time statistical periods T. tof N is a positive integer greater than 1, and the detection unit 101 performs detection in each flight time statistical period T. tof The received echo light signal is represented by a rectangle filled with diagonal lines, and the received ambient light signal is represented by a rectangle filled with gray. The light-emitting unit 101 during the first flight time statistical period T... tof ~Nth flight time statistical period T tof The light emission begins at the start time, emitting N pulse light signals; the detection unit 101 detects N echo light signals within N flight time statistical periods. From Figure 1B It can be seen from this that the detection unit 101 in each flight time statistical period T tof In addition to receiving echo light signals, the detector also receives multiple ambient light signals. The position of the echo light signals remains relatively constant, while the positions of the ambient light signals are more scattered. The detection unit 101 receives signals over one flight time statistical period T. tof The photon events within a time-of-flight (TOF) period constitute a time-of-flight (TOF) dataset. The horizontal axis of the TOF dataset represents each flight moment within a TOF statistical period, and the vertical axis represents the number of photons corresponding to each flight moment. The position of the signal on the horizontal axis of the TOF dataset indicates the arrival time of the optical signal (ambient light or echo light), and the value of the signal on the vertical axis indicates the number of photons in the optical signal (ambient light or echo light). The first TOF statistical period T... tof ~Nth flight time statistical period T tof The flight time data sets are overlaid, that is, the first flight time statistical period T is processed by overlaying. tof ~Nth flight time statistical period T tof The number of photons at the same flight time is accumulated to obtain the count value for each flight time; where the count value for a certain flight time is equal to the first flight time statistical period T. tof ~Nth flight time statistical period T tofThe cumulative number of photons corresponding to this flight moment. Based on the flight time statistical period T. tof The count values ​​at each flight moment can then be used to generate the data. Figure 1B The histogram below. The horizontal axis of the histogram represents the flight time statistical period T. tof In the histogram, the vertical axis represents the count value corresponding to each flight time. The flight time corresponding to the maximum count value in the histogram is the arrival time of the echo light signal, i.e., the flight time.

[0042] It is understandable that for the aforementioned time-of-flight measurement system, obtaining the correct time of flight depends on correctly identifying the peak position of the count value in the histogram, and thus identifying the correct arrival time of the echo light signal. When the ambient light is weak and the distance to the obstacle is small, the signal-to-noise ratio (SBNR) is large, and the peak value of the histogram corresponding to the echo light signal is easily obtained after multiple time-of-flight statistical cycles. However, when the ambient light intensity is strong or the distance to the target object is large, the number of photons in the echo light signal received by the detection unit 101 decreases with increasing distance, while the number of photons in the received ambient light remains constant with distance. This results in a lower SBNR, affecting the back-end circuit's identification of the peak position of the count value, potentially leading to incorrect peak identification by the back-end circuit, causing detection errors, and consequently significantly reducing the detection accuracy.

[0043] To address the aforementioned problems, in a first aspect, embodiments of this application provide a time-of-flight measurement method. This method generates ambient light values ​​by statistically analyzing photon events within a first preset time period T1 using a detection unit 101, wherein the light-emitting unit 601 corresponding to the detection unit 101 does not emit light during the first preset time period T1; and generates histogram data by statistically analyzing photon events within a second preset time period T2, wherein the second preset time period T2 includes N time-of-flight statistical periods T. tof N is a positive integer greater than 1, and the light-emitting unit 601 corresponding to the detection unit 101 operates for N flight time statistical periods T. tof The system emits N pulsed light signals at the start time; then, it subtracts the ambient light value from the multiple count values ​​in the histogram data to obtain multiple processed values ​​that correspond one-to-one with the multiple count values; finally, it determines the flight time based on the multiple processed values, so that the count value of the echo light signal in the histogram data remains basically unchanged, while the count value of the ambient light signal is attenuated, thereby improving the signal-to-noise ratio of the detection unit 101, facilitating the determination of the correct flight time, and effectively improving the accuracy of the flight time measurement.

[0044] Please see Figure 2 , Figure 2This is a flowchart illustrating a time-of-flight measurement method provided in an embodiment of this application. The method includes, but is not limited to, the following steps:

[0045] S11, the statistical detection unit generates ambient light values ​​by analyzing photon events within a first preset time period.

[0046] like Figure 3 As shown, in this application, a single detection cycle includes a first preset time period T1 and a second preset time period T2. Detection unit 101 performs ambient light detection during the first preset time period T1, and detects N echo light signals during the second preset time period T2. During the first preset time period T1, the light-emitting unit 601 corresponding to detection unit 101 does not emit light, thereby achieving ambient light detection during the first preset time period T1. Since the light-emitting unit 601 does not emit light, the light signal received by detection unit 101 during the first preset time period T1 does not include echo light signals, and the photon events of detection unit 101 during the first preset time period T1 are generated by ambient light.

[0047] In some implementations, the ambient light value is used to indicate the average number of ambient light photons received by the detection unit 101 at each flight moment during the N echo light signal detection process, that is, the average number of ambient light photons included in the count value corresponding to each flight moment in the histogram data.

[0048] Furthermore, the principle behind the time-of-flight measurement method for generating ambient light values ​​provided in this application embodiment is as follows:

[0049] Assume that, through statistical analysis, the cumulative number of photons of ambient light received by detection unit 101 within the first preset time period T1 is Sum, and the ambient light value is ambl. The sampling unit 201 (e.g., TDC) performs sampling with a clock period of T. c Each clock cycle is divided into j flight moments, and the duration of each flight moment is t0, where j is a positive integer greater than 1, and t0 = T. c / j.

[0050] It is understood that the detection unit 101 receives ambient light photons at flight times of (T1 / t0) within the first preset time period T1. The average number of ambient light photons received by the detection unit 101 at each flight time is S0 = [Sum / (T1 / t0)]. Therefore, it can be set that the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of a single echo light signal is S1 = S0 = [Sum / (T1 / t0)]. That is, based on the first cumulative value of the number of ambient light photons received by the detection unit 101 within the first preset time period T1, Sum, the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal is S0. Correspondingly, based on the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal, S0, the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal is S1 = S0 =

[0051] [Sum / (T1 / t0)], and further, based on the average number of ambient light photons S1 received by the detection unit 101 at each flight moment during the detection of a single echo light signal, the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the detection of N echo light signals can be set as S2 = N*S1 = N*

[0052] [Sum / (T1 / t0)]. The ambient light value ambl can be set according to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the N echo light signal detection process, thereby indicating the average number of ambient light photons received by the detection unit 101 at each flight moment during the N echo light signal detection process.

[0053] For example, assuming the first preset time period T1 = 20ns, and the clock period T c = 2ns, j = 4, that is, each clock cycle T c The flight is divided into four time slots, with a time interval of t0 = 2ns / 4 = 500ps between each time slot.

[0054] Therefore, the detection unit 101 receives photons in 40 flight moments (where 40 = 20 ns / 500 ps) within the first preset time period T1. During the detection of ambient light signals, the average number of ambient light photons received by the detection unit 101 per flight moment is S0 = (Sum / 40). Correspondingly, the average number of ambient light photons received by the detection unit 101 per flight moment during a single echo signal detection can be set to S1 = (Sum / 40). Furthermore, the average number of ambient light photons received by the detection unit 101 per flight moment during N echo signal detections can be set to S2 = N*(Sum / 40). At this time, the ambient light value ambl can be set based on the average number of ambient light photons received by the detection unit 101 per flight moment during N echo signal detections, i.e., N*(Sum / 40).

[0055] Furthermore, the statistical detection unit generates ambient light values ​​based on photon events within the first preset time period, including:

[0056] The cumulative detection unit counts the number of photons received within a first preset time period to generate a first cumulative photon count value; based on the first cumulative photon count value, an ambient light value is generated. The formula for calculating the ambient light value is:

[0057] ambl=β+α*Sum

[0058] The aforementioned first photon count accumulation value is the accumulated photon count Sum of ambient light received by the detection unit 101 within the first preset time period T1; α is the gain coefficient, which is a real number, and α < 1 or α > 1. The gain coefficient α is used to multiply the first photon count accumulation value of ambient light by a number less than or greater than 1, thereby adjusting the magnitude and proportion of the influence of ambient light. The bias coefficient β is used to add a static bias to the photon count of ambient light, thereby reducing the number of ambient light photons in each count value of the histogram data while eliminating static ambient noise and further improving the signal-to-noise ratio.

[0059] In some implementations, the gain coefficient α can be set using the following formula:

[0060] α = N*[1 / (T1 / t0)]

[0061] At this point, α*Sum=N*[Sum / (T1 / t0)]=S2. The ambient light value ambl=β+S2, that is, the ambient light value is equal to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the N echo light signal detection process, plus the bias coefficient β. This is used to subtract the number of ambient light photons in each count value of the histogram data, while also eliminating static ambient noise and further improving the signal-to-noise ratio.

[0062] In other alternative implementations, the gain coefficient α can also be a value close to N*[1 / (T1 / t0)], such as N*[1 / (T1 / t0)]*α0, where α0 is a real number close to 1, such as α0 = 0.99, 0.98, 0.97, etc. Correspondingly, α = 0.99*N*[1 / (T1 / t0)], α = 0.98*N*[1 / (T1 / t0)], α = 0.97*N*[1 / (T1 / t0)], etc., or α0 = 1.01, 1.02, 1.03, etc. Correspondingly, α = 1.01*N*[1 / (T1 / t0)], α = 1.02*N*[1 / (T1 / t0)], α = 1.03*N*[1 / (T1 / t0)], etc. This application does not limit the specific value of the gain coefficient α.

[0063] As can be seen from the above scheme, the gain coefficient α is directly proportional to the number of receptions N when the detection unit 101 detects the echo optical signal, and inversely proportional to the first preset time period T1. The specific value of the gain coefficient α can be set according to actual needs, and this application does not limit the specific value of the gain coefficient α. The bias coefficient β can be set according to the static environmental noise floor obtained from actual testing, and this application does not limit the specific value of the bias coefficient β.

[0064] In some other implementations, the ambient light value is calculated as follows:

[0065] ambl = N * [Sum / (T1 / t0)]

[0066] At this time, the ambient light value ambl=N*[Sum / (T1 / t0)]=S2, that is, the ambient light value is equal to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the N echo light signal detection process.

[0067] Theoretically, the longer the first preset time period T1 is, the closer the average number of ambient light photons S0 received by the detection unit 101 at each flight moment during the ambient light detection process will be to the actual average number of ambient light photons received at each flight moment; correspondingly, the closer the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the N echo light signal detection process will be to the actual number of ambient light photons received by the detection unit 101 at each flight moment during the N echo light signal detection process.

[0068] In fact, in the embodiments of the present application, the first preset time period T1 is within a single detection cycle. To ensure the consistency of the flight time within a single detection cycle, the duration of a single detection cycle cannot be infinitely extended. Correspondingly, the first preset time period T1 cannot be infinitely extended. Among them, the first preset time period T1 satisfies: t0 < T1 < the duration of a single detection cycle.

[0069] Further, the value range of the first preset time period T1 is: T tof ≤ T1 < N * T tof . Among them, T tof is the above-mentioned flight time statistical cycle, and T tof = i * T c , T c = j * t0, both i and j are positive integers greater than 1, T c is the clock cycle, t0 is the duration of each flight moment; N is the number of times the detection unit 101 detects the reflected optical signal in a single detection cycle, and is also the number of times the light emitting unit 101 emits a pulsed optical signal in a single detection cycle.

[0070] Preferably, in some embodiments, the first preset time period T1 can be set by the following formula:

[0071] T1 = u1 * T tof ;

[0072] Among them, u1 is a positive integer, and 1 ≤ u1 < N.

[0073] Further, since T tof = i * T c , T c = j * t0, it can be seen that T1 = u1 * i * T c = u1 * i * j * t0, that is, the first preset time period T1 is divided into u1 * i clock cycles T c , and the first preset time period T1 is divided into u1 * i * j flight moments. Since each flight moment corresponds to a number of photons, correspondingly, the first preset time period T1 corresponds to u1 * i * j photons.

[0074] At this time, the gain coefficient α can be set by the formula: α = N * [1 / (T1 / t0)] = N * [1 / (u1 * i * j)]. Among them, the number i of clock cycles T tof included in the flight time statistical cycle T c and the number j of flight moments included in each clock cycle T c are usually preset values. At this time, by setting the value of u1, the setting of the first preset time period T1 can be completed, and the setting method is very simple.

[0075] Furthermore, the first preset time period T1 is divided into K clock cycles; the number of photons received by the accumulating detection unit within the first preset time period is used to generate a first photon count accumulation value, including:

[0076] The number of photons detected by the detection unit in each clock cycle of the first preset time period is accumulated sequentially according to the clock cycle, and K initial photon count accumulation values ​​are generated in sequence; wherein, each initial photon count accumulation value is the accumulation value of the number of ambient light photons received by the detection unit in one clock cycle;

[0077] Accumulate K initial photon count values ​​to generate the first photon count accumulation value; the first photon count accumulation value satisfies:

[0078]

[0079] Where Sum is the first accumulated photon count, K is the number of clock cycles Tc included in the first preset time period T1, which is also the number of initial accumulated photon counts, K is a positive integer, and K = T1 / Tc; k is a positive integer, and 1 ≤ k ≤ K; s k This is the accumulated value of the kth initial photon count, that is, the accumulated value of the number of ambient light photons received by the detection unit 101 during the kth clock cycle of the first preset time period T1. Where T1 = u1*i*T c At that time, K = u1*i.

[0080] It should also be noted that the data format can be set according to the data type. For example, the data format of the gain coefficient 'a' is U4.6, and the data format of the bias coefficient 'β' is U10.0; the data format of the cumulative value of the number of photons of ambient light received by the detection unit 101 in the first preset time period, Sum, is U11.0, and the data format of the ambient light value ambl is U11.0.

[0081] Furthermore, after the statistical detection unit generates ambient light values ​​from photon events within the first preset time period, it also includes storing the ambient light values ​​into a storage unit.

[0082] In some specific implementations, the ambient light value ambl is stored in the storage space at address a0 in storage unit 401.

[0083] Furthermore, after the statistical detection unit generates ambient light values ​​from photon events within the first preset time period, it also includes: performing limiting saturation processing on the ambient light values.

[0084] At this point, the ambient light value ambl, which has undergone limit saturation processing, is stored in the storage space at address a0 in storage unit 401.

[0085] The limit saturation processing is to prevent data overflow caused by excessively long photon count counting time. If the data (the first accumulated photon count) exceeds the maximum value that the required data format can store, the maximum value is used to represent this data (i.e., the first accumulated photon count). If the first accumulated photon count exceeds the minimum value that the required data format can store, the minimum value is used to represent this data (i.e., the first accumulated photon count).

[0086] S12, the statistical detection unit generates histogram data by analyzing photon events within a second preset time period.

[0087] The histogram data includes Z flight times and Z corresponding count values, where Z is a positive integer greater than 1. For example... Figure 3 As shown, the second preset time period T2 includes N flight time statistical periods T. tof The light-emitting unit 601 corresponding to the detection unit 101 emits light during N flight time statistical periods T. tof The system emits N pulsed light signals at the start time. Detection unit 101 emits N pulsed light signals during the first flight time statistical period T. tof ~The Nth flight time statistical period T tof It receives N optical signals to detect N echo optical signals. Since the light-emitting unit 601 receives the signal during the first flight time statistical period T... tof ~The Nth flight time statistical period T tof The pulsed light signal is emitted at the start time, and the detection unit 101 emits a pulsed light signal during the first flight time statistical period T. tof ~The Nth flight time statistical period T tof The received optical signals include echo optical signals and ambient light signals. Detection unit 101 receives the signals during the first flight time statistical period T. tof ~The Nth flight time statistical period T tof Photon events within the space are generated by echo light signals and ambient light signals. The count values ​​in the histogram data are used to indicate N time-of-flight statistical periods T. tof The cumulative value of the number of photons corresponding to the same flight time. Specifically, this can be achieved by statistically analyzing N flight time periods T. tof The corresponding N flight time data sets are overlaid to generate histogram data.

[0088] Furthermore, the second preset time period T2 includes N flight time statistical periods T. tof Among them, each flight time statistical period T tof Includes i clock cycles T c Each clock cycle T cThe data is divided into j flight times. Correspondingly, the horizontal axis (time axis) of the histogram data includes Z = i*j flight times, and Z flight times correspond to i*j count values.

[0089] like Figure 3 As shown, the second preset time period T2 also includes N transmission time intervals T. 21 N transmission time intervals T tx Located in N flight time statistical periods T respectively tof Before the start time. The light-emitting unit 601 emits light at each emission time interval T. tx To emit light in order to achieve the first flight time statistical period T tof ~The Nth flight time statistical period T tof The system emits N pulsed light signals at the start time.

[0090] like Figure 3 As shown, tx_en is the first control signal, used to trigger the light-emitting unit 601 to emit N pulse light signals within a second preset time period T2. tof_en is the first receiving control signal, used to trigger the detection unit 102 to detect N echo light signals within the second preset time period T2. env_en is the second control signal, used to trigger the detection unit 101 to detect ambient light within a first preset time period T1.

[0091] In one specific implementation, tx_en includes N first high-level pulses Pulse1 within a single detection period, and the pulse width of each first high-level pulse Pulse1 is equal to the transmission time interval T. tx The time interval between the falling edges of two adjacent first high-level pulses Pulse1 is equal to the time-of-flight statistical period T. tof N first high-level pulses (Pulse1) are evenly distributed within a second preset time period T2, with the first first high-level pulse (Pulse1) occurring at the start time of the second preset time period T2. tx_en triggers the light-emitting unit 601 to emit N pulsed light signals through the high levels of the N first high-level pulses (Pulse1).

[0092] In one specific implementation, tof_en includes N second high-level pulse signals Pulse2 within a single detection period, and the pulse width of each first high-level pulse Pulse1 is equal to the time-of-flight statistical period T. tofThe rising edges of the N second high-level pulse signals Pulse2 are aligned with the falling edges of the N first high-level pulse signals Pulse1, respectively. The falling edges of the first second high-level pulse signal Pulse2 to the (N-1)th second high-level pulse signal Pulse2 are aligned with the rising edges of the second first high-level pulse signal Pulse1 to the Nth first high-level pulse signal Pulse1, respectively. tof_en triggers the receiving unit 101 to detect the echo optical signal N times through the high levels of the N second high-level pulse signals Pulse2.

[0093] In one specific implementation, env_en includes a third high-level pulse signal Pulse3 within a single detection cycle. The pulse width of the third high-level pulse signal Pulse3 is equal to the first preset time period T2. The falling edge of the third high-level pulse signal Pulse3 is aligned with the rising edge of the first first high-level pulse Pulse1, meaning the end time of the first preset time period T1 is equal to the start time of the second preset time period T2. env_en triggers the receiving unit 101 to detect ambient light signals through the high level of the third high-level pulse signal Pulse3. Further, the photon events within the second preset time period are statistically analyzed by the detection unit to generate histogram data, including:

[0094] Overlay N sets of flight time data to generate histogram data.

[0095] Among them, N flight time data sets are used to indicate the detection unit 101 in N flight time statistical periods T. tof That is, the first flight time statistical period T tof ~The Nth flight time statistical period T tof Photon events within the time-of-flight dataset. Each time-of-flight data set includes a time-of-flight statistical period T. tof The data includes the various flight periods and the corresponding photon counts for each flight period. The horizontal axis of the flight time dataset represents a flight time statistical period T. tof In the histogram, each flight time is represented by a vertical axis, which indicates the number of photons at each flight time. The position of the optical signal (ambient light or echo light) on the horizontal axis of the time-of-flight data set indicates the arrival time of the optical signal, and the value of the optical signal on the vertical axis of the time-of-flight data set indicates the number of photons. Specifically, the superposition of N time-of-flight data sets involves aligning the N time-of-flight data sets according to their flight times, and then accumulating the photon counts at the same flight time. That is, the N sets of photon counts corresponding to each flight time are accumulated, so that each count value in the histogram data indicates the accumulated photon count value corresponding to each flight time after the N time-of-flight data sets are superimposed.

[0096] Furthermore, due to the statistical period T for each flight time tof Includes i clock cycles T c Each clock cycle T c The data is divided into j flight times. Accordingly, each flight time dataset contains i*j flight times, with each i*j flight time corresponding to i*j photon counts. Similarly, the histogram data contains Z = i*j flight times, with Z flight times corresponding to i*j count values.

[0097] Furthermore, after the statistical detection unit generates histogram data of photon events within the second preset time period, it also includes storing the histogram data into a storage unit.

[0098] In some specific implementations, the histogram data is stored in storage unit 401 at addresses a1 to a2. i The storage space consists of j sub-storage spaces. Specifically, the j sub-storage spaces at address a1 are used to store the j count values ​​corresponding to the j flight times in the first clock cycle, the j sub-storage spaces at address a2 are used to store the j count values ​​corresponding to the j flight times in the second clock cycle, and so on, until address a1... i The j sub-storage spaces in the storage space are used to store the j count values ​​corresponding to the j flight times in the i-th clock cycle, so that the i*j sub-storage spaces formed by the i storage spaces store the i*j count values ​​in the histogram data respectively.

[0099] S13, subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values.

[0100] Furthermore, subtracting the ambient light value from each of the Z count values ​​generates Z processing values ​​corresponding to each of the Z count values, including:

[0101] Get and output ambient light value and Z count values;

[0102] Receive the ambient light value and Z count values, and subtract the ambient light value from each of the Z count values ​​to generate Z processed values.

[0103] In some implementations, acquiring and outputting ambient light values ​​and Z count values ​​includes:

[0104] Obtain Z count values ​​and output them sequentially according to flight time.

[0105] Acquire and output ambient light values.

[0106] Specifically, Z count values ​​are output sequentially according to flight time, based on a statistical period T for each flight time.tof The system outputs the Z count values ​​corresponding to each of the Z flight times (i*j times, i.e., Z flight times) in sequence.

[0107] Furthermore, obtain Z count values, and output the Z count values ​​sequentially according to the flight time order in each flight time statistics period, including:

[0108] The i sets of count values ​​corresponding to i clock cycles are obtained sequentially according to the clock cycle order. Each set of count values ​​includes j count values ​​corresponding to j flight times included in one clock cycle.

[0109] Output the j count values ​​corresponding to the j flight times in each clock cycle in the order of flight times.

[0110] Specifically, the count values ​​corresponding to i clock cycles are obtained sequentially according to the clock cycle order, and then calculated for each flight time statistical period T. tof In the process, the i sets of count values ​​corresponding to the i clock cycles stored in the storage unit 401 are sequentially obtained in the order of i clock cycles.

[0111] Specifically, according to the flight time sequence, the j count values ​​corresponding to each of the j flight times included in each clock cycle are output sequentially. After obtaining the j count values ​​included in each group of count values, the j count values ​​are output sequentially according to the flight time sequence in each clock cycle.

[0112] Specifically, the i sets of count values ​​corresponding to i clock cycles are stored in memory unit 401 at addresses a1 to a2. i In the storage space. Following the clock cycle order of each flight time statistical period, sequentially retrieve the i sets of count values ​​corresponding to the i clock cycles stored in the storage unit, including: sequentially retrieve the count values ​​at addresses a1 to a2 in the storage unit according to the clock cycle order of each flight time statistical period. i The storage space contains i sets of count values.

[0113] Specifically, the ambient light value is stored in the storage space at address a0 of the storage unit 401. Obtaining and outputting the ambient light value includes: obtaining the ambient light value from the storage space at address a0 in the storage unit and outputting the obtained ambient light value.

[0114] Furthermore, when outputting the ambient light value, the output time of the ambient light value covers the output time of the Z count values, which facilitates the subtraction operation between each count value and the ambient light value.

[0115] Specifically, the output time of Z count values ​​can be determined during the design phase. For example, the output time range of Z count values ​​can be preset to t.21 ~t 22 By setting the acquisition time of ambient light values, the output time range of ambient light values ​​is made t. 11 ~t 12 , where t 11 <t 21 , t 12 >t 22 This allows the output time of the ambient light value to cover the output time of Z count values, thus facilitating the subtraction operation between each count value and the ambient light value.

[0116] In some specific implementations, a subtractor can receive the ambient light value and Z count values, and then subtract the Z count values ​​from the ambient light value to generate Z processed values.

[0117] Furthermore, after subtracting the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values, the process also includes: performing limit saturation processing on the Z processing values.

[0118] The limit saturation processing is to prevent data (i.e., count value) overflow due to excessively long photon count time. If the data exceeds the maximum value that the required data format can store, the maximum value is used to represent the data; if the data exceeds the minimum value that the required data format can store, the minimum value is used to represent the data.

[0119] S14, determine the flight time based on Z processing values.

[0120] In some specific implementations, the flight time is determined based on the time corresponding to the peak position among the Z processed values. The time-of-flight ranging method provided in this application generates ambient light values ​​by statistically analyzing photon events within a first preset time period using the detection unit 101, and generates histogram data by statistically analyzing photon events within a second preset time period using the same detection unit 101. Then, the ambient light values ​​are subtracted from the multiple count values ​​in the histogram data to obtain multiple processed values. The correct flight time of the obstacle can be determined based on the time corresponding to the peak position among these multiple processed values. This ensures that the count value of the echo light signal in the histogram data remains essentially unchanged, while the count value of the ambient light signal is attenuated, improving the signal-to-noise ratio of the detection unit 101, facilitating the identification of the correct peak position, and effectively improving the accuracy of the detection unit 101 in measuring the flight time.

[0121] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0122] To address the aforementioned issues, in a second aspect, this application provides a time-of-flight measurement device. This device generates ambient light values ​​by having a first statistical unit 301 count photon events within a first preset time period using the detection unit 101, and generates histogram data by having a second statistical unit 302 count photon events within a second preset time period using the detection unit 101. Then, a calculation unit 501 subtracts the ambient light values ​​from multiple count values ​​in the histogram data to obtain multiple processed values. Finally, a determination unit 502 determines the obstacle's flight time based on the time corresponding to the peak position among the multiple processed values. This allows the echo light signal count value in the histogram data to remain essentially unchanged, while the ambient light signal count value is attenuated, improving the signal-to-noise ratio of the detection unit 101, facilitating the identification of the correct peak position, and effectively improving the accuracy of the detection unit 101 in measuring flight time.

[0123] Please see Figure 4 , Figure 4 This is a schematic block diagram of a flight time measuring device provided in an embodiment of this application. Figure 4 The flight time measurement device shown can achieve Figure 3 The flight time measurement method of the embodiment shown. Figure 4 The flight time measurement device shown includes a first statistical unit 301, a second statistical unit 302, a calculation unit 501, and a determination unit 502.

[0124] Specifically, the first statistical unit 301 is used to count the photon events of the detection unit 101 within the first preset time period T1 and generate ambient light values.

[0125] like Figure 3 As shown, in this application, a single detection cycle includes a first preset time period T1 and a second preset time period T2. Detection unit 101 performs ambient light detection during the first preset time period T1, and detects N echo light signals during the second preset time period T2. During the first preset time period T1, the light-emitting unit 601 corresponding to detection unit 101 does not emit light, thereby achieving ambient light detection during the first preset time period T1. Since the light-emitting unit 601 does not emit light, the light signal received by detection unit 101 during the first preset time period T1 does not include echo light signals, and the photon events of detection unit 101 during the first preset time period T1 are generated by ambient light.

[0126] In some implementations, the ambient light value ambl is used to indicate the average number of ambient light photons received by the detection unit 101 at each flight time during the N echo light signal detection process, that is, the average number of ambient light photons included in the count value corresponding to each flight time in the histogram data.

[0127] Furthermore, in the flight time measurement device provided in this application embodiment, the principle by which the first statistical unit 301 generates ambient light values ​​is as follows:

[0128] Assume that, through statistical analysis, the cumulative number of first photons of ambient light received by detection unit 101 within the first preset time period T1 is Sum, and the ambient light value is ambl. The clock period for sampling by sampling unit 201 (e.g., TDC) is T. c Each clock cycle is divided into j flight moments, and the duration of each flight moment is t0, where j is a positive integer greater than 1, and t0 = T. c / j.

[0129] It is understood that the detection unit 101 receives ambient light photons at flight times of (T1 / t0) within the first preset time period T1. The average number of ambient light photons received by the detection unit 101 at each flight time is S0 = [Sum / (T1 / t0)]. Therefore, it can be set that the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of a single echo light signal is S1 = S0 = [Sum / (T1 / t0)]. That is, based on the first cumulative value of the number of ambient light photons received by the detection unit 101 within the first preset time period T1, Sum, the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal is S0. Correspondingly, based on the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal, S0, the average number of ambient light photons received by the detection unit 101 at each flight time during the detection of the ambient light signal is S1 = S0 =

[0130] [Sum / (T1 / t0)], and further, based on the average number of ambient light photons S1 received by the detection unit 101 at each flight moment during the detection of a single echo light signal, the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the detection of N echo light signals can be set to N*S1=N*[Sum / (T1 / t0)]. The ambient light value ambl can be set according to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the detection of N echo light signals, thereby indicating the average number of ambient light photons received by the detection unit 101 at each flight moment during the detection of N echo light signals.

[0131] For example, assuming the first preset time period T1 = 20ns, and the clock period T c = 2ns, j = 4, that is, each clock cycle T cThe flight is divided into four time slots, with a time interval of t0 = 2ns / 4 = 500ps between each time slot.

[0132] Therefore, the detection unit 101 receives photons in 40 flight moments (where 40 = 20 ns / 500 ps) within the first preset time period T1. During the detection of ambient light signals, the average number of ambient light photons received by the detection unit 101 per flight moment is S0 = (Sum / 40). Correspondingly, the average number of ambient light photons received by the detection unit 101 per flight moment during a single echo signal detection can be set to S1 = (Sum / 40). Furthermore, the average number of ambient light photons received by the detection unit 101 per flight moment during N echo signal detections can be set to S2 = N*(Sum / 40). At this time, the ambient light value ambl can be set based on the average number of ambient light photons received by the detection unit 101 per flight moment during N echo signal detections, i.e., N*(Sum / 40).

[0133] Furthermore, such as Figure 5 and Figure 6 As shown, the first statistical unit 301 includes:

[0134] The first accumulation unit 3011 is used to accumulate the number of photons received by the detection unit within a first preset time period and generate a first photon count accumulation value.

[0135] The first generation unit 3012 is used to generate an ambient light value based on the accumulated value of the first photon count. The formula for calculating the ambient light value is:

[0136] ambl = β + α * Sum;

[0137] Wherein, the aforementioned first photon count accumulation value is the accumulated value Sum of the first photon count of ambient light received by the detection unit 101 within the first preset time period T1; α is the gain coefficient, α is a real number, and α<1 or α>1. The gain coefficient α is used to multiply the accumulated value of the first photon count of ambient light by a number less than or greater than 1, thereby adjusting the magnitude and proportion of the influence of ambient light. The bias coefficient β is used to add a static bias to the photon count of ambient light, thereby eliminating artificial static environmental noise when subtracting the ambient light value from the histogram data, and maximizing the signal-to-noise ratio.

[0138] like Figure 6 As shown, in some specific embodiments, the first generation unit 3012 includes:

[0139] The first multiplier MUL is used to receive the first photon count accumulation value Sum and the gain coefficient α, and to perform a multiplication operation on the first photon count accumulation value Sum and the gain coefficient α to generate the product α*Sum of the first photon count accumulation value Sum and the gain coefficient α.

[0140] The first accumulator A1 is used to receive the bias coefficient β, the product of the first photon number accumulation value Sum and the gain coefficient α*Sum, and generate the ambient light value ambl. Wherein, the ambient light value ambl = β + α*Sum.

[0141] In some alternative implementations, the gain coefficient α can be set using the following formula:

[0142] α = N*[1 / (T1 / t0)];

[0143] At this point, α*Sum=N*[Sum / (T1 / t0)]=S2. The ambient light value ambl=β+S2, that is, the ambient light value is equal to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the N echo light signal detection process, plus the bias coefficient β. This is used to subtract the number of ambient light photons in each count value of the histogram data, while also eliminating static ambient noise and further improving the signal-to-noise ratio.

[0144] In other alternative implementations, the gain coefficient α can also be a value close to N*[1 / (T1 / t0)], such as N*[1 / (T1 / t0)]*α0, where α0 is a real number close to 1, such as α0 = 0.99, 0.98, 0.97, etc. Correspondingly, α = 0.99*N*[1 / (T1 / t0)], α = 0.98*N*[1 / (T1 / t0)], α = 0.97*N*[1 / (T1 / t0)], etc., or α0 = 1.01, 1.02, 1.03, etc. Correspondingly, α = 1.01*N*[1 / (T1 / t0)], α = 1.02*N*[1 / (T1 / t0)], α = 1.03*N*[1 / (T1 / t0)], etc. This application does not limit the specific value of the gain coefficient α.

[0145] As can be seen from the above scheme, the gain coefficient α is directly proportional to the number of receptions N when the detection unit 101 detects the echo optical signal, and inversely proportional to the first preset time period T1. The specific value of the gain coefficient α can be set according to actual needs. The bias coefficient β can be set according to the static environmental noise floor obtained from actual testing, and this application does not limit the specific value of the bias coefficient β.

[0146] In some other implementations, the ambient light value is calculated as follows:

[0147] ambl = N * [Sum / (T1 / t0)].

[0148] Furthermore, the first generating unit 3012 includes a second multiplier (not shown). The second multiplier is configured to receive the first photon number accumulation value Sum and the coefficient N * [Sum / (T1 / t0)], and perform a multiplication operation on the first photon number accumulation value Sum and the coefficient N * [Sum / (T1 / t0)] to generate an ambient light value. At this time, the ambient light value ambl = N * [Sum / (T1 / t0)] = S2, that is, the ambient light value is equal to the average number of ambient light photons S2 received by the detection unit 101 at each flight moment during the detection process of N echo optical signals.

[0149] Theoretically speaking, the longer the first preset time period T1 is, during the process of the detection unit 101 detecting ambient light, the closer the average number of ambient light photons S0 received by the detection unit 101 at each flight moment is to the actual average number of ambient light photons received at each flight moment; correspondingly, during the detection process of the detection unit 101 for N echo optical signals, the average number of ambient light photons S2 received by the detection unit 101 at each flight moment is closer to the actual average number of ambient light photons received by the detection unit 101 at each flight moment during the detection process of N echo optical signals.

[0150] In fact, in the embodiments of the present application, the first preset time period T1 is within a single detection cycle. In order to ensure the consistency of the flight time within a single detection cycle, the duration of a single detection cycle cannot be infinitely extended, and correspondingly, the first preset time period T1 cannot be infinitely extended. Among them, the first preset time period T1 satisfies: t0 < T1 < the duration of a single detection cycle.

[0151] Furthermore, the value range of the first preset time period T1 is: T tof ≤ T1 < N * T tof . Where T tof is the above-mentioned flight time statistical period, and T tof = i * T c , T c = j * t0, both i and j are positive integers greater than 1, T c is the clock cycle, t0 is the duration of each flight moment; N is the number of times the detection unit 101 detects echo optical signals in a single detection cycle, and is also the number of times the light emitting unit 101 emits pulsed optical signals in a single detection cycle.

[0152] Preferably, in some embodiments, the first preset time period T1 can be set by the following formula:

[0153] T1 = u1 * T tof ;

[0154] Where u1 is a positive integer, and 1 ≤ u1 <N。

[0155] Furthermore, due to T tof =i*T c T c =j*t0, therefore T1 = u1*i*T c = u1*i*j*t0, that is, the first preset time period T1 is divided into u1*i clock cycles Tc, and the first preset time period T1 is divided into u1*i*j flight moments. Since each flight moment corresponds to one photon count, the first preset time period T1 corresponds to u1*i*j photons.

[0156] At this point, the gain coefficient α can be set using the formula: α=N*[1 / (T1 / t0)]=N*[1 / (u1*i*j)]. Wherein, the flight time statistical period T... tof The included clock period T c The number i and each clock cycle T c The number of flight times j included is usually a preset value. At this time, by setting the value of u1, the setting of the first preset time period T1 can be completed, which simplifies the setting method of the first preset time period T1.

[0157] Furthermore, the first preset time period T1 is divided into K clock cycles; the first accumulation unit 3011 includes:

[0158] The second accumulation unit 30111 is used to sequentially accumulate the number of photons of the detection unit in each clock cycle of the first preset time period according to the clock sequence, and sequentially generate K initial photon count accumulation values; wherein, each initial photon count accumulation value is the accumulation value of the number of ambient light photons received by the detection unit in one clock cycle;

[0159] The third accumulation unit 30112 is used to accumulate K initial photon count accumulation values ​​to generate the first photon count accumulation value; the first photon count accumulation value Sum satisfies:

[0160]

[0161] Where K is the number of clock cycles included in the first preset time period, and is also the number of times the initial photon count is accumulated. K is a positive integer, and K = T1 / T c ; k is a positive integer, and 1 ≤ k ≤ K; s k This is the accumulated value of the kth initial photon count, that is, the accumulated value of the ambient light photon count in the kth clock cycle of the first preset time period T1 by the detection unit 101. When T1 = u1*i*T c At that time, K = u1*i.

[0162] like Figure 6 As shown, in one specific embodiment, the third accumulator unit 30112 includes a first data selector MUX, a second accumulator A2, and a first register; the first data selector MUX includes a first input terminal, a second input terminal, an output terminal, and a control terminal; the first input terminal of the first data selector MUX is used to receive the K initial photon count accumulation values ​​sequentially output by the second accumulator unit 30111 according to the clock cycle sequence; the second input terminal of the first data selector MUX receives data 0; the control terminal of the first data selector MUX receives a first statistical control signal; and the output terminal of the first data selector MUX is connected to one input terminal of the second accumulator A2. The second accumulator A2 includes two input terminals and one output terminal. One input terminal of the second accumulator A2 is connected to the output terminal of the first data selector MUX, and the other input terminal of the second accumulator A2 is connected to the feedback terminal of the first register. The output terminal of the second accumulator A2 is connected to the input terminal of the first register. The first register includes one input terminal, one output terminal, and one feedback terminal. The input terminal of the first register is connected to the output terminal of the second accumulator A2, and the output terminal of the first register is connected to the first generation unit 3012 for outputting the first photon count accumulation value Sum. The feedback terminal of the first register is connected to the other input terminal of the second accumulator A2.

[0163] The operation of the third accumulator unit 30112 is as follows: The first statistical control signal controls the first data selector MUX to sequentially select and output the K initial photon count accumulation values ​​output by the second accumulator unit 30111 according to the clock cycle. After the first data selector MUX completes the output of the K initial photon count accumulation values, it controls the first data selector MUX to select data 0 for output. For example, during the first to the Kth clock cycles, the first statistical control signal is at a high level. The high-level first statistical control signal is used to control the first data selector MUX to select the data at the first input terminal, that is, the second accumulator unit 30111 selects the data at the first input terminal according to the clock cycle. The system outputs K initial photon count accumulation values ​​sequentially. After the Kth clock cycle, the first statistical control signal switches to a low level. This low-level signal controls the first data selector MUX to select data from the second input terminal, i.e., data 0, for output. The first data selector MUX outputs the K initial photon count accumulation values ​​sequentially to the second accumulator A2. The second accumulator A2, in conjunction with the first register, performs K-1 accumulation cycles to accumulate the K initial photon count accumulation values, generating the first photon count accumulation value. The first register then outputs this photon count accumulation value to the first generation unit 3012. The K-1 accumulation cycle process of the second accumulator A2 and the first register is as follows:

[0164] First accumulation process: The second accumulator A2 outputs the first initial photon count accumulation value to the first register, and the first register feeds back the first initial photon count accumulation value to the second accumulator A2. When the second accumulator A2 receives the second initial photon count accumulation value, it adds the second initial photon count accumulation value and the first initial photon count accumulation value to generate the first accumulation result, and the second accumulator A2 outputs the first accumulation result to the first register again.

[0165] The second accumulation process: The first register feeds back the first accumulation result to the second accumulator A2. When the second accumulator A2 receives the third initial photon count accumulation value, it adds the third initial photon count accumulation value to the first accumulation result to generate the second accumulation result. The second accumulator A2 then outputs the second accumulation result back to the first register.

[0166] The above process is executed multiple times until the (K-1)th accumulation process is entered: the first register feeds back the (K-2)th accumulation result (the accumulated value of the first to the (K-1)th initial photon count accumulation value) to the second accumulator A2. When the second accumulator A2 receives the Kth initial photon count accumulation value, the second accumulator A2 performs an addition operation on the Kth initial photon count accumulation value and the (K-2)th accumulation result to generate the (K-1)th accumulation result (the accumulated value of the first to the Kth initial photon count accumulation value), which is the first photon count accumulation value.

[0167] like Figure 6 As shown, in one specific implementation, j = 4. Each clock cycle includes four flight moments, each corresponding to a photon count P0, P1, P2, and P3. Each initial accumulation value is the sum of the four photon counts P0, P1, P2, and P3 corresponding to the four flight moments included in one clock cycle. The second accumulation unit 30111 includes three accumulators. The first accumulator is used to add P0 and P1 to obtain the sum of P0 and P1; the second accumulator is used to add P2 and P3 to obtain the sum of P2 and P3; the third accumulator is connected to the outputs of the first and second accumulators and is used to add the sums of P0 and P1 and P2 and P3 to obtain the sum of the four photon counts P0, P1, P2, and P3 corresponding to the four flight moments included in each clock cycle, i.e., the initial photon count accumulation value corresponding to each clock cycle.

[0168] It should also be noted that the data format can be set according to the data type. For example, the data format of the gain coefficient 'a' is U4.6, and the data format of the bias coefficient 'β' is U10.0; the data format of the first photon count accumulation value Sum of the ambient light received by the detection unit 101 within the first preset time period is U11.0, and the data format of the ambient light value ambl is U11.0.

[0169] Furthermore, such as Figure 4 As shown, the time-of-flight measurement device also includes a storage unit 401; the ambient light value ambl generated by the first statistical unit 301 is stored in the storage unit 401.

[0170] In some specific implementations, the ambient light value ambl is stored in the storage space at address a0 in storage unit 401.

[0171] Furthermore, the time-of-flight measurement device also includes a first limiting saturation unit (not shown). The input terminal of the first limiting saturation unit is connected to the first statistical unit 301, and the output terminal of the first limiting saturation unit is connected to the storage unit 401. The first limiting saturation unit performs limiting saturation processing on the ambient light value ambl, and the ambient light value ambl processed by the first limiting saturation unit is stored in the storage unit 401. Specifically, the ambient light value ambl after limiting saturation processing is stored in the storage space at address a0 in the storage unit 401.

[0172] The limit saturation processing is to prevent data overflow caused by excessively long photon count counting time. If the data (the first accumulated photon count) exceeds the maximum value that the required data format can store, the maximum value is used to represent this data (i.e., the first accumulated photon count). If the first accumulated photon count exceeds the minimum value that the required data format can store, the minimum value is used to represent this data (i.e., the first accumulated photon count).

[0173] Specifically, the second statistical detection unit 302 is used to statistically detect photon events within a second preset time period by the detection unit 101 and generate histogram data.

[0174] The histogram data includes Z flight times and Z corresponding count values, where Z is a positive integer greater than 1. For example... Figure 3 As shown, the second preset time period T2 includes N flight time statistical periods T. tof The light-emitting unit 601 corresponding to the detection unit 101 emits light during N flight time statistical periods T. tof The system emits N pulsed light signals at the start time. Detection unit 101 emits N pulsed light signals during the first flight time statistical period T. tof ~The Nth flight time statistical period T tofIt receives N optical signals to detect N echo optical signals. Since the light-emitting unit 601 receives the signal during the first flight time statistical period T... tof ~The Nth flight time statistical period T tof The pulsed light signal is emitted at the start time, and the detection unit 101 emits a pulsed light signal during the first flight time statistical period T. tof ~The Nth flight time statistical period T tof The received optical signals include echo optical signals and ambient light signals. Detection unit 101 receives the signals during the first flight time statistical period T. tof ~The Nth flight time statistical period T tof Photon events within the space are generated by echo light signals and ambient light signals. The count values ​​in the histogram data are used to indicate N time-of-flight statistical periods T. tof The cumulative value of the number of photons corresponding to the same flight time. Specifically, this can be achieved by statistically analyzing N flight time periods T. tof The corresponding N flight time data sets are overlaid to generate histogram data.

[0175] Furthermore, the second preset time period T2 includes N flight time statistical periods T. tof Among them, each flight time statistical period T tof Includes i clock cycles T c Each clock cycle T c The data is divided into j flight times. Correspondingly, the horizontal axis (time axis) of the histogram data includes Z = i*j flight times, and Z flight times correspond to i*j count values.

[0176] like Figure 3 As shown, the second preset time period T2 also includes N transmission time intervals T. 21 N transmission time intervals T tx Located in N flight time statistical periods T respectively tof Before the start time. The light-emitting unit 601 emits light at each emission time interval T. tx To emit light in order to achieve the first flight time statistical period T tof ~The Nth flight time statistical period T tof The system emits N pulsed light signals at the start time.

[0177] like Figure 3 As shown, tx_en is the first control signal, used to trigger the light-emitting unit 601 to emit N pulse light signals within a second preset time period T2. tof_en is the first receiving control signal, used to trigger the detection unit 102 to detect N echo light signals within the second preset time period T2. env_en is the second control signal, used to trigger the detection unit 101 to detect ambient light within a first preset time period T1.

[0178] In one specific implementation, tx_en includes N first high-level pulses Pulse1 within a single detection period, and the pulse width of each first high-level pulse Pulse1 is equal to the transmission time interval T. tx The time interval between the falling edges of two adjacent first high-level pulses Pulse1 is equal to the time-of-flight statistical period T. tof N first high-level pulses (Pulse1) are evenly distributed within a second preset time period T2, with the first first high-level pulse (Pulse1) occurring at the start time of the second preset time period T2. tx_en triggers the light-emitting unit 601 to emit N pulsed light signals through the high levels of the N first high-level pulses (Pulse1).

[0179] In one specific implementation, tof_en includes N second high-level pulse signals Pulse2 within a single detection cycle, and the pulse width of each first high-level pulse Pulse1 is equal to the time-of-flight statistical period Ttof. The rising edges of the N second high-level pulse signals Pulse2 are aligned with the falling edges of the N first high-level pulse signals Pulse1, respectively. The falling edges of the first second high-level pulse signal Pulse2 to the (N-1)th second high-level pulse signal Pulse2 are aligned with the rising edges of the second first high-level pulse signal Pulse1 to the Nth first high-level pulse signal Pulse1, respectively. tof_en triggers the receiving unit 101 to detect the echo optical signal N times through the high levels of the N second high-level pulse signals Pulse2.

[0180] In one specific implementation, env_en includes a third high-level pulse signal Pulse3 within a single detection cycle. The pulse width of the third high-level pulse signal Pulse3 is equal to the first preset time period T2. The falling edge of the third high-level pulse signal Pulse3 is aligned with the rising edge of the first high-level pulse Pulse1, meaning that the end time of the first preset time period T1 is equal to the start time of the second preset time period T2. env_en triggers the receiving unit 101 to detect ambient light signals through the high level of the third high-level pulse signal Pulse3.

[0181] Furthermore, the second statistical unit 302 generates histogram data by overlaying N flight time data sets.

[0182] Among them, N flight time data sets are used to indicate the N flight time statistical periods within the second preset time period T2 of the detection unit 101, that is, the first flight time statistical period Tt. of ~The Nth flight time statistical period T tofPhoton events within a time-of-flight (TOF) dataset. Each TOF dataset includes the various flight segments within a TOF statistical period and the corresponding photon count for each flight segment. The horizontal axis of the TOF dataset represents the various flight times within a TOF statistical period, and the vertical axis represents the photon count for each flight time. The position of the optical signal (ambient light signal or echo light signal) on the horizontal axis of the TOF dataset indicates the arrival time of the optical signal, and the value of the optical signal on the vertical axis of the TOF dataset indicates the photon count. Specifically, superimposing N TOF datasets involves aligning the N TOF datasets according to their flight times, and then accumulating the photon counts for the same flight time. That is, accumulating the N sets of photon counts corresponding to each flight time, so that each count value in the histogram data is used to indicate the accumulated photon count value corresponding to each flight time after superimposing the N TOF datasets. Further, since each TOF statistical period T... tof Includes i clock cycles T c Each clock cycle T c The data is divided into j flight times. Accordingly, each flight time dataset contains i*j flight times, with each i*j flight time corresponding to i*j photon counts. Similarly, the histogram data contains Z = i*j flight times, with Z flight times corresponding to i*j count values.

[0183] Furthermore, the histogram data generated by the second statistical unit 302 is stored in the storage unit 401.

[0184] In some specific implementations, the histogram data is stored in storage unit 401 at addresses a1 to a2. i The storage space consists of j sub-storage spaces. Specifically, the j sub-storage spaces at address a1 are used to store the j count values ​​corresponding to the j flight times in the first clock cycle, the j sub-storage spaces at address a2 are used to store the j count values ​​corresponding to the j flight times in the second clock cycle, and so on, until address a1... i The j sub-storage spaces in the storage space are used to store the j count values ​​corresponding to the j flight times in the i-th clock cycle, so that the i*j sub-storage spaces formed by the i storage spaces store the i*j count values ​​in the histogram data respectively.

[0185] like Figure 7As shown, in one specific implementation, j = 4. Each clock cycle includes four flight moments, which correspond to four photon counts P0, P1, P2, and P3, respectively. The second statistical unit 302 includes four sub-statistical units 3010 to 3013. Taking the first sub-statistical unit 3020 as an example, the first statistical unit 3020 includes an accumulator A20, a selector MUX0, a storage unit wdat0, and a readout unit rdat0; one input of the accumulator A20 is used to receive the photon count P0 corresponding to the first flight moment of each clock cycle in each flight time statistical cycle of the detection unit 101; the other input of the accumulator A20 is connected to the readout unit rdat0; the output of the accumulator A20 is connected to one input of the selector MUX0; the other input of MUX0 receives data 0; the output of the selector MUX0 is connected to the storage unit wdat0; the storage unit wdat0 is configured to be connected to the address a1 to a3 in the storage unit 401. i The first sub-storage space in the storage space is connected, and the read unit rdat0 is also configured to connect to the storage unit 401 at addresses a1 to a2. i The first sub-storage space in the storage space is connected. The superposition process of the first sub-statistical unit 3020 is as follows:

[0186] In the first flight time statistics cycle: selector MUX0, under the control of the second statistics control signal, selects the output result of accumulator A20. First, accumulator A20 receives the photon count P0 corresponding to the first flight moment of the first clock cycle in the first flight time statistics cycle and outputs it to storage unit wdat0 through selector MUX0. Storage unit wdat0, under the control of storage control signal, stores photon count P0 into the first sub-storage space of storage space at address a1. Accumulator A20 receives the photon count P0 corresponding to the first flight moment and outputs it to storage unit wdat0 through selector MUX0. Storage unit wdat0, under the control of storage control signal, stores photon count P0 into the first sub-storage space of storage space at address a2... until accumulator A20 receives the photon count P0 corresponding to the first flight moment of the i-th clock cycle and outputs it to storage unit wdat0 through selector MUX0. Storage unit wdat0, under the control of storage control signal, stores photon count P0 into the first sub-storage space of storage space at address a2... i The first sub-storage space of the storage space.

[0187] In the second flight time statistics cycle: While accumulator A20 receives the photon count P0 corresponding to the first flight moment of the first clock cycle in the second flight time statistics cycle, readout unit rdat20, under the control of the readout control signal, reads the data stored in the first sub-storage space of the storage space at address a1 (i.e., the photon count P0 corresponding to the first flight moment of the first clock cycle in the first flight time statistics cycle of the detection unit 101), and sends it to accumulator A20, so that accumulator A20 can analyze the photon count P0 of the detection unit 101 in the first flight time statistics cycle. The number of photons P0 corresponding to the first flight moment in the first clock cycle of the second flight time statistical cycle is accumulated. Accumulator A20 outputs the accumulated value to storage unit wdat0 through selector MUX0. Storage control signal controls storage unit wdat0 to store the accumulated value into the first sub-storage space of storage space at address a2... until, at the same time that accumulator A20 receives the number of photons P0 corresponding to the first flight moment in the first clock cycle of the second flight time statistical cycle, readout unit rdat0 reads out the photon at address a2 under the control of readout control signal. i The data stored in the first sub-storage space of the storage space (i.e., the number of photons P0 corresponding to the first flight moment of the i-th clock cycle of the first flight time statistical period of the first flight time) is sent to the accumulator A20 so that the accumulator A20 can accumulate the number of photons P0 corresponding to the first flight moment of the i-th clock cycle of the first and second flight time statistical periods of the detection unit 101. The accumulator A20 outputs the accumulated value to the storage unit wdat0 through the selector MUX0. The storage control signal controls the storage unit wdat0 to store the accumulated value in the address a. i The first sub-storage space of the storage space; the first sub-statistical unit 3010 completes the superposition of the number of photons P0 corresponding to the first flight moment of each clock cycle in the first flight time statistical cycle to the second flight time statistical cycle of the detection unit 101.

[0188] Next, the first-path statistical unit 3010 continues to execute the superposition operation from the 3rd to the Nth flight time statistical cycle stage to complete the Nth superposition of the photon count P0 corresponding to the first flight moment of each clock cycle in the 1st to Nth flight time statistical cycles of the detection unit 101. After the first-path statistical unit 3010 completes the Nth superposition of the photon count P0 corresponding to the first flight moment of each clock cycle in the 1st to Nth flight time statistical cycles of the detection unit 101, the selector MUX0 selects output data 0 to the storage unit wdat0 under the control of the second statistical control signal, and the first-path statistical unit 3010 stops the superposition operation.

[0189] Similarly, the second sub-statistical unit 3011 performs N superposition operations from the first flight time statistical cycle stage to the Nth flight time statistical cycle stage to complete the N superposition of the photon number P1 corresponding to the second flight moment of each clock cycle in the first flight time statistical cycle to the Nth flight time statistical cycle stage; the third sub-statistical unit 3012 performs N superposition operations from the first flight time statistical cycle stage to the Nth flight time statistical cycle stage to complete the N superposition of the photon number P1 corresponding to the second flight moment of each clock cycle in the first flight time statistical cycle to the Nth flight time statistical cycle stage. The photon count P2 corresponding to the third flight moment of the clock cycle is superimposed N times; the fourth sub-statistical unit 3013 performs N superposition actions from the first flight time statistical cycle stage to the Nth flight time statistical cycle stage to complete the N superposition of the photon count P3 corresponding to the fourth flight moment of each clock cycle in the first flight time statistical cycle to the Nth flight time statistical cycle of the detection unit 101; the basic principle of superposition of the second sub-statistical unit 3011, the third sub-statistical unit 3012 and the fourth sub-statistical unit 3013 is the same as that of the first sub-statistical unit 3010, and will not be repeated here.

[0190] In other embodiments, j can be any positive integer other than 4; correspondingly, the second statistical unit 302 includes j-path sub-statistical units. The structure and working principle of each sub-statistical unit are basically the same as those of the first sub-statistical unit 3010 described above, and will not be repeated here. This application specifies the sub-statistical unit for each clock cycle T. c The specific value of the number of flight times j included is not limited.

[0191] Specifically, the calculation unit 501 is used to subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values.

[0192] like Figure 8 As shown, storage unit 401 includes addresses a0 to a00. i The storage space is as follows. The storage space at address a0 is used to store the ambient light value ambl. The storage space at addresses a1 to a... i The storage space is used to store histogram data.

[0193] Furthermore, such as Figure 8 As shown, the computing unit 501 includes:

[0194] The acquisition and output unit 5011 is used to acquire and output ambient light values ​​and Z count values;

[0195] Subtractor 5012 is used to receive the ambient light value and Z count values, and subtract the Z count values ​​from the ambient light value to generate Z processed values.

[0196] like Figure 8 As shown, in some specific embodiments, the acquisition and output unit 5011 includes:

[0197] The first acquisition and output unit 50111 is used to acquire and output ambient light values;

[0198] The second acquisition and output unit 50112 is used to acquire Z count values ​​and output the Z count values ​​sequentially according to the flight time order.

[0199] Specifically, Z count values ​​are output sequentially according to flight time, based on a statistical period T for each flight time. tof The system outputs the Z count values ​​corresponding to each of the Z flight times (i*j times, i.e., Z flight times) in sequence.

[0200] Furthermore, obtain Z count values, and output the Z count values ​​sequentially according to the flight time order in each flight time statistics period, including:

[0201] The i sets of count values ​​corresponding to i clock cycles are obtained sequentially according to the clock cycle order. Each set of count values ​​includes j count values ​​corresponding to j flight times included in one clock cycle.

[0202] Output the j count values ​​corresponding to the j flight times in each clock cycle in the order of flight times.

[0203] Specifically, the count values ​​corresponding to i clock cycles are obtained sequentially according to the clock cycle order, and then calculated for each flight time statistical period T. tof In the process, the i sets of count values ​​corresponding to the i clock cycles stored in the storage unit 401 are sequentially obtained in the order of i clock cycles.

[0204] Specifically, according to the flight time sequence, the j count values ​​corresponding to each of the j flight times included in each clock cycle are output sequentially. After obtaining the j count values ​​included in each group of count values, the j count values ​​are output sequentially according to the flight time sequence in each clock cycle.

[0205] In one specific implementation, the second acquisition and output unit 50112 may employ a shift register. The shift register is configured to sequentially acquire i sets of count values ​​corresponding to i clock cycles stored in the storage unit 401, according to the clock cycle order within the flight time statistics period. Each set of count values ​​includes j count values ​​corresponding to j flight moments within one clock cycle. The shift register is used to shift and output multiple received parallel data, so that the j count values ​​included in each acquired set are output sequentially according to the flight moment order within the clock cycle. For example, when the shift register acquires the first set of count values ​​corresponding to the first clock cycle stored in the storage unit 401, i.e., the j count values ​​corresponding to the j flight moments within the first clock cycle, the shift register shifts and outputs the j count values ​​according to the flight moment order within the clock cycle, so that the j count values ​​included in the first set of count values ​​are output sequentially according to the flight moment order within the clock cycle. When the shift register obtains the second set of count values ​​corresponding to the second clock cycle stored in the storage unit 401, that is, the j count values ​​corresponding to each of the j flight times included in the second clock cycle, the shift register shifts and outputs the j count values ​​according to the flight time order in the clock cycle, so as to output the j count values ​​included in the second set of count values ​​sequentially according to the flight time order in the clock cycle... When the shift register obtains the i-th set of count values ​​corresponding to the i-th clock cycle stored in the storage unit 401, that is, the j count values ​​corresponding to each of the j flight times included in the i-th clock cycle, the shift register shifts and outputs the j count values ​​according to the flight time order in the clock cycle, so as to output the j count values ​​included in the i-th set of count values ​​sequentially according to the flight time order in the clock cycle. Through the above i shift outputs, the shift register can obtain Z count values ​​and output Z count values ​​sequentially according to the flight time order in each flight time statistical cycle.

[0206] like Figure 8As shown, the j count values ​​corresponding to the j flight times included in each clock cycle are hist_dat0, hist_dat1, ..., hist_dat(j-1). After the second acquisition and output unit 50112 acquires the j count values ​​hist_dat0, hist_dat1, ..., hist_dat(j-1) corresponding to each clock cycle, it shifts and outputs the j count values ​​hist_dat0, hist_dat1, ..., hist_dat(j-1) according to the flight time order, so that the subtractor 5012 can perform subtraction operations between the j count values ​​hist_dat0, hist_dat1, ..., hist_dat(j-1) and the ambient light value ambl in the flight time order to obtain j processing values ​​corresponding to the j count values ​​hist_dat0, hist_dat1, ..., hist_dat(j-1).

[0207] Specifically, the i sets of count values ​​corresponding to i clock cycles are stored in memory unit 401 at addresses a1 to a2. i In the memory space. The shift register is configured to point sequentially to addresses a1 to a2 according to the clock cycle order in each flight time statistics cycle. i To retrieve addresses a1 to a2 from the memory unit according to the clock cycle in each flight time statistical cycle. i The storage space contains i sets of count values.

[0208] Specifically, the ambient light value ambl is stored in the storage space at address a0 of the storage unit 401. The first acquisition and output unit 50111 acquires the ambient light value from the storage space at address a0 in the storage unit and outputs the acquired ambient light value ambl.

[0209] Furthermore, when the first acquisition and output unit 50111 outputs the ambient light value, the output time of the ambient light value covers the output time of the Z count values, which facilitates the subtraction operation between each count value and the ambient light value.

[0210] Specifically, the output time of Z count values ​​can be determined during the design phase. For example, the output time range of Z count values ​​can be preset to t. 21 ~t 22 By setting the acquisition time of ambient light values, the output time range of ambient light values ​​is made t. 11 ~t 12 , where t 11 <t 21 , t 12 >t 22This allows the output time of the ambient light value to cover the output time of Z count values, thus facilitating the subtraction operation between each count value and the ambient light value.

[0211] In some specific implementations, the subtractor 5012 receives the ambient light value and Z count values, and performs subtraction operations between the Z count values ​​and the ambient light value to generate Z processed values.

[0212] Furthermore, the flight time measuring device also includes a second limit saturation unit (not shown). The input end of the second limit saturation unit is connected to the output end of the calculation unit 501, and the output end is connected to the input end of the determination unit 502. It is used to perform limit saturation processing on Z processing values ​​and output the Z processing values ​​after limit saturation processing to the determination unit 502.

[0213] The limit saturation processing is to prevent data (i.e., processed value) overflow due to excessively long photon count time. If the data exceeds the maximum value that the required data format can store, the maximum value is used to represent the data; if the data exceeds the minimum value that the required data format can store, the minimum value is used to represent the data.

[0214] Specifically, the determining unit 502 is used to determine the flight time based on Z processing values.

[0215] In some specific embodiments, the determining unit 502 determines the flight time of the obstacle based on the time corresponding to the peak position among the Z processed values. When the flight time measuring device includes a second limit saturation unit, the determining unit 502 determines the flight time of the obstacle based on the time corresponding to the peak position among the Z processed values ​​after limit saturation processing.

[0216] The flight time measurement device provided in this application embodiment generates ambient light values ​​by statistically analyzing photon events within a first preset time period using a first statistical unit 301 and a second statistical unit 302, and generates histogram data by statistically analyzing photon events within a second preset time period using a second statistical unit 302. Then, it subtracts the ambient light values ​​from multiple count values ​​in the histogram data to obtain multiple processed values. The flight time of the obstacle is determined based on the time corresponding to the peak position among the multiple processed values. This allows the count value of the echo light signal in the histogram data to remain essentially unchanged, while the count value of the ambient light signal is attenuated, improving the signal-to-noise ratio of the detection unit 101, facilitating the identification of the correct peak position, and effectively improving the accuracy of the detection unit 101 in measuring flight time.

[0217] Furthermore, the aforementioned time-of-flight measurement device also includes a transmitter 60, a detector 10, a sampling module 20, and a storage module 40. The transmitter includes a light-emitting unit 601 for emitting light signals. The detector 10 includes a detection unit 101 for receiving light signals and converting the received light signals into electrical signals. The sampling module includes a sampling unit 201 for generating time-of-flight data based on the electrical signals converted by the detection unit 101. The time-of-flight data is used to indicate the flight time and the number of photons corresponding to the flight time. The storage module 40 includes the aforementioned storage unit 401 for storing ambient light values ​​and histogram data.

[0218] Figure 9 A schematic diagram of the structure of a laser ranging device provided in one embodiment of this application is shown.

[0219] like Figure 9 As shown, the laser ranging device may include: a transmitter 60, a detector 10, a processor 910, a communication interface 920, a memory 930, and a communication bus 940. The transmitter 60 includes one or more light-emitting units 601 for emitting pulsed light signals. The detector 10 includes one or more detection units 101 for receiving light signals. Each light-emitting unit 601 corresponds to one or more detection units 101. The processor 910, communication interface 920, and memory 930 communicate with each other via the communication bus 940. The communication interface 920 is used to communicate with other devices, such as clients or other server network elements. The memory 930 stores computer programs or instructions 903 that implement the various modules of the above method embodiments (i.e., time-of-flight measurement method) or device embodiments (i.e., time-of-flight testing device). The processor 910 is connected to the transmitter 60 and detector 10 via the communication interface 920 and is used to call the computer program or instructions 903 to execute the operations of the above method embodiments, for example... Figure 2 S11 to S14 are shown.

[0220] The laser ranging device provided in this application generates a point cloud map based on the flight time determined by the above-described method or device embodiments. By processing the point cloud map, parameters such as the distance, orientation, height, speed, attitude, and shape of obstacles are obtained, thereby realizing the laser detection function. It can then be applied to navigation and avoidance, obstacle recognition, ranging, speed measurement, and autonomous driving scenarios of products such as automobiles, robots, logistics vehicles, and inspection vehicles.

[0221] Specifically, in some embodiments, the emitter 60 includes a light-emitting unit 601. In this case, the emitter 60 can be a vertical-cavity surface-emitting laser (VCSEL), an edge-emitting laser (EEL), a light-emitting diode (LED), a micro light-emitting diode (Micro LED), a pulsed laser deposition (PLD), or a laser diode (LD), etc. This application does not limit the type of emitter 60.

[0222] In some other embodiments, the emitter 60 includes a plurality of light-emitting units 601; the plurality of light-emitting units 601 can be arranged in an array, that is, the emitter 60 can be a laser array. In this case, the emitter 60 can be a vertical-cavity surface-emitting laser (VCSEL) array, an edge-emitting laser (EEL) array, a light-emitting diode (LED) array, a micro light-emitting diode (Micro LED) array, a pulsed laser deposition (PLD) array, or a laser diode (LD) array, etc. This application does not limit the type of emitter 60.

[0223] In some embodiments, detector 10 includes a detection unit 101. In this case, detector 10 can be a single-photon avalanche diode (SPAD) or a silicon photomultiplier (SIPM), and this application does not limit the type of detector 10. In other embodiments, detector 10 includes multiple detection units 101 arranged in an array, i.e., detector 10 can be a detector array. In this case, detector 10 can be a single-photon avalanche diode (SPAD) array or a silicon photomultiplier (SIPM) array, and this application does not limit the type of detector 10.

[0224] Furthermore, when the transmitter 60 includes multiple light-emitting units 601, the multiple light-emitting units 601 can emit light sequentially to scan and transmit pulsed light signals to the detection area to scan obstacles within the detection area. Correspondingly, the detection unit 101 in the detector 10 is used to detect the echo light signals reflected by obstacles located within the detection area.

[0225] Specifically, the processor 910 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0226] The memory 930 can be an internal storage unit of the laser rangefinder, such as the hard drive or RAM of the laser rangefinder. The memory 930 can also be an external storage device of the laser rangefinder, such as a plug-in hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the laser rangefinder. Furthermore, the memory 930 can include both internal and external storage units of the laser rangefinder. The memory 930 is used to store the computer program and other programs and data required by the terminal device. The memory 930 can also be used to temporarily store data that has been output or will be output.

[0227] This application also provides a computer-readable storage medium. The computer-readable storage medium stores at least one executable instruction, which, when executed by a processor, implements the above-described time-of-flight measurement method.

[0228] This application provides a computer program product that, when run on a laser ranging device, enables the laser ranging device to perform the aforementioned time-of-flight measurement method.

[0229] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the functions described above can be assigned to different functional units and modules as needed, that is, the internal structure of the terminal device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the above embodiments, the descriptions of each embodiment have different focuses; parts not described or recorded in detail in a certain embodiment can be referred to the relevant descriptions of other embodiments.

[0230] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0231] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for measuring time of flight, characterized in that, include: The statistical detection unit generates ambient light values ​​based on photon events within a first preset time period. The statistical detection unit generates histogram data for photon events within a second preset time period; wherein, the histogram data includes Z flight times and Z count values ​​corresponding to each of the Z flight times, where Z is a positive integer greater than 1; Subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values; Flight time is determined based on Z processing values; Wherein, the first preset time period and the second preset time period are located within a single detection cycle; during the first preset time period, the light-emitting unit corresponding to the detection unit does not emit pulse light signals; during the second preset time period, the light-emitting unit corresponding to the detection unit emits N pulse light signals, where N is a positive integer greater than 1; The statistical detection unit generates ambient light values ​​based on photon events within a first preset time period, including: The number of photons received by the detection unit within the first preset time period is summed to generate a first photon count summation value; The ambient light value is generated based on the first accumulated photon count; the formula for calculating the ambient light value is: ambl=β+α Sum; Where Sum is the accumulated value of the first photon count; α is the gain coefficient, α is a real number, and α<1 or α>1; β is the offset coefficient, and β is a real number.

2. The flight time measurement method according to claim 1, characterized in that, The gain coefficient α is set using the following formula: α=N [1 / (T1 / t0)]; Wherein, T1 is the first preset time period; t0=T c / j; T c Let j be the clock cycle, and j be the number of flight times included in each clock cycle.

3. The flight time measurement method according to claim 1, characterized in that: The first preset time period includes K clock cycles; the number of photons received by the detection unit within the first preset time period is accumulated to generate a first photon count accumulation value, including: The number of photons of the detection unit in each clock cycle of the first preset time period is accumulated sequentially according to the clock cycle, and K initial photon count accumulation values ​​are generated sequentially. The first photon count accumulation value is generated by summing the K initial photon count accumulation values; the first photon count accumulation value satisfies: ; Where K is a positive integer greater than 1; the accumulated value of each initial photon count is the accumulated value of the number of photons received by the detection unit in one clock cycle; k is a positive integer, and 1≤k≤K. This is the cumulative value of the number of photons received by the detection unit during the k-th clock cycle of the first preset time period.

4. The flight time measurement method according to claim 1, characterized in that, After generating ambient light values ​​from photon events within a first preset time period, the statistical detection unit further includes: The ambient light value is stored in the storage unit.

5. The flight time measurement method according to claim 1, characterized in that, The statistical detection unit generates histogram data of photon events within a second preset time period, including: Overlay N sets of flight time data to generate histogram data; The second preset time period includes N flight time statistical cycles, and each flight time data set is used to indicate the photon events of the detection unit within one flight time statistical cycle.

6. The flight time measurement method according to claim 5, characterized in that, After generating histogram data for photon events within a second preset time period, the statistical detection unit further includes: The histogram data is stored in the storage unit.

7. The flight time measurement method according to claim 1, characterized in that, The step of subtracting the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values ​​includes: Acquire and output the ambient light value and Z count values; The system receives the ambient light value and Z count values, and subtracts the ambient light value from each of the Z count values ​​to generate the Z processed values.

8. The flight time measurement method according to claim 7, characterized in that, The acquisition and output of ambient light values ​​and Z count values ​​include: Obtain Z count values ​​and output the Z count values ​​sequentially according to the flight time order; Acquire and output the ambient light value.

9. The flight time measurement method according to claim 8, characterized in that, The process of acquiring Z count values ​​and outputting them sequentially according to flight time order includes: The i sets of count values ​​corresponding to i clock cycles are obtained sequentially according to the clock cycle order. Each set of count values ​​includes j count values ​​corresponding to j flight times included in one clock cycle. Output the j count values ​​corresponding to the j flight times in each clock cycle in the order of flight times.

10. The time-of-flight measurement method according to claim 1, characterized in that, After subtracting the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values, the process further includes: The Z processing values ​​are subjected to limit saturation processing.

11. A time-of-flight measuring device, characterized in that, The flight time measurement method according to any one of claims 1 to 10 is employed; the flight time measurement device comprises: The first statistical unit is used to count the photon events of the detection unit within a first preset time period and generate ambient light values. The second statistical unit is used to count the photon events of the detection unit within a second preset time period and generate histogram data; wherein, the histogram data includes Z flight times and Z count values ​​corresponding to each of the Z flight times, where Z is a positive integer greater than 1; A calculation unit is used to subtract the ambient light value from each of the Z count values ​​to generate Z processing values ​​corresponding to each of the Z count values. A determination unit is used to determine the flight time based on Z processed values; Wherein, the first preset time period and the second preset time period are located within a single detection cycle; during the first preset time period, the light-emitting unit corresponding to the detection unit does not emit pulse light signals; during the second preset time period, the light-emitting unit corresponding to the detection unit emits N pulse light signals, where N is a positive integer greater than 1; The first statistical unit includes: The first accumulation unit is used to accumulate the number of photons received by the detection unit within the first preset time period and generate a first photon count accumulation value. The first generation unit is used to generate the ambient light value based on the first accumulated photon count; the formula for calculating the ambient light value is: ambl=β+α Sum; Where Sum is the accumulated value of the first photon count; α is the gain coefficient, α is a real number, and α<1 or α>1; β is the offset coefficient, and β is a real number.

12. The time-of-flight measuring device according to claim 11, characterized in that, Also includes: The transmitter includes one or more light-emitting units; the light-emitting units are used to emit pulsed light signals; A detector, comprising one or more detection units; The detection unit is used to receive optical signals; Each of the light-emitting units corresponds to one or more of the detection units.

13. A laser ranging device, characterized in that, include: Transmitter, detector, processor, communication interface, memory, and communication bus; The processor communicates with the transmitter and the detector through the communication interface; The processor, communication interface, and memory communicate with each other through the communication bus; The transmitter includes one or more light-emitting units for emitting pulsed light signals; The detector includes one or more detection units for receiving optical signals; The memory is used to store computer programs or instructions; The processor is used to execute computer programs or instructions in the memory to implement the method as described in any one of claims 1 to 10.

14. A computer-readable storage medium storing at least one executable instruction that, when executed by a processor, implements the method as claimed in any one of claims 1-10.

Citation Information

Patent Citations

  • Optical sensor and electronic device

    CN109196377A