TOF sensor device distance measuring method and device, storage medium and electronic equipment

By emitting short pulse and continuous wave light signals using a TOF sensor device, and combining pulse and phase ranging methods, the problem of balancing high resolution and wide range in a single cycle of TOF ranging technology is solved, achieving high-precision ranging results.

CN120972191APending Publication Date: 2025-11-18JUYOU INTELLIGENT TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511073432.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing TOF ranging technology struggles to achieve both high resolution and wide range in a single ranging cycle. CW modulation is limited by unambiguous distance and multi-cycle confusion, while PTOF is limited by safety standards and ambient light interference.

Method used

The modulated light source in the TOF sensor device emits short-pulse light signals and continuous-wave light signals. The light intensity values ​​are detected by multiple receivers, and the pulse and phase ranging results are calculated. The final distance is calculated by combining the phase difference and the number of modulation cycles.

Benefits of technology

It achieves both sub-millimeter high resolution and tens of meters range in a single ranging cycle, improving the accuracy and stability of ranging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120972191A_ABST
    Figure CN120972191A_ABST
Patent Text Reader

Abstract

The invention discloses a distance measuring method and device for a TOF sensor device, a storage medium and electronic equipment, and the method comprises the steps: transmitting a short-pulse optical signal according to a preset pulse width and duty ratio through a modulated light source in the TOF sensor device; after the short pulse optical signal is transmitted, a plurality of receivers of the TOF sensor device respectively detect a first light intensity value of a returned pulse, and a pulse distance measurement result is calculated according to the first light intensity value; emitting a continuous wave optical signal according to a preset continuous wave modulation frequency by using a modulatable light source, and sequentially collecting and receiving second light intensity values at four preset equally-divided phase points; obtaining a phase distance measurement result based on the phase difference between the second light intensity values; and calculating a final measurement distance according to a phase distance measurement result and a pulse distance measurement result. According to the embodiment of the invention, high resolution and wide range can be considered in a single ranging period.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of TOF ranging, and in particular to a TOF sensor device ranging method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the increasing demand for high-precision, long-range, and high-frame-rate ranging in applications such as intelligent driving, industrial automation, robot navigation, augmented reality (AR) / virtual reality (VR), etc., time-of-flight (TOF) sensor technology has attracted widespread attention due to its fast ranging speed and ability to achieve two-dimensional / three-dimensional imaging. Currently, there are two main implementation methods for TOF ranging: continuous wave (CW) modulation and pulsed TOF (PTOF).

[0003] The current mainstream CW modulation method can achieve sub-millimeter resolution by measuring the phase difference of light waves, but its unambiguous distance is only half the modulation wavelength, which is easily limited by multi-cycle confusion; the PTOF method can obtain a range of tens of meters or even further by measuring the flight time of light pulses, but it is limited by the peak power under safety standards and environmental light and multipath reflection interference, and its ranging accuracy fluctuates.

[0004] Therefore, how to balance high resolution and wide range in a single ranging period is a problem that needs to be solved by those skilled in the art. SUMMARY

[0005] Embodiments of the present application provide a TOF sensor device ranging method, device, storage medium and electronic device, which can balance high resolution and wide range in a single ranging period.

[0006] In a first aspect, embodiments of the present application provide a TOF sensor device ranging method, comprising:

[0007] emitting a short pulse light signal according to a preset pulse width and duty cycle using a modulable light source in the TOF sensor device;

[0008] After emitting the short pulse light signal, detecting a first light intensity value of the returned pulse by a plurality of receivers of the TOF sensor device, and calculating a pulse ranging result according to the first light intensity value;

[0009] emitting a continuous wave light signal according to a preset continuous wave modulation frequency using the modulable light source, and sequentially collecting a second light intensity value at four equally divided phase points;

[0010] obtaining a phase ranging result based on the phase difference between the second light intensity values;

[0011] The final measured distance is calculated according to the phase ranging result and the pulse ranging result.

[0012] In the TOF sensor ranging method provided in the embodiments of the present application, the phase ranging result is obtained based on the phase difference between the second light intensity values, and the phase ranging result comprises:

[0013] The four second light intensity values are sent to a phase calculation module;

[0014] In the phase calculation module, a phase operation relationship is constructed according to the difference between the four second light intensity values, so as to obtain the phase difference.

[0015] The phase difference is combined with a preset continuous wave modulation frequency, and a phase ranging result is converted.

[0016] In the TOF sensor ranging method provided in the embodiments of the present application, the second light intensity values comprise a first light intensity, a second light intensity, a third light intensity and a fourth light intensity.

[0017] In the phase calculation module, a phase operation relationship is constructed according to the difference between the four second light intensity values, and the sensitivity deviation of each sampling channel is eliminated, so as to obtain the phase difference, and the phase ranging result comprises:

[0018] The difference between the first light intensity and the third light intensity is taken as a first difference value;

[0019] The difference between the fourth light intensity and the second light intensity is taken as a second difference value;

[0020] In the phase calculation module, the first difference value and the second difference value are taken as inputs, and an inverse tangent operation is used to obtain the phase difference.

[0021] In the TOF sensor ranging method provided in the embodiments of the present application, the final measured distance is calculated according to the phase ranging result and the pulse ranging result, and the calculation comprises:

[0022] The phase period number is calculated according to the difference between the pulse ranging result and the distance corresponding to the modulation period;

[0023] The final measured distance is calculated according to the phase period number and the phase ranging result.

[0024] In the TOF sensor ranging method provided in the embodiments of the present application, the phase period number is calculated according to the ratio of the pulse ranging result to the distance corresponding to the modulation period, and the calculation comprises:

[0025] The difference between the pulse ranging result and the distance corresponding to the modulation period is obtained;

[0026] The difference value interval in which the difference value is located is determined.

[0027] determining a phase period number according to the difference interval.

[0028] In the TOF sensor device ranging method provided in the embodiments of the present application, the final measurement distance is calculated according to the phase period number and the phase ranging result, comprising:

[0029] multiplying the phase period number and the corresponding distance of the modulation period to obtain a period distance;

[0030] adding the period distance and the phase ranging result to obtain the final measurement distance.

[0031] In the TOF sensor device ranging method provided in the embodiments of the present application, further comprising:

[0032] filtering or temperature drift calibration is performed on the final measurement distance.

[0033] In a second aspect, the embodiments of the present application provide a TOF sensor device ranging device, comprising:

[0034] a first transmitting unit configured to transmit a short pulse light signal according to a preset pulse width and duty cycle by using a modulatable light source in a TOF sensor device;

[0035] a pulse acquisition unit configured to detect first light intensity values of returned pulses by using a plurality of receivers of the TOF sensor device after the short pulse light signal is transmitted, and calculate a pulse ranging result according to the first light intensity values;

[0036] a second transmitting unit configured to transmit a continuous wave light signal according to a preset continuous wave modulation frequency by using the modulatable light source, and sequentially collect second light intensity values at four equally divided phase points;

[0037] a phase acquisition unit configured to acquire a phase ranging result based on phase differences between the second light intensity values;

[0038] a distance calculation unit configured to calculate a final measurement distance according to the phase ranging result and the pulse ranging result.

[0039] In a third aspect, the present application provides a storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute the TOF sensor device ranging method of any one of the above aspects.

[0040] In a fourth aspect, the present application provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the TOF sensor device ranging method of any one of the above aspects when executing the computer program.

[0041] In summary, the TOF sensor device ranging method provided by the embodiments of the present application comprises: using a modulatable light source in the TOF sensor device to emit a short pulse light signal according to a preset pulse width and duty cycle; after the short pulse light signal is emitted, a first light intensity value of a return pulse is detected by a plurality of receivers of the TOF sensor device respectively, and a pulse ranging result is calculated according to the first light intensity value; using the modulatable light source to emit a continuous wave light signal according to a preset continuous wave modulation frequency, and sequentially collecting a second light intensity value at four equally divided phase points; obtaining a phase ranging result based on the phase difference between the second light intensity values; and calculating a final measurement distance according to the phase ranging result and the pulse ranging result. The embodiments of the present application synchronously emit a short pulse light signal and a continuous wave light signal in the same ranging period, and at the same time of obtaining a high-resolution phase internal distance, a large-range unambiguous measurement is realized by using a pulse time of flight, so as to realize the organic combination of sub-millimeter level precision and tens of meters range. That is, the embodiments of the present application can take into account high resolution and wide range in a single ranging period. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0043] Figure 1 FIG. 1 is an application scenario diagram of the TOF sensor device ranging method provided by the embodiments of the present application.

[0044] Figure 2 FIG. 2 is a flow diagram of the TOF sensor device ranging method provided by the embodiments of the present application.

[0045] Figure 3 FIG. 3 is a structural diagram of the TOF sensor device ranging device provided by the embodiments of the present application.

[0046] Figure 4 FIG. 4 is a structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0047] The exemplary embodiments will be described in detail herein with reference to the drawings. Unless otherwise indicated, the same numbers on the different drawings represent and / or indicate the same or similar elements. The following detailed description does not restrict the application to all of the embodiments described. Instead, it is intended to provide an example of apparatus and methods in accordance with some aspects of the application as detailed elsewhere in the instant specification.

[0048] It should be noted that the terms "comprising", "including", or any other variant are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can include other elements not expressly listed or inherent to such processes, methods, articles, or apparatuses. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the element. In different embodiments of the present application, components, features, elements with the same name can have the same meaning or different meanings, and the specific meaning thereof should be determined according to its explanation in the specific embodiment or further combined with the context in the specific embodiment.

[0049] It should be understood that the specific embodiments described herein are merely intended to explain the present application and are not intended to limit the present application.

[0050] In the following description, the suffixes used for elements such as "module", "part", or "unit" are used only to facilitate explanation of the present application, and have no specific meaning by themselves. Therefore, "module", "part", or "unit" can be used interchangeably.

[0051] In the description of the present application, it should be noted that the terms "upper", "lower", "left", "right", "inner", "outer", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", and the like are only for the purpose of description and cannot be understood as indicating or implying relative importance.

[0052] The current mainstream CW modulation method can achieve sub-millimeter resolution by measuring the phase difference of light waves, but its unambiguous distance is only half the modulation wavelength, which is easily limited by multi-period confusion; the PTOF method can obtain a range of tens of meters or even farther by measuring the flight time of light pulses, but it is limited by the peak power under safety standards and the interference of ambient light and multipath reflection, and its ranging accuracy fluctuates.

[0053] Therefore, how to balance high resolution and wide range in a single ranging period is a problem that those skilled in the art need to solve.

[0054] Based on this, the embodiment of the present application provides a TOF sensor device ranging method, device, storage medium and electronic equipment. Specifically, the TOF sensor device ranging device can be integrated in an electronic equipment, which can be a server or a terminal and the like. The terminal can include a mobile phone, a wearable smart device, a tablet computer, a notebook computer, a personal computer (PC) and the like. The server can be a single server or a server cluster composed of multiple servers, which can be a physical server or a virtual server.

[0055] For example, as shown in Figure 1 The electronic equipment can emit a short pulse light signal by using a modulable light source in the TOF sensor device according to a preset pulse width and duty cycle. The time interval from emission to reception of the short pulse light signal is measured by a time-to-digital converter to obtain a pulse ranging result. The modulable light source is used to emit a continuous wave light signal according to a preset continuous wave modulation frequency, and the received second light intensity values are sequentially collected at the preset four equal phase points. The phase difference between the second light intensity values is used to obtain a phase ranging result. The final measurement distance is calculated according to the phase ranging result and the pulse ranging result.

[0056] The technical solutions shown in the present application will be described in detail below through specific embodiments. It should be noted that the description order of the following embodiments is not limited to the priority order of the embodiments.

[0057] Please refer to Figure 2 , Figure 2 is a flowchart of a TOF sensor device ranging method provided by the embodiment of the present application. The specific process of the TOF sensor device ranging method can be as follows:

[0058] 101. Emit a short pulse light signal by using a modulable light source in the TOF sensor device according to a preset pulse width and duty cycle.

[0059] The modulable light source can be a fast modulable semiconductor laser diode (LD) or a laser emitting tube (VCSEL). Because the on / off time of LD and VCSEL is less than nanosecond level, the pulse width requirement can be met.

[0060] The pulse width can be controlled by a pulse signal generated by a timing module in the FPGA / MCU. The typical range of the pulse width is 5ns-50ns, which can be configured by register programming.

[0061] The duty cycle is determined by the pulse period and the pulse width, and the duty cycle is generally set to be less than 20%.

[0062] 102、In the short pulse light signal is transmitted, the first light intensity value of the return pulse is detected by the plurality of receivers of the TOF sensor device respectively, and the pulse ranging result is calculated according to the first light intensity value.

[0063] For example, after the short pulse light signal is transmitted, the integral channels of the receivers can be opened in turn in three equal time gate periods G1, G2, G3 (the time interval is t) by the plurality of receivers of the TOF sensor device, and the return pulse is integrated and sampled to obtain three integral light intensity values Q1, Q2, Q3; the three light intensity values (first light intensity values) can reflect the energy distribution of the return pulse in three different time windows.

[0064] Based on the collected Q1, Q2, Q3, the pulse ranging result can be calculated as follows:

[0065]

[0066] Wherein, t is the time interval of adjacent two gate periods; c is the speed of light.

[0067] It can be understood that after the short pulse light signal is transmitted, the light intensity values are collected by the plurality of receivers of the TOF sensor device in the gate periods Q1, Q2, Q3, wherein Q1 does not receive effective return pulse, mainly receives noise (such as dark noise and ambient light noise), and therefore Q1 is used for noise signal processing; and Q2 and Q3 receive effective return pulse respectively, and the light intensity values Q2 and Q3 are used for calculating the pulse ranging result. Due to the influence of noise, the proportional value should always be positive to avoid error and negative value interference. This way ensures that only the effective light intensity values of Q2 and Q3 participate in the calculation, and Q1 is excluded as a noise source, thereby improving the accuracy and stability of the measurement.

[0068] This embodiment only relies on the light intensity integral ratio, without complex time-to-digital converter (TDC), and the hardware implementation is simpler and the cost is lower; and the gate integration can filter out the direct current ambient light interference, and the ratio operation is not sensitive to the intensity fluctuation of the light source; the single pulse can complete the ranging, which is suitable for high-speed measurement scene.

[0069] 103、Utilize the modulatable light source to emit continuous wave light signals according to a preset continuous wave modulation frequency, and collect the second light intensity values at the preset four equal phase points in turn.

[0070] Specifically, the modulatable light source can be switched to the CW mode, and the FPGA / MCU outputs a sine wave or square wave driving signal.

[0071] In one modulation period, the modulatable light source can be equally divided into four phase points: 0, π / 2, π, 3π / 2. Upon reaching each preset phase point, the ADC can read the current received second light intensity value I n (first light intensity I1, second light intensity I2, third light intensity I3, fourth light intensity I4).

[0072] 104. Obtain a phase ranging result based on the phase difference between the second light intensity values.

[0073] Specifically, the four sampling obtained second light intensity values can be sent to a phase calculation module; in the phase calculation module, a phase operation relationship is constructed according to the difference between the four second light intensity values, and the sensitivity deviation of each sampling channel is eliminated to obtain a phase difference; the phase difference is combined with a preset continuous wave modulation frequency to convert to obtain a phase ranging result.

[0074] For example, each sampling channel can measure its own gain / bias coefficient K 1- K4 at the factory or system calibration. Then, the real-time second light intensity value I n is divided by the corresponding coefficient K n , and the compensated light intensity value is obtained.

[0075] In some embodiments, the C language or hardware IP core can be called in the phase calculation module to complete the arctangent operation, so as to obtain the phase difference where ΔI 42 is the second difference, and ΔI 13 is the first difference.

[0076] Then, the phase difference can be combined with a preset continuous wave modulation frequency f mod to convert to obtain a phase ranging result D cw . As follows:

[0077]

[0078] That is, in some embodiments, the first light intensity, the second light intensity, the third light intensity and the fourth light intensity can be compensated according to the pre-measured sensitivity coefficients of the respective sampling channels, respectively, to eliminate the channel gain difference; the difference between the first light intensity and the third light intensity is taken as a first difference; the difference between the fourth light intensity and the second light intensity is taken as a second difference; in the phase calculation module, the first difference and the second difference are taken as inputs, and the phase difference is obtained by using the arctangent operation.

[0079] 105. Calculate the final measurement distance according to the phase ranging result and the pulse ranging result.

[0080] In some embodiments, the number of phase periods can be calculated according to the difference between the pulse ranging result and the modulation period corresponding distance; and the final measured distance can be calculated according to the number of phase periods and the phase ranging result.

[0081] The modulation period corresponding distance refers to the round-trip optical path length corresponding to one complete modulation period (phase change of 2π) in continuous wave TOF ranging, also known as single period unambiguous distance. The modulation period corresponding distance L can be as follows: L = c / (2f mod ).

[0082] In the embodiment, the pulse ranging result can be obtained by using the pulse mode first, and then the modulation period corresponding distance can be obtained by using the continuous wave mode. Then, the difference between the two is compared with a plurality of difference value intervals defined in advance one by one to determine the difference value interval into which the difference falls. Finally, the phase period number corresponding to the difference value interval can be obtained through the mapping table.

[0083] That is, the difference between the pulse ranging result and the modulation period corresponding distance can be obtained; the difference value interval in which the difference falls can be determined; and the number of phase periods can be determined according to the difference value interval.

[0084] The mapping table is preformed, a series of known distance points are measured and sampled, the difference value interval corresponding to each distance is corresponded to the number of phase periods one by one, and thus the mapping table is formed.

[0085] The step of calculating the final measured distance according to the number of phase periods and the phase ranging result can be that the number of phase periods is multiplied by the modulation period corresponding distance to obtain a period distance; and the period distance is added to the phase ranging result to obtain the final measured distance.

[0086] In some embodiments, the final measured distance can also be filtered or temperature drift calibrated to improve the ranging accuracy and stability.

[0087] It should be noted that the embodiments of the present application can support dynamic switching of single PTOF, single CW or dual-mode fusion mode according to the actual ranging scene, and the pulse parameters and modulation frequency can be flexibly adjusted through software configuration to be compatible with various application requirements.

[0088] In summary, the TOF sensor device ranging method provided by the embodiments of the present application comprises: using a modulable light source in the TOF sensor device to emit a short pulse light signal according to a preset pulse width and duty cycle; after the short pulse light signal is emitted, a plurality of receivers of the TOF sensor device detect first light intensity values of returned pulses respectively, and calculate a pulse ranging result according to the first light intensity values; using the modulable light source to emit a continuous wave light signal according to a preset continuous wave modulation frequency, and sequentially collecting second light intensity values at preset four equal phase points; obtaining a phase ranging result based on phase differences between the second light intensity values; and calculating a final measurement distance according to the phase ranging result and the pulse ranging result. The scheme combines short pulse time of flight and continuous wave phase ranging dual modes, and realizes the consideration of both large range ranging and sub-millimeter level high resolution measurement: the short pulse ranging is responsible for determining a rough distance of a target, covering a range of tens of meters, and the phase ranging provides high-precision distance subdivision in a single period, so that the system can adapt to long distance scenes and meet the needs of high precision in close distance.

[0089] To better implement the TOF sensor device ranging method provided by the embodiments of the present application, the embodiments of the present application further provide a TOF sensor device ranging device. The meanings of the terms are the same as those in the above TOF sensor device ranging method, and specific implementation details can be referred to the description in the method embodiment.

[0090] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of the TOF sensor device ranging device provided by the embodiments of the present application. The TOF sensor device ranging device can comprise a first emitting unit 201, a pulse obtaining unit 202, a second emitting unit 203, a phase obtaining unit 204 and a distance calculating unit 205. Among them,

[0091] The first emitting unit 201 is configured to use a modulable light source in the TOF sensor device to emit a short pulse light signal according to a preset pulse width and duty cycle.

[0092] The pulse obtaining unit 202 is configured to, after the short pulse light signal is emitted, detect first light intensity values of returned pulses respectively through a plurality of receivers of the TOF sensor device, and calculate a pulse ranging result according to the first light intensity values.

[0093] The second emitting unit 203 is configured to use the modulable light source to emit a continuous wave light signal according to a preset continuous wave modulation frequency, and sequentially collect second light intensity values at preset four equal phase points.

[0094] The phase obtaining unit 204 is configured to obtain a phase ranging result based on phase differences between the second light intensity values.

[0095] The distance calculation unit 205 is configured to calculate a final measurement distance according to the phase ranging result and the pulse ranging result.

[0096] The specific implementation of each unit can refer to the above-mentioned embodiment of the TOF sensor device ranging method, and will not be repeated here.

[0097] In summary, the TOF sensor device ranging device provided by the embodiment of the present application can use the modulatable light source in the TOF sensor device to emit a short pulse light signal according to a preset pulse width and duty cycle by the first emitting unit 201; the first light intensity value of the returned pulse is detected by the plurality of receivers of the TOF sensor device after the short pulse light signal is emitted, and the pulse ranging result is calculated according to the first light intensity value by the pulse acquisition unit 202; the continuous wave light signal is emitted according to a preset continuous wave modulation frequency by the second emitting unit 203 using the modulatable light source, and the second light intensity value is collected at the preset four equally divided phase points in turn; the phase ranging result is obtained based on the phase difference between the second light intensity values by the phase acquisition unit 204; and the final measurement distance is calculated according to the phase ranging result and the pulse ranging result by the distance calculation unit 205. The scheme combines the short pulse time-of-flight and the continuous wave phase ranging dual mode, realizes the consideration of both the large-range ranging and the sub-millimeter level high-resolution measurement: the short pulse ranging is responsible for determining the rough distance of the target, covering a range of tens of meters, and the phase ranging provides high-precision distance subdivision in a single period, so that the system can adapt to both long-distance scenes and short-distance high-precision requirements.

[0098] The embodiment of the present application also provides an electronic device, which can integrate the TOF sensor device ranging device of the embodiment of the present application, as shown in Figure 4 The electronic device structure related to the embodiment of the present application is shown, and specifically:

[0099] The electronic device can include a processor 301 with one or more processing cores and a memory 302 with one or more computer readable storage media, and the like. Those skilled in the art can understand that the electronic device structure shown in Figure 4 does not constitute a limitation on the electronic device, and can include more or fewer components than shown, or combine certain components, or different component arrangements. Among them:

[0100] The processor 301 is the control center of the electronic device, connects all parts of the electronic device through various interfaces and lines, executes various functions of the electronic device and processes data by running or executing software programs and / or the present application stored in the memory 302, and calling data stored in the memory 302, thereby overall monitoring the electronic device. Optionally, the processor 301 can include one or more processing cores; preferably, the processor 301 can integrate an application processor and a modem processor, wherein the application processor mainly processes operating storage media, user interfaces and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 301.

[0101] The memory 302 can be used to store software programs and the present application, and the processor 301 executes various function applications and data processing by running the software programs stored in the memory 302 and the present application. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store application programs required by at least one function of operating storage media, etc.; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 302 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 302 can also include a memory controller to provide access for the processor 301 to the memory 302.

[0102] Although not shown, the electronic device can also include a display unit, an input unit, a power supply, etc., which will not be described here. Specifically, in the present embodiment, the processor 301 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and run the application programs stored in the memory 302 by the processor 301, thereby realizing various functions, such as:

[0103] The modulatable light source in the TOF sensor device emits a short pulse light signal according to a preset pulse width and duty cycle;

[0104] After the short pulse light signal is emitted, the first light intensity value of the returned pulse is detected by the plurality of receivers of the TOF sensor device respectively, and the pulse ranging result is calculated according to the first light intensity value;

[0105] The modulatable light source emits a continuous wave light signal according to a preset continuous wave modulation frequency, and sequentially collects the second light intensity value at the preset four equally divided phase points;

[0106] The phase difference between the second light intensity values is obtained to obtain a phase ranging result;

[0107] The final measured distance is calculated according to the phase ranging result and the pulse ranging result.

[0108] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0109] To this end, the storage medium provided in the embodiments of the present application has a plurality of instructions stored therein, which can be loaded by a processor to execute the steps in any method provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0110] The modulatable light source in the TOF sensor device emits a short pulse light signal according to a preset pulse width and duty cycle;

[0111] After the short pulse light signal is emitted, a plurality of receivers of the TOF sensor device respectively detect first light intensity values of the returned pulses, and calculate a pulse ranging result according to the first light intensity values;

[0112] The modulatable light source emits a continuous wave light signal according to a preset continuous wave modulation frequency, and sequentially collects received second light intensity values at four equally divided phase points;

[0113] The phase ranging result is obtained based on phase differences between the second light intensity values;

[0114] The final measured distance is calculated according to the phase ranging result and the pulse ranging result.

[0115] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described here.

[0116] The storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0117] Since the instructions stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by any method provided in the embodiments of the present application can be achieved, which will be described in detail in the foregoing embodiments, and will not be described here.

[0118] The TOF sensor ranging method, the device, the storage medium and the electronic equipment provided by the application are introduced in detail above, and the principles and implementation manners of the application are described by using specific examples. The above example is only used to help understand the core idea of the application. Meanwhile, for those skilled in the art, according to the idea of the application, the specific implementation manner and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the application.

Claims

1. A ranging method for a TOF sensor device, characterized in that, include: The modulated light source in the TOF sensor device emits short pulse light signals according to a preset pulse width and duty cycle; After the short pulse light signal is emitted, multiple receivers of the TOF sensor device detect the first light intensity value of the returned pulse, and calculate the pulse ranging result based on the first light intensity value. The modulated light source emits a continuous wave light signal at a preset continuous wave modulation frequency, and the second light intensity value is collected and received sequentially at four preset equally divided phase points. The phase ranging result is obtained based on the phase difference between the second light intensity values; The final measured distance is calculated based on the phase ranging result and the pulse ranging result.

2. The ranging method of the TOF sensor device as described in claim 1, characterized in that, The step of obtaining the phase ranging result based on the phase difference between the second light intensity values ​​includes: The second light intensity value obtained from four samplings is sent to the phase calculation module; In the phase calculation module, a phase operation relationship is constructed based on the differences between the four second light intensity values ​​to obtain the phase difference; The phase difference is combined with a preset continuous wave modulation frequency to obtain the phase ranging result.

3. The ranging method of the TOF sensor device as described in claim 2, characterized in that, The second light intensity value includes the first light intensity, the second light intensity, the third light intensity, and the fourth light intensity; In the phase calculation module, a phase operation relationship is constructed based on the differences between the four second light intensity values ​​to obtain the phase difference, including: The difference between the first light intensity and the third light intensity is taken as the first difference value; The difference between the fourth light intensity and the second light intensity is taken as the second difference value; In the phase calculation module, the phase difference is obtained by using the first difference and the second difference as inputs and by employing arctangent operation.

4. The ranging method of the TOF sensor device as described in claim 1, characterized in that, The calculation of the final measured distance based on the phase ranging result and the pulse ranging result includes: The number of phase cycles is calculated based on the difference between the pulse ranging result and the distance corresponding to the modulation period; The final measured distance is calculated based on the number of phase cycles and the phase ranging result.

5. The ranging method of the TOF sensor device as described in claim 4, characterized in that, The step of calculating the number of phase periods based on the difference between the pulse ranging result and the distance corresponding to the modulation period includes: Obtain the difference between the pulse ranging result and the distance corresponding to the modulation period; Determine the range of the difference values; The number of phase cycles is determined based on the difference range.

6. The ranging method of the TOF sensor device as described in claim 1, characterized in that, The step of calculating the final measured distance based on the number of phase cycles and the phase ranging result includes: Multiply the number of phase periods by the distance corresponding to the modulation period to obtain the period distance; The final measured distance is obtained by adding the periodic distance to the phase ranging result.

7. The ranging method of the TOF sensor device as described in claim 6, characterized in that, Also includes: The final measured distance is then filtered or calibrated for temperature drift.

8. A ranging device for a TOF sensor, characterized in that, include: The first transmitting unit is used to transmit short pulse light signals according to a preset pulse width and duty cycle using the modulated light source in the TOF sensor device. The pulse acquisition unit is used to detect the first light intensity value of the returned pulse through multiple receivers of the TOF sensor device after the short pulse light signal is emitted, and to calculate the pulse ranging result based on the first light intensity value. The second transmitting unit is used to transmit a continuous wave light signal using the modulated light source at a preset continuous wave modulation frequency, and to sequentially collect and receive the second light intensity value at four preset equally divided phase points. A phase acquisition unit is used to acquire a phase ranging result based on the phase difference between the second light intensity values; The distance calculation unit is used to calculate the final measured distance based on the phase ranging result and the pulse ranging result.

9. A storage medium, characterized in that, The storage medium stores multiple instructions, which are adapted for loading by a processor to execute the ranging method of the TOF sensor device according to any one of claims 1-7.

10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the TOF sensor device ranging method as described in any one of claims 1-7.