An adaptive ultrasonic signal sampling method
By using the system clock frequency division and adaptive sampling frequency adjustment methods in the ultrasonic range measurement system, the problems of large measurement error, unstable accuracy and high cost in the traditional ultrasonic signal sampling method are solved, and high-precision and low-cost ultrasonic signal sampling are achieved.
Patent Information
- Application Number
- CN202411883315.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-08
AI Technical Summary
Traditional ultrasonic signal sampling methods have problems such as large measurement errors, unstable measurement accuracy and high design costs.
Through the system clock division, a variable target frequency clock is generated, the ultrasonic probe is controlled to vibrate and transmit the corresponding ultrasonic signal, and adaptively adjust the sampling frequency to always be an integer multiple of the transmission frequency, ensuring that the transmission pulse is fully sampled within one transmission cycle, and dynamically adjusting the filter center frequency with the transmission frequency.
A stable measurement accuracy is achieved, design costs are reduced, and the integrity of the sampled data is ensured.
Smart Images

Figure CN119780891A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ultrasonic distance measurement, and in particular to an adaptive ultrasonic signal sampling method. Background Art
[0002] With the continuous development of science and technology, various distance measurement methods have been widely used. At present, the most common distance measurement methods include laser distance measurement, radar distance measurement and ultrasonic distance measurement. Among them, ultrasonic distance measurement technology is widely recognized for its advantages such as low price, high reliability and wide applicability. Ultrasonic distance measurement is a method of distance measurement using ultrasonic signals. Its main task is to send an ultrasonic signal through a rangefinder. When the signal hits the target object, it will be reflected back. The rangefinder can calculate the return time and distance based on the reflected signal received.
[0003] Ultrasonic signals are high-frequency oscillation signals with a frequency between 20kHz and 200kHz. Ultrasonic waves can be generated by high-speed vibration of ultrasonic probes. Different ultrasonic probes have different natural frequencies, and the sampling frequency of ultrasonic signals must correspond to them. According to the Quest sampling principle, the sampling frequency must be greater than twice the signal bandwidth. If the sampling frequency is insufficient, aliasing will occur in the sampling sequence, resulting in signal distortion. The collected signal needs to be filtered to extract the effective information, so the sampling frequency, ultrasonic transmission frequency, and filter bandwidth are strongly correlated.
[0004] At present, when ultrasonic waves of different frequencies are emitted for ranging, in order to extract effective echo signals, the filter needs to use the emission frequency as the center frequency for filtering, and the center frequency of the filter also changes accordingly. If only one filter is used to filter ultrasonic signals of different emission frequencies, it is necessary to ensure that the sampling frequency and the emission frequency maintain an integer multiple relationship to collect the ultrasonic signal completely. Otherwise, the center frequency of the filter will shift, there will be a large error, and the measurement accuracy will be unstable. If a fixed sampling frequency is maintained, separate filters with different center frequencies need to be designed for different emission frequencies, which greatly increases the cost of use. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the traditional ultrasonic signal sampling method has the problems of large measurement error, unstable measurement accuracy and too high design cost.
[0006] In order to solve the above technical problems, the present invention proposes an adaptive ultrasonic signal sampling method, which generates a variable target frequency clock by dividing the system clock frequency, and controls the ultrasonic probe to vibrate and transmit the corresponding ultrasonic signal. When collecting ultrasonic signals with different transmission frequencies, the sampling frequency is adaptively adjusted so that the average sampling frequency is always an integer multiple of the transmission frequency, ensuring that the transmission pulse is completely sampled within one transmission cycle, and realizing the dynamic adjustment of the center frequency of the filter following the transmission frequency, so that the system maintains stable measurement accuracy and reduces the design cost.
[0007] The technical solutions adopted are as follows: An adaptive ultrasonic signal sampling method comprises the following steps: S1, generating a system clock through a system clock module, and sending the system clock to a transmitting clock module and a sampling clock module respectively; then inputting a target ultrasonic frequency into a frequency adjustment module, the frequency adjustment module automatically calculates a transmitting clock frequency division coefficient and a sampling clock frequency division coefficient according to the target ultrasonic frequency, and sends the generated transmitting clock control signal and sampling clock control signal to a driving module and a sampling module respectively; S2, in the transmitting clock module, inputting a transmitting clock into a driving module, the driving module outputs a transmitting clock according to the transmitting clock control signal to control the vibration of an ultrasonic probe and generate an ultrasonic signal; in the sampling clock module, inputting a sampling clock into a sampling module, the sampling module outputs a sampling clock according to the sampling clock control signal to sample the ultrasonic signal; S3, in the sampling module, collecting the ultrasonic signal through the sampling clock to obtain sampling data, and sending the sampling data to a filtering module, and then using a filter in the filtering module to extract valid data in the sampling data whose frequency band is consistent with the transmitting frequency, and perform subsequent distance measurement.
[0008] The present invention realizes different transmitting frequencies and corresponding sampling frequencies by dividing the system clock into a transmitting clock and a sampling clock respectively, and can completely sample a period of the transmitting clock, thereby improving the accuracy and stability of the measurement and reducing the design cost.
[0009] In a further preferred embodiment of the technical solution of the present invention, in step S1, the transmitting clock module divides the system clock according to the transmitting clock division coefficient to obtain the transmitting clock; the sampling clock module divides the system clock according to the sampling clock division coefficient to obtain the sampling clock. By dividing the system clock to obtain the transmitting clock and the sampling clock, the overall power consumption of the system can be reduced and the cost can be reduced.
[0010] In a further preferred embodiment of the technical solution of the present invention, in step S1, the target ultrasonic frequency is used to ensure that the frequency of the sampled ultrasonic signal is consistent with the center frequency of the filter. By keeping the transmission frequency consistent with the center frequency of the filter, more effective data can be extracted from the sampled data, thereby improving the measurement accuracy.
[0011] In a further preferred embodiment of the technical solution of the present invention, in step S1, the frequency adjustment module counts the system clock according to the clock division coefficients of the transmission clock and the sampling clock, and generates corresponding control signals to adjust the transmission frequency of the transmission clock and the sampling frequency of the sampling clock by counting the corresponding system clocks. By adjusting the transmission frequency and the sampling frequency through the control signal, the transmission frequency and the corresponding sampling frequency can be adaptively adjusted to maintain stable measurement accuracy.
[0012] In a further preferred embodiment of the technical solution of the present invention, when sampling the ultrasonic signal, the sampling frequency and the transmitting frequency are dynamically adjusted to completely sample the ultrasonic signal. By adjusting the sampling frequency and the transmitting frequency, the integrity of the sampled data is ensured.
[0013] In a further preferred embodiment of the technical solution of the present invention, ultrasonic signals are collected by a sampling module, wherein when collecting ultrasonic signals of different frequencies, the sampling module dynamically adjusts the sampling frequency by a sampling clock control signal so that the average sampling frequency is always an integer multiple of the transmission frequency. By adjusting the average sampling frequency to an integer multiple of the transmission frequency, a complete sampling of a transmission clock of one cycle can be achieved.
[0014] In a further preferred embodiment of the technical solution of the present invention, in step S3, the filter built into the filter module uses the transmission frequency as the center frequency for filtering, extracts valid data from the sampled data, and the center frequency of the filter is dynamically adjusted following the transmission frequency. By adjusting the center frequency of the filter to be consistent with the transmission frequency, the error of the measured data is reduced and the accuracy of the measured data is improved.
[0015] Compared with the prior art, the present invention has the following beneficial effects: The technical solution of the present invention generates a variable target frequency clock by dividing the system clock frequency, and controls the ultrasonic probe to vibrate and transmit the corresponding ultrasonic signal. When collecting ultrasonic signals of different transmission frequencies, the sampling frequency is adaptively adjusted so that the average sampling frequency is always an integer multiple of the transmission frequency, ensuring that the transmission pulse is completely sampled within one transmission cycle, and the center frequency of the filter is dynamically adjusted following the transmission frequency, so that the system maintains stable measurement accuracy and reduces design costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a system block diagram of an adaptive ultrasonic signal sampling method; Figure 2 It is the signal waveform diagram of the traditional ultrasonic signal sampling method; Figure 3It is a signal waveform diagram of an adaptive ultrasonic signal sampling method. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the following Figure 1-Figure 3 The present invention is further described in detail with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as they do not conflict with each other. Example 1
[0018] like Figure 1 The figure shows a system block diagram of an adaptive ultrasonic signal sampling method, including: a system clock, a target ultrasonic frequency, a frequency adjustment module, a transmission clock module, a sampling clock module, a driving module, a sampling module and a filtering module. Among them, the frequency adjustment module can automatically calculate the frequency division coefficients of the transmission clock and the sampling clock, and send the generated control signals to the driving module and the sampling module respectively; the transmission clock module generates the transmission clock according to the transmission clock frequency division coefficient; the sampling clock module generates the sampling clock according to the sampling clock frequency division coefficient; the driving module outputs the transmission clock according to the control signal to control the vibration of the ultrasonic probe; the sampling module outputs the sampling clock according to the control signal to sample the ultrasonic signal; the filtering module uses the filter to extract the valid data from the sampled data.
[0019] The method specifically comprises the following steps: S1. Generate a system clock through the system clock module and send it to the transmitting clock module and the sampling clock module respectively; then input the target ultrasonic frequency into the frequency adjustment module, the frequency adjustment module automatically calculates the transmitting clock frequency division coefficient and the sampling clock frequency division coefficient according to the target ultrasonic frequency, and counts the system clock according to the transmitting clock frequency division coefficient and the sampling clock frequency division coefficient. For each system clock counted with the same number of system clocks as the transmitting clock frequency division coefficient, a transmitting clock control signal is generated to adjust the transmitting frequency of the transmitting clock; for each system clock counted with the same number of system clocks as the sampling clock frequency division coefficient, a sampling clock control signal is generated to adjust the sampling frequency of the sampling clock. Then send the generated transmitting clock control signal and sampling clock control signal to the driving module and the sampling module respectively. Among them, the target ultrasonic frequency is used to ensure that the frequency of the sampled ultrasonic signal is consistent with the center frequency of the filter.
[0020] The present invention can extract more effective data from the sampled data and improve the measurement accuracy by keeping the transmission frequency consistent with the center frequency of the filter; and by adjusting the transmission frequency and the sampling frequency through a control signal, the transmission frequency and the corresponding sampling frequency can be adaptively adjusted to maintain stable measurement accuracy.
[0021] S2. In the transmitting clock module, the system clock is divided according to the transmitting clock division coefficient to obtain the transmitting clock, and the transmitting clock is input into the driving module. The driving module outputs the transmitting clock according to the transmitting clock control signal to control the vibration of the ultrasonic probe and generate an ultrasonic signal. In the sampling clock module, the system clock is divided according to the sampling clock division coefficient to obtain the sampling clock, and the sampling clock is input into the sampling module. The sampling module outputs the sampling clock according to the sampling clock control signal to sample the ultrasonic signal. The sampling module is used to collect ultrasonic signals. When collecting ultrasonic signals of different frequencies, the sampling module dynamically adjusts the sampling frequency through the sampling clock control signal so that the average sampling frequency is always an integer multiple of the transmitting frequency, which can realize the complete sampling of a period of the transmitting clock and ensure the integrity of the sampling data. The average sampling frequency refers to the average value of the sampling frequency.
[0022] S3. In the sampling module, the ultrasonic signal is collected through the sampling clock to obtain the sampling data, and the sampling data is sent to the filtering module. The built-in filter of the filtering module uses the transmission frequency as the center frequency for filtering, extracts the valid data whose frequency band is consistent with the transmission frequency in the sampling data, and performs subsequent ranging. At the same time, the center frequency of the filter is dynamically adjusted following the transmission frequency. By adjusting the center frequency of the filter to be consistent with the transmission frequency, the error of the measurement data is reduced and the accuracy of the measurement data is improved. Example 2
[0023] like Figure 2As shown in the figure, it is a signal waveform diagram of the traditional ultrasonic signal sampling method. D is the transmission clock division coefficient. The transmission clock is obtained by dividing the system clock by D. By adjusting D, the transmission frequency of the transmission clock can be adjusted; S is the sampling clock division coefficient. Each sampling clock is obtained by dividing the system clock by S. At the same time, n-fold oversampling is adopted, n>=2, and each transmission clock cycle corresponds to n sampling cycles C1, C2...Cn, where S is the integer part of D / n, D is a variable, and R is the remainder of D / n, which changes between 0 and n-1 as D changes. As can be seen from the figure, due to the existence of the remainder R, the sampling clock cannot stably sample the ultrasonic signal completely within n cycles. If the same filter is used, the center frequency will shift with the remainder, resulting in inaccurate measurement; if different filters are used, it is necessary to design corresponding filters for each transmission clock and remainder, which increases the cost and limits the universality of the system.
[0024] like Figure 3 The figure shows a signal waveform diagram of an adaptive ultrasonic signal sampling method. The ultrasonic signal sampling method in Example 1 is used to achieve complete sampling of the ultrasonic signal by splitting the remainder R, so that the filter can adaptively follow the transmission frequency and automatically adjust the center frequency. Figure 3 In the above formula, the remainder R contains r system clocks. These redundant clocks are evenly distributed to each sampling period. The period from C1 to Cr in the original sampling period is changed from the system S division to S+1 division. The remainder R is distributed to the first r sampling periods, and the number of n decomposed by the division coefficient D is changed from the original: D = S * n + r to: D = (S+1) * r + (nr) * S Through the method of the present invention, the sampling clock can completely sample the ultrasonic signal within n cycles, ensuring the integrity of the signal. Among them, D division refers to reducing the frequency of the system clock to the original 1 / D to obtain the transmission clock, and S division refers to reducing the frequency of the system clock to the original 1 / S to obtain the sampling clock. At the same time, for a high-frequency system clock, in order to obtain an ultrasonic signal of 20kHz to 200kHz, the transmission clock division coefficient D must be set larger. The ultrasonic wave emitted by the ultrasonic probe is a smooth sine wave signal. Within the time of a high-frequency system clock, the change of the ultrasonic sampling value is extremely small, and the error caused is small, thereby achieving high-precision ranging.
[0025] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An adaptive ultrasonic signal sampling method, characterized in that: The method comprises the following steps: S1. Generate a system clock through the system clock module and send it to the transmitting clock module and the sampling clock module respectively; then input the target ultrasonic frequency into the frequency adjustment module, the frequency adjustment module automatically calculates the transmitting clock frequency division coefficient and the sampling clock frequency division coefficient according to the target ultrasonic frequency, and sends the generated transmitting clock control signal and sampling clock control signal to the driving module and the sampling module respectively; S2. In the transmitting clock module, the transmitting clock is input to the driving module, and the driving module outputs the transmitting clock according to the transmitting clock control signal to control the vibration of the ultrasonic probe to generate an ultrasonic signal; in the sampling clock module, the sampling clock is input to the sampling module, and the sampling module outputs the sampling clock according to the sampling clock control signal to sample the ultrasonic signal; S3. In the sampling module, the ultrasonic signal is collected through the sampling clock to obtain sampling data, and the sampling data is sent to the filtering module. The filter in the filtering module is then used to extract valid data in the sampling data that is consistent with the frequency band and the transmission frequency for subsequent ranging.
2. The adaptive ultrasonic signal sampling method according to claim 1, characterized in that: In step S1, the transmission clock module divides the system clock according to the transmission clock division coefficient to obtain the transmission clock.
3. The adaptive ultrasonic signal sampling method according to claim 1, characterized in that: In step S1, the sampling clock module divides the system clock according to the sampling clock division coefficient to obtain the sampling clock.
4. The adaptive ultrasonic signal sampling method according to claim 1, characterized in that: In step S1, the target ultrasonic frequency is used to ensure that the frequency of the sampled ultrasonic signal is consistent with the center frequency of the filter.
5. The adaptive ultrasonic signal sampling method according to claim 1, characterized in that: In step S1, the frequency adjustment module counts the system clock according to the clock division coefficients of the transmission clock and the sampling clock, and generates corresponding control signals to adjust the transmission frequency of the transmission clock and the sampling frequency of the sampling clock by counting the corresponding system clocks.
6. The adaptive ultrasonic signal sampling method according to claim 5, characterized in that: When sampling the ultrasonic signal, the ultrasonic signal is completely sampled by dynamically adjusting the sampling frequency and the transmitting frequency.
7. The adaptive ultrasonic signal sampling method according to claim 6, characterized in that: The ultrasonic signal is collected by a sampling module. When collecting ultrasonic signals of different frequencies, the sampling module dynamically adjusts the sampling frequency through a sampling clock control signal so that the average sampling frequency is always an integer multiple of the transmission frequency.
8. The adaptive ultrasonic signal sampling method according to claim 1, characterized in that: In step S3, the filter built into the filtering module performs filtering using the transmission frequency as the center frequency to extract valid data from the sampled data, and the center frequency of the filter is dynamically adjusted following the transmission frequency.