Ultrasonic positioning method and electronic equipment
By installing ultrasonic devices and multiple receiving devices on the object to be located, obtaining the ultrasonic time difference and combining it with the weighted least squares method or joint Kalman filtering method, the problem of low accuracy caused by the multipath effect in ultrasonic signal positioning is solved, and high-precision object positioning is achieved.
Patent Information
- Application Number
- CN202510888951.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-30
AI Technical Summary
Existing ultrasonic signal positioning methods are easily affected by multipath effects, resulting in low positioning accuracy.
An ultrasonic device is installed on the object to be located, and multiple receiving devices are set up in the workspace. The ultrasonic time difference corresponding to each receiving device is obtained, and the position of the object to be located is determined based on the ultrasonic time difference and sound speed. The sliding window cross-correlation method and the weighted least squares method or the joint Kalman filter method are used for positioning.
By comprehensively analyzing the ultrasonic time difference and sound speed, the influence of multipath effect is avoided, the positioning accuracy is improved, and high-precision object positioning is achieved.
Smart Images

Figure CN120722281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic positioning, and in particular to an ultrasonic positioning method and electronic equipment. Background Art
[0002] With the continuous development of science and technology, various devices (such as robots, unmanned vehicles, and precision manufacturing equipment) have appeared in industrial production and daily life. Among them, the precise arrival of devices at their working positions is an important condition for ensuring their accurate operation. Therefore, positioning the devices during use has become an indispensable step. Existing methods for positioning devices include visual positioning, wireless radio frequency positioning, inertial navigation positioning, and ultrasonic signal positioning.
[0003] Among these methods, ultrasonic signal positioning is the most common positioning method due to its good physical properties, including good reflectivity, strong penetration, easy concentration of propagation energy, simple structure, low cost, high ranging accuracy, and good stability. However, the current ultrasonic signal positioning usually uses the ultrasonic time difference received by a single radio device to determine the position of the object to be located. It is easily affected by the multipath effect during positioning, resulting in low positioning accuracy of the ultrasonic positioning method. Summary of the Invention
[0004] In view of this, an object of the present invention is to provide an ultrasonic positioning method and electronic equipment, which can solve the technical problem that the existing technology is easily affected by the multipath effect during positioning, resulting in low positioning accuracy.
[0005] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0006] In a first aspect, an embodiment of the present invention provides an ultrasound positioning method, comprising:
[0007] An ultrasonic device is installed on the object to be positioned, and a plurality of sound receiving devices are arranged in a working space of the object to be positioned; wherein the sound receiving devices are arranged at different positions in the working space;
[0008] Obtaining the ultrasonic time difference corresponding to each of the sound receiving devices; wherein the ultrasonic time difference is the time difference between the ultrasonic signal emitted by the ultrasonic device and when it reaches each of the sound receiving devices;
[0009] The position of the object to be located is determined based on the ultrasonic time differences and the sound velocity of the ultrasonic signal.
[0010] Furthermore, an embodiment of the present invention provides a first possible implementation of the first aspect, wherein the step of obtaining the ultrasonic time difference corresponding to each of the sound receiving devices includes:
[0011] After the ultrasonic device emits an ultrasonic signal, the ultrasonic signal received by each of the sound receiving devices is processed based on the delayed sampling method to obtain multiple integer sampling delays; wherein the delayed sampling method includes a sliding window cross-correlation method;
[0012] The ultrasonic time difference corresponding to each of the sound receiving devices is determined based on each of the integer sampling delays and the frequency of the ultrasonic signal.
[0013] Furthermore, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein the step of determining the position of the object to be located based on each of the ultrasonic time differences and the sound velocity of the ultrasonic signal includes:
[0014] Establishing a three-dimensional coordinate system based on the workspace of the object to be positioned to obtain a positioning coordinate system;
[0015] Inputting the ultrasonic time difference and the sound velocity of the ultrasonic signal as input parameters into a positioning method to determine the three-dimensional coordinates of the object to be positioned in the positioning coordinate system; wherein the positioning method includes a weighted least squares method and a joint Kalman filter method;
[0016] The three-dimensional coordinates of the object to be positioned in the positioning coordinate system determine the position of the object to be positioned in the workspace.
[0017] Furthermore, an embodiment of the present invention provides a third possible implementation of the first aspect, wherein the ultrasonic device emits two ultrasonic signals having mutually prime frequencies; wherein the two ultrasonic signals are respectively a first ultrasonic signal and a second ultrasonic signal;
[0018] The step of processing the ultrasonic signals received by each of the sound receiving devices based on the delayed sampling method to obtain a plurality of integer sampling delays includes:
[0019] The first ultrasonic signal or the second ultrasonic signal received by each of the sound receiving devices is processed based on the sliding window cross-correlation method to obtain a first integer sampling delay or a second integer sampling delay corresponding to each of the sound receiving devices.
[0020] Furthermore, an embodiment of the present invention provides a fourth possible implementation of the first aspect, wherein the step of determining the ultrasonic time difference corresponding to each of the sound receiving devices based on each of the integer sampling delays and the frequency of the ultrasonic signal includes:
[0021] respectively calculating a ratio of each of the first integer sampling delays to the frequency of the first ultrasonic signal to obtain a first time difference corresponding to each of the sound receiving devices;
[0022] determining a first phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each of the sound receiving devices;
[0023] The sum of the first phase difference and the first time difference corresponding to each of the sound receiving devices is calculated respectively to obtain the ultrasonic time difference corresponding to each of the sound receiving devices.
[0024] Furthermore, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the step of determining the first phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each of the sound receiving devices includes:
[0025] The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are processed respectively based on a time-domain-frequency domain transformation algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain transformation algorithm includes a fast Fourier transform algorithm;
[0026] A first phase difference corresponding to each of the sound receiving devices is determined based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each of the first time differences.
[0027] Furthermore, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the step of determining the ultrasonic time difference corresponding to each of the sound receiving devices based on each of the integer sampling delays and the frequency of the ultrasonic signal includes:
[0028] respectively calculating a ratio of each second integer sampling delay to the frequency of the second ultrasonic signal to obtain a second time difference corresponding to each of the sound receiving devices;
[0029] determining a second phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each of the sound receiving devices;
[0030] The sum of the second phase difference and the second time difference corresponding to each of the sound receiving devices is calculated respectively to obtain the ultrasonic time difference corresponding to each of the sound receiving devices.
[0031] Furthermore, an embodiment of the present invention provides a seventh possible implementation of the first aspect, wherein the step of determining the second phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each of the sound receiving devices includes:
[0032] The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are processed respectively based on a time-domain-frequency domain transformation algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain transformation algorithm includes a fast Fourier transform algorithm;
[0033] The second phase difference corresponding to each of the sound receiving devices is determined based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each of the second time differences.
[0034] Furthermore, the embodiment of the present invention provides an eighth possible implementation of the first aspect, further comprising the steps of:
[0035] The speed of sound of the ultrasonic signal is updated based on the temperature and humidity of the workspace.
[0036] In a second aspect, an embodiment of the present invention further provides an electronic device, characterized in that it includes: a processor and a storage device;
[0037] The storage device stores a computer program, which, when executed by the processor, executes the ultrasonic positioning method described above.
[0038] An embodiment of the present invention provides an ultrasonic positioning method and electronic device. The ultrasonic positioning method includes: installing an ultrasonic device on an object to be positioned, disposing multiple sound receiving devices within a workspace of the object to be positioned; wherein the sound receiving devices are disposed at different positions within the workspace; obtaining an ultrasonic time difference corresponding to each sound receiving device; wherein the ultrasonic time difference is the time difference between an ultrasonic signal emitted by the ultrasonic device and when it reaches each sound receiving device; and determining the position of the object to be positioned based on each ultrasonic time difference and the sound velocity of the ultrasonic signal. The present invention installs an ultrasonic device on the object to be positioned, uses the ultrasonic device to emit an ultrasonic signal, and disposes multiple sound receiving devices within the workspace for receiving the ultrasonic signal. Due to the different positions of the sound receiving devices, the ultrasonic signal arrives at each sound receiving device at different times. The ultrasonic time difference between the ultrasonic signal emitted by the ultrasonic device and when it reaches each sound receiving device is obtained. Since the ultrasonic device is disposed on the object to be positioned, the distance between the object to be positioned and each sound receiving device can be determined by comprehensively analyzing the sound velocity of the ultrasonic signal and the ultrasonic time difference corresponding to each sound receiving device, thereby determining the position of the object to be positioned within the workspace. This avoids the influence of multipath effects during positioning and improves positioning accuracy.
[0039] Other features and advantages of the embodiments of the present invention will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technologies of the embodiments of the present invention.
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A schematic flow chart of an ultrasonic positioning method provided in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0044] This embodiment provides an ultrasonic positioning method, which can be applied to electronic devices such as computers. Figure 1 The flowchart of an ultrasonic positioning method shown in FIG. 1 mainly includes the following steps:
[0045] Step S100: installing an ultrasonic device on the object to be positioned, and setting a plurality of sound receiving devices in a working space of the object to be positioned; wherein the sound receiving devices are set at different positions in the working space;
[0046] In the above steps, an ultrasonic device (usually a loudspeaker) is installed on the object to be located, so that the object to be located can use the ultrasonic device to emit ultrasonic signals in real time, and multiple sound receiving devices are set at different positions in the working space of the object to be located (the number of sound receiving devices (usually microphones) set is usually greater than or equal to four), and the ultrasonic signals of the ultrasonic device are received by the sound receiving devices, thereby determining the position of the object to be located in the working space.
[0047] Step S300, obtaining the ultrasonic time difference corresponding to each sound receiving device; wherein the ultrasonic time difference is the time difference between the ultrasonic signal emitted by the ultrasonic device and the time when it reaches each sound receiving device;
[0048] In the above steps, it is necessary to set a time synchronization module (usually an oven-controlled crystal oscillator (OCXO)) and use optical fiber or a precision time protocol to achieve synchronization between the ultrasonic device and each receiving device, compressing the synchronization error between each node to within 100 ps, and controlling the ultrasonic device to emit an ultrasonic signal. Since the receiving devices are arranged at different positions in the workspace, the time at which each receiving device receives the ultrasonic signal after the ultrasonic device emits the ultrasonic signal is different. At the same time, there is also a time difference between the time when the ultrasonic device emits the ultrasonic signal and the time when each receiving device receives the ultrasonic signal. The corresponding ultrasonic time difference of each receiving device is used to facilitate determining the position of the object to be located. Among them, the ultrasonic signal (i.e., analog signal) received by each receiving device is quantized and cached in the processing unit by using a field-programmable gate array-time-to-digital converter (FPGA-TDC) for subsequent retrieval.
[0049] Step S500, determining the position of the object to be located based on the ultrasonic time differences and the sound velocity of the ultrasonic signal;
[0050] In the above steps, the distance between the ultrasonic device (i.e., the object to be located) and each sound receiving device can be determined by utilizing the ultrasonic time difference corresponding to each sound receiving device and the sound velocity of the ultrasonic signal, thereby determining the position of the object to be located in the workspace.
[0051] The ultrasonic method provided by an embodiment of the present invention installs an ultrasonic device on the object to be located, uses the ultrasonic device to emit an ultrasonic signal, and sets up multiple sound receiving devices in the workspace for receiving the ultrasonic signal. Since the setting positions of the sound receiving devices are different, the time when the ultrasonic signal reaches each sound receiving device is different. The ultrasonic time difference between the ultrasonic signal emitted by the ultrasonic device and the arrival at each sound receiving device is obtained. Since the ultrasonic device is set on the object to be located, the distance between the object to be located and each sound receiving device can be determined by comprehensively analyzing the sound speed of the ultrasonic signal and the ultrasonic time difference corresponding to each sound receiving device, thereby determining the position of the object to be located in the workspace, avoiding the influence of the multipath effect during positioning, and improving the positioning accuracy.
[0052] In one embodiment, the specific implementation method for obtaining the ultrasonic time difference corresponding to each sound receiving device provided in this embodiment further includes:
[0053] Step S310: After the ultrasonic device emits an ultrasonic signal, the ultrasonic signal received by each receiving device is processed based on a delayed sampling method to obtain a plurality of integer sampling delays; wherein the delayed sampling method includes a sliding window cross-correlation method;
[0054] Set the size of the sliding window in the sliding window cross-correlation method (usually 1ms), and use the sliding window to find the peak value of the ultrasonic signal received by each receiver, so as to determine the integer sampling delay n corresponding to each receiver. i ; where n i is the integer sampling delay corresponding to the i-th radio device.
[0055] Step S330 , determining the ultrasonic time difference corresponding to each sound receiving device based on each integer sampling delay and the frequency of the ultrasonic signal;
[0056] In the above steps, a rough ultrasonic time-of-flight (TOF) is obtained based on the low-frequency channel. Specifically, the frequency of the ultrasonic signal is set to f, and the ratio of each integer sampling delay to the frequency f is calculated to determine the ultrasonic time difference corresponding to the receiving device:
[0057]
[0058] Among them, τ i is the ultrasonic time difference corresponding to the i-th receiving device.
[0059] In one embodiment, this embodiment provides a specific implementation method for determining the position of the object to be located based on each ultrasonic time difference and the sound velocity of the ultrasonic signal, and further includes:
[0060] Step S510, establishing a three-dimensional coordinate system based on the workspace of the object to be positioned to obtain a positioning coordinate system;
[0061] A three-dimensional coordinate system is established by selecting any point as the origin in the working space of the object to be positioned to obtain a positioning coordinate system. Specifically, any radio device can be selected as the origin, an xy plane is established based on its horizontal plane, and a z axis is established based on its vertical direction to obtain a positioning coordinate system.
[0062] Step S530: Inputting each ultrasonic time difference and the sound velocity of the ultrasonic signal as input parameters into a positioning method to determine the three-dimensional coordinates of the object to be positioned in the positioning coordinate system; wherein the positioning method includes a weighted least squares method and a joint Kalman filter method;
[0063] The ultrasonic time difference and the sound velocity of the ultrasonic signal are input as input parameters to the weighted least squares method or the Unscented Kalman Filter (UKF) method to determine the three-dimensional coordinates of the object to be located in the positioning coordinate system. Specifically, the Unscented Kalman Filter method has a built-in measurement equation:
[0064] h i =τ i ×c;
[0065] Among them, h i is the distance between the ith receiver and the object to be located; c is the speed of the ultrasonic signal;
[0066] The ultrasonic time difference and the sound velocity of the ultrasonic signal are input into the Kalman filter method as input parameters to obtain the state vector of the object to be located:
[0067] H = [x, y, z, c] T ;
[0068] Wherein, H is the state vector of the object to be located; x is the horizontal coordinate of the object to be located in the positioning coordinate system; y is the horizontal coordinate of the object to be located in the positioning coordinate system; z is the horizontal coordinate of the object to be located in the positioning coordinate system; c is the speed of sound of the ultrasonic signal;
[0069] The three-dimensional coordinates (x, y, z) of the object to be positioned in the positioning coordinate system can be determined based on x, y, and z. At the same time, the update frequency of the three-dimensional coordinates of the object to be positioned in the positioning coordinate system is 200 Hz.
[0070] Step S550, the three-dimensional coordinates of the object to be positioned in the positioning coordinate system are used to determine the position of the object to be positioned in the workspace;
[0071] The position of the object to be positioned in the workspace can be accurately determined based on the three-dimensional coordinates (x, y, z) of the object to be positioned in the positioning coordinate system.
[0072] In an embodiment of the present invention, the three-dimensional coordinates of the object to be positioned in the positioning coordinate system can be transmitted in real time (real-time transmission frequency is 200 Hz) to the controller of the object to be positioned (such as a robot or an automatic guided vehicle (AGV)) through data transmission technology (Ethernet for Control Automation Technology (EtherCAT) or Robot Operating System 2 Data Distribution Service (ROS2DDS)). The controller can plan the movement trajectory of the object to be positioned based on the current position of the object to be positioned, thereby realizing a closed loop of the real-time posture and movement trajectory of the object to be positioned; through data transmission technology, the delay of the three-dimensional coordinates in transmitting to the controller of the object to be positioned is reduced to within 4.8 ms.
[0073] In one embodiment, the present embodiment provides an ultrasonic device that emits two ultrasonic signals with mutually prime frequencies; wherein the two ultrasonic signals are a first ultrasonic signal and a second ultrasonic signal;
[0074] The ultrasonic device (a dual-frequency piezoelectric transducer speaker can be used) emits two ultrasonic signals with mutually prime center frequencies, including a first ultrasonic signal and a second ultrasonic signal; wherein the frequency of the first ultrasonic signal is f1 (23kHz can be used), and the frequency of the second ultrasonic signal is f2 (37kHz can be used). The frame structure of the first ultrasonic signal and the second ultrasonic signal is modulated using a binary phase shift keying-M (BPSK-M) sequence, and each frame of the ultrasonic signal is controlled to sequentially send a synchronization word (which can be set to 15 bits), an absolute timestamp (which can be set to 48 bits), and an M-sequence (the length can be set to 2 15 -1).
[0075] The steps of processing the ultrasonic signals received by each receiving device based on the delayed sampling method to obtain multiple integer sampling delays include:
[0076] Step S311 , processing the first ultrasonic signal or the second ultrasonic signal received by each sound receiving device based on a sliding window cross-correlation method to obtain a first integer sampling delay or a second integer sampling delay corresponding to each sound receiving device;
[0077] Use a sliding window (the window size is usually 1ms) to find the peak value of the first ultrasonic signal or the second ultrasonic signal received by each receiving device, so as to determine the first integer sampling delay n corresponding to each receiving device. 1i or a second integer sample delay n 2i ; where n 1i is the first integer sampling delay corresponding to the i-th radio receiver; n 2i is the second integer sampling delay corresponding to the i-th radio receiver.
[0078] In one embodiment, this embodiment provides a specific implementation method for determining the ultrasonic time difference corresponding to each receiving device based on each integer sampling delay and the frequency of the ultrasonic signal, further comprising:
[0079] Step S331 , respectively calculating the ratio of each first integer sampling delay to the frequency of the first ultrasonic signal to obtain a first time difference corresponding to each sound receiving device;
[0080] Calculate each first integer sample delay n 1i The ratio of the frequency f1 of the first ultrasonic signal to the first time difference corresponding to each sound receiving device is:
[0081]
[0082] Among them, τ 1i is the first time difference corresponding to the i-th receiving device.
[0083] Step S333, determining a first phase difference corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each sound receiving device;
[0084] A phase difference calculation is performed based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each sound receiving device to determine the first phase difference corresponding to each sound receiving device; wherein the first phase difference is the phase difference between the first ultrasonic signal and the second ultrasonic signal.
[0085] Step S335 , calculating the sum of the first phase difference and the first time difference corresponding to each sound receiving device, to obtain the ultrasonic time difference corresponding to each sound receiving device;
[0086] Calculate the first phase difference and first time difference τ corresponding to each receiving device 1i The sum of , the ultrasonic time difference corresponding to each receiving device is obtained:
[0087]
[0088] Where, Δtφ 1i is the first phase difference corresponding to each i-th receiving device, Δt_total i is the ultrasonic time difference corresponding to each i-th receiving device.
[0089] In one embodiment, this embodiment provides a specific implementation method for determining the first phase difference corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each sound receiving device, further comprising:
[0090] Step S3331, processing the frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal respectively based on a time-domain-frequency domain conversion algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain conversion algorithm includes a fast Fourier transform algorithm;
[0091] The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are respectively Fourier transformed by a fast Fourier transform algorithm to obtain a first phase φ1 and a second phase φ2.
[0092] Step S3333, determining a first phase difference corresponding to each sound receiving device based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each first time difference;
[0093] Determine the first phase difference corresponding to each sound receiving device based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each first time difference:
[0094]
[0095] Where, Δtφ 1i is the first phase difference corresponding to the i-th radio receiver.
[0096] In one embodiment, this embodiment provides a specific implementation method for determining the ultrasonic time difference corresponding to each receiving device based on each integer sampling delay and the frequency of the ultrasonic signal, further comprising:
[0097] Step S332 , respectively calculating the ratio of each second integer sampling delay to the frequency of the second ultrasonic signal to obtain a second time difference corresponding to each sound receiving device;
[0098] Calculate each second integer sample delay n 2i The ratio of the frequency f2 of the second ultrasonic signal to the first time difference corresponding to each sound receiving device is:
[0099]
[0100] Among them, τ 2i is the second time difference corresponding to the i-th sound receiving device.
[0101] Step S334, determining a second phase difference corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each sound receiving device;
[0102] A phase difference calculation is performed based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each sound receiving device to determine the second phase difference corresponding to each sound receiving device; wherein the second phase difference is also the phase difference between the first ultrasonic signal and the second ultrasonic signal.
[0103] Step S336, calculating the sum of the second phase difference and the second time difference corresponding to each sound receiving device, to obtain the ultrasonic time difference corresponding to each sound receiving device;
[0104] Calculate the second phase difference and second time difference τ corresponding to each receiving device 1i The sum of , the ultrasonic time difference corresponding to each receiving device is obtained:
[0105] Δt_total i =τ 2i +Δtφ 2i ;
[0106] Where, Δtφ 2i is the second phase difference corresponding to each i-th radio device, Δt_total i is the ultrasonic time difference corresponding to each i-th receiving device.
[0107] In one embodiment, this embodiment provides a specific implementation method for determining the second phase difference corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each sound receiving device, further comprising:
[0108] Step S3341, processing the frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal respectively based on a time-domain-frequency domain conversion algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain conversion algorithm includes a fast Fourier transform algorithm;
[0109] The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are respectively Fourier transformed by a fast Fourier transform algorithm to obtain a first phase φ1 and a second phase φ2.
[0110] Step S3343, determining a second phase difference corresponding to each sound receiving device based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each second time difference;
[0111] Determine the second phase difference corresponding to each sound receiving device based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each second time difference:
[0112]
[0113] Where, Δtφ 2i is the second phase difference corresponding to the i-th radio device.
[0114] In one embodiment, the specific implementation of the ultrasound positioning method provided in this embodiment further includes the steps of:
[0115] Step S700, updating the speed of sound of the ultrasonic signal based on the temperature and humidity of the working space;
[0116] Since the temperature and humidity in the space will affect the sound velocity of the ultrasonic signal, a temperature sensor (temperature probe) and a humidity sensor (humidity probe) are set in the workspace to obtain the temperature and humidity in the workspace; the sampling frequency of the temperature sensor and humidity sensor can be set to 10Hz;
[0117] Update the speed of sound of the ultrasonic signal in real time based on the temperature and humidity in the workspace:
[0118] c=331.3+0.606×T+0.0124×RH;
[0119] Where c is the speed of sound of the ultrasonic signal; T is the temperature in the working space; RH is the humidity in the working space;
[0120] The sound velocity of the ultrasonic signal updated in real time is used; wherein the update interval of the sound velocity of the ultrasonic signal can be set to 100ms.
[0121] This embodiment also provides an electronic device, which includes: a processor and a storage device;
[0122] The storage device stores a computer program, which executes the above-mentioned ultrasonic positioning method when executed by the processor.
[0123] The ultrasonic positioning method provided by the embodiment of the present invention uses an ultrasonic device (a dual-frequency piezoelectric transducer speaker can be used) to emit two mutually prime dual-frequency ultrasonic signals, sets the ultrasonic frame structure so that each frame of the ultrasonic signal is ultimately output as an M sequence (i.e., a broadband pseudo-random coding sequence), thereby improving the ultrasonic signal's ability to resist industrial noise (resistant to industrial noise greater than 25dB) and allowing the dual-frequency ultrasonic signals to be concurrent; multiple (≥4) sound receiving devices (micro-electromechanical system microphones can be used) are set in the working space of the object to be positioned, and a high-quality factor oven-controlled crystal oscillator (100ps level) is used. A precise time protocol is set up or each receiver and ultrasonic device is connected via optical fiber to achieve synchronization of each receiver and ultrasonic device (delay between each device is ≤ 100ms). The ultrasonic time difference corresponding to each receiver is determined based on the phase difference of the mutually prime dual-frequency ultrasonic signal and the flight time of the ultrasonic signal from the ultrasonic device to the reception of each receiver. Hybrid ranging of mutually prime dual-frequency phase difference and ultrasonic signal flight time is achieved. The obtained ultrasonic time difference has both the centimeter-level accuracy of flight time capture and the 0.1mm accuracy of mutually prime dual-frequency phase difference capture, weakening the influence of multipath false peaks and improving the positioning accuracy of the object to be located.
[0124] By setting a temperature sensor and a humidity sensor, the temperature and humidity in the workspace are determined in real time, and the sound velocity of the ultrasonic signal is updated in real time based on the temperature and humidity. The updated sound velocity of the ultrasonic signal and the ultrasonic time difference corresponding to each receiving device are input as input parameters into the joint Kalman filter algorithm to determine the three-dimensional coordinates of the object to be located in the positioning coordinate system, thereby determining the position of the object to be located in the workspace, eliminating most (≥80%) of the influence of environmental drift on the positioning accuracy, so that the object to be located can still stably obtain high-precision (errors of horizontal, vertical and vertical coordinates are all ≤±0.1mm) three-dimensional coordinates even in a multipath and noisy environment, thereby improving the positioning accuracy of the object to be located; the ultrasonic positioning method provided by the embodiment of the present invention has the advantages of high anti-interference, high real-time performance, and easy scalability, and is suitable for scenarios such as collaborative robots, high-precision unmanned guided vehicles, semiconductor and optical assembly lines, VR / AR space calibration, etc.
[0125] Based on the above embodiment, this embodiment provides an example of using the above ultrasonic positioning method to locate an object to be positioned, which can be specifically performed by referring to the following steps:
[0126] Step S801: An ultrasonic device, specifically a dual-frequency piezoelectric transducer speaker (transmitting power can be set to ≤115dB SPL), is placed on the object to be located (a robot, a robotic arm, or an automated guided vehicle can be used). Multiple (≥4) sound receiving devices, specifically micro-electromechanical system microphones, are placed in the workspace of the object to be located.
[0127] An optical fiber is set up to connect the ultrasonic device and each receiving device through an optical fiber distributor or the ultrasonic device and each receiving device through a precision time protocol. The time of the global master clock (Grand-Master) is obtained through an oven-controlled crystal oscillator. The oven-controlled crystal oscillator with the obtained time is used to achieve synchronization between the devices. At the same time, a delay calibrator is set up to compensate for various delays in the synchronization process.
[0128] Step S803: The class D driver drives the ultrasonic device to emit a first ultrasonic signal and a second ultrasonic signal. Each sound receiving device receives the first ultrasonic signal and the second ultrasonic signal, and quantizes the first ultrasonic signal and the second ultrasonic signal using the FPGA-TDC and caches them in a processing unit.
[0129] Step S805: Process the first ultrasonic signal or the second ultrasonic signal received by each sound receiving device based on a sliding window cross-correlation method to obtain a first integer sampling delay n corresponding to each sound receiving device. 1i or a second integer sample delay n 2i ;
[0130] Step S807: obtaining a first time difference τ corresponding to each sound receiving device based on the first integer sampling delay and the frequency of the first ultrasonic signal. 1i ;
[0131] Determine a first phase difference Δtφ corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each sound receiving device. 1i ;.
[0132] Based on the first phase difference and the first time difference corresponding to each sound receiving device, the ultrasonic time difference Δt_total corresponding to each sound receiving device is obtained. i ;
[0133] Alternatively, the second time difference τ corresponding to each sound receiving device is obtained based on the second integer sampling delay and the frequency of the second ultrasonic signal. 2i ;
[0134] Determine the second phase difference Δtφ corresponding to each sound receiving device based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each sound receiving device. 2i ;.
[0135] Based on the first phase difference and the first time difference corresponding to each sound receiving device, the ultrasonic time difference Δt_total corresponding to each sound receiving device is obtained. i ;
[0136] Step S809: establishing a three-dimensional coordinate system based on the workspace of the object to be positioned to obtain a positioning coordinate system;
[0137] A temperature probe and a humidity probe are set in the workspace to determine the temperature and humidity in the workspace in real time, and the sound velocity of the ultrasonic signal is updated based on the real-time determined temperature and humidity;
[0138] The updated sound velocity of the ultrasonic signal and the ultrasonic time difference corresponding to each receiving device are input as input parameters to the joint Kalman filter algorithm (weighted least squares method and trilateration method can also be used) to determine the three-dimensional coordinates of the object to be located in the positioning coordinate system;
[0139] Determining the position of the object to be positioned in the workspace based on the three-dimensional coordinates of the object to be positioned in the positioning coordinate system;
[0140] In step S811, the three-dimensional coordinates of the object to be positioned in the positioning coordinate system are pushed to the controller of the object to be positioned (robot, robotic arm, automatic guided vehicle) in real time through Ethernet control automation technology or robot operating system 2 data distribution service to plan the subsequent operation trajectory of the object to be positioned.
[0141] The ultrasonic positioning method provided in the embodiment of the present invention can use the real-time position of the robot to enable it to plan its path, avoid obstacles, and perform other functions; it can also use the real-time position of the robotic arm to guide the robotic arm to complete precision assembly, welding, and other operations, thereby improving processing accuracy and efficiency; it can also use the real-time position of the automated guided vehicle to adjust the direction and speed of the automated guided vehicle to achieve precise navigation.
[0142] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0143] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. An ultrasonic positioning method, characterized in that: include: An ultrasonic device is installed on the object to be positioned, and a plurality of sound receiving devices are arranged in a working space of the object to be positioned; wherein the sound receiving devices are arranged at different positions in the working space; Obtaining the ultrasonic time difference corresponding to each of the sound receiving devices; wherein the ultrasonic time difference is the time difference between the ultrasonic signal emitted by the ultrasonic device and when it reaches each of the sound receiving devices; The position of the object to be located is determined based on the ultrasonic time differences and the sound velocity of the ultrasonic signal.
2. The ultrasonic positioning method according to claim 1, wherein: The step of obtaining the ultrasonic time difference corresponding to each of the sound receiving devices includes: After the ultrasonic device emits an ultrasonic signal, the ultrasonic signal received by each of the sound receiving devices is processed based on the delayed sampling method to obtain multiple integer sampling delays; wherein the delayed sampling method includes a sliding window cross-correlation method; The ultrasonic time difference corresponding to each of the sound receiving devices is determined based on each of the integer sampling delays and the frequency of the ultrasonic signal.
3. The ultrasonic positioning method according to claim 2, characterized in that: The step of determining the position of the object to be located based on the ultrasonic time differences and the sound velocity of the ultrasonic signal comprises: Establishing a three-dimensional coordinate system based on the workspace of the object to be positioned to obtain a positioning coordinate system; Inputting the ultrasonic time difference and the sound velocity of the ultrasonic signal as input parameters into a positioning method to determine the three-dimensional coordinates of the object to be positioned in the positioning coordinate system; wherein the positioning method includes a weighted least squares method and a joint Kalman filter method; The three-dimensional coordinates of the object to be positioned in the positioning coordinate system determine the position of the object to be positioned in the workspace.
4. The ultrasonic positioning method according to claim 2, characterized in that: The ultrasonic device emits two ultrasonic signals with mutually prime frequencies; wherein the two ultrasonic signals are respectively a first ultrasonic signal and a second ultrasonic signal; The step of processing the ultrasonic signals received by each of the sound receiving devices based on the delayed sampling method to obtain a plurality of integer sampling delays includes: The first ultrasonic signal or the second ultrasonic signal received by each of the sound receiving devices is processed based on the sliding window cross-correlation method to obtain a first integer sampling delay or a second integer sampling delay corresponding to each of the sound receiving devices.
5. The ultrasonic positioning method according to claim 4, characterized in that: The step of determining the ultrasonic time difference corresponding to each of the sound receiving devices based on each of the integer sampling delays and the frequency of the ultrasonic signal comprises: respectively calculating a ratio of each of the first integer sampling delays to the frequency of the first ultrasonic signal to obtain a first time difference corresponding to each of the sound receiving devices; determining a first phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each of the sound receiving devices; The sum of the first phase difference and the first time difference corresponding to each of the sound receiving devices is calculated respectively to obtain the ultrasonic time difference corresponding to each of the sound receiving devices.
6. The ultrasonic positioning method according to claim 5, characterized in that: The step of determining the first phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the first time difference corresponding to each of the sound receiving devices includes: The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are processed respectively based on a time-domain-frequency domain transformation algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain transformation algorithm includes a fast Fourier transform algorithm; A first phase difference corresponding to each of the sound receiving devices is determined based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each of the first time differences.
7. The ultrasonic positioning method according to claim 4, characterized in that: The step of determining the ultrasonic time difference corresponding to each of the sound receiving devices based on each of the integer sampling delays and the frequency of the ultrasonic signal comprises: respectively calculating a ratio of each second integer sampling delay to the frequency of the second ultrasonic signal to obtain a second time difference corresponding to each of the sound receiving devices; determining a second phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each of the sound receiving devices; The sum of the second phase difference and the second time difference corresponding to each of the sound receiving devices is calculated respectively to obtain the ultrasonic time difference corresponding to each of the sound receiving devices.
8. The ultrasonic positioning method according to claim 7, characterized in that: The step of determining the second phase difference corresponding to each of the sound receiving devices based on the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and the second time difference corresponding to each of the sound receiving devices includes: The frequency of the first ultrasonic signal and the frequency of the second ultrasonic signal are processed respectively based on a time-domain-frequency domain transformation algorithm to obtain a first phase and a second phase; wherein the time-domain-frequency domain transformation algorithm includes a fast Fourier transform algorithm; The second phase difference corresponding to each of the sound receiving devices is determined based on the first phase, the second phase, the frequency of the first ultrasonic signal, the frequency of the second ultrasonic signal, and each of the second time differences.
9. The ultrasonic positioning method according to claim 1, characterized in that: Also includes the steps: The speed of sound of the ultrasonic signal is updated based on the temperature and humidity of the workspace.
10. An electronic device, characterized in that: include: processors and storage devices; The storage device stores a computer program, which, when executed by the processor, executes the method according to any one of claims 1 to 9.
Citation Information
Cited By
Curtain wall panel positioning confirmation method and device, electronic equipment and storage medium
CN121878700A