CN115079177B - Distance measuring method and device, electronic equipment and storage medium - Google Patents
Distance measuring method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115079177B CN115079177B CN202210822913.6A CN202210822913A CN115079177B CN 115079177 B CN115079177 B CN 115079177B CN 202210822913 A CN202210822913 A CN 202210822913A CN 115079177 B CN115079177 B CN 115079177B
- Authority
- CN
- China
- Prior art keywords
- signal
- determining
- wave
- sampling
- phase difference
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S15/00—Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
- G01S15/02—Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
- G01S15/06—Systems determining the position data of a target
- G01S15/08—Systems for measuring distance only
- G01S15/32—Systems for measuring distance only using transmission of continuous waves, whether amplitude-, frequency-, or phase-modulated, or unmodulated
- G01S15/36—Systems for measuring distance only using transmission of continuous waves, whether amplitude-, frequency-, or phase-modulated, or unmodulated with phase comparison between the received signal and the contemporaneously transmitted signal
Abstract
The present disclosure provides a ranging method, an apparatus, an electronic device and a storage medium, including transmitting an ultrasonic wave-emitting signal to a target object and acquiring an echo signal, determining an increment value of a phase difference between the echo signal and the wave-emitting signal; extracting continuous signals with the length meeting a threshold value from the echo signals based on the increment value of the phase difference, and determining the continuous signals as target signals, wherein the target signals are signals reflected by the target object to send wave signals; determining a position and a phase difference of a starting point of a target signal; determining a phase deviation value of a target signal according to the phase difference of the starting point and the sampling rate of the echo signal; determining a virtual distance between a target object and ultrasonic equipment for transmitting ultrasonic waves according to the position of the starting point and the sampling rate of the echo signal; the actual distance between the target object and the ultrasonic equipment is determined through the virtual distance and the phase deviation value, and the measurement precision of distance measurement by using ultrasonic waves is improved.
Description
Technical Field
The present disclosure relates to the field of ultrasonic ranging technologies, and in particular, to a ranging method, a ranging device, an electronic device, and a storage medium.
Background
Ultrasonic waves are often used for distance measurement because of their strong directivity, slow energy consumption, and long propagation distance in a medium. The ultrasonic ranging equipment mainly starts timing at the same time of the transmitting time by transmitting ultrasonic waves to a certain direction or a target object, the ultrasonic waves are transmitted in the air and immediately return when encountering an obstacle in the process, the ultrasonic receiver immediately stops timing after receiving reflected waves, and the actual distance from a transmitting point to the obstacle or the target object is calculated according to the time difference between transmitting and receiving.
However, the conventional distance measurement method using ultrasonic waves only uses the time difference method described above, that is, calculates the phase of the target signal in the reflected wave actually received by default to be identical to the phase of the transmitted wave by using the propagation velocity and the time difference, ignores that the initial phase of the target signal in the reflected wave is not equal to the initial phase of the transmitted wave due to factors such as the dispersion of the echo signal and the signal attenuation, and reduces the accuracy of ultrasonic distance measurement when the time difference method is used directly for calculation.
Disclosure of Invention
The present disclosure provides a ranging method, apparatus, electronic device and storage medium to at least solve the above technical problems in the prior art.
One aspect of the present disclosure provides a ranging method, including:
transmitting an ultrasonic wave transmitting signal to a target object, acquiring an echo signal, and determining an increment value of a phase difference between the echo signal and the wave transmitting signal;
extracting continuous signals with the length meeting a threshold value from the echo signals based on the increment value of the phase difference, determining the continuous signals as target signals, wherein the target signals are signals reflected by the target object to the wave-transmitting signals, and determining the position and the phase difference of the starting point of the target signals;
determining a phase deviation value of the target signal according to the phase difference of the starting point and the sampling rate of the echo signal;
determining a virtual distance between the target object and ultrasonic equipment for transmitting ultrasonic waves according to the position of the starting point and the sampling rate of the echo signal;
and determining the actual distance between the target object and the ultrasonic equipment according to the virtual distance and the phase offset value.
In an embodiment, the determining the incremental value of the phase difference between the echo signal and the wave signal includes:
determining a correlation signal between the echo signal and the wave-sending signal, and determining a phase difference function between the echo signal and the wave-sending signal according to the correlation signal;
and determining an increment value of the phase difference according to the phase difference function.
In an embodiment, the determining the correlation signal between the echo signal and the wave signal includes:
determining the number of sampling points in a sampling period according to the sampling rate of the echo signal and the transmitting frequency of the wave-transmitting signal;
constructing the serial numbers of the sampling points of all sampling periods according to the number of the sampling points and the number of the sampling periods of one sampling period;
determining a first related signal according to the number of sampling points in the sampling period, the period number for transmitting the wave transmitting signal, the number of the sampling points, the echo signal and the wave transmitting signal;
according to the number of sampling points of the sampling period, the number of periods for transmitting the wave-transmitting signal, the number of the sampling points, the echo signal and the phase deviation with the wave-transmitting signalDetermining the second correlation signal.
In an embodiment, the extracting, from the echo signal, a continuous signal whose length satisfies a threshold value and is determined as a target signal includes:
setting a phase increment value of the wave-sending signal according to the number of sampling points in the sampling period, and determining a candidate signal set from signals corresponding to all sampling points of the echo signal by comparing the increment value of the phase difference with the phase increment value of the wave-sending signal;
determining a plurality of continuous signals from the candidate signal set, the continuous signals being composed of a plurality of candidate signals that are continuous from the candidate signal set, the continuous signals having a length satisfying a threshold being determined as the target signal.
In an embodiment, the determining the position and the phase difference of the starting point of the target signal includes:
determining a first sampling point corresponding to the target signal, wherein the number of the first sampling point represents the position of a starting point of the target signal;
and inputting the number of the sampling point corresponding to the position of the starting point into the phase difference function to obtain the phase difference of the starting point of the target signal.
In one implementation, the determining an actual distance between the target object and the ultrasound device by the virtual distance and the phase offset value includes:
and acquiring the inherent offset distance of the ultrasonic equipment, subtracting the phase offset value from the virtual distance, and adding the inherent offset distance to obtain the actual distance between the target object and the ultrasonic equipment.
Another aspect of the present disclosure provides a ranging apparatus, including:
the acquisition module is used for transmitting ultrasonic wave transmitting signals to a target object and acquiring echo signals;
the processing module is used for determining an increment value of the phase difference between the echo signal and the wave sending signal;
the processing module is further configured to extract, based on the increment value of the phase difference, a continuous signal with a length that meets a threshold from the echo signal, determine the continuous signal as a target signal, where the target signal is a signal reflected by the target object from the wave-emitting signal, and determine a position of a starting point of the target signal and the phase difference;
the processing module is further configured to determine a phase offset value of the target signal according to the phase difference of the starting point and the sampling rate of the echo signal;
the processing module is further used for determining a virtual distance between the target object and ultrasonic equipment for transmitting ultrasonic waves according to the position of the starting point and the sampling rate of the echo signal;
and the calculation module is used for determining the actual distance between the target object and the ultrasonic equipment according to the virtual distance and the phase deviation value.
Yet another aspect of the present disclosure provides an electronic device including: a memory storing a computer program executable by the processor and a processor implementing the above-mentioned ranging method when the processor executes the computer program.
In another aspect, the present disclosure provides a storage medium, where a computer program is stored, and when the computer program is read and executed, the ranging method is implemented.
Based on the above scheme, the present disclosure provides a distance measurement method, which determines a target signal reflected by a target object from an echo signal, obtains a phase difference of a starting point of the target signal and a sampling rate of the echo signal, calculates a phase offset value between an actual initial phase of the target signal and an ideal initial phase, determines a virtual distance from the target object to an ultrasonic device under the condition that the initial phase of the target signal is different from the initial phase of a wave-transmitting signal according to a position of the starting point and the sampling rate of the echo signal, and can determine an actual distance between the target object and the ultrasonic device under the actual condition according to the virtual distance and the phase offset value, thereby improving the measurement accuracy of distance measurement using ultrasonic waves.
Drawings
Fig. 1 is a schematic flow chart of a ranging method according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of waveforms of a plurality of parameters provided by an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a distance measuring apparatus according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a distance measuring device according to an embodiment of the disclosure.
Detailed Description
In order to make the objects, features and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In order to improve the accuracy of ranging, an embodiment of the present disclosure provides a ranging method, as shown in fig. 1, including:
step 101, transmitting an ultrasonic wave transmitting signal to a target object, acquiring an echo signal, and determining an increment value of a phase difference between the echo signal and the wave transmitting signal.
The principle of ultrasonic ranging is to transmit a wave signal to a target object, receive an echo signal, and then perform measurement.
Phase is the position in its cycle for a wave at a particular instant in time.
Phase difference is the difference between the two phases. The increment is also called a change amount, and means a difference between function values corresponding to different values of the independent variable in a period of time, so that an increment value of the phase difference is a difference value of the phase difference, for example, if the phase difference is a function of the independent variables which sequentially change, a difference value of the phase difference of the former independent variable subtracted from the phase difference of the latter independent variable is an increment value of the phase difference.
102, extracting a continuous signal with a length meeting a threshold from the echo signals based on an increment value of the phase difference, determining the continuous signal as a target signal, wherein the target signal is a signal reflected by the target object on the wave-transmitting signal, and determining the position and the phase difference of a starting point of the target signal.
The echo signal is a signal received by the ultrasonic wave, and if a target object exists on a path of an angle at which a transmission signal of the ultrasonic wave is transmitted, a signal generated by the target object reflecting the ultrasonic wave, i.e., a transmission signal, is a target signal.
It should be understood that the target signal is present in the echo signal, but the echo signal has a larger data amount than the target signal. That is, if the sampling points are used for representation, each sampling point represents a signal, the echo signal is composed of signals corresponding to all the sampling points, and the target signal is composed of signals corresponding to part of the sampling points.
The target signal appears as a continuous signal in the echo signal, but there may be other non-target signals (i.e. interference signals) appearing as continuous signals in the echo signal, and since such signals appear weak compared to the target signal, such as the continuous length is shorter, the continuous signal satisfying the condition can be selected to be determined as the target signal by setting the relationship between the length and the threshold. It should be understood that the length satisfying threshold described herein is not limited to a specific calculation manner, and is mainly used to express a main basis for finding the target signal.
By finding the target signal, the position of the starting point of the target signal and the phase difference corresponding to the starting point can be determined, so that the phase offset can be calculated subsequently.
And 103, determining a phase offset value of the target signal according to the phase difference of the starting point and the sampling rate of the echo signal.
The phase difference of the starting point is obtained in step 102, and the sampling rate of the echo signal can be directly obtained. Ideally, the initial phase of the target signal should be the same as the initial phase of the wave-transmitting signal, and if the wave-transmitting signal is a sine wave signal and the initial phase is 0, the initial phase of the target signal should also be 0, however, due to the arrangement of the sampling points, the initial phase of the acquired target signal is not 0, and therefore, the phase offset value is used to represent the deviation value of the distance between the ultrasonic device and the target object caused by the deviation of the actual initial phase of the target signal from the ideal initial phase (ideally, the ideal initial phase of the target signal is the same as the initial phase of the wave-transmitting signal).
It should be understood that in most cases, the initial phase of the acquired target signal is different from the initial phase of the wave-transmitting signal, but in some cases (i.e., ideal cases), the initial phase of the acquired target signal is the same as the initial phase of the wave-transmitting signal, and the phase shift value should be 0.
And 104, determining a virtual distance between the target object and the ultrasonic equipment for transmitting the ultrasonic wave according to the position of the starting point and the sampling rate of the echo signal.
The sampling rate of the echo signal is fixed, and the virtual distance between the target object and the ultrasonic equipment for transmitting the ultrasonic wave represents the distance between the target object and the ultrasonic equipment under the condition that the initial phase of the target signal is different from the initial phase of the wave-transmitting signal.
And 105, determining the actual distance between the target object and the ultrasonic equipment according to the virtual distance and the phase offset value.
Since the initial phase of the acquired target signal is different from that of the wave-transmitting signal in actual circumstances, the initial phase of the acquired target signal is not actually 0 as described in step 103. According to the calculation in step 104, after the virtual distance between the target object and the ultrasonic device when the initial phase of the target signal is different from the initial phase of the wave-transmitting signal is obtained, the actual distance between the target object and the ultrasonic device can be obtained more accurately by subtracting the distance of the phase offset, i.e., the phase offset value.
Based on the scheme, the method and the device determine the target signal reflected by the target object from the echo signal, acquire the phase difference of the starting point of the target signal and the sampling rate of the echo signal, calculate the phase deviation value of the actual initial phase and the ideal initial phase of the target signal, determine the virtual distance from the target object to the ultrasonic equipment under the condition that the initial phase of the target signal is different from the initial phase of the wave-transmitting signal according to the position of the starting point and the sampling rate of the echo signal, and can determine the actual distance between the target object and the ultrasonic equipment under the actual condition through the virtual distance and the phase deviation value, so that the measurement precision of distance measurement by using ultrasonic waves is improved.
In one example, the determining a delta value of a phase difference of the echo signal and the wave signal comprises:
determining a correlation signal between the echo signal and the wave-sending signal, and determining a phase difference function between the echo signal and the wave-sending signal according to the correlation signal;
and determining an increment value of the phase difference according to the phase difference function.
In order to determine the target signal, an incremental value of the phase difference needs to be calculated, and thus the phase difference function needs to be determined first. The phase difference function is determined by the echo signal and the wave sending signal together.
In an example, the determining a correlation signal between the echo signal and the wave signal includes:
determining the number of sampling points in a sampling period according to the sampling rate of the echo signal and the transmitting frequency of the wave-transmitting signal;
constructing the serial numbers of the sampling points of all sampling periods according to the number of the sampling points and the number of the sampling periods of one sampling period;
determining a first related signal according to the number of sampling points in the sampling period, the period number for transmitting the wave transmitting signal, the number of the sampling points, the echo signal and the wave transmitting signal;
according to the number of sampling points of the sampling period, the number of periods for transmitting the wave-transmitting signal, the number of the sampling points, the echo signal and the phase deviation with the wave-transmitting signalDetermining the second correlation signal.
Determining correlation signals of an echo signal and a wave signal, and determining an arctangent function according to a first correlation signal and a second correlation signal, wherein the arctangent function is a function of a phase difference between the echo signal and the wave signal;
an increment value of the phase difference is determined as a function of the phase difference.
The sampling rate of the echo signal and the transmitting frequency of the wave signal can be directly obtained, and in an example, the number of sampling points in one sampling period can be determined by the following formula:
wherein fs is the sampling rate of the echo signal;
f is the transmitting frequency of the wave-transmitting signal;
One sampling period represents one period when the echo signal is sampled, all sampling periods of the echo signal are the total period number of the echo signal, the number of sampling points of all sampling periods can be calculated by multiplying the number of the sampling points of one sampling period by the number of the sampling periods, the number of the sampling points corresponds to the number of the sampling points, the number of the sampling points of all sampling periods is constructed according to the number, for example, if n sampling points exist, the number of the sampling points is 0,1,2, … … to n-1, and the length of the number is n.
In an example, the phase difference function is an arctangent function, which can be derived by calculating correlation data of the echo signal and the wave signal, i.e., a first correlation signal of the wave signal and the echo signal and a second correlation signal of the wave signal and the echo signal.
The second correlation signal of the first correlation signal is obtained by performing a correlation calculation on the echo signal and the wave signal, and the calculation method is as follows without specific limitation.
In one example, the first correlation signal may be calculated by the following equation:
wherein x is the number of the sampling point, and the length of the number is p _ len;
PoN is the number of sampling points in a sampling period;
PeN is the number of cycles of the wave signal;
sg is an echo signal;
sin is a wave-emitting signal (which can also be regarded as a sine wave signal in phase with the wave-emitting signal);
asin (x) is correlation data obtained by performing correlation calculation on the echo signal and the sine wave signal, namely a first correlation signal.
In one example, the second correlation signal may be calculated by the following equation:
wherein x is the number of the sampling point, and the length of the number is p _ len;
PoN is the number of sampling points in a sampling period;
PeN is the number of cycles of the wave signal;
cos is a cosine wave signal with the phase difference equal to the wave-transmitting signal;
sg is an echo signal;
acos (x) is correlation data obtained by performing correlation calculation on the echo signal and the cosine wave signal, namely a second correlation signal.
In one example, the arctan function can be calculated by the following formula:
wherein x is the number of the sampling point, and the length of the number is p _ len;
asin (x) is a first correlation signal;
acos (x) is the second correlation signal;
atan2 is an arctangent function;
According to step 101, the incremental value of the phase difference is formed by the difference between the two phase differences, so that after the phase difference function is determined, the incremental value of the phase difference can be calculated.
In one example, the incremental value of the phase difference is calculated according to the following formula:
wherein x is the number of the sampling point, and the length of the number is p _ len;
Since the signal exhibits a periodic variation, one period is 2Therefore, the value of the phase difference corresponding to the next sampling point is smaller than the value of the phase difference corresponding to the previous sampling point, and therefore 2 needs to be addedAnd (4) complementing.
In an example, the extracting of the continuous signal with the length satisfying the threshold from the echo signal is determined as a target signal, and includes:
setting a phase increment value of the wave-sending signal according to the number of sampling points in the sampling period, and determining a candidate signal set from signals corresponding to all sampling points of the echo signal by comparing the increment value of the phase difference with the phase increment value of the wave-sending signal;
determining a plurality of continuous signals from the candidate signal set, the continuous signals being composed of a plurality of candidate signals that are continuous from the candidate signal set, the continuous signals having a length satisfying a threshold being determined as the target signal.
Through the calculation of the increment value of the phase difference, the candidate signal and the signal corresponding to the meaningless waveform can be distinguished. Since the signal is presented by the received signal corresponding to the sampling point, each sampling point corresponds to a signal.
By comparing the increment value of the phase difference with the phase increment value of the wave-transmitting signal, signals meeting the conditions can be screened out from all sampling points and used as candidate signals, and the target signals can be further determined by extracting the candidate signals.
In one example, the corresponding values of the sampling points are calculated according to the following formula:
wherein x is the number of the sampling point, and the length of the number is p _ len;
en (x) is the value corresponding to the sampling point.
It should be understood that the above-described embodiments,the role played here is not particularly restrictedThis fixed number, which is merely exemplary herein, is provided to provideThe floating range of (a) may be modified according to the actual application, and is not specifically limited herein. Through the definition of the method, the candidate signal and the signal corresponding to the meaningless waveform can be distinguished, the candidate signal is marked as 1, the signal corresponding to the meaningless waveform is marked as 0, and the signal corresponding to the sampling point with En (x) as 1 is brought into the candidate signal set.
According to the step 102, there is an interference signal in the candidate signal set in addition to the target signal, and there is a possibility that the interference signal appears as a continuous signal. Generally, the length of the interference signal should be much smaller than that of the target signal, and if the waveform of the signal is displayed in a conventional manner with the sampling point as the abscissa, the target signal, whether the length is on the horizontal axis or the vertical axis, is much longer than the interference signal.
In one example, the vertical length of the target signal is calculated according to the following formula:
wherein x is the number of the sampling point, and the length of the number is p _ len;
en (x) is a numerical value corresponding to the sampling point;
tn (x) is the vertical length of the target signal.
It should be understood that, in the above step, all candidate signals in the candidate signal set are marked as 1, so that the calculation of the length here is not a true data value of the target signal, but rather a dimensionless calculation of the target signal and the interference signal, and the comparison of the target signal and the interference signal for distinguishing can be realized, and other length calculation manners are not specifically limited herein.
Through the calculation, the result of Tn (x) obtained by the target signal is far greater than that of Tn (x) obtained by the interference signal, and the target signal can be selected from the sample points after all the sample points are calculated in sequence or by setting a specific threshold according to the actual situation.
In one example, the determining the position and the phase difference of the starting point of the target signal includes:
determining a first sampling point corresponding to the target signal, wherein the number of the first sampling point represents the position of a starting point of the target signal;
and inputting the number of the sampling point corresponding to the position of the starting point into the phase difference function to obtain the phase difference of the starting point of the target signal.
The target signal is determined according to the steps, the target signal is a continuous signal, the iterative calculation is performed when the target signal is calculated according to the formula, after the target signal is finished, the iteration is also finished, namely 1 is counted in each iteration, and when the iteration is finished, the mark of the signal corresponding to the next sampling point is 0, so that the position of the end point of the target signal can be obtained. Therefore, tn (x) corresponding to the position of the end point of the target signal is the maximum value, the number of the sampling point corresponding to the maximum value is determined, and the number corresponding to the position of the start point of the target signal, that is, the number of the first sampling point corresponding to the target signal can be determined.
In one example, the maximum value MaxTn of Tn (x) corresponding to the position of the target signal end point and the number of the sampling point corresponding to the maximum value are obtained according to the following formula:
wherein x is the number of the sampling point, and the length of the number is p _ len;
tn (x) is the vertical length of the target signal;
max is a maximum function;
MaxTn is the maximum value of Tn (x).
MaxTn _ p is the number of the sampling point corresponding to MaxTn, i.e. the number of the sampling point corresponding to the maximum value of the target signal, and is also the position of the termination point of the target signal.
Since the Tn (x) corresponding to the position of the end point of the target signal is calculated as iterative calculation, after the position of the end point of the target signal, that is, the number of the corresponding sampling point and the maximum value of the corresponding Tn (x) are obtained, the number of the sampling point corresponding to the start point of the target signal can be calculated.
In one example, the number of the first sampling point corresponding to the target signal is calculated according to the following formula, that is, the position of the starting point representing the target signal:
wherein, maxTn _ p is the number of the sampling point corresponding to MaxTn, that is, the number of the sampling point corresponding to the maximum value of the target signal;
MaxTn is the maximum value of Tn (x);
fix is the rounding function towards the 0 direction;
and MaxTn _ s is the number of the sampling point corresponding to the position of the starting point.
After the number of the sampling point corresponding to the position of the starting point of the target signal is obtained according to the formula, a phase difference function can be input to calculate the phase difference of the starting point.
In one example, the phase difference of the starting point of the target signal is calculated according to the following formula:
wherein the content of the first and second substances,is a function of the phase difference of the echo signal and the wave signal;
the number of the sampling point corresponding to the position of the starting point is the number of the sampling point corresponding to the position of the starting point;
In one example, the determining an actual distance between the target object and the ultrasound device from the virtual distance and the phase offset value includes:
and acquiring the inherent offset distance of the ultrasonic equipment, subtracting the phase offset value from the virtual distance, and adding the inherent offset distance to obtain the actual distance between the target object and the ultrasonic equipment.
In one example, the virtual distance is calculated according to the following formula:
wherein the content of the first and second substances,the number of the sampling point corresponding to the position of the starting point is the number of the sampling point corresponding to the position of the starting point;
speed is the Speed of sound on the current ultrasonic transmission path;
fs is the sampling rate of the echo signal;
e _ dis is the virtual distance between the target object and the ultrasound device.
In one example, the phase offset value is calculated according to the following equation:
wherein the content of the first and second substances,a phase difference that is a starting point of the target signal;
speed is the Speed of sound on the current ultrasonic transmission path;
fs is the sampling rate of the echo signal;
c _ dis is the phase offset value of the target signal.
In one example, the actual distance between the target object and the ultrasound device is calculated according to the following formula:
Dis=E_dis-C_dis+O_dis
wherein E _ dis is a virtual distance between the target object and the ultrasonic device;
c _ dis is a phase offset value of the target signal;
o _ dis is the inherent offset distance of the ultrasound device;
dis is the actual distance between the target object and the ultrasound device.
In one example, a specific numerical value is provided to further illustrate some of the above scenarios.
As shown in fig. 2, the waveform diagram and the phase difference function of the echo signal Sg (x) are provided in order from top to bottom in fig. 2Waveform diagram of (2) and increment value D of phase differenceAnd a waveform diagram of Tn (x) used to calculate the vertical length of the target signal.
As can be seen from the waveform diagram of the echo signal, the number of sampling points starts approximately at 2510 and there is a target signal.
As can be seen from the waveform diagram of Tn (x), when the number of the sampling point is 2751, the maximum value MaxTn =478 of Tn (x) corresponding to the position of the target signal termination point can be obtained.
Calculating the number of the sampling point corresponding to the starting point of the target signal according to the formula to obtain the number
The phase difference of the starting point is continuously calculated through the number of the sampling point of the starting point, and the phase difference can be obtained
Calculating the virtual distance between the target object and the ultrasonic equipment to obtain
It can be seen that the virtual distance between the target object and the ultrasonic device is 0.66725 meters in the ideal case.
The phase offset value is continuously calculated to obtain
If the inherent offset distance of the ultrasonic equipment is 0.175 m, the actual distance between the target object and the ultrasonic equipment under the actual condition is calculated, and the actual distance can be obtained
Dis=E_dis-C_dis+O_dis=0.66725-0.00004025+0.175=0.84220975
Thus, in practical situations, the actual distance between the target object and the ultrasonic device is 0.84220975 meters.
In an example, the present disclosure also provides an apparatus, as shown in fig. 3, comprising a processor 301, an ultrasonic transmission circuit 302, an ultrasonic reception circuit 303, and an ultrasonic sensor 304.
A sine wave signal of a fixed frequency, i.e., a transmission signal, is transmitted by the processor 301 of the ultrasonic apparatus, wherein the sine wave signal is amplified by the ultrasonic transmission circuit 302 and transmitted by the ultrasonic sensor 304. The ultrasonic sensor 304 receives a reflected signal reflected by a target object on the ultrasonic transmission path, the reflected signal is filtered and gained by the ultrasonic receiving circuit 303 to generate an echo signal, and the processor 301 collects and processes the echo signal.
An embodiment of the present disclosure further provides an apparatus, which is applied to a processor, and as shown in fig. 4, the apparatus includes:
the acquisition module 10 is configured to transmit an ultrasonic wave signal to a target object and acquire an echo signal.
A processing module 20, configured to determine an increment value of a phase difference between the echo signal and the wave-transmitting signal.
The processing module 20 is further configured to extract, based on the increment value of the phase difference, a continuous signal with a length that satisfies a threshold from the echo signal, determine the continuous signal as a target signal, where the target signal is a signal reflected by the target object from the wave-emitting signal, and determine a position of a starting point of the target signal and the phase difference.
The processing module 20 is further configured to determine a phase offset value of the target signal according to the phase difference of the starting point and the sampling rate of the echo signal.
The processing module 20 is further configured to determine a virtual distance between the target object and an ultrasonic device that transmits ultrasonic waves according to the position of the starting point and the sampling rate of the echo signal.
The processing module 20 is further configured to determine a correlation signal between the echo signal and the wave-sending signal, and determine a phase difference function between the echo signal and the wave-sending signal according to the correlation signal;
and determining an increment value of the phase difference according to the phase difference function.
The processing module 20 is further configured to determine the number of sampling points in a sampling period according to the sampling rate of the echo signal and the transmitting frequency of the wave transmitting signal;
constructing the serial numbers of the sampling points of all sampling periods according to the number of the sampling points and the number of the sampling periods of one sampling period;
determining a first relevant signal according to the number of sampling points in the sampling period, the period number for transmitting the wave-transmitting signal, the number of the sampling points, the echo signal and the wave-transmitting signal;
according to the number of sampling points of the sampling period, the number of periods for transmitting the wave-transmitting signal, the number of the sampling points, the echo signal and the phase deviation with the wave-transmitting signalDetermining the second correlation signal.
The processing module 20 is further configured to set a phase increment value of the wave-transmitting signal according to the number of sampling points in the one sampling period, and determine a candidate signal set from signals corresponding to all sampling points of the echo signal by comparing the increment value of the phase difference with the phase increment value of the wave-transmitting signal;
determining a plurality of continuous signals from the candidate signal set, the continuous signals being composed of a plurality of candidate signals that are continuous from the candidate signal set, the continuous signals having a length satisfying a threshold being determined as the target signal.
The processing module 20 is further configured to determine a first sampling point corresponding to the target signal, where a number of the first sampling point represents a position of a starting point of the target signal;
and inputting the number of the sampling point corresponding to the position of the starting point into the phase difference function to obtain the phase difference of the starting point of the target signal.
A calculating module 30, configured to determine an actual distance between the target object and the ultrasonic device according to the virtual distance and the phase offset value.
The calculation module 30 is further configured to obtain an inherent offset distance of the ultrasonic device, and subtract the phase offset value from the virtual distance and add the inherent offset distance to obtain an actual distance between the target object and the ultrasonic device.
The present disclosure also provides a computer-readable storage medium storing a computer program for executing the ranging method of the present disclosure.
In still another aspect, the present disclosure provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the ranging method of the present disclosure.
In addition to the methods and apparatus described above, embodiments of the present application may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to the various embodiments of the present application described in the "exemplary methods" section above of this specification.
The computer program product may be written with program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method according to various embodiments of the present application described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present application in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present application are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present application. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the foregoing disclosure is not intended to be exhaustive or to limit the disclosure to the precise details disclosed.
The block diagrams of devices, apparatuses, systems referred to in this application are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the devices, apparatuses, and methods of the present application, the components or steps may be decomposed and/or recombined. These decompositions and/or recombinations are to be considered as equivalents of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the application to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
Claims (10)
1. A method of ranging, comprising:
transmitting an ultrasonic wave transmitting signal to a target object, acquiring an echo signal, and determining an increment value of a phase difference between the echo signal and the wave transmitting signal;
extracting continuous signals with the length meeting a threshold value from the echo signals based on the increment value of the phase difference, determining the continuous signals as target signals, wherein the target signals are signals reflected by the target object to the wave-transmitting signals, and determining the position and the phase difference of the starting point of the target signals;
according to the product of the phase difference of the starting point and the sound velocity on the current ultrasonic wave transmission path, and the sum of the sampling rates of the echo signalsDetermining a phase offset value of the target signal by a ratio of the 4-fold products;
determining the number of sampling points in a sampling period according to the sampling rate of the echo signal and the transmitting frequency of the wave-transmitting signal;
constructing the serial numbers of the sampling points of all sampling periods according to the number of the sampling points and the number of the sampling periods of one sampling period;
determining a virtual distance between the target object and ultrasonic equipment for transmitting ultrasonic waves according to the product of the number of the sampling point corresponding to the position of the starting point and the sound velocity on the current ultrasonic transmission path and the ratio of the product of 2 times of the sampling rate of the echo signal;
and determining the actual distance between the target object and the ultrasonic equipment according to the virtual distance and the phase offset value.
2. The method of claim 1, wherein said determining an incremental value of a phase difference between said echo signal and said transmitted wave signal comprises:
determining a correlation signal between the echo signal and the wave-sending signal, and determining a phase difference function between the echo signal and the wave-sending signal according to the correlation signal;
and determining an increment value of the phase difference according to the phase difference function.
3. The ranging method of claim 2, wherein the determining the correlation signal between the echo signal and the wave signal comprises:
determining a first related signal according to the number of sampling points in the sampling period, the period number for transmitting the wave transmitting signal, the number of the sampling points, the echo signal and the wave transmitting signal;
4. The ranging method according to claim 3, wherein the extracting of the continuous signal having the length satisfying the threshold from the echo signal and determining as the target signal comprises:
setting a phase increment value of the wave-transmitting signal according to the number of sampling points in the sampling period, and determining a candidate signal set from signals corresponding to all sampling points of the echo signal by comparing the increment value of the phase difference with the phase increment value of the wave-transmitting signal;
determining a plurality of continuous signals from the candidate signal set, the continuous signals being composed of a plurality of candidate signals continuous from the candidate signal set, determining the continuous signals whose length satisfies a threshold as the target signal.
5. The method of claim 4, wherein the determining the position and the phase difference of the starting point of the target signal comprises:
determining a first sampling point corresponding to the target signal, wherein the number of the first sampling point represents the position of a starting point of the target signal;
and inputting the number of the sampling point corresponding to the position of the starting point into the phase difference function to obtain the phase difference of the starting point of the target signal.
6. The method of claim 1, wherein said determining an actual distance between the target object and the ultrasound device from the virtual distance and the phase offset value comprises:
and acquiring the inherent offset distance of the ultrasonic equipment, subtracting the phase offset value from the virtual distance, and adding the inherent offset distance to obtain the actual distance between the target object and the ultrasonic equipment.
7. A ranging apparatus, comprising:
the acquisition module is used for transmitting ultrasonic wave transmitting signals to a target object and acquiring echo signals;
the processing module is used for determining an increment value of the phase difference between the echo signal and the wave-sending signal;
the processing module is further configured to extract, based on the increment value of the phase difference, a continuous signal with a length that meets a threshold from the echo signal, determine the continuous signal as a target signal, where the target signal is a signal reflected by the target object from the wave-emitting signal, and determine a position of a starting point of the target signal and the phase difference;
the processing module is also used for calculating the product of the phase difference of the starting point and the sound velocity on the current ultrasonic wave transmission path and the sum of the sampling rates of the echo signalsDetermining a phase offset value of the target signal by a ratio of the 4-fold products;
the processing module is further configured to determine the number of sampling points in a sampling period according to the sampling rate of the echo signal and the transmitting frequency of the wave transmitting signal;
the processing module is further used for constructing the serial numbers of the sampling points in all the sampling periods according to the number of the sampling points in one sampling period and the number of the sampling periods;
the processing module is further configured to determine a virtual distance between the target object and an ultrasonic device that transmits ultrasonic waves according to a ratio of a product of a number of a sampling point corresponding to the position of the starting point and a sound velocity on a current ultrasonic transmission path to a product of 2 times of a sampling rate of the echo signal;
and the calculation module is used for determining the actual distance between the target object and the ultrasonic equipment according to the virtual distance and the phase deviation value.
8. The range finder device of claim 7, wherein the processing module is further configured to determine a correlation signal between the echo signal and the transmitted wave signal, and determine a phase difference function between the echo signal and the transmitted wave signal according to the correlation signal;
and determining an increment value of the phase difference according to the phase difference function.
9. An electronic device, comprising: a memory storing a computer program executable by the processor, and a processor implementing the ranging method of any of claims 1-6 when the computer program is executed by the processor.
10. A storage medium having stored thereon a computer program which, when read and executed, implements the ranging method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210822913.6A CN115079177B (en) | 2022-07-14 | 2022-07-14 | Distance measuring method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210822913.6A CN115079177B (en) | 2022-07-14 | 2022-07-14 | Distance measuring method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115079177A CN115079177A (en) | 2022-09-20 |
CN115079177B true CN115079177B (en) | 2022-11-15 |
Family
ID=83259611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210822913.6A Active CN115079177B (en) | 2022-07-14 | 2022-07-14 | Distance measuring method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115079177B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339259A (en) * | 1992-07-10 | 1994-08-16 | Northrop Grumman Corporation | High speed high resolution ultrasonic position and orientation tracker |
JPH08160126A (en) * | 1994-12-09 | 1996-06-21 | Nec Eng Ltd | Sonar receiver |
CN1746700A (en) * | 2005-10-11 | 2006-03-15 | 汪柏年 | Method and device for measuring displacement/distance based on supersonic wave or sonic continuous sound-field phase-demodulating principle |
CN205608186U (en) * | 2016-04-15 | 2016-09-28 | 中国科学院上海技术物理研究所 | Laser rangefinder based on synchronous sampling and multiple phase are measured |
CN211239956U (en) * | 2020-03-23 | 2020-08-11 | 福州英迪格成像技术有限公司 | Embedded ultraviolet camera focusing system |
CN113678176A (en) * | 2019-03-29 | 2021-11-19 | 株式会社电装 | Passive entry/passive start system for carrier phase based ranging using MUSIC style eigenvalue decomposition for range determination |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5058108B2 (en) * | 2008-09-19 | 2012-10-24 | 古野電気株式会社 | Ultrasonic detector |
FR3056765B1 (en) * | 2016-09-27 | 2018-12-07 | Centre National D'etudes Spatiales | METHOD FOR CHARACTERIZATION BY A RADAR INSTRUMENT DEFINING A TARGET IN POSITION AND IN REFLECTIVITY |
CN112213728A (en) * | 2019-07-11 | 2021-01-12 | 深圳市优必选科技股份有限公司 | Ultrasonic distance measurement method and device, computer readable storage medium and robot |
CN110780302A (en) * | 2019-11-01 | 2020-02-11 | 天津大学 | Echo signal generation method based on continuous sound beam synthetic aperture |
-
2022
- 2022-07-14 CN CN202210822913.6A patent/CN115079177B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339259A (en) * | 1992-07-10 | 1994-08-16 | Northrop Grumman Corporation | High speed high resolution ultrasonic position and orientation tracker |
JPH08160126A (en) * | 1994-12-09 | 1996-06-21 | Nec Eng Ltd | Sonar receiver |
CN1746700A (en) * | 2005-10-11 | 2006-03-15 | 汪柏年 | Method and device for measuring displacement/distance based on supersonic wave or sonic continuous sound-field phase-demodulating principle |
CN205608186U (en) * | 2016-04-15 | 2016-09-28 | 中国科学院上海技术物理研究所 | Laser rangefinder based on synchronous sampling and multiple phase are measured |
CN113678176A (en) * | 2019-03-29 | 2021-11-19 | 株式会社电装 | Passive entry/passive start system for carrier phase based ranging using MUSIC style eigenvalue decomposition for range determination |
CN211239956U (en) * | 2020-03-23 | 2020-08-11 | 福州英迪格成像技术有限公司 | Embedded ultraviolet camera focusing system |
Non-Patent Citations (6)
Title |
---|
Aliasing Line Spectrum Recognition Method Based on Joint Processing of Sound Pressure and Acceleration;Li Tianxing et al.;《2021 OES China Ocean Acoustics (COA)》;20210826;第920-923页 * |
Automated Optimal Processing of Phase Differencing Side-scan Sonar Data Using the MostProbable Angle Algorithm;Val E. Schmidt et al.;《2012 Oceans》;20130110;第1-6页 * |
基于物联网大数据的城市降雨径流控制率分析;杨婷婷等;《水电能源科学》;20200525;第38卷(第5期);第15-17、210页 * |
基于超声波A/D采样法的相位差位移测量方法;徐从裕等;《计量学报》;20161122;第37卷(第06期);第559-562页 * |
相位比较法高精度超声测距研究;沈常宇等;《传感器技术学报》;20100620;第23卷(第6期);第893-895页 * |
移相相关法计算相位差的研究;刘玉周等;《激光技术》;20140925;第38卷(第5期);第638-642页 * |
Also Published As
Publication number | Publication date |
---|---|
CN115079177A (en) | 2022-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101244605B1 (en) | Method and Apparatus for Recognizing Parking Area | |
JPH11508046A (en) | FMCW distance measurement method | |
WO2005010552A9 (en) | Distance measurement method and device using ultrasonic waves | |
Hague et al. | The generalized sinusoidal frequency-modulated waveform for active sonar | |
US9001620B2 (en) | Method for echo processing in a pulse-echo ranging system | |
CN111413699A (en) | Acoustic distance measurement circuit and method for low frequency modulated (L FM) chirp signals | |
JP2008232861A (en) | Active sonar system, reception signal processing method for sonar, and signal processing program therefor | |
CN109375206B (en) | Moving target speed measurement method based on speed search | |
CN115822564A (en) | Casing thickness measuring method and device, electronic equipment and computer storage medium | |
RU2550576C1 (en) | Method to measure distance to noisy object | |
CN116429192A (en) | Method and measuring device for determining a flow-dependent measuring variable | |
CN115079177B (en) | Distance measuring method and device, electronic equipment and storage medium | |
US8593908B2 (en) | Method for determining an echo distance in an acoustic pulse-echo ranging system | |
Liu et al. | SCH: a speed measurement method of combined hyperbolic frequency modulation signals | |
CN107576964B (en) | Echo time measuring method of linear frequency conversion signal | |
EP1565708B1 (en) | Ultrasonic signal processing method and applications thereof | |
CN112230212A (en) | Radar ranging signal processing method and device | |
CN113375737A (en) | Flow velocity metering method of time difference type ultrasonic gas flowmeter | |
Sabatini et al. | Sampled baseband correlators for in-air ultrasonic rangefinders | |
KR100739506B1 (en) | Ultrasonic distance measuring method using matched filter of reduced calculation | |
RU2612201C1 (en) | Method of determining distance using sonar | |
CN109031260B (en) | LFM signal time delay measurement method based on fractional Fourier modulation rate analysis | |
Ashraf et al. | High accuracy time of flight measurement using digital signal processing techniques for subsea applications | |
RU2559310C2 (en) | Method of estimating distance to noisy object at sea | |
CN115372920B (en) | Radar condensation compensation method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |