Time sequence signal compensation method and device for measuring instrument
By measuring and compensating for the total conversion time of electrical and acoustic signals, and using FPGA and timers to achieve timing signal compensation, the problem of large errors in shallow water measurements by echo sounders is solved, and the measurement accuracy is improved. This method is suitable for high-precision scenarios such as waterway surveying and marine exploration.
Patent Information
- Application Number
- CN202511037541.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-31
AI Technical Summary
Existing echo sounders have large measurement errors when measuring shallow water, mainly because the signal conversion time accounts for a large proportion of the measurement cycle, resulting in insufficient measurement accuracy.
The total conversion time between electrical and acoustic signals was experimentally determined. Timing signal compensation was achieved using FPGA and programmable timers. The conversion delay between electrical and acoustic signals was dynamically measured and compensated. A digital delay unit was used to accurately compensate the trigger signal.
It significantly improves measurement accuracy, reducing the error from 3% to <0.5% after compensation. It is suitable for different media environments and equipment such as echo sounders and ultrasonic sensors, especially in high-precision measurement scenarios such as waterway surveying and marine exploration.
Smart Images

Figure CN120871095A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal processing technology for measuring sound waves, and in particular to a method and apparatus for timing signal compensation for measuring instruments. Background Technology
[0002] An echo sounder is an instrument that measures water depth using the principle of sound wave reflection. Based on the constant speed of sound in water and its reflection at different media interfaces, it measures the distance from the seabed to the measurement point. Echo sounders can help ships detect underwater obstacles, ensuring navigational safety. When navigating along the coast, by combining the observed bearing of landmarks with the measured water depth, an approximate ship position can be determined. It can also be used for waterway mapping, nautical chart mapping, and water depth measurement in marine surveys, providing accurate water depth data for related research and engineering projects.
[0003] However, the aforementioned instruments will produce large errors when measuring shallow depths. This is because during the measurement process, the instrument converts electrical signals into acoustic signals and then back into electrical signals. When the measurement depth is shallow, the signal conversion time will account for a large proportion of the entire measurement cycle, resulting in a large measurement error.
[0004] Therefore, there is an urgent need for a solution that can perform timing signal compensation without prior knowledge of the signal conversion time, thereby greatly reducing measurement errors and fully ensuring measurement accuracy. Summary of the Invention
[0005] To solve the above-mentioned technical problems, the present invention provides a timing signal compensation method for measuring instruments, comprising the following steps:
[0006] Step S1: Experimental Measurement Phase. Two measurement depths, L1 and L2, are set up in the experimental environment using movable acoustic wave reflectors. A measurement process is performed once at each depth, and the total durations T1 and T2 are recorded. Based on the measurement data, a system of equations is established to calculate the time t1 for the electrical signal to be converted into an acoustic signal and the time t2 for the acoustic signal to be converted into an electrical signal, as well as the total time delay t. sum =t1+t2;
[0007] Step S2: Timing compensation stage. During the measurement process, record the rising edge timestamp T of the signal that begins measurement. start Use the timing compensation module to T start Delay t sum Generate compensation timestamp T comp ;
[0008] Step S3: Measurement and calculation stage, record the rising edge timestamp T of the feedback electrical signal. feedback According to T comp and T feedback Combined with tsum The actual measured distance L is calculated using the following formula:
[0009]
[0010] Where v is the speed at which sound waves propagate in the medium.
[0011] Specifically, the experimental environment is a gaseous medium environment (such as air), and the propagation speed v of ultrasound is a known value.
[0012] In one embodiment of the present invention, the system of equations for the experimental determination phase is solved using the following formula:
[0013]
[0014] Wherein, L1 and L2 are the two experimental measurement distances, and T1 and T2 are the two sets of measurement total durations; in addition, a verification step is included: substitute the calculated t1 and t2 into the system of equations. If the system of equations is valid, the experimental results are deemed valid; otherwise, the measurement depth is readjusted and the experiment is repeated.
[0015] In one embodiment of the present invention, the delay operation in the timing compensation stage is implemented using a programmable timer, the timer being configured as t sum The machine cycle is an integer multiple of the machine cycle; and the timestamp is determined by the machine cycle of the oscilloscope or the microcontroller.
[0016] In one embodiment of the present invention, T in the timing compensation stage star The measurement was performed using an oscilloscope to capture the first transition edge of the signal that exceeds the threshold voltage.
[0017] In one embodiment of the present invention, the depth calculation for distance L is performed in the microcontroller during the measurement calculation phase, and the calculation cycle is less than 1ms.
[0018] In one embodiment of the present invention, the compensated time point T comp Calculated using the following formula:
[0019] T comp =T start +t2
[0020] Among them, T start This is the timestamp of the original rising edge of the signal at which the measurement began.
[0021] In one embodiment of the present invention, the measurement error correction is achieved in the following manner, wherein the measurement error before compensation is:
[0022] Δd raw =d raw -d target
[0023] The measurement error after compensation is:
[0024] Δd comp =d comp -d target
[0025] By comparing Δd raw and Δd comp To verify the compensation effect.
[0026] The present invention also provides a timing compensation device, comprising:
[0027] Duration measurement module: used to obtain t sum ;
[0028] Rising edge detection module: used to measure T start ;
[0029] Digital delay unit: used to generate T comp The delay time is t sum ;
[0030] Time difference calculation unit: used to output ΔT = T feedback -T comp .
[0031] In one embodiment of the present invention, the digital delay unit is implemented by FPGA programmable logic, and the delay resolution is ≤10ns.
[0032] Compared with the prior art, the above-mentioned technical solution of the present invention has the following advantages: The timing signal compensation method of the present invention is implemented based on FPGA and programmable timer, with a delay resolution ≤10ns, meeting the real-time requirements of industrial applications. Specifically, the conversion delay (t) between electrical signal and acoustic signal is dynamically measured through a dual-distance calibration method. sum This device utilizes a digital delay unit to precisely compensate for the trigger signal, significantly improving measurement accuracy. Furthermore, the compensated measurement error approaches the theoretical value (e.g., experimental verification shows the error decreased from 3% to <0.5%). It requires no prior knowledge of the delay parameter and is suitable for various media environments (such as air and water). It can be integrated into echo sounders, ultrasonic sensors, and other equipment, making it suitable for high-precision measurement scenarios such as waterway surveying and marine exploration. Attached Figure Description
[0033] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0034] Figure 1 This is a flowchart illustrating the timing signal compensation method for measuring instruments according to the present invention.
[0035] Figure 2This is the timing compensation diagram described in this invention. Detailed Implementation
[0036] Example: Time-compensation experiment for shallow water depth measurement
[0037] To verify the compensation effect of this invention in shallow water depth measurement, the following experiment was designed:
[0038] Target depth: Set two measurement depths d1 = 0.1m and d2 = 0.2m.
[0039] Experimental environment: gaseous medium (air), ultrasonic wave propagation speed v = 343 m / s.
[0040] Experimental equipment: echo sounder, movable acoustic reflector, oscilloscope.
[0041] like Figure 1 As shown, the experimental steps are as follows: data acquisition, first measurement (d1 = 0.1m), recording the timestamp sequence:
[0042] Serial Number Timestamp Time (ms) 1 Data Acquisition Enable 0.000 2 Start measuring 0.023 3 Sound wave trigger 0.045 4 Sound wave recovery 241.435 5 Feedback electrical signal 241.507
[0043] The total calculation time T1 = 241.507 - 0.023 = 241.484 ms.
[0044] The second measurement (d2 = 0.2m) was recorded with a timestamp sequence:
[0045] Serial Number Timestamp Time (ms) 1 Data Acquisition Enable 0.000 2 Start measuring 0.023 3 Sound wave trigger 0.045 4 Sound wave recovery 482.870 5 Feedback electrical signal 482.942
[0046] The total calculation time T2 = 482.942 - 0.023 = 482.919 ms.
[0047] Solve the system of equations by substituting the equations into the formula:
[0048]
[0049] Solving for t1, we get t1 = 0.022 ms and t2 = 0.062 ms.
[0050] Timing compensation verification, error before compensation:
[0051] Calculate the distance using the original timestamp:
[0052]
[0053] Error: Δd = 0.003m (3%).
[0054] Error after compensation:
[0055] Adjusting the rising edge delay of the trigger signal to t2 = 0.062ms yields the compensated time point T. compensated=0.117ms.
[0056] Recalculate the distance:
[0057]
[0058] Error: Δd = 0.
[0059] Similarly, an example of a time-compensation experiment for deep-water depth measurement can also be obtained;
[0060] The final results are as follows: in shallow water experiments, the error was 3% before compensation and 0% after compensation; in deep water experiments, the error was 0.3% before compensation and 0% after compensation. Therefore, the compensation method invented in this embodiment is effective for measurements at different depths, and it significantly improves accuracy, especially in shallow water scenarios.
[0061] In summary, the compensation method in this embodiment is based on the following principle:
[0062] This embodiment assumes that the conversion time from an electrical signal to a sound wave signal is different from the conversion time from a sound wave signal to an electrical signal. Therefore, the conversion time is first determined experimentally. The specific experimental method is as follows:
[0063] The experimental environment was an air environment. First, a fixed measurement point was established, and two measurement depths were set below the point. These two depths were achieved using a movable acoustic reflector. A measurement process was performed once at each of the two experimental depths, yielding two sets of measurement data. Then, the total conversion time from electrical signal to acoustic signal and from acoustic signal to electrical signal was calculated using the following set of equations:
[0064]
[0065] In the above formula, L1 and L2 are two measurement distances, v0 is the speed of ultrasonic wave propagation in air, T1 and T2 are two total measurement durations, t1 represents the conversion time from electrical signal to sound wave signal, and t2 represents the conversion time from sound wave signal to electrical signal.
[0066] The above method cannot directly measure the values of t1 and t2, but in this invention, only the value of t1+t2 needs to be measured. The above method implicitly includes a verification process for the measured values; that is, the value of t1+t2 can be calculated through the experimental process of L1, and then the value of t1+t2 is substituted into the system of equations. If the condition is met, it means that the value of t1+t2 is valid.
[0067] After obtaining the value of t1+t2, the timing signal within the instrument can be compensated. Specifically, the compensation method involves timing compensation of the trigger signal that converts the electrical signal into a sound wave signal, delaying its rising edge by t1+t2. This is done because the timing of receiving the rising edge of the electrical signal converted from the sound wave signal is uncertain; the timestamp of signal reception can only be determined at the instant the signal is received, and it cannot be predicted. Therefore, timing compensation can only be performed on the trigger signal that transmits the electrical signal after it has been emitted.
[0068] At the same time, such as Figure 2 The timing compensation diagram is shown below. Here, 1 represents the rising edge timestamp of the acquisition enable signal, 2 represents the rising edge timestamp of the start measurement signal, 3 represents the rising edge timestamp of the acoustic trigger signal, 4 represents the rising edge timestamp of the compensated start measurement signal, 5 represents the rising edge timestamp of the acoustic recovery signal, and 6 represents the rising edge timestamp of the acoustic signal converted into a feedback electrical signal. This can be measured using an oscilloscope or the machine cycle of a microcontroller. The distance between 2 and 4 is equal to the sum of the distances between 2 and 3 and between 5 and 6. When calculating the distance, the timestamps of the compensated start measurement signal and the feedback electrical signal can be used.
[0069] The compensation method described in this embodiment can be widely applied in fields such as echo sounders, industrial ultrasonic sensors, and underwater navigation, and is especially suitable for scenarios with high measurement accuracy requirements (such as waterway surveying and marine exploration).
[0070] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A timing signal compensation method for measuring instruments, characterized in that, Includes the following steps: Step S1: Experimental Measurement Phase. Two measurement depths, L1 and L2, are set up in the experimental environment using movable acoustic wave reflectors. A measurement process is performed once at each depth, and the total durations T1 and T2 are recorded. Based on the measurement data, a system of equations is established to calculate the time t1 for the electrical signal to be converted into an acoustic signal and the time t2 for the acoustic signal to be converted into an electrical signal, as well as the total time delay t. sum =t1+t2; Step S2: Timing compensation stage. During the measurement process, record the rising edge timestamp T of the signal that begins measurement. start Use the timing compensation module to T start Delay t sum Generate compensation timestamp T comp ; Step S3: Measurement and calculation stage, record the rising edge timestamp T of the feedback electrical signal. feedback According to T comp and T feedback Combined with t sum The actual measured distance L is calculated using the following formula: Where v is the speed at which sound waves propagate in the medium.
2. The timing signal compensation method according to claim 1, characterized in that: The equations for the experimental determination phase are solved using the following formulas: Wherein, L1 and L2 are the two experimental measurement distances, and T1 and T2 are the two sets of measurement total durations; in addition, there is a verification step: substitute the calculated t1 and t2 into the system of equations. If the system of equations is valid, the experimental results are determined to be valid; otherwise, the measurement depth is readjusted and the experiment is repeated.
3. The timing signal compensation method according to claim 1, characterized in that: The delay operation in the timing compensation stage is implemented using a programmable timer, configured as t. sum Integer multiples of machine cycles.
4. The timing signal compensation method according to claim 1, characterized in that: T in the timing compensation stage star The measurement was performed using an oscilloscope to capture the first transition edge of the signal that exceeds the threshold voltage.
5. The timing signal compensation method according to claim 1, characterized in that: The depth calculation for distance L during the measurement and calculation phase is completed in the microcontroller, with a calculation cycle of less than 1ms.
6. The timing signal compensation method according to claim 1, characterized in that: The compensated time point T comp Calculated using the following formula: T comp =T start +t2 Among them, T start This is the timestamp of the original rising edge of the signal at which the measurement began.
7. The timing signal compensation method according to claim 1, characterized in that: The measurement error correction is achieved in the following way, with the measurement error before compensation being: Δd raw =d raw -d target The measurement error after compensation is: Δd comp =d comp -d target By comparing Δd raw and Δd comp To verify the compensation effect.
8. A timing compensation device, serving the timing signal compensation method of any one of claims 1 to 7, characterized in that, include: Duration measurement module: used to obtain t sum ; Rising edge detection module: used to measure T start ; Digital delay unit: used to generate T comp The delay time is t sum ; Time difference calculation unit: used to output ΔT = T feedback -T comp .
9. The timing compensation device according to claim 8, characterized in that, The digital delay unit is implemented by FPGA programmable logic, with a delay resolution of ≤10ns.
Citation Information
Patent Citations
A circuit for acoustic distance flight time compensation
CN107167808A
Wireless earphone, mobile phone and acoustic ranging method
CN114286254A
Ultrasonic position measurement method
JP1993272956A
How to measure distance
KR1019980077355A