Adaptive filtering method based on ultrasonic metering and ultrasonic metering equipment
The echo signal of the ultrasonic gas meter is processed through adaptive filtering, and the reference signal is generated using delay and the weight coefficient is iteratively adjusted, which solves the problem of interference signals in the sweep band and improves the measurement accuracy and reliability.
Patent Information
- Application Number
- CN202510990624.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional filtering methods cannot effectively process interference signals in the sweep band in gas metering, resulting in increased echo signal distortion and time difference measurement error.
Adaptive filtering method is adopted to generate a reference signal by delay processing of ultrasonic echo signals, and the weight coefficient of the adaptive filter is iteratively adjusted using variable step size until the minimum mean square value of the error signal meets the preset requirements.
It improves the metering accuracy and reliability of ultrasonic gas meters in complex environments, overcomes the dependence of traditional filtering on external reference signals, and enhances the anti-interference ability of signal processing.
Smart Images

Figure CN120489271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas ultrasonic metering, and in particular to an adaptive filtering method based on ultrasonic metering and an ultrasonic metering device. Background Art
[0002] Ultrasonic gas metering technology utilizes the propagation and measurement principles of ultrasonic waves to measure gas flow. Compared to the complex mechanical structure of diaphragm gas meters, fully electronic ultrasonic metering offers advantages such as higher accuracy, a wider measurement range, greater reliability and stability, and improved pollution resistance. Consequently, ultrasonic metering technology has experienced rapid development in recent years. To enhance signal amplitude and interference resistance, the transducer is often excited using a swept frequency method. However, when the frequency of the interfering signal overlaps with the swept frequency band (such as due to frequency reflection echoes or external superimposed noise), traditional low-pass filtering, high-pass filtering, and band-pass filtering methods become ineffective, resulting in echo signal distortion and increased time difference measurement errors. Summary of the Invention
[0003] In view of this, the present invention provides an adaptive filtering method based on ultrasonic measurement and an ultrasonic measurement device to solve the signal distortion problem caused by interference within the sweep frequency band.
[0004] In a first aspect, the present invention provides an adaptive filtering method based on ultrasonic metrology, the method comprising: Regularly collect the uplink echo signal and downlink echo signal of the ultrasonic wave; Delaying the uplink echo signal for a preset time to generate an uplink echo reference signal, and delaying the downlink echo signal for a preset time to generate a downlink echo reference signal; The uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering processing, and an uplink echo output signal and a downlink echo output signal are output. At the same time, the weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements. The uplink echo error signal is a comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is a comparison result of the downlink echo reference signal and the downlink echo output signal.
[0005] This invention provides an adaptive filtering method for ultrasonic metering. This method applies a correlation-based adaptive model to echo signal processing during instantaneous time difference acquisition in ultrasonic metering, resolving the issue of interference within the frequency sweep range. By using the delayed signal as a reference signal, the method overcomes the difficulty of obtaining an ideal waveform under operating conditions. This method eliminates the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0006] In an optional embodiment, the uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, including: Initialize the weight coefficient and step size of the uplink echo adaptive filter; Continuously taking a preset number of sampling points from the uplink echo signal and inputting them into an uplink echo adaptive filter for filtering to obtain an uplink echo output signal, wherein the preset number is the same as the filtering order; Comparing the uplink echo output signal of each sampling point with the uplink echo reference signal to obtain an uplink echo error signal; Determining whether the minimum mean square values of the uplink echo error signals all meet preset requirements; If the minimum mean square value of the uplink echo error signal does not meet the preset requirement, the weight coefficient of the uplink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal meets the preset requirement.
[0007] In an optional embodiment, the uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until a minimum mean square value of the uplink echo error signal and a minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: If the minimum mean square value of the uplink echo error signal meets the preset requirement, the data window is shifted back by one sampling point, and the process returns to the step of continuously taking a preset number of sampling points from the uplink echo signal and inputting them into the uplink echo adaptive filter for filtering.
[0008] In an optional embodiment, the uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until a minimum mean square value of the uplink echo error signal and a minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: Initialize the weight coefficient and step size of the downlink echo adaptive filter; Continuously taking a preset number of sampling points from the downlink echo signal and inputting them into a downlink echo adaptive filter for filtering to obtain a downlink echo output signal, wherein the preset number is the same as the filtering order; Comparing the downlink echo output signal of each sampling point with the downlink echo reference signal to obtain a downlink echo error signal; Determining whether the minimum mean square values of the downlink echo error signals all meet preset requirements; If the minimum mean square value of the downlink echo error signal does not meet the preset requirement, the weight coefficient of the downlink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the downlink echo error signal meets the preset requirement.
[0009] In an optional embodiment, the uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until a minimum mean square value of the uplink echo error signal and a minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: If the minimum mean square value of the downlink echo error signal meets the preset requirement, the data window is shifted back by one sampling point, and the process returns to the step of continuously taking a preset number of sampling points from the downlink echo signal and inputting them into the downlink echo adaptive filter for filtering.
[0010] In an optional embodiment, the method further includes: Dividing the uplink echo signal in the uplink echo output signal calculation formula and the uplink echo error signal calculation formula, and the downlink echo signal in the downlink echo output signal calculation formula and the downlink echo error signal calculation formula by a preset scaling factor; The uplink echo signal in the weight coefficient iterative formula of the uplink echo adaptive filter and the downlink echo signal in the weight coefficient iterative formula of the downlink echo adaptive filter are multiplied by a preset scaling factor, and the preset scaling factor is determined according to the resources of the single chip microcomputer.
[0011] In a second aspect, the present invention provides an ultrasonic measuring device, comprising: a single chip microcomputer, a transducer A and a transducer B, wherein: The transducer A transmits a frequency sweep signal, and the transducer B receives an uplink echo signal. The transducer B transmits a frequency sweep signal, and the transducer A receives a downlink echo signal, forming a forward and reverse waveform signal. The single chip microcomputer is used to execute the adaptive filtering method for ultrasonic metrology of the first aspect or any corresponding embodiment thereof.
[0012] The ultrasonic metering device provided by this invention utilizes a correlation-based adaptive model for echo signal processing during ultrasonic measurement instantaneous time difference acquisition, resolving the issue of interference within the frequency sweep range. By using its own signal as a reference signal after delay processing, it overcomes the difficulty of obtaining an ideal waveform under operating conditions and transcends the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0013] In a third aspect, the present invention provides an adaptive filtering device based on ultrasonic measurement, the device comprising: An acquisition module is used to regularly acquire ultrasonic uplink echo signals and downlink echo signals; A delay module, configured to delay the uplink echo signal by a preset time to generate an uplink echo reference signal, and delay the downlink echo signal by a preset time to generate a downlink echo reference signal; A filtering module is used to input the uplink echo signal and the downlink echo signal into an adaptive filter for filtering processing, output an uplink echo output signal and a downlink echo output signal, and iteratively adjust the weight coefficient of the adaptive filter using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, the uplink echo error signal is a comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is a comparison result of the downlink echo reference signal and the downlink echo output signal.
[0014] The present invention provides an adaptive filtering device for ultrasonic metering. This device utilizes a correlation-based adaptive model for echo signal processing during instantaneous time difference acquisition in ultrasonic metering, resolving the issue of interference within the frequency sweep range. By using the delayed signal as a reference signal, the device overcomes the difficulty of obtaining an ideal waveform under operating conditions. This eliminates the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0015] In a fourth aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the adaptive filtering method for ultrasonic metrology according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0016] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the adaptive filtering method for ultrasonic metrology according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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.
[0018] Figure 1 is a flow chart of an adaptive filtering method based on ultrasonic measurement according to an embodiment of the present invention; Figure 2 is a schematic diagram of an adaptive filtering algorithm according to an embodiment of the present invention; Figure 3 3. This is a waveform comparison diagram before and after filtering according to an embodiment of the present invention; Figure 4 is another waveform comparison diagram before and after filtering according to an embodiment of the present invention; Figure 5 is a structural block diagram of an adaptive filtering device based on ultrasonic measurement according to an embodiment of the present invention; Figure 6 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0020] According to an embodiment of the present invention, an embodiment of an adaptive filtering method based on ultrasonic metrology is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0021] In this embodiment, an adaptive filtering method based on ultrasonic measurement is provided, which can be used for the above-mentioned ultrasonic measurement equipment. Figure 1 FIG. 1 is a flow chart of an adaptive filtering method based on ultrasonic measurement according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S1: regularly collect the uplink echo signal and the downlink echo signal of the ultrasonic wave.
[0022] Specifically, in an ultrasonic measuring device, transducer A is excited by a sweep frequency from 180 kHz to 240 kHz, and the corresponding transducer B receives the uplink echo signal. Subsequently, transducer B is excited by a sweep frequency from 180 kHz to 240 kHz, and the corresponding transducer A receives the downlink echo signal, forming forward and reverse waveform signals. The uplink echo signal is correlated with the downlink echo signal to obtain the time difference between the two. The ultrasonic measuring device collects this time difference at a set 125 ms interval.
[0023] Step S2: delaying the uplink echo signal by a preset time to generate an uplink echo reference signal, and delaying the downlink echo signal by a preset time to generate a downlink echo reference signal.
[0024] Specifically, the self-echo signal is delayed for a certain period to form a reference signal, overcoming the limitation of the adaptive filtering algorithm that requires a relatively stable signal as a reference. Specifically, the uplink echo signal is delayed for a preset time to form the uplink echo reference signal d1(n); the downlink echo signal is delayed for a preset time to form the downlink echo reference signal d2(n), overcoming the difficulty of obtaining an ideal waveform under working conditions. The preset time is one sampling point.
[0025] Step S3, input the uplink echo signal and the downlink echo signal into the adaptive filter for filtering processing respectively, output the uplink echo output signal and the downlink echo output signal, and at the same time use the variable step size to iteratively adjust the weight coefficient of the adaptive filter until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet the preset requirements, the uplink echo error signal is the comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is the comparison result of the downlink echo reference signal and the downlink echo output signal.
[0026] Specifically, the above step S3 includes the following steps: Step S301: Initialize the weight coefficient and step size of the uplink echo adaptive filter.
[0027] Step S302 : continuously taking a preset number of sampling points from the uplink echo signal and inputting them into an uplink echo adaptive filter for filtering to obtain an uplink echo output signal. The preset number is the same as the filtering order.
[0028] Step S303: Compare the uplink echo output signal of each sampling point with the uplink echo reference signal to obtain an uplink echo error signal.
[0029] Step S304: determine whether the minimum mean square value of the uplink echo error signal meets a preset requirement.
[0030] Step S305 : If the minimum mean square value of the uplink echo error signal does not meet the preset requirement, the weight coefficient of the uplink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal meets the preset requirement.
[0031] Step S306: If the minimum mean square value of the uplink echo error signal meets the preset requirement, the data window is shifted back by one sampling point and the process returns to step S302.
[0032] Specifically, the adaptive filter consists of two parts: a digital filter model with adjustable parameters and an adaptive algorithm. Figure 2 As shown. Figure 2 The adaptive filter shown in the figure performs adaptive filtering on the sampled forward and reverse waveforms respectively. The adaptive filtering process of the uplink echo signal is as follows: First, the weight coefficient W1 and step size u1 of the uplink echo adaptive filter are initialized, for example, the initial weight is 0, u1=0.01. Then, a signal of a specific length is selected for processing based on the uplink echo signal duration and the filter order. For example, when the uplink echo signal x1(n) has 200 sampling points and the filter order is 10, 10 consecutive sampling points are selected from the uplink echo signal x1(n), such as x1(n), x1(n-1), ..., x1(n-9). The uplink echo error signal corresponding to each sampling point is input into the uplink echo adaptive filter for filtering processing to obtain the uplink echo output signal y1(n) of each sampling point. The uplink echo output signal y1(n) is then compared with the uplink echo reference signal d1(n) to form the error signal e1(n), as shown in formula (1): e1(n)= d1(n)- y1(n)(1) y1(n)= W1(n) * x1(n)(2) Wherein, W1(n) is the weight vector of the uplink echo adaptive filter.
[0033] Further, e1(n)= d1(n)- W1(n) * x1(n)(3) If the minimum mean square value of the uplink echo error signal does not meet the preset requirements, the LMS (least mean square) algorithm is used. By using a variable step size u1(n), the weight coefficient W1 is iteratively adjusted to make the minimum mean square value of the uplink echo error signal as small as possible. The weight coefficient W1 iteration is shown in formula (4): W1(n+1) = W1(n) + u1(n) * e1(n) * x1(n)(4) u1(n)= u1 / (ɛ + x1 T (n) *x1(n))(5) If the uplink echo error signal meets the preset requirements, the data window is shifted back by one point and the next set of 10 data points (e.g., x1(n+1) to x1(n-8)) is processed. Furthermore, the number of iterations is determined. If all uplink echo signals are filtered, the number of iterations is determined to have been reached and the iterations are terminated.
[0034] Furthermore, the above step S3 further includes the following steps: Step S311: Initialize the weight coefficient and step size of the downlink echo adaptive filter.
[0035] Step S312 , continuously taking a preset number of sampling points from the downlink echo output signal and inputting them into the downlink echo adaptive filter for filtering to obtain the downlink echo output signal. The preset number is the same as the filtering order.
[0036] Step S313 : Compare the downlink echo output signal of each sampling point with the downlink echo reference signal to obtain a downlink echo error signal.
[0037] Step S314: determine whether the minimum mean square value of the downlink echo error signal meets the preset requirement.
[0038] Step S315 : If the minimum mean square value of the downlink echo error signal does not meet the preset requirement, the weight coefficient of the downlink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the downlink echo error signal meets the preset requirement.
[0039] Step S316: If the minimum mean square value of the downlink echo error signal meets the preset requirement, the data window is shifted back by one sampling point and the process returns to step S312.
[0040] Specifically, the adaptive filtering process of the uplink echo signal is as follows: First, the weight coefficient W2 and step size u2 of the downlink echo adaptive filter are initialized, for example, the initial weight is 0, u2=0.01. Then, a signal of a specific length is selected for processing based on the downlink echo signal duration and the filter order. For example, when the downlink echo signal x2(n) has 200 sampling points and the filter order is 10, 10 consecutive sampling points are taken from the downlink echo signal x2(n), such as x2(n), x2(n-1), ..., x2(n-9). The downlink echo error signal corresponding to each sampling point is input into the downlink echo adaptive filter for filtering processing to obtain the downlink echo output signal y2(n) of each sampling point. The downlink echo output signal y2(n) is then compared with the downlink echo reference signal d2(n) to form an error signal e2(n), as shown in formula (6): e2(n)= d2(n)- y2(n)(6) y2(n)= W2(n) * x2(n)(7) Wherein, W2(n) is the weight vector of the downlink echo adaptive filter.
[0041] Further, e2(n)= d2(n)- W2(n) * x2(n)(8) If the minimum mean square value of the downlink echo error signal does not meet the preset requirements, the LMS (least mean square) algorithm is used. By using a variable step size u2(n), the weight coefficient W2 is iteratively adjusted to make the minimum mean square value of the downlink echo error signal as small as possible. The weight coefficient W2 iteration is shown in formula (9): W2(n+1) = W2(n) + u2(n) * e2(n) * x2(n)(9) u2(n)= u2 / (ɛ + x2 T (n) *x2(n))(10) Among them, ɛ is a protective constant, which is a very small positive number. Its main function is to prevent the denominator from being zero during the algorithm calculation process and ensure the stability of the operation.
[0042] If the downlink echo error signal meets the preset requirements, the data window is shifted back by one point and the next set of 10 data points (e.g., x²(n+1) to x²(n-8)) is processed. Furthermore, the number of iterations is determined. If all downlink echo signals are filtered, the number of iterations is determined to have been reached and the iterations are terminated.
[0043] Because of the randomness of environmental noise, the correlation decreases after the delay, so that the effective signal is enhanced after the adaptive weight, thereby achieving a filtering effect. Compared with traditional adaptive filtering, this application uses its own delay as the reference signal, which solves the problem that it is difficult for adaptive filtering to find an ideal reference signal under working conditions. Through the above steps, the method completes the filtering of the collected signal to obtain a more accurate time difference. This method can effectively remove noise interference and improve product reliability. Give an effect demonstration, such as Figure 3 、 Figure 4 ,The waveforms before and after filtering are quite different from the calculated data, ,and the filtering effect is achieved.
[0044] This invention provides an adaptive filtering method for ultrasonic metering. This method applies a correlation-based adaptive model to echo signal processing during instantaneous time difference acquisition in ultrasonic metering, resolving the issue of interference within the frequency sweep range. By using the delayed signal as a reference signal, the method overcomes the difficulty of obtaining an ideal waveform under operating conditions. This method eliminates the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0045] In an optional implementation, the adaptive filtering method further includes the following steps: Step S4: dividing the downlink echo signal in the uplink echo output signal calculation formula and the uplink echo error signal calculation formula, and the downlink echo signal in the downlink echo output signal calculation formula and the downlink echo error signal calculation formula by a preset scaling factor.
[0046] Step S5 , multiplying the uplink echo signal in the iterative formula of the weight coefficient of the uplink echo adaptive filter and the downlink echo signal in the iterative formula of the weight coefficient of the downlink echo adaptive filter by a preset scaling factor, which is determined according to the resources of the single chip microcomputer.
[0047] Furthermore, when applying the above formulas (1)-(10) to embedded microcontrollers, such as 16-bit microcontrollers, resource constraints may occur. In this case, only 2 bytes can be used to store data, which may cause the calculation result to exceed the counting range. Therefore, the above formula (2) is modified into formula (11): y1(n)= W1(n) * x1(n) / const(11) Therefore e1(n)= d1(n)- W1(n) * x1(n) / const(12) Formula (4) is modified into formula (13): W1(n+1) = W1(n) + u1(n) * e1(n) * x1(n) * const(13) Similarly, the above formula (7) is modified into formula (14): y2(n)= W2(n) * x2(n) / const(14) Therefore e2(n)= d2(n)- W2(n) * x2(n) / const(15) Formula (9) is modified into formula (16): W2(n+1) = W2(n) + u2(n) * e2(n) * x2(n) * const(16) By introducing the scaling factor const, the calculation result is first reduced to avoid overflow, and then the accuracy is restored through the reverse operation, ensuring that the algorithm can still run correctly when hardware resources are limited.
[0048] The present invention provides an ultrasonic measuring device, comprising: a single-chip microcomputer, a transducer A, and a transducer B, wherein transducer A transmits a frequency sweep signal, and transducer B receives an uplink echo signal; transducer B transmits the frequency sweep signal, and transducer A receives a downlink echo signal, thereby forming forward and reverse waveform signals; the single-chip microcomputer is used to execute the adaptive filtering method for ultrasonic measurement of the above-mentioned embodiment.
[0049] The ultrasonic metering device provided by this invention utilizes a correlation-based adaptive model for echo signal processing during ultrasonic measurement instantaneous time difference acquisition, resolving the issue of interference within the frequency sweep range. By using its own signal as a reference signal after delay processing, it overcomes the difficulty of obtaining an ideal waveform under operating conditions and transcends the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0050] This embodiment also provides an adaptive filtering device based on ultrasonic metrology, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0051] This embodiment provides an adaptive filtering device based on ultrasonic measurement, such as Figure 5 Shown, including: The acquisition module 51 is used to regularly acquire ultrasonic uplink echo signals and downlink echo signals.
[0052] The delay module 52 is configured to delay the uplink echo signal by a preset time to generate an uplink echo reference signal, and delay the downlink echo signal by a preset time to generate a downlink echo reference signal.
[0053] The filtering module 53 is used to input the uplink echo signal and the downlink echo signal into the adaptive filter for filtering processing respectively, output the uplink echo output signal and the downlink echo output signal, and iteratively adjust the weight coefficient of the adaptive filter using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements. The uplink echo error signal is the comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is the comparison result of the downlink echo reference signal and the downlink echo output signal.
[0054] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0055] The adaptive filtering device based on ultrasonic metrology in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0056] The present invention provides an adaptive filtering device for ultrasonic metering. This device utilizes a correlation-based adaptive model for echo signal processing during instantaneous time difference acquisition in ultrasonic metering, resolving the issue of interference within the frequency sweep range. By using the delayed signal as a reference signal, the device overcomes the difficulty of obtaining an ideal waveform under operating conditions. This eliminates the reliance of traditional filtering on external reference signals, significantly improving the metering accuracy and reliability of ultrasonic gas meters in complex environments.
[0057] The embodiment of the present invention also provides a computer device having the above Figure 5 The adaptive filtering device based on ultrasonic measurement is shown.
[0058] See also Figure 6 , Figure 6 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0059] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0060] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0061] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0062] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0063] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0064] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0065] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An adaptive filtering method based on ultrasonic measurement, characterized in that: The method comprises: Regularly collect the uplink echo signal and downlink echo signal of the ultrasonic wave; Delaying the uplink echo signal for a preset time to generate an uplink echo reference signal, and delaying the downlink echo signal for a preset time to generate a downlink echo reference signal; The uplink echo signal and the downlink echo signal are respectively input into the adaptive filter for filtering processing, and an uplink echo output signal and a downlink echo output signal are output. At the same time, the weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements. The uplink echo error signal is the comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is the comparison result of the downlink echo reference signal and the downlink echo output signal.
2. The adaptive filtering method based on ultrasonic measurement according to claim 1, characterized in that: Inputting the uplink echo signal and the downlink echo signal into adaptive filters for filtering respectively, outputting an uplink echo output signal and a downlink echo output signal, and iteratively adjusting the weight coefficient of the adaptive filter using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, including: Initialize the weight coefficient and step size of the uplink echo adaptive filter; Continuously taking a preset number of sampling points from the uplink echo signal and inputting them into an uplink echo adaptive filter for filtering to obtain an uplink echo output signal, wherein the preset number is the same as the filtering order; Comparing the uplink echo output signal of each sampling point with the uplink echo reference signal to obtain an uplink echo error signal; Determining whether the minimum mean square values of the uplink echo error signals all meet preset requirements; If the minimum mean square value of the uplink echo error signal does not meet the preset requirement, the weight coefficient of the uplink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal meets the preset requirement.
3. The adaptive filtering method based on ultrasonic measurement according to claim 2, characterized in that: The uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, and an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: If the minimum mean square value of the uplink echo error signal meets the preset requirement, the data window is shifted back by one sampling point, and the process returns to the step of continuously taking a preset number of sampling points from the uplink echo signal and inputting them into the uplink echo adaptive filter for filtering.
4. The adaptive filtering method based on ultrasonic measurement according to claim 2, characterized in that: The uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, and an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: Initialize the weight coefficient and step size of the downlink echo adaptive filter; Continuously taking a preset number of sampling points from the downlink echo signal and inputting them into a downlink echo adaptive filter for filtering to obtain a downlink echo output signal, wherein the preset number is the same as the filtering order; Comparing the downlink echo output signal of each sampling point with the downlink echo reference signal to obtain a downlink echo error signal; Determining whether the minimum mean square values of the downlink echo error signals all meet preset requirements; If the minimum mean square value of the downlink echo error signal does not meet the preset requirement, the weight coefficient of the downlink echo adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the downlink echo error signal meets the preset requirement.
5. The adaptive filtering method based on ultrasonic measurement according to claim 4, characterized in that: The uplink echo signal and the downlink echo signal are respectively input into an adaptive filter for filtering, and an uplink echo output signal and a downlink echo output signal are output, and a weight coefficient of the adaptive filter is iteratively adjusted using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, further comprising: If the minimum mean square value of the downlink echo error signal meets the preset requirement, the data window is shifted back by one sampling point, and the process returns to the step of continuously taking a preset number of sampling points from the downlink echo signal and inputting them into the downlink echo adaptive filter for filtering.
6. The adaptive filtering method based on ultrasonic measurement according to claim 1, characterized in that: The method further comprises: Dividing the uplink echo signal in the uplink echo output signal calculation formula and the uplink echo error signal calculation formula, and the downlink echo signal in the downlink echo output signal calculation formula and the downlink echo error signal calculation formula by a preset scaling factor; The uplink echo signal in the weight coefficient iterative formula of the uplink echo adaptive filter and the downlink echo signal in the weight coefficient iterative formula of the downlink echo adaptive filter are multiplied by a preset scaling factor, which is determined according to the resources of the single chip microcomputer.
7. An ultrasonic measuring device, characterized in that: The device includes: a single chip microcomputer, a transducer A and a transducer B, wherein: The transducer A transmits a frequency sweep signal, and the transducer B receives an uplink echo signal. The transducer B transmits a frequency sweep signal, and the transducer A receives a downlink echo signal, forming a forward and reverse waveform signal. The single chip microcomputer is used to execute the adaptive filtering method for ultrasonic measurement according to any one of claims 1 to 6.
8. An adaptive filtering device based on ultrasonic measurement, characterized in that: The device comprises: An acquisition module is used to regularly acquire ultrasonic uplink echo signals and downlink echo signals; A delay module, configured to delay the uplink echo signal by a preset time to generate an uplink echo reference signal, and delay the downlink echo signal by a preset time to generate a downlink echo reference signal; A filtering module is used to input the uplink echo signal and the downlink echo signal into an adaptive filter for filtering processing, output an uplink echo output signal and a downlink echo output signal, and iteratively adjust the weight coefficient of the adaptive filter using a variable step size until the minimum mean square value of the uplink echo error signal and the minimum mean square value of the downlink echo error signal both meet preset requirements, the uplink echo error signal is a comparison result of the uplink echo reference signal and the uplink echo output signal, and the downlink echo error signal is a comparison result of the downlink echo reference signal and the downlink echo output signal.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the adaptive filtering method for ultrasonic measurement according to any one of claims 1 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the adaptive filtering method for ultrasonic metrology according to any one of claims 1 to 6.
Citation Information
Patent Citations
Blind adaptive filtering device capable of eliminating narrowband interference and its application
CN102281044A
Reference signal selection method, calculation method and phase difference type ultrasonic flowmeter
CN111337092A
Open channel flow measurement method and device based on adaptive LMS filtering and medium
CN118051724A
Adaptive signal processing
US20120226728A1
Liquid immersion sensor
US20200018726A1
Cited By
Echo signal processing method, integrated circuit chip and ultrasonic flowmeter
CN120742287A
Processing method of echo signal, integrated circuit chip and ultrasonic flowmeter
CN120742287B