A convenient real-time acoustic ranging system with high sampling rate and high precision

By designing 192kHz high sampling rate board hardware, FPGA software and real-time ranging software, high-precision real-time acoustic ranging is achieved, solving the problem of difficult to achieve sub-mm-level ranging accuracy in the existing technology, and improving the stability of ranging results.

CN114895311BActive Publication Date: 2025-06-03HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210380798.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-10
Publication Date
2025-06-03
Estimated Expiration
2042-04-10

AI Technical Summary

Technical Problem

Existing ultrasonic ranging technology is difficult to achieve sub-mm-level ranging accuracy, and existing equipment cannot realize software definition and visual convenient processing of transmitting and receiving waveforms.

Method used

A convenient real-time acoustic ranging system with high sampling rate is designed, using 192kHz high sampling rate board hardware, FPGA software and real-time ranging software to realize transmission and reception synchronization and real-time ranging.

Benefits of technology

It realizes the distance measurement accuracy of sub-mm, and can perform software definition and visualization of the transmission and reception waveforms, improving the stability of the distance measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114895311B_ABST
    Figure CN114895311B_ABST
Patent Text Reader

Abstract

A convenient real-time acoustic wave ranging system with high sampling rate and high precision, comprising: a board hardware, an FPGA software, and a real-time ranging software. The board hardware includes a USB sound card chip, a DAC, a MEMS digital microphone, and an FPGA module. The USB sound card chip is a dedicated sound card chip with a sampling rate of 192 kHz, communicating with the operating system; the DAC is a high-dynamic-range audio decoding chip, converting into an analog signal and outputting it to the speaker; the MEMS digital microphone has a wide-band response range; the FPGA module is a GW1N series chip, connecting to the MEMS digital microphone. The FPGA software realizes signal acquisition, low-pass and decimation filtering of the MEMS digital microphone, transmits the data to the USB sound card chip via an IIS encoder, and also generates precise clocks required for PDM and IIS signals, achieving consistent transceiver sampling rates. The real-time ranging software is implemented on the operating system, including real-time transceiver, cross-correlation, cross-correlation peak jitter elimination, and distance conversion modules. The present invention has a high sampling rate of 192 kHz with consistent transceiver, and can conveniently perform high-precision real-time ranging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ranging sensors, and relates to a convenient and precise ranging system based on acoustic signals, in particular to a convenient and real-time acoustic ranging system with high sampling rate and high precision. Background Art

[0002] In non-contact ranging technologies, ultrasonic ranging has unique advantages and is widely used. It is not affected by light conditions, can measure transparent targets, does not damage vision and hearing, has low cost and good universality. Existing ultrasonic ranging technologies often adopt the ultrasonic travel time method, that is, a dedicated ultrasonic transducer is used to emit high-frequency ultrasonic pulse signals, and the distance is indirectly measured by detecting the arrival time of the pulse first wave. In order to extract the arrival time of the first wave, some studies have proposed solutions such as the time threshold method for judging the first wave, the method of extracting the echo envelope, and the variable threshold amplitude discrimination method. However, the accuracy of this method for estimating the arrival time of the first wave is not high. In order to solve the problem that the first wave is difficult to identify in ultrasonic ranging, some studies have designed high-precision ranging methods based on the FMCW algorithm and the cross-correlation method, but it is difficult to achieve sub-millimeter ranging accuracy. The implementation of the FMCW algorithm and the cross-correlation method often requires convenient controllability of the acoustic transceiver platform, while existing ultrasonic ranging sensor devices often have their hardware set for fixed pulse ranging and cannot achieve software-defined transceiver waveforms and convenient visualization processing.

[0003] Currently, using audio devices to achieve precise acoustic ranging is a novel and convenient solution because it can perform convenient software-defined signal transceiver through a host computer (such as a computer, mobile phone and other terminals with operating systems). However, the sampling frequency Fs of audio devices is usually ≤48 kHz, and the available bandwidth B of some ordinary speakers is 4 kHz (the available frequency band for non-interference with hearing is 18 kHz - 22 kHz). If the FMCW algorithm that is positively correlated with the bandwidth B and the cross-correlation method that is positively correlated with the sampling frequency Fs are respectively adopted, the highest theoretical ranging resolutions are approximately 4.29 cm and 3.57 mm respectively (taking the indoor normal temperature of 20° as an example, the sound speed C≈343 m / s). Summary of the Invention

[0004] In order to overcome the above-mentioned disadvantages of the prior art, the purpose of the present invention is: to be able to conveniently achieve sub-millimeter ranging accuracy, starting from the cross-correlation ranging algorithm that is relatively easy to meet the requirements, design a board card with synchronous transceiver that meets a high sampling rate of 192 kHz (at this sampling rate, the ranging resolution δR = 343 / (2×192000)≈0.89 mm, that is, the system theoretical ranging resolution reaches sub-millimeter level), and based on this, propose a set of high-precision real-time acoustic ranging system solutions.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0006] A convenient real-time acoustic wave ranging system with high sampling rate and high precision, the main features of which include: board hardware, FPGA software, and real-time ranging software, where:

[0007] The board hardware mainly includes: a USB sound card chip, a DAC, a MEMS digital microphone, and an FPGA module;

[0008] The FPGA software is used to: realize the signal acquisition, low-pass and decimation filtering of the MEMS digital microphone, transmit the data to the USB sound card chip via the IIS encoder, and it also generates the precise clocks required for PDM and IIS signals to achieve consistent and synchronous transceiver sampling rates;

[0009] The real-time ranging software mainly includes: real-time transceiver, cross-correlation, cross-correlation peak jitter elimination, and distance conversion modules.

[0010] Preferably, for the board hardware, its USB sound card chip uses a dedicated sound card chip supporting a sampling rate of 192 kHz for USB communication with the operating system; the DAC uses a high-dynamic-range audio decoding chip to convert the IIS signal into an analog signal and output it to the speaker for playback, where the speaker unit is any high-frequency speaker; the MEMS digital microphone uses a digital microphone with a wide frequency band response range and is onboard on the board hardware; the FPGA module uses a GW1N series chip to connect and receive the PDM signal output by the MEMS digital microphone.

[0011] Preferably, for the FPGA software, it mainly plays a key role as a low-pass, decimation filter, and output timing, manifested in: the FPGA, as a timing generator, generates the clocks required for PDM and IIS signals from the main clock MCLK of the DAC, that is, divides the 49.152 MHz MCLK to provide a bit clock CLK of 3.072 MHz for the MEMS microphone and a clock of 192 kHz for the IIS encoder inside the FPGA, that is, to achieve a consistent transceiver sampling frequency Fs of 192 kHz.

[0012] Preferably, the real-time ranging software is deployed on the operating system and mainly includes:

[0013] The real-time transceiver module constructs a first-in-first-out queue (First Input First Output, FIFO, data length: 0.2 s × Fs) to store the recording signal, and realizes real-time non-blocking playback of the transmitted signal and recording by controlling the USB sound card driver built in the upper computer. The transmitted signal uses the non-interfering frequency band of 18 kHz - 22 kHz available for the high-frequency speaker and is designed as a chirp signal, and the signal parameters are: chirp period T = 0.02 s, fundamental frequency f c= 22 kHz, frequency bandwidth B = 4 kHz;

[0014] The cross - correlation module intercepts the transmitted signal of the same length as the FIFO, reverses the order, and then uses the time - domain convolution theorem to replace the cross - correlation operation to obtain the cross - correlation sequence of the transmitted and received signals.

[0015] The cross - correlation peak jitter elimination module: Since there are uncertain peak jitters in the real - time cross - correlation sequence, which leads to errors in identifying and extracting the translation amount Lag corresponding to the local peak. To minimize the error in extracting Lag, this software module extracts the Lag value from multiple cross - correlation peak curves in real time.

[0016] The distance conversion module uses the known initial position R ref as a reference to calculate the translation amount Lag of the target position relative to the reference position, and then refers to the formula: R=(C·Lag) / (2×Fs)+R ref to achieve the estimation of the distance, where C is the speed of sound. In addition, to improve the stability of the ranging result, the real - time ranging result is stored in a shorter FIFO for sliding - window Gaussian filtering and the mean value is taken as the final distance value.

[0017] Preferably, the specific steps of the cross - correlation peak jitter elimination module are as follows:

[0018] First, the multi - peak cross - correlation sequence is segmented by the size of Fs*T;

[0019] Then, the horizontal axis of each segmented cross - correlation sequence is normalized to the range of 0 - Fs*T;

[0020] Next, the Lag value corresponding to each peak is extracted and put into the cache to obtain a sequence of Lag values;

[0021] Finally, the mean value of the sequence of Lag values is taken to obtain the final Lag value.

[0022] Compared with the existing acoustic wave ranging system, the present invention can not only perform software definition of the transmitted and received waveforms and convenient visual processing, but also has transceiver synchronization and a high sampling rate of 192 kHz. By connecting any high - pitched speaker and operating system, a convenient acoustic wave ranging system can be constructed, and then the above - mentioned real - time ranging software is embedded. In an environment with stable temperature, humidity and no wind, the system can stably perform high - precision real - time ranging at the sub - millimeter level. Brief Description of the Drawings

[0023] Figure 1 is the overall hardware diagram of the system of the present invention.

[0024] Figure 2 is the overall FPGA software architecture of the FPGA module of the present invention.

[0025] Figure 3It is the overall flowchart of the real-time ranging software of the present invention.

[0026] Figure 4 It is the multi-peak cross-correlation sequence in the real-time ranging software module of the present invention.

[0027] Figure 5 It is the cross-correlation sequence diagram of a certain block in the real-time ranging software module of the present invention, with the horizontal axis normalized to the range of 0 to Fs*T. Specific Embodiments

[0028] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0029] Figure 1 A convenient real-time acoustic wave ranging system with high sampling rate and high precision is shown, mainly including: board hardware, FPGA software, and real-time ranging software part; the FPGA software is written into the FPGA module on the board hardware, and then the USB bus is used to connect the operating system and the board hardware. After the board is recognized by the host computer as an external USB audio playback and recording device, the audio cable is then connected to the DAC on the board hardware and a certain high-pitched speaker to complete the construction of the system.

[0030] The main features of the present invention include: these three parts: board hardware, FPGA software, and real-time ranging software. Among them, the board hardware mainly consists of a USB sound card chip, a DAC, a MEMS digital microphone, and an FPGA module; among them, the USB sound card chip uses a dedicated sound card chip with a sampling rate of 192 kHz to communicate with the operating system; the DAC uses a high-dynamic-range audio decoding chip to convert the IIS signal into an analog signal and output it to the speaker for playback. In addition, in order to better synchronize the DAC working in the asynchronous mode, an external high-speed crystal oscillator clock signal (generally 256*Fs = 49.152 MHz, where Fs = 192 kHz) is introduced to its IIS main clock interface (MCLK); the MEMS digital microphone uses a digital microphone module with a wide frequency band; the FPGA module uses a GW1N series chip, and the MEMS digital microphone continuously outputs PDM signals, and its bit clock input and data output pins are connected to the FPGA module.

[0031] The FPGA software is the key to realizing the functions and performance of the board hardware. Programs for low-pass, decimation filters, and output timing need to be designed. The overall architecture of the FPGA software is as Figure 2As shown. In fact, the key issue is to determine the decimation factor and the output clock size of each channel on the premise of meeting the 192 kHz sampling rate requirement. Since the MEMS digital microphone requires a bit clock CLK in the range of 3.072 MHz to 4.8 MHz, which defines the frequency of generating the PDM bit stream and satisfies the relationship CLK = Fs × DIV with the frequency of the converted PCM data stream, where DIV is the decimation factor (even value), determining how many signal values represented by the PDM bit stream length are converted into a PCM data stream represented by 1 audio frame. Given that Fs needs to be 192 kHz, then CLK is set to 3.072 MHz and DIV is 16. In addition, to ensure transceiver clock synchronization, the FPGA, as a timing generator, generates the clocks required for the PDM and IIS signals from the main clock MCLK of the DAC, that is, divides 49.152 MHz, provides the bit clock CLK required for the MEMS digital microphone as 3.072 MHz, and 192 kHz for the IIS encoder. The audio data is transmitted to the USB sound card chip through the IIS encoder.

[0032] The real-time ranging software is implemented on the operating system. The overall flowchart of its software is as Figure 3 shown, mainly including software modules such as real-time transceiver, cross-correlation, cross-correlation peak jitter elimination, and distance conversion.

[0033] Preferably, the real-time transceiver module constructs a first-in-first-out queue (First Input First Output, FIFO, data length: 0.2 s × Fs) to store the recording signal, and realizes real-time non-blocking playback of the transmitted signal and recording by controlling the USB sound card driver built in the upper computer. The transmitted signal uses the non-interfering frequency band of 18 kHz to 22 kHz available for the tweeter and is designed as a chirp signal. The signal parameters are: frequency modulation period T = 0.02 s, fundamental frequency f c = 22 kHz, frequency bandwidth B = 4 kHz;

[0034] Preferably, the cross-correlation module intercepts the transmitted signal of the same length as the FIFO, reverses it, and then uses the time-domain convolution theorem instead of the cross-correlation operation to obtain the cross-correlation sequence of the transceiver signals.

[0035] Preferably, for the cross-correlation peak jitter elimination module, since there are uncertain peak jitters in the real-time cross-correlation sequence, which in turn leads to errors in identifying and extracting the translation amount Lag corresponding to the local peak. To minimize the error in extracting Lag, this software module extracts the Lag value from multiple cross-correlation peak curves in real time. The specific steps of the cross-correlation peak jitter elimination module are as follows:

[0036] First, a multi-peak cross-correlation sequence is obtained through the cross-correlation module, such as Figure 4As shown, the multi-peak cross-correlation sequence is segmented into chunks of size Fs*T;

[0037] Then, the horizontal axis of the cross-correlation sequence of each block is normalized to the range of 0 to Fs*T, obtaining a cross-correlation sequence of a certain block as Figure 5 shown;

[0038] Furthermore, the Lag values corresponding to the respective peaks are extracted and stored in a cache, obtaining a sequence of Lag values;

[0039] Finally, the mean value of the sequence of Lag values is taken to obtain the final Lag value.

[0040] Preferably, the distance conversion module calculates the translation amount Lag of the target position relative to the reference position with the known initial position R ref as a reference, and then estimates the distance according to the formula: R = (C·Lag) / (2×Fs)+R ref where C is the speed of sound. In addition, to improve the stability of the ranging result, the real-time ranging result is stored in a short FIFO for sliding window Gaussian filtering and the mean value is taken as the final distance value.

[0041] The present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive; those of ordinary skill in the art, under the inspiration of the present invention and without departing from the spirit and scope protected by the present invention and its claims, can still make many forms, and all of these are within the protection scope of the present invention.

Claims

1. A convenient real-time acoustic wave ranging system with high sampling rate and high precision, comprising: a board hardware, an FPGA software, and a real-time ranging software, and its main features are as follows: ① The board hardware mainly includes: (1) A USB sound card chip that supports a sampling rate of 192 kHz for communication with the operating system; (2) A high-dynamic range DAC audio decoding chip for IIS signal conversion and transmission to the speaker; (3) A MEMS digital microphone with a wide frequency band response range for obtaining ultrasonic echoes; (4) An FPGA module; ② The FPGA software module calls the MEMS digital microphone to collect, low-pass filter, and decimate filter ultrasonic signals at a sampling frequency of 192 kHz, and transmits the data to the USB sound card chip through an IIS encoder; at the same time, it also generates precise clocks required for PDM and IIS signals to ensure consistent and synchronous transceiver sampling rates; among them, the clock is realized by dividing the main clock MCLK with a frequency of 49.152 MHz of the DAC, specifically including providing a bit clock with a frequency of 3.072 MHz for the MEMS microphone and a clock with a frequency of 192 kHz for the on-chip IIS encoder of the FPGA; ③ The real-time ranging software consists of a real-time transceiver module, a cross-correlation and peak jitter elimination module, and a distance conversion module: (1) The real-time transceiver module stores the recorded signal by constructing a first-in-first-out queue (FIFO), and controls the USB sound card driver built in the upper computer to achieve real-time non-blocking playback of the transmitted signal and recording; among them, the transmitted signal is a chirp signal, and the frequency band is 18 kHz to 22 kHz; (2) The cross-correlation and peak jitter elimination module intercepts the transmitted signal of the same length as the FIFO, and calculates the cross-correlation sequence of the transmitted and received signals by using the time-domain convolution theorem; after the cross-correlation operation, jitter elimination is performed. The specific method is as follows: the multi-peak cross-correlation sequence is segmented by the size of Fs*T, and the horizontal axis of the cross-correlation sequence of each block is normalized to the range of 0 to Fs*T, and then the translation amount Lag value corresponding to the peak of each block is extracted and cached, and the mean value of the Lag value sequence is taken as the final Lag value; (3) The distance conversion module calculates the distance of the target position based on the known initial position Rref through the formula R = (C·Lag) / (2×Fs)+Rref, where C is the speed of sound and Fs is the sampling frequency; to improve the ranging stability, the real-time ranging result is stored in a shorter FIFO for sliding window Gaussian filtering and the mean value is taken as the final distance value.