CN112285679A - Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device - Google Patents

Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device Download PDF

Info

Publication number
CN112285679A
CN112285679A CN202011096833.4A CN202011096833A CN112285679A CN 112285679 A CN112285679 A CN 112285679A CN 202011096833 A CN202011096833 A CN 202011096833A CN 112285679 A CN112285679 A CN 112285679A
Authority
CN
China
Prior art keywords
ultrasonic sensor
attenuation
calibration
acquiring
value
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.)
Pending
Application number
CN202011096833.4A
Other languages
Chinese (zh)
Inventor
刘晓锋
朱宏锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zongmu Technology Shanghai Co Ltd
Original Assignee
Zongmu Technology Shanghai Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zongmu Technology Shanghai Co Ltd filed Critical Zongmu Technology Shanghai Co Ltd
Priority to CN202011096833.4A priority Critical patent/CN112285679A/en
Publication of CN112285679A publication Critical patent/CN112285679A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO 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
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/52Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S15/00
    • G01S7/52004Means for monitoring or calibrating
    • G01S7/52006Means for monitoring or calibrating with provision for compensating the effects of temperature
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO 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/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/02Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems using reflection of acoustic waves
    • G01S15/06Systems determining the position data of a target
    • G01S15/08Systems for measuring distance only

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)

Abstract

The invention provides an adjustment method, a distance measurement method, a medium and an electronic device of an ultrasonic sensor. The adjusting method of the ultrasonic sensor is used for adjusting the detection threshold of the ultrasonic sensor and comprises the following steps: acquiring a calibration threshold at a calibration time, and recording external environment parameters at the calibration time; acquiring external environment parameters at the current moment; acquiring the detection distance of the ultrasonic sensor according to the calibration threshold of the ultrasonic sensor and the external environment parameters at the calibration moment; obtaining an attenuation difference value; the attenuation difference value is the difference between the attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time and the attenuation value of the ultrasonic wave corresponding to the detection distance at the current time; and acquiring the detection threshold value of the ultrasonic sensor at the current moment according to the calibration threshold value and the attenuation difference value. The adjusting method of the ultrasonic sensor enables the ultrasonic sensor to realize stable detection in the change of complex external environment parameters.

Description

Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device
Technical Field
The present invention relates to a method for adjusting an ultrasonic sensor, and more particularly, to a method for adjusting an ultrasonic sensor, a distance measuring method, a medium, and an electronic device, which belong to the field of ultrasonic distance measurement.
Background
An ultrasonic sensor is a sensor that transmits and receives ultrasonic waves (mechanical waves) and converts the received ultrasonic waves (mechanical waves) into electrical signals. At present, the ultrasonic sensor is widely applied to the aspects of industry, national defense, biomedicine and the like. For example, in the field of automatic driving, ultrasonic sensors are widely used in Automatic Parking Systems (APAs), Automatic Emergency Braking Systems (AEBs), and other scenarios.
In some application scenarios, such as autopilot, ultrasonic sensors are mainly used to achieve ranging of objects. In the prior art, a detection threshold value is often set when an ultrasonic sensor is used for distance measurement so as to filter noise echoes. Specifically, when receiving the echo, the ultrasonic sensor filters out the echo with the intensity smaller than the detection threshold value, and retains the echo with the intensity larger than the detection threshold value. However, the inventor finds that in practical application, when ultrasonic waves propagate in air, the ultrasonic waves are damped by air damping; the external environment parameters such as the temperature and/or the humidity of the air can affect the size of the air damping, so that the attenuation value generated when the ultrasonic wave is transmitted in the air changes along with the change of the external environment parameters. When the attenuation value of the ultrasonic wave changes, if the detection threshold of the ultrasonic sensor is not adjusted, problems such as missing detection, failure of noise filtering and the like are caused, so that the detection threshold of the ultrasonic sensor needs to be adjusted according to external environment parameters in specific application. In the existing scheme, the method for adjusting the detection threshold of the ultrasonic sensor includes: acquiring the external environment temperature at the current moment, and acquiring the detection threshold of the ultrasonic wave according to the temperature interval where the external environment temperature at the current moment is located; and the detection threshold corresponding to each temperature interval is obtained in a manual calibration mode. However, this adjustment method depends on the detection threshold corresponding to each temperature interval, and it is difficult to achieve stable detection of the ultrasonic sensor in complicated external environment parameter changes by using this adjustment method.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide an adjustment method, a distance measurement method, a medium and an electronic device for an ultrasonic sensor, which are used to solve the problem that the existing adjustment method makes it difficult to stably detect the ultrasonic sensor in the complicated external environment parameter change.
To achieve the above and other related objects, a first aspect of the present invention provides a method of adjusting an ultrasonic sensor; the adjusting method of the ultrasonic sensor is used for adjusting the detection threshold of the ultrasonic sensor and comprises the following steps: acquiring a calibration threshold at a calibration time, and recording external environment parameters at the calibration time; acquiring external environment parameters at the current moment; acquiring the detection distance of the ultrasonic sensor according to the calibration threshold of the ultrasonic sensor and the external environment parameters at the calibration moment; obtaining an attenuation difference value; the attenuation difference value is the difference between the attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time and the attenuation value of the ultrasonic wave corresponding to the detection distance at the current time; and acquiring the detection threshold value of the ultrasonic sensor at the current moment according to the calibration threshold value and the attenuation difference value.
In an embodiment of the first aspect, the method for obtaining the detection distance of the ultrasonic sensor includes: acquiring echo propagation time corresponding to the calibration threshold; acquiring the propagation speed of the ultrasonic wave at the calibration time according to the external environment parameters at the calibration time; and acquiring the detection distance of the ultrasonic sensor according to the echo propagation time and the propagation speed.
In an embodiment of the first aspect, an implementation method for obtaining the attenuation difference includes: acquiring a first attenuation coefficient of the ultrasonic wave at the calibration time according to the external environment parameter at the calibration time; acquiring a second attenuation coefficient of the ultrasonic wave at the current moment according to the external environment parameter at the current moment; and acquiring a difference value between the first attenuation coefficient and the second attenuation coefficient, and acquiring the attenuation difference value according to the difference value and the detection distance.
In an embodiment of the first aspect, another implementation method for obtaining the attenuation difference includes: acquiring a first attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time; acquiring a second attenuation value of the ultrasonic wave corresponding to the detection distance at the current moment; and obtaining the attenuation difference value according to the first attenuation value and the second attenuation value.
In an embodiment of the first aspect, the detection threshold of the ultrasonic sensor at the current time is: LSBcurrent=LSBApplication×10(ΔLoss/20)(ii) a Wherein, LSBcurrentFor the detection threshold, LSB, of the ultrasonic sensor at the present timeApplicationAnd the delta Loss is the attenuation difference value as the calibration threshold value.
In an embodiment of the first aspect, the external environmental parameter includes temperature and/or humidity.
A second aspect of the present invention provides a ranging method; the distance measurement method comprises the following steps: according to the adjusting method of the ultrasonic sensor of the first aspect of the invention, the current time and the detection threshold of the ultrasonic sensor are obtained; and based on the detection threshold value of the ultrasonic sensor at the current moment, the ultrasonic sensor is utilized to carry out distance measurement.
In an embodiment of the second aspect, before the performing the distance measurement by using the ultrasonic sensor, the distance measurement method further includes: and adjusting the transmitting frequency of the ultrasonic sensor according to the sensor temperature at the current moment so as to match the transmitting frequency of the ultrasonic sensor with the design transmitting frequency of the ultrasonic sensor.
A third aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of adjusting an ultrasonic sensor according to any one of the first aspects of the present invention and/or the method of measuring a distance according to any one of the second aspects of the present invention.
A fourth aspect of the present invention provides an electronic apparatus; the electronic device includes: a memory storing a computer program; a processor, communicatively connected to the memory, for executing the method for adjusting an ultrasound sensor according to any of the first aspects of the present invention and/or the method for measuring a distance according to any of the second aspects of the present invention when the computer program is invoked.
As described above, the technical solution of the adjustment method, the distance measurement method, the medium, and the electronic device of the ultrasonic sensor according to the present invention has the following advantageous effects:
the adjusting method of the ultrasonic sensor can acquire a calibration threshold corresponding to a calibration moment and the detection distance of the ultrasonic sensor, and further acquire an attenuation difference value of ultrasonic waves; and acquiring the detection threshold value of the ultrasonic sensor at the current moment based on the calibration threshold value and the attenuation difference value. Therefore, the adjusting method of the ultrasonic sensor does not depend on the detection threshold corresponding to each temperature interval, so that the time and labor consumed when the detection threshold corresponding to each temperature interval is manually calibrated are saved; meanwhile, when the change of the external environment parameters is small, the adjusting method of the ultrasonic sensor can still adjust the detection threshold of the ultrasonic sensor, so that the ultrasonic sensor can realize stable detection in the complex external environment parameter change.
Drawings
Fig. 1 is a flowchart illustrating an adjusting method of an ultrasonic sensor according to an embodiment of the invention.
Fig. 2 is a flowchart illustrating the adjusting method of the ultrasonic sensor according to the present invention in step S12 according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating the adjusting method of the ultrasonic sensor according to the present invention in step S13 according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating the step S13 of the method for adjusting an ultrasonic sensor according to another embodiment of the present invention.
Fig. 5 is a flowchart illustrating an adjusting method of an ultrasonic sensor according to an embodiment of the invention.
Fig. 6 is a flowchart illustrating a ranging method according to an embodiment of the invention.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Description of the element reference numerals
700 electronic device
710 memory
720 processor
S11-S15
S121 to S123
S31-S33
S41-S43
S51-S58
S61-S62
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated. Moreover, in this document, relational terms such as "first," "second," and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In the prior art, a detection threshold value is often set when an ultrasonic sensor is used for distance measurement so as to filter noise echoes. Specifically, the ultrasonic sensor filters out echoes (noise echoes) having an intensity smaller than the detection threshold value when receiving the echoes, and retains echoes having an intensity larger than the detection threshold value. However, the inventor finds that in practical application, when ultrasonic waves propagate in air, the ultrasonic waves are damped by air damping; the external environment parameters such as the temperature and/or the humidity of the air can affect the size of the air damping, so that the attenuation value generated when the ultrasonic wave is transmitted in the air changes along with the change of the external environment parameters. When the attenuation value of the ultrasonic wave changes, if the detection threshold of the ultrasonic sensor is not adjusted, problems such as missing detection, failure of noise filtering and the like are caused, so that the detection threshold of the ultrasonic sensor needs to be adjusted according to external environment parameters in specific application. In the existing scheme, the method for adjusting the detection threshold of the ultrasonic sensor includes: acquiring the external environment temperature at the current moment, and acquiring the detection threshold of the ultrasonic wave according to the temperature interval where the external environment temperature at the current moment is located; and the detection threshold corresponding to each temperature interval is obtained in a manual calibration mode. However, this adjustment method relies on the detection threshold for each temperature interval: on one hand, manual calibration of each temperature interval consumes a large amount of time and labor; on the other hand, the detection threshold corresponding to the temperature interval in which the temperature at the current time is located is used as the detection threshold at the current time, and the detection threshold corresponding to the temperature at the current time is not used as the detection threshold at the current time, so that an error exists, and particularly, when the temperature range included in each temperature interval is large, the error is more obvious, and therefore, the ultrasonic sensor is difficult to realize stable detection in the complex external environment parameter change by adopting the adjusting method. For example, if the external temperature at the previous time is T1, the external temperature at the current time is T2, and if T2 and T1 are both in the same temperature interval, the detection threshold of the ultrasonic sensor at the current time and the detection threshold at the previous time should be the same according to the prior art, which affects the stability of the ultrasonic sensor during the detection process.
In order to solve the problem, the invention provides an adjusting method of an ultrasonic sensor. The adjusting method of the ultrasonic sensor can acquire a calibration threshold corresponding to a calibration moment and the detection distance of the ultrasonic sensor, and further acquire an attenuation difference value of ultrasonic waves; and acquiring the detection threshold value of the ultrasonic sensor at the current moment based on the calibration threshold value and the attenuation difference value. Therefore, the adjusting method of the ultrasonic sensor does not depend on the detection threshold corresponding to each temperature interval, so that the time and labor consumed when the detection threshold corresponding to each temperature interval is manually calibrated are saved; meanwhile, the detection threshold of the ultrasonic sensor is obtained according to the external environment parameter at the current moment, so that when the external environment parameter changes slightly, the adjustment method of the ultrasonic sensor can still adjust the detection threshold of the ultrasonic sensor, and the ultrasonic sensor can realize stable detection in the complex external environment parameter change.
In an embodiment of the present invention, the adjusting method of the ultrasonic sensor is used for adjusting a detection threshold of the ultrasonic sensor; referring to fig. 1, the method for adjusting the ultrasonic sensor includes:
s11, acquiring a calibration threshold value at a calibration time, and recording the external environment parameters at the calibration time. The external environment parameters refer to environment parameters that affect the propagation speed of the ultrasonic waves, such as the temperature and humidity of the air. The calibration threshold refers to a detection threshold of the external environment parameter corresponding to the calibration time, for example, a detection threshold of the ultrasonic sensor at 20 ℃ or 30 ℃. In a specific application, the calibration threshold may be obtained in a manual calibration manner, or may be obtained in other manners, where a detection threshold adopted by the ultrasonic sensor for the same external environment parameter in a historical operation process is counted as the calibration threshold, and a specific manner is not limited here.
And S12, acquiring the external environment parameters at the current moment. The external environment parameter at the current time is the same as the external environment parameter at the calibration time in type, for example: if the external environment parameters at the calibration time comprise temperature and humidity, the external environment parameters at the current time also comprise temperature and humidity.
And S13, acquiring the detection distance of the ultrasonic sensor according to the calibration threshold of the ultrasonic sensor and the external environment parameters at the calibration time. Specifically, the detection distance acquired in step S12 is an echo distance that can be detected by the corresponding ultrasonic sensor under the calibration threshold.
S14, obtaining an attenuation difference value; the attenuation difference value is the difference between the attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time and the attenuation value of the ultrasonic wave corresponding to the detection distance at the current time. Specifically, when the detection distances are the same, the attenuation value generated when the ultrasonic wave emitted by the ultrasonic sensor propagates at a certain moment is related to the external environment parameter at the moment; based on this, if the external environment parameter at the current time is different from the external environment parameter at the calibration time, a difference exists between the attenuation value of the ultrasonic wave emitted by the ultrasonic sensor at the calibration time and the attenuation value of the ultrasonic wave at the current time, and the difference is the attenuation difference.
And S15, obtaining the detection threshold value of the ultrasonic sensor at the current moment according to the calibration threshold value and the attenuation difference value. Specifically, since the detection threshold represents the intensity (dB) of the received echo inside the ultrasonic sensor, the attenuation difference can reflect the change of the detection threshold of the ultrasonic sensor, and therefore, the detection threshold of the ultrasonic sensor at the current time can be obtained according to the attenuation difference and the calibration threshold.
Preferably, in this embodiment, only when the variation of the external environment parameter at the current time acquired in step S12 with respect to the external environment parameter at the previous time (or the calibration time) is greater than an environment parameter threshold, step S13-15 is executed to adjust the inspection threshold of the ultrasonic sensor; otherwise, keeping the detection threshold value of the current moment the same as the detection threshold value of the last moment. Wherein the environmental parameter threshold value can be set by a user according to actual experience.
As can be seen from the above description, the adjustment method of the ultrasonic sensor according to this embodiment does not depend on the detection threshold corresponding to each temperature interval, so that time and labor consumed when the detection threshold corresponding to each temperature interval is manually calibrated are saved; meanwhile, the detection threshold of the ultrasonic sensor is obtained according to the external environment parameter at the current moment, so that when the external environment parameter changes slightly, the adjustment method of the ultrasonic sensor can still adjust the detection threshold of the ultrasonic sensor, and therefore the ultrasonic sensor can realize stable detection in complex external environment parameter changes.
Referring to fig. 2, in an embodiment of the present invention, a method for obtaining a detection distance of the ultrasonic sensor includes:
and S121, acquiring the echo propagation Time (Time of Flight, ToF) corresponding to the calibration threshold. The ultrasonic waves emitted by the ultrasonic sensor are reflected after reaching the detected object to form an echo, and the time for the echo to propagate to the receiving end of the ultrasonic sensor is the propagation time of the echo.
And S122, acquiring the propagation speed of the ultrasonic wave at the calibration time according to the external environment parameters at the calibration time. Specifically, the propagation speed of the ultrasonic wave at the calibration time is influenced by the external environment parameters at the calibration time. For example, when the external environment parameter is temperature, the propagation velocity of the ultrasonic wave is vair(a + B × T) m/s; wherein, a is the propagation velocity of the ultrasonic wave at the temperature of 0, and the value thereof can be obtained according to actual measurement, and for convenience of calculation, a may be 331.3 in specific application; b is a coefficient of variation of the propagation velocity with temperature, and the value thereof can also be obtained according to actual measurement, and for convenience of calculation, B may be taken to be 0.606 in specific application; and T is the air temperature at the calibration moment, and in particular application, the temperature acquired by the vehicle external temperature sensor can be used as the air temperature for reducing the measurement difficulty of the temperature.
And S123, acquiring the detection distance of the ultrasonic sensor according to the echo propagation time and the propagation speed. Specifically, the detection distance of the ultrasonic sensor is as follows: the distance that the ultrasonic wave propagates within the echo propagation time described in step S121 at the propagation speed described in step S122.
The detection distance of the ultrasonic sensor can be obtained according to the propagation speed corresponding to the external environment parameter at the calibration moment; therefore, the present embodiment can obtain the detection distance of the ultrasonic sensor regardless of the external environment parameter at the calibration time selected by the user.
Referring to fig. 3, in an embodiment of the present invention, an implementation method for obtaining the attenuation difference includes:
and S31, acquiring a first attenuation coefficient of the ultrasonic wave at the calibration time according to the external environment parameter at the calibration time. Wherein the attenuation coefficient refers to the attenuation value of the ultrasonic wave in unit distance, and the unit of the attenuation value is dB/m; the attenuation coefficient is used for representing the degree of attenuation of the ultrasonic wave in propagation under the influence of external environment parameters under the oscillation frequency of the ultrasonic wave. Similarly to the attenuation value, the attenuation coefficient also changes with the change of the external environment parameter.
In this step, the first attenuation coefficient refers to an attenuation coefficient of the ultrasonic wave corresponding to the external environment parameter at the calibration time. The first attenuation coefficient may be obtained by looking up an attenuation coefficient table. The attenuation coefficient table comprises common external environment parameters and corresponding attenuation coefficients, and can be obtained through actual measurement or calculation in specific application. And S32, acquiring a second attenuation coefficient of the ultrasonic wave at the current moment according to the external environment parameter at the current moment. The second attenuation coefficient refers to an attenuation coefficient of the ultrasonic wave corresponding to the external environment parameter at the current moment; the second attenuation coefficient may be obtained by querying the attenuation coefficient table.
It should be noted that "the first" and "the second" of the first attenuation coefficient and the second attenuation coefficient are only to distinguish the attenuation coefficient at the calibration time from the attenuation coefficient at the current time, and both the first attenuation coefficient and the second attenuation coefficient are essentially attenuation coefficients of the ultrasonic wave in the propagation process.
And S33, obtaining the difference value between the first attenuation coefficient and the second attenuation coefficient, and obtaining the attenuation difference value according to the difference value and the detection distance. Specifically, the product of the difference between the first attenuation coefficient and the second attenuation coefficient and the detection distance is the attenuation difference.
Referring to fig. 4, another implementation of obtaining the attenuation difference is provided in an embodiment of the present invention, which can be used in a laboratory environment. Specifically, the method for acquiring the attenuation difference in this embodiment includes:
and S41, acquiring a first attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time. Specifically, at the calibration time, the ultrasonic wave is emitted from the emitting end of the ultrasonic sensor, and after the detection distance is propagated, the ultrasonic wave is emitted to form an echo, and then the echo is propagated to the receiving end of the ultrasonic sensor. In this process, the attenuation value of the ultrasonic wave is the first attenuation value corresponding to the detection distance at the calibration time.
And S42, acquiring a second attenuation value of the ultrasonic wave corresponding to the detection distance at the current moment. Similar to the first attenuation value, the second attenuation value is that at the current moment, the ultrasonic wave is emitted from the transmitting end of the ultrasonic sensor, and after the ultrasonic wave propagates the detection distance, an echo is formed and returns to the receiving end of the ultrasonic sensor. In this process, the attenuation value of the ultrasonic wave is a second attenuation value corresponding to the detection distance at the current time.
S43, obtaining the attenuation difference value according to the first attenuation value and the second attenuation value. Specifically, the difference between the first attenuation value and the second attenuation value is the attenuation difference.
In an embodiment of the present invention, the detection threshold of the ultrasonic sensor at the current time is: LSBcurrent=LSBApplication×10(ΔLoss/20)(ii) a Wherein, LSBcurrentFor the detection threshold, LSB, of the ultrasonic sensor at the present timeApplicationAnd the delta Loss is the attenuation difference value as the calibration threshold value.
Referring to fig. 5, in an embodiment of the present invention, an adjustment method of an ultrasonic sensor includes:
and S51, calibrating the sensor at the temperature and humidity of the calibration moment by a manual calibration mode to obtain a calibration threshold value. Particularly, when the adjustment method of the ultrasonic sensor is applied to an unmanned scene, the temperature at the calibration time can be obtained by measuring the temperature of the vehicle body, and the humidity at the calibration time can be obtained by the average humidity of the outside.
And S52, acquiring the attenuation coefficient of the ultrasonic wave at the outside temperature and humidity at the calibration time as a first attenuation coefficient. The first attenuation coefficient is used for representing the degree of attenuation of the ultrasonic waves in propagation under the influence of the air temperature and the humidity at the calibration moment under the oscillation frequency of the ultrasonic waves, and the unit of the attenuation is dB/m or other relevant units.
And S53, acquiring the attenuation coefficient of the ultrasonic wave at the external temperature and humidity at the current moment as a second attenuation coefficient. The second attenuation coefficient is used for representing the degree of attenuation of the ultrasonic wave in propagation under the influence of the air temperature and the humidity at the current moment under the oscillation frequency of the ultrasonic wave, and the unit of the attenuation is dB/m or other relevant units.
And S54, acquiring the difference between the first attenuation coefficient and the second attenuation coefficient as an attenuation coefficient difference. The unit of the attenuation coefficient difference is dB/m or other relevant units.
And S55, acquiring the propagation time point TOF of the echo corresponding to the calibration threshold of the sensor.
And S56, acquiring the detection distance of the ultrasonic wave according to the propagation time point TOF corresponding to the calibration threshold and the temperature at the calibration time. The propagation speed of the acoustic wave is affected by the external temperature, so the propagation speed of the ultrasonic wave at the calibration time can be obtained according to the external temperature at the calibration time, and based on the propagation speed, the time point TOF corresponding to the calibration threshold can be converted into the propagation distance at the calibration time.
And S57, obtaining the attenuation difference value delta Loss corresponding to the ultrasonic wave on the detection distance according to the attenuation coefficient difference value and the detection distance. Wherein the attenuation difference Δ Loss may be obtained by multiplying the attenuation coefficient difference by the detection distance.
S58, according to the attenuation difference and the calibration thresholdAnd acquiring the detection threshold value of the ultrasonic sensor at the current moment. Specifically, the detection threshold LSB of the current timecurrent=LSBApplication×10(ΔLoss/20)(ii) a Wherein, LSBApplicationAnd the delta Loss is the attenuation difference value as the calibration threshold value.
Based on the above description of the adjustment method of the ultrasonic sensor, the invention also provides a distance measurement method. Referring to fig. 6, in an embodiment of the present invention, the distance measuring method includes:
and S61, acquiring the detection threshold value of the ultrasonic sensor at the current moment according to the adjusting method of the ultrasonic sensor. In a specific application, the method for adjusting the ultrasonic sensor according to the present invention may be performed each time the ultrasonic sensor is used for distance measurement. Or, an environmental parameter threshold may be set, and if the change amount of the external environmental parameter at the current time relative to the external environmental parameter at the previous time is greater than the environmental parameter threshold, the adjustment method of the ultrasonic sensor according to the present invention is executed to obtain the detection threshold at the current time; otherwise, the detection threshold value of the previous moment is used as the detection threshold value of the current moment.
And S62, based on the detection threshold value of the ultrasonic sensor at the current time, the distance measurement is carried out by the ultrasonic sensor.
In a particular application, the inventors have found that for an ultrasonic sensor, the probe core is often designed and optimized according to the design frequency of the probe core, which is called the design emission frequency of the ultrasonic sensor; the transmission intensity of the ultrasonic sensor is maximized when the transmission frequency of the ultrasonic sensor is equal to the design transmission frequency. In practical application, the transmitting frequency of the ultrasonic sensor can be considered to be the same as the driving frequency of the probe core, and the driving frequency of the probe core is obtained by a driving circuit of the probe core according to the saved ratio of the designed transmitting frequency (EEPROM parameter) and the oscillation frequency of the crystal oscillator of the ultrasonic sensor. When the oscillation frequency of the crystal oscillator of the ultrasonic sensor changes due to the change of temperature, if the ratio of the designed emission frequency to the oscillation frequency of the crystal oscillator is kept unchanged, the driving frequency of the probe core deviates from the designed emission frequency, so that the emission frequency of the ultrasonic sensor deviates from the designed emission frequency, and the emission intensity of the ultrasonic sensor is obviously reduced and the emission is attenuated. In the method for adjusting an ultrasonic sensor, the attenuation difference only takes into account the attenuation in the propagation path, but not the emission attenuation of the sensor. To address this problem, in an embodiment of the present invention, before performing ranging by using the ultrasonic sensor, the ranging method further includes: and adjusting the transmitting frequency of the ultrasonic sensor according to the sensor temperature at the current moment so as to match the transmitting frequency of the ultrasonic sensor with the designed transmitting frequency. The fact that the transmitting frequency of the ultrasonic sensor is matched with the design transmitting frequency means that the transmitting frequency of the ultrasonic sensor is the same as or close to the design transmitting frequency; the fact that the transmission frequency of the ultrasonic sensor is close to the design transmission frequency means that the deviation between the transmission frequency and the design transmission frequency is within the range accepted by a user. According to the foregoing description, the change of the oscillation frequency of the crystal oscillator causes the change of the transmission frequency of the ultrasonic sensor, so that the oscillation frequency of the crystal oscillator in the ultrasonic sensor can be continuously adjusted according to the designed transmission frequency until the transmission frequency of the ultrasonic sensor matches the designed transmission frequency. It should be noted that adjusting the transmission frequency of the ultrasonic sensor by adjusting the oscillation frequency of the crystal oscillator is only one of many adjustment manners, and the transmission frequency of the ultrasonic sensor may also be adjusted by other manners in specific applications.
Preferably, the ranging method performs the step of adjusting the transmission frequency of the ultrasonic sensor according to the sensor temperature at the current time only when the amount of change of the sensor temperature at the current time with respect to the sensor temperature at the previous time is greater than a temperature change threshold.
As can be seen from the above description, in the present embodiment, the emission attenuation of the sensor can be reduced by adjusting the emission frequency of the ultrasonic sensor, so as to ensure a smaller emission sound pressure deviation.
Based on the above description of the adjustment method and the ranging method of the ultrasonic sensor, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for adjusting an ultrasonic sensor according to the present invention and/or the method for measuring a distance according to the present invention.
Based on the above description of the adjustment method and the ranging method of the ultrasonic sensor, the invention also provides an electronic device. Referring to fig. 7, in an embodiment of the invention, the electronic device 700 includes a memory 710 and a processor 720. Wherein the memory 710 stores a computer program; the processor 720 is communicatively coupled to the memory 710, and executes the method for adjusting the ultrasonic sensor according to the present invention and/or the method for measuring distance according to the present invention when the computer program is invoked.
The protection scope of the adjustment method of the ultrasonic sensor according to the present invention is not limited to the execution sequence of the steps illustrated in the embodiment, and all the solutions of the prior art including the steps addition, subtraction, and step replacement according to the principle of the present invention are included in the protection scope of the present invention.
The adjusting method of the ultrasonic sensor can acquire the calibration threshold corresponding to the calibration time and the detection distance of the ultrasonic sensor, and further acquire the attenuation difference value of ultrasonic waves; and acquiring the detection threshold value of the ultrasonic sensor at the current moment based on the calibration threshold value and the attenuation difference value. Therefore, the adjusting method of the ultrasonic sensor does not depend on the detection threshold corresponding to each temperature interval, so that the time and labor consumed when the detection threshold corresponding to each temperature interval is manually calibrated are saved; meanwhile, when the change of the external environment parameters is small, the adjusting method of the ultrasonic sensor can still adjust the detection threshold of the ultrasonic sensor, so that the ultrasonic sensor can realize stable detection in the complex external environment parameter change. In conclusion, the present invention effectively overcomes various disadvantages of the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. An adjustment method of an ultrasonic sensor, for adjusting a detection threshold of the ultrasonic sensor, the adjustment method of the ultrasonic sensor comprising:
acquiring a calibration threshold at a calibration time, and recording external environment parameters at the calibration time;
acquiring external environment parameters at the current moment;
acquiring the detection distance of the ultrasonic sensor according to the calibration threshold of the ultrasonic sensor and the external environment parameters at the calibration moment;
obtaining an attenuation difference value; the attenuation difference value is the difference between the attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time and the attenuation value of the ultrasonic wave corresponding to the detection distance at the current time;
and acquiring the detection threshold value of the ultrasonic sensor at the current moment according to the calibration threshold value and the attenuation difference value.
2. The method for adjusting an ultrasonic sensor according to claim 1, wherein the method for obtaining the detection distance of the ultrasonic sensor comprises:
acquiring echo propagation time corresponding to the calibration threshold;
acquiring the propagation speed of the ultrasonic wave at the calibration time according to the external environment parameters at the calibration time;
and acquiring the detection distance of the ultrasonic sensor according to the echo propagation time and the propagation speed.
3. The method of claim 1, wherein obtaining the attenuation difference comprises:
acquiring a first attenuation coefficient of the ultrasonic wave at the calibration time according to the external environment parameter at the calibration time;
acquiring a second attenuation coefficient of the ultrasonic wave at the current moment according to the external environment parameter at the current moment;
and acquiring a difference value between the first attenuation coefficient and the second attenuation coefficient, and acquiring the attenuation difference value according to the difference value and the detection distance.
4. The method of claim 1, wherein obtaining the attenuation difference comprises:
acquiring a first attenuation value of the ultrasonic wave corresponding to the detection distance at the calibration time;
acquiring a second attenuation value of the ultrasonic wave corresponding to the detection distance at the current moment;
and obtaining the attenuation difference value according to the first attenuation value and the second attenuation value.
5. The method of adjusting an ultrasonic sensor according to claim 1, wherein the detection threshold of the ultrasonic sensor at the current time is: LSBcurrent=LSBApplication×10(ΔLoss/20)(ii) a Wherein, LSBcurrentFor the detection threshold, LSB, of the ultrasonic sensor at the present timeApplicationAnd the delta Loss is the attenuation difference value as the calibration threshold value.
6. The method of adjusting an ultrasonic sensor according to claim 1, wherein: the ambient parameter comprises temperature and/or humidity.
7. A method for ranging, the method comprising:
the method for adjusting an ultrasonic sensor according to any one of claims 1 to 6, wherein a detection threshold value of the ultrasonic sensor at the current moment is obtained;
and based on the detection threshold value of the ultrasonic sensor at the current moment, the ultrasonic sensor is utilized to carry out distance measurement.
8. The ranging method according to claim 7, wherein before ranging using the ultrasonic sensor, the ranging method further comprises:
and adjusting the transmitting frequency of the ultrasonic sensor according to the sensor temperature at the current moment so as to match the transmitting frequency of the ultrasonic sensor with the design transmitting frequency of the ultrasonic sensor.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements the method of adjusting an ultrasonic sensor of any one of claims 1-6 and/or the method of ranging of any one of claims 7-8.
10. An electronic device, characterized in that the electronic device comprises:
a memory storing a computer program;
a processor, communicatively coupled to the memory, that when invoked performs the method of adjusting the ultrasonic sensor of any of claims 1-6, and/or the method of ranging of any of claims 7-8.
CN202011096833.4A 2020-10-14 2020-10-14 Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device Pending CN112285679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011096833.4A CN112285679A (en) 2020-10-14 2020-10-14 Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011096833.4A CN112285679A (en) 2020-10-14 2020-10-14 Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device

Publications (1)

Publication Number Publication Date
CN112285679A true CN112285679A (en) 2021-01-29

Family

ID=74496646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011096833.4A Pending CN112285679A (en) 2020-10-14 2020-10-14 Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device

Country Status (1)

Country Link
CN (1) CN112285679A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114910758A (en) * 2022-05-17 2022-08-16 国网黑龙江省电力有限公司佳木斯供电公司 Switch equipment partial discharge detection method based on intelligent sound and electricity combined sensing

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04110687A (en) * 1990-08-30 1992-04-13 Fuji Electric Co Ltd Temperature-compensation method of detection sensitivity in supersonic sensor
EP1624319A1 (en) * 2004-08-07 2006-02-08 Robert Bosch Gmbh Method and apparatus for adapting a threshold in an obstacle-detection unit for vehicles
CN101346641A (en) * 2005-12-22 2009-01-14 罗伯特·博世有限公司 Ultrasonic sensor
CN103713290A (en) * 2012-10-05 2014-04-09 福特全球技术公司 Method, system, and device used for reducing object report errors of driving assistant characteristics
CN105629215A (en) * 2014-10-27 2016-06-01 同致电子科技(厦门)有限公司 Vehicle ultrasonic sensor correction method and system
JP2016191614A (en) * 2015-03-31 2016-11-10 パナソニックIpマネジメント株式会社 Obstacle detection device, method of calculating humidity correction value, and method of determining ultrasonic wave reception threshold
CN107209256A (en) * 2014-10-22 2017-09-26 株式会社电装 Ultrasonic type article detection device
US20180095057A1 (en) * 2016-10-05 2018-04-05 Ford Global Technologies, Llc Systems and methods for humidity determination and uses thereof
DE102018119266B3 (en) * 2018-08-08 2019-09-12 Valeo Schalter Und Sensoren Gmbh Method for operating an ultrasonic sensor by excitation with a frequency-coded signal, computer program product and ultrasound sensor
CN110703233A (en) * 2019-10-17 2020-01-17 苏州优达斯汽车科技有限公司 Temperature and humidity compensation method for sensitivity of ultrasonic sensor

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04110687A (en) * 1990-08-30 1992-04-13 Fuji Electric Co Ltd Temperature-compensation method of detection sensitivity in supersonic sensor
EP1624319A1 (en) * 2004-08-07 2006-02-08 Robert Bosch Gmbh Method and apparatus for adapting a threshold in an obstacle-detection unit for vehicles
CN101346641A (en) * 2005-12-22 2009-01-14 罗伯特·博世有限公司 Ultrasonic sensor
CN103713290A (en) * 2012-10-05 2014-04-09 福特全球技术公司 Method, system, and device used for reducing object report errors of driving assistant characteristics
CN107209256A (en) * 2014-10-22 2017-09-26 株式会社电装 Ultrasonic type article detection device
CN105629215A (en) * 2014-10-27 2016-06-01 同致电子科技(厦门)有限公司 Vehicle ultrasonic sensor correction method and system
JP2016191614A (en) * 2015-03-31 2016-11-10 パナソニックIpマネジメント株式会社 Obstacle detection device, method of calculating humidity correction value, and method of determining ultrasonic wave reception threshold
US20180095057A1 (en) * 2016-10-05 2018-04-05 Ford Global Technologies, Llc Systems and methods for humidity determination and uses thereof
DE102018119266B3 (en) * 2018-08-08 2019-09-12 Valeo Schalter Und Sensoren Gmbh Method for operating an ultrasonic sensor by excitation with a frequency-coded signal, computer program product and ultrasound sensor
CN110703233A (en) * 2019-10-17 2020-01-17 苏州优达斯汽车科技有限公司 Temperature and humidity compensation method for sensitivity of ultrasonic sensor

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHANG TAO; ZHAO WEIGUO AND ZHANG SHENGYI: "The self-adaptive threshold method of echo signal for gas ultrasonic flowmeter", CHINESE JOURNAL OF SENSORS AND ACTUATORS, vol. 31, no. 12, pages 1853 - 7 *
潘康福: "基于超声波测距的倒车防撞报警系统研究", 南京邮电大学, vol. 2018, no. 02, pages 1 - 60 *
苏松恺等: "温度补偿在超声波测距中的应用", 上海汽车, no. 05, pages 44 - 47 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114910758A (en) * 2022-05-17 2022-08-16 国网黑龙江省电力有限公司佳木斯供电公司 Switch equipment partial discharge detection method based on intelligent sound and electricity combined sensing
CN114910758B (en) * 2022-05-17 2023-05-12 国网黑龙江省电力有限公司佳木斯供电公司 Switch equipment partial discharge detection method based on intelligent sound-electricity combined sensing

Similar Documents

Publication Publication Date Title
CN209894972U (en) Acoustic distance measuring circuit
CN107064939B (en) Circuit for measuring acoustic distance
US11112495B2 (en) Method for acoustic distance time of flight compensation
US7010974B2 (en) Method for measuring a fill level
US11885874B2 (en) Acoustic distance measuring circuit and method for low frequency modulated (LFM) chirp signals
US11231492B2 (en) Radar fill level measurement device and method for operating a radar fill level measurement device
CN110850416B (en) Distance measuring method, ultrasonic distance measuring device, electric appliance and computer readable storage medium
US10670705B2 (en) Method for avoiding phase jumps
CN112285679A (en) Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device
CN112285680A (en) Ultrasonic sensor adjustment method, distance measurement method, medium, and electronic device
CN111373251B (en) Method and device for processing echo signals received by an acoustic sensor
US11346837B2 (en) Method and apparatus for detecting a property of a liquid medium, urea sensor system, computer program product and computer-readable storage medium
CN107576964B (en) Echo time measuring method of linear frequency conversion signal
JP6289788B1 (en) Object detection device
US9103764B2 (en) Method and system for determining the time-of-flight of an acoustic signal
US6865137B2 (en) Method for pulse offset calibration in time of flight ranging systems
US7010973B2 (en) Method and apparatus for improving accuracy in ultrasonic echo ranging systems
CN208654310U (en) Laser radar
CN112162289B (en) Ultrasonic ranging method and device
JP7354848B2 (en) Object detection device and object detection program
JP2022107424A (en) Object detector
Moszynski et al. TIME-VARIED-GAIN CORRECTION FOR DIGITAL ECHOSOUNDERS.
CN116858359A (en) Underground cavity medium sound velocity measurement system, method, electronic equipment and medium
JP2001521165A (en) A method for measuring the thickness of an object, more specifically the wall thickness of an extruded object such as a plastic tube
JPS6394184A (en) Ultrasonic wave displacement detecting device

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