A method for processing echo signals of a guided wave radar liquid level meter and a related device

CN122881832APending Publication Date: 2026-10-09CHINA TECHENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611173768.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0003]然而,在实际复杂的工业现场工况下,导波雷达液位计的回波信号常受到多种干扰源的严重影响,导致真实液面回波难以被准确识别

Benefits of technology

[0056]本申请通过生成动态包络序列作为自适应阈值,能够将幅值低于包络的噪声、衰减尾巴以及泡沫、蒸汽等引起的宽缓低幅干扰自动排除,仅保留幅值较强、可能对应实际反射的采样子序列;由于真实液面回波通常具有高峰值、高信噪比与合理面积,而内壁或搅拌器虚假回波具有窄脉冲、面积小的特点,挂料或腐蚀引起的异常反射具有信噪比低的特点,因此,本申请基于真实液面回波与干扰回波的特点差异,可以准确识别真实液面回波,有效解决了复杂工况下主回波与干扰回波难以分离的技术难题,为后续精准计算液位提供了可靠的数据基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122881832A_ABST
    Figure CN122881832A_ABST
Patent Text Reader

Abstract

The application discloses a guided wave radar liquid level gauge echo signal processing method and related device, and relates to the field of liquid level measurement. After the guided wave radar liquid level gauge is powered on and stabilized, a sampling sequence of high-frequency echoes is obtained, the average value of the amplitudes of wave crests and troughs in the sequence is determined, the starting point index of the amplitude equaling to the average value of the amplitudes before the trough is calculated through linear interpolation, a plurality of sampling sub-sequences with amplitudes higher than a pre-generated envelope sequence are screened from the sampling sequence, and the terminal point index, the amplitude of the wave crest, the echo signal-to-noise ratio and the echo area corresponding to each sub-sequence are determined. According to the above, a target sampling sub-sequence representing the real liquid surface echo is screened from the plurality of sub-sequences, the time difference between the flange echo and the liquid surface echo is determined according to the starting point index and the terminal point index corresponding to the target sampling sub-sequence, and then the liquid level height currently measured by the guided wave radar liquid level gauge is determined. The application can accurately extract the real liquid surface echo from the complex echo signal, and then accurately measure the liquid level height.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of liquid level measurement technology, and in particular to a method and related apparatus for processing echo signals from a guided wave radar liquid level gauge. Background Technology

[0002] Guided wave radar level gauges are based on the time-domain reflectometry principle. They emit high-frequency electromagnetic pulses along a waveguide (or cable probe) and detect the echo signal reflected from the liquid surface, calculating the liquid level height based on the signal propagation time. Due to their advantages such as high measurement accuracy, strong anti-interference ability, and wide range of applicable media, they have been widely used in liquid level measurement in industries such as petroleum, chemical, metallurgy, and power.

[0003] However, in complex industrial environments, the echo signals of guided wave radar level gauges are often severely affected by various interference sources, making it difficult to accurately identify the true liquid level echo. Among these challenges, the interference echo problem under complex conditions is one of the key obstacles restricting its measurement accuracy. Specifically, foam layers in industrial environments attenuate the amplitude of the true liquid level echo, while steam, turbulence, container walls, and agitators generate multipath effects and direct reflections, creating numerous false echoes superimposed on the true echo. Furthermore, the adhesion or corrosion of the medium on the waveguide surface alters the local impedance, producing abnormal reflections whose position and intensity vary with the operating conditions, severely interfering with the measurement of the true liquid level signal.

[0004] Therefore, how to effectively identify and suppress interference echoes generated by various complex working conditions such as foam, steam, turbulence, container inner walls, stirring equipment, and waveguide rod adhesion or corrosion, and accurately extract the real liquid surface echo from the complex signal environment, is a technical problem that urgently needs to be solved in the field of guided wave radar level gauge technology. Summary of the Invention

[0005] In view of the above problems, this application provides a method and related device for processing echo signals from a guided wave radar level gauge, so as to accurately extract the real liquid surface echo from complex echo signals and thus accurately measure the liquid level height. The specific solution is as follows:

[0006] The first aspect of this application provides a method for processing echo signals from a guided wave radar level gauge, including:

[0007] After the guided wave radar level gauge is powered on and stabilized, a sampling sequence is obtained based on the high-frequency signal emitted by the guided wave radar level gauge. The sampling sequence is a sequence of multiple sampling points obtained by time-axis extension of the echo signal corresponding to the high-frequency signal and data sampling based on the extended signal.

[0008] Determine the average amplitude of the peaks and troughs in the sampling sequence, and calculate the index of the point before the trough whose amplitude is equal to the average amplitude through linear interpolation, and use it as the starting point index;

[0009] An envelope sequence is generated based on the sampling sequence. Multiple sampling sub-sequences with amplitudes higher than those of the envelope sequence are selected from the sampling sequence. The endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence are determined.

[0010] Based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the multiple sampling sub-sequences, a target sampling sub-sequence representing the real liquid surface echo is selected from the multiple sampling sub-sequences.

[0011] Based on the starting point index and the ending point index corresponding to the target sampling subsequence, the time difference between the flange echo and the liquid surface echo in the echo signal is determined, and the liquid level height currently measured by the guided wave radar level gauge is determined based on the time difference.

[0012] In one possible implementation, calculating the index of the point whose amplitude equals the average amplitude before the trough via linear interpolation, as the starting point index, includes:

[0013] Starting from the position of the trough, search backwards in the sampling sequence for the nearest sampling point whose amplitude is greater than or equal to the average amplitude, and use it as the starting transition point;

[0014] Linear interpolation is performed based on the magnitude and index of the starting transition point to obtain the starting point index.

[0015] In one possible implementation, generating the envelope sequence based on the sampled sequence includes:

[0016] The average amplitude of each sampling point in the sampling sequence is determined as the target value;

[0017] Starting from the starting point corresponding to the starting point index, the first sampling point with an amplitude greater than the target value is searched forward from the sampling sequence. The sampling points between the starting point and the first sampling point are used as the envelope start data. The sampling points after the first sampling point are filtered to obtain the envelope subsequent data.

[0018] The envelope start data and the envelope subsequent data are concatenated to form the envelope sequence.

[0019] In one possible implementation, the process of determining the endpoint index includes:

[0020] From each of the sampling sub-sequences, a sampling point at the peak position is determined as the peak sampling point, and the envelope value corresponding to the peak sampling point is determined from the envelope sequence.

[0021] The first value is determined based on the amplitude of the peak sampling point and the envelope value;

[0022] Starting from the peak sampling point, search backwards from the sampling subsequence for the nearest sampling point whose amplitude is less than or equal to the first value, and use it as the first endpoint transition point;

[0023] The second value is determined based on the amplitude of the peak sampling point and the amplitude of the first endpoint transition point;

[0024] Starting from the peak sampling point, between the peak sampling point and the first endpoint transition point, the nearest sampling point with an amplitude less than or equal to the second value is searched forward and used as the second endpoint transition point;

[0025] Linear interpolation is performed based on the amplitude and index of the second endpoint transition point to obtain the endpoint index whose amplitude is equal to the second value.

[0026] In one possible implementation, determining the first value based on the amplitude of the peak sampling point and the envelope value includes:

[0027] Calculate the first difference between the amplitude of the peak sampling point and the envelope value;

[0028] The first difference is linearly scaled to obtain the scaled value;

[0029] The scaling value is added to the envelope value, and the sum is used as the first value.

[0030] In one possible implementation, determining the second value based on the amplitude of the peak sampling point and the amplitude of the first endpoint transition point includes:

[0031] Calculate the second difference between the amplitude of the peak sampling point and the amplitude of the first endpoint transition point;

[0032] Multiply the second difference by the preset amplitude of the true echo confirmation point, and then add the product to the amplitude of the first endpoint transition point to obtain the second value.

[0033] In one possible implementation, the step of selecting a target sampling subsequence characterizing the real liquid surface echo from the plurality of sampling subsequences based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the plurality of sampling subsequences respectively includes:

[0034] The peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling subsequence are normalized to obtain the normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area corresponding to each sampling subsequence.

[0035] The normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area corresponding to each sampling subsequence are weighted and summed to obtain the initial scale value corresponding to each sampling subsequence.

[0036] Based on the initial scale values ​​corresponding to the plurality of sampling subsequences respectively, the initial scale value corresponding to each sampling subsequence is normalized to obtain the normalized scale value corresponding to each sampling subsequence;

[0037] The sampled subsequence with the largest normalized scaling value among the plurality of sampled subsequences is taken as the target sampled subsequence.

[0038] In one possible implementation, determining the liquid level height currently measured by the guided wave radar level gauge based on the time difference includes:

[0039] The frequency of the transmitted pulse signal, the preset speed correction amount, and the current period value of the difference frequency signal used for the time axis extension are obtained;

[0040] The electromagnetic wave speed is determined based on the frequency of the transmitted pulse signal, the speed correction amount, and the current period value of the difference frequency signal.

[0041] The distance between the flange and the liquid surface in the guided wave radar level gauge is determined based on the time difference and the electromagnetic wave velocity.

[0042] The liquid level height is determined based on the distance.

[0043] In one possible implementation, determining the liquid level height based on the distance includes:

[0044] Using the distance as a candidate distance, for the multiple sampling sequences obtained from consecutive measurements, the distance corresponding to each sampling sequence is determined according to the guided wave radar level gauge echo signal processing method shown in the previous implementation, so as to obtain multiple candidate distances;

[0045] The truncated average algorithm is used to remove the extreme large and small values ​​among the multiple candidate distances, and the average distance is calculated for the remaining candidate distances;

[0046] The liquid level height is determined based on the average distance.

[0047] A second aspect of this application provides a guided wave radar level gauge echo signal processing device, comprising:

[0048] The echo sampling unit is used to obtain a sampling sequence based on the high-frequency signal emitted by the guided wave radar level gauge after the guided wave radar level gauge is powered on and stabilized. The sampling sequence is a sequence of multiple sampling points obtained by performing data sampling based on the extended signal after time-axis extension of the echo signal corresponding to the high-frequency signal.

[0049] The starting point determination unit is used to determine the average amplitude of the peaks and troughs in the sampling sequence, and calculate the index of the point before the trough whose amplitude is equal to the average amplitude through linear interpolation, as the starting point index;

[0050] A multi-dimensional feature calculation unit is used to generate an envelope sequence based on the sampling sequence, filter multiple sampling sub-sequences with amplitudes higher than the envelope sequence from the sampling sequence, and determine the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence.

[0051] The subsequence filtering unit is used to filter target sampling subsequences that characterize the real liquid surface echo from the multiple sampling subsequences based on the peak amplitude, echo signal-to-noise ratio and echo area corresponding to the multiple sampling subsequences respectively.

[0052] The height calculation unit is used to determine the time difference between the flange echo and the liquid surface echo in the echo signal based on the starting point index and the ending point index corresponding to the target sampling sub-sequence, and to determine the liquid level height currently measured by the guided wave radar level gauge based on the time difference.

[0053] By employing the above technical solution, the guided wave radar level gauge echo signal processing method provided in this application considers that the travel time of the high-frequency signal emitted during the liquid level measurement process of the guided wave radar level gauge is short (nanosecond level), making real-time sampling difficult. To accurately obtain the liquid level measurement value, this application obtains a sampling sequence based on the high-frequency signal emitted by the guided wave radar level gauge after it is powered on and stabilized. This sampling sequence is a sequence of multiple sampling points obtained by time-axis extension of the echo signal corresponding to the high-frequency signal, followed by data sampling based on the extended signal. This application uses time-axis extension to lengthen the echo signal on the time axis, thereby enabling accurate acquisition of the echo signal at a lower sampling rate, reducing the requirements for the signal acquisition chip while ensuring measurement accuracy.

[0054] Next, this application determines the average amplitude of the peaks and troughs in the sampling sequence, and calculates the index of the point before the trough whose amplitude equals the average amplitude through linear interpolation, which serves as the starting point index. Since the starting point is based on the dynamic average of the peaks and troughs and is located before the trough, even if the foam layer decays, causing a significant decrease in the amplitude of the liquid surface echo, or if changes in the medium cause fluctuations in the reflection intensity, the position of this starting point on the time axis remains stable, providing a highly repeatable benchmark for subsequent time difference measurements.

[0055] Considering that echo signals are usually composed of a main echo (including flange echo and real liquid surface echo) and several tail interferences or false echoes, in order to accurately separate the real liquid surface echo from the complex echo signal and accurately measure the liquid level height based on the real liquid surface echo, this application further generates an envelope sequence based on the sampling sequence, selects multiple sampling sub-sequences with amplitudes higher than the envelope sequence from the sampling sequence, and determines the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence. Based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the multiple sampling sub-sequences respectively, a target sampling sub-sequence representing the real liquid surface echo is selected from the multiple sampling sub-sequences.

[0056] This application generates a dynamic envelope sequence as an adaptive threshold, which can automatically exclude noise, attenuation tails, and wide-range low-amplitude interference caused by foam, steam, etc., with amplitudes lower than the envelope, and retain only the sampling subsequence with stronger amplitude that may correspond to the actual reflection. Since real liquid surface echoes usually have high peak values, high signal-to-noise ratios and reasonable areas, while false echoes from the inner wall or agitator have narrow pulses and small areas, and abnormal reflections caused by material buildup or corrosion have low signal-to-noise ratios, this application can accurately identify real liquid surface echoes based on the differences in characteristics between real liquid surface echoes and interference echoes. This effectively solves the technical problem of separating the main echo and interference echoes under complex working conditions, and provides a reliable data foundation for subsequent accurate liquid level calculation.

[0057] Finally, considering that the high-frequency signal will generate a significant unidirectional flange echo at the connection point of the waveguide cable and waveguide rod, while generating a large reverse liquid surface echo at the liquid surface, given that the propagation speed of the high-frequency signal in the waveguide rod is known, the time difference between the flange echo and the liquid surface echo is linearly proportional to the one-way distance of the high-frequency signal from the flange to the liquid surface. Combined with the flange installation height, the current liquid level can be uniquely determined. Based on this, this application determines the time difference between the flange echo and the liquid surface echo in the echo signal according to the starting point index and the endpoint index corresponding to the target sampling subsequence, and determines the current liquid level measured by the guided wave radar level gauge based on the time difference, thus improving the accuracy of liquid level measurement. Attached Figure Description

[0058] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0059] Figure 1 A flowchart illustrating a method for processing echo signals from a guided wave radar level gauge provided in this application;

[0060] Figure 2 A schematic diagram of the equivalent time sampling process provided for this application;

[0061] Figure 3 A schematic diagram of the flange echo, liquid surface echo, and two feature points provided in this application;

[0062] Figure 4 This is a schematic diagram of a real-world sampled sequence and envelope sequence.

[0063] Figure 5 This is a schematic diagram of the structure of a guided wave radar level gauge echo signal processing device provided in this application. Detailed Implementation

[0064] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0065] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0066] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0067] To enable those skilled in the art to better understand this application, the guided wave radar level gauge echo signal processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0068] Reference Figure 1 , Figure 1 This application provides a flowchart illustrating a method for processing echo signals from a guided wave radar level gauge, as shown in the embodiments below. Figure 1 As shown, the guided wave radar level gauge echo signal processing method may include:

[0069] Step S201: After the guided wave radar level gauge is powered on and stabilized, a sampling sequence is obtained based on the high-frequency signal emitted by the guided wave radar level gauge. The sampling sequence is a sequence of multiple sampling points obtained by time-axis extension of the echo signal corresponding to the high-frequency signal and data sampling based on the extended signal.

[0070] Each sampling point includes two attributes: an index and an amplitude. The index represents the sampling time. Multiple sampling points are arranged in ascending order of their indices to form a sampling sequence.

[0071] It is understandable that the guided wave radar level gauge will experience a period of unstable operation after initial power-on due to the influence of the system environment. In order to avoid transmitting interfering high-frequency signals during the initial unstable power-on operation, which would affect the accuracy of the liquid level measurement, this application allows the guided wave radar level gauge to be powered on and stabilized before measurement.

[0072] Considering that the travel time of electromagnetic wave signals is short, typically on the nanosecond level, during liquid level measurement using guided wave radar level gauges, signal acquisition chips usually cannot meet the requirements for real-time signal sampling. To accurately obtain the liquid level measurement value, this application provides an equivalent time sampling technique, which involves acquiring a point within each cycle of the echo signal and sampling the amplitude of the high-frequency signal within the cycle at equal intervals. After such sampling processing, the echo signal can be stretched on the time axis to form an extended signal.

[0073] like Figure 2 This illustrates the equivalent time sampling process. The transmitted high-frequency signal is a periodically repeating signal, and correspondingly, the echo signal is also periodically repeating. Equivalent time sampling does not require high-speed sampling to be completed within a single cycle. Instead, it samples the first point in the first sampling cycle, the second point in the second cycle with a delay of Δt, the third point in the third cycle with a delay of 2Δt, and so on. After several cycles, a signal like this can be formed. Figure 2 The image shows the extended signal after time-axis extension of the echo signal.

[0074] The aforementioned Δt refers to the difference frequency signal, which is determined based on the frequencies of the high-frequency signal emitted by the guided wave radar level gauge and the sampling signal. For example, if the high-frequency signal frequency is 100MHz and the sampling signal frequency is 100kHz, then the equivalent time sampling technique will amplify the time by 1000 times (i.e., 100MHz / 100kHz), which is (T+Δt) / Δt=1000, where T=1 / 100MHz. From this, the theoretical value of the difference frequency signal can be obtained.

[0075] In this embodiment, the difference frequency signal is acquired by the difference frequency detection circuit and then sent to the microcontroller of the guided wave radar level gauge. The microcontroller detects the period of the difference frequency signal and compares it with the theoretical value. Based on the obtained difference, it continuously adjusts the frequency difference between the fixed-frequency oscillation circuit and the adjustable-frequency oscillation circuit to achieve the theoretical value and measurement accuracy requirements. This is called "differential frequency adjustment". "Differential frequency adjustment" completes the adjustment and control of the frequency. Through the adjustment of the hardware circuit and feedback measurement, the data obtained by the subsequent data sampling program is a sampling sequence of the extended signal periodically extended from the high-frequency signal.

[0076] In other words, this embodiment can perform data sampling on the extended signal to obtain a sampling sequence.

[0077] In one possible implementation, the data sampling process may include: starting periodic alignment after detecting the differential frequency adjustment completion flag (i.e., synchronizing the sampling signal clock with the clock of the high-frequency signal to align the start time of the high-frequency signal and the sampling signal, aligning once per sampling cycle); then, after the periodic alignment is completed, setting the sampling delay time according to the cable length of the transmitted sampling signal (achieved by detecting the number of falling edges of the differential frequency signal); after the sampling delay is completed, acquiring data from the extended signal according to the sampling frequency set by the timer (after the periodic extension of the high-frequency signal), and transmitting the data to the microcontroller's DMA (Direct Memory Access) under the control of the microcontroller hardware; when sampling is complete (i.e., when the amount of sampled data reaches a set value, such as 1000 sampling points), the DMA controller issues a DMA storage completion flag, stopping the current round of sampling.

[0078] It is understandable that the above data sampling process is performed after the sampling delay time is reached. At this time, the guided wave radar level gauge may not be powered on and stable. In order to ensure that the level measurement is performed after the guided wave radar level gauge is powered on and stable, this embodiment may not use the m sampling sequences of the first sampling after power-on (for example, each sampling sequence includes 1000 sampling points), but instead perform the following processing based on the sampling sequences collected after the (m+1)th sampling sequence or the sampling sequences collected thereafter.

[0079] Optionally, before proceeding with the following processing, the sampled sequence can be preliminarily filtered. The filtering method can be averaging of adjacent data. Of course, other filtering methods are also possible, and no specific limitations are made here.

[0080] It should also be noted that the aforementioned guided wave radar level gauge requires factory calibration and parameter settings to ensure accurate level measurement. This factory calibration process can be performed by maintenance personnel. The configurable calibration data and parameter settings are as follows:

[0081] (1) Distance value calibration data.

[0082] The data includes "measured values" and "calibrated values" for empty height corresponding to n different liquid levels. Maintenance personnel can simulate liquid surface reflection on the waveguide structure by short-circuiting to obtain these empty height data at n different locations. The data displayed by the guided wave radar level gauge is used as the "measured value," and the data measured using calibrated tools such as a ruler is used as the "calibrated value." The calibration data must include at least the data corresponding to the liquid level at the upper and lower limits of the range.

[0083] (2) Level gauge parameter data.

[0084] This includes the lower limit of the measuring range, the upper limit of the measuring range, the installation height, material parameters, and damping time parameters. These data are obtained based on actual user needs and on-site installation conditions.

[0085] Step S202: Determine the average amplitude of the peaks and troughs in the sampling sequence, and calculate the index of the point before the trough where the amplitude is equal to the average amplitude through linear interpolation, and use it as the starting point index.

[0086] It is understandable that the high-frequency signal output from the level gauge pulse signal transmitting circuit propagates along the waveguide rod or waveguide cable via a coaxial cable. When it encounters a medium with different impedance, it will generate reflected signals in the same or opposite directions. See also Figure 3 As shown, high-frequency signals will generate a relatively obvious unidirectional flange echo at the connection point of the waveguide cable and waveguide rod, while a large reverse liquid surface echo will be generated on the liquid surface.

[0087] Since there is no standard mathematical model for the echo waveform represented by the sampling sequence, and the waveforms are not the same at different liquid levels, it is necessary to select the most suitable feature point on the echo curve represented by the sampling sequence to perform time positioning of the echo in order to obtain the time difference between the flange echo and the liquid surface echo.

[0088] In order to obtain a stable starting point that is insensitive to amplitude fluctuations, exceeds sampling accuracy, and has minimal impact from waveform distortion, and to provide a highly repeatable benchmark for subsequent time difference measurements, this embodiment provides an echo starting point determination method based on a first-order difference algorithm.

[0089] Specifically, we can first determine the average amplitude of the peaks and troughs in the sampling sequence, and then use linear interpolation to interpolate the point before the trough where the amplitude equals the calculated average amplitude, as the starting point, and calculate the index (time index) of this starting point as the starting point index.

[0090] Step S203: Generate an envelope sequence based on the sampling sequence, select multiple sampling sub-sequences from the sampling sequence whose amplitude is higher than that of the envelope sequence, and determine the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence.

[0091] Understandably, echo signals typically include not only flange echoes and actual liquid surface echoes, but also interference echoes generated by various factors such as foam, steam, container inner walls, agitators, material buildup or corrosion on waveguides, and tail oscillations following the main echo. These interference signals superimposed on the actual echoes make it extremely difficult to directly identify the actual liquid surface echoes from the sampling sequence.

[0092] To separate potential real liquid surface echoes from the complex background, this embodiment employs a dynamic envelope filtering strategy. Specifically, an envelope sequence is generated based on the sampling sequence. This envelope sequence reflects the overall trend of the sampling sequence and is insensitive to local spikes. See also... Figure 4 This illustrates a schematic diagram of a real-world sampling sequence and envelope sequence. The sampling sequence is... Figure 4 The waveform curve portion, the envelope sequence is Figure 4 The flat line portion.

[0093] In this embodiment, the original sampling sequence and the envelope sequence can be compared point by point to filter out continuous data segments with amplitudes higher than those in the envelope sequence. Each continuous segment is called a sampling subsequence, such as... Figure 4 Three sampling subsequences are shown, denoted as sampling subsequence 11, sampling subsequence 12, and sampling subsequence 13. These sampling subsequences are candidate echo bands that may correspond to physical reflections.

[0094] Since the amplitude of wide, low-amplitude interference caused by foam, steam, etc., is likely to be lower than the envelope sequence, it can be automatically excluded. The attenuation tail after the main echo will also be unable to form a continuous segment higher than the envelope due to the reduced amplitude, thus avoiding being misjudged as an independent echo.

[0095] Considering that among the many sampling subsequences, only the main echo portion, i.e., sampling subsequence 11, is the truly needed real liquid surface echo, in order to accurately identify this real liquid surface echo, it is important to consider that the real liquid surface echo and various interfering echoes often exhibit different characteristic distributions in terms of peak amplitude, signal-to-noise ratio, and echo area. For example, the real liquid surface echo usually has a high peak value, high signal-to-noise ratio, and moderate echo area, while the false echoes from the inner wall or agitator are characterized by narrow pulses and small areas, and abnormal reflections caused by material buildup or corrosion are characterized by low signal-to-noise ratio. Based on these differences in echo characteristics, this embodiment can further determine the corresponding endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area for each selected sampling subsequence. Among them, the echo signal-to-noise ratio can be represented by the ratio of peak amplitude to the root mean square of noise. In this embodiment, the starting point is used as noise, and the root mean square of noise is calculated using the amplitude of the starting point. The echo area is obtained by integrating or summing the amplitudes of the sampling points within the range from the starting point to the endpoint of the sampling subsequence.

[0096] In one possible implementation, considering that a large number of sampled subsequences may be obtained by filtering through the envelope sequence, in order to improve the efficiency of subsequent processing, this embodiment may retain only the first 50 (optional threshold, or other thresholds, or a preset value range) valid sampled subsequences, and then calculate their endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area.

[0097] Here, a valid sampling subsequence refers to a subsequence containing valid echo peaks. A valid echo peak refers to a rising segment immediately preceding the peak where the amplitude of multiple sampling points has increased continuously and the change is significant compared to the amplitude of the previous trough, exceeding at least the preset threshold height.

[0098] In this embodiment, optionally, if more than 50 valid sampled subsequences are found under the above conditions, the threshold height can be increased and the search can be repeated; otherwise, the threshold height can be decreased until a valid sampled subsequence that meets the above quantity requirements is found.

[0099] Optionally, after obtaining each sampling subsequence, the echo width of each sampling subsequence can also be determined (i.e., the difference between the distance values ​​corresponding to the first and last sampling points of the sampling subsequence, the distance value corresponding to any sampling point is calculated by the electromagnetic wave velocity calculated by formula (2) below and the index of the sampling point), so as to determine whether the sampling subsequence needs to be calibrated or needs to be removed due to exceeding the range based on the echo width.

[0100] Step S204: Based on the peak amplitude, echo signal-to-noise ratio and echo area corresponding to the multiple sampling sub-sequences, select the target sampling sub-sequence that represents the real liquid surface echo from the multiple sampling sub-sequences.

[0101] As previously described, since real liquid surface echoes and interference echoes have characteristic differences in peak amplitude, signal-to-noise ratio, and area, in order to identify real liquid surface echoes, this embodiment can compare the differences in peak amplitude, echo signal-to-noise ratio, and echo area corresponding to multiple sampling sub-sequences, thereby enabling the selection of target sampling sub-sequences that characterize real liquid surface echoes from multiple sampling sub-sequences.

[0102] Step S205: Determine the time difference between the flange echo and the liquid surface echo in the echo signal according to the starting point index and the endpoint index corresponding to the target sampling sub-sequence, and determine the liquid level height currently measured by the guided wave radar level gauge according to the time difference.

[0103] Understandably, a high-frequency signal will produce a fixed and distinct reflection in the same direction (flange echo) at the connection point between the waveguide cable and the waveguide rod (i.e., the flange location). The time position of this echo remains essentially unchanged after the equipment is installed and can be used as the zero point for measurement. However, when the electromagnetic wave propagates to the liquid surface, due to the abrupt change in the dielectric constants of air and liquid, a reverse reflection will occur (liquid surface echo), whose arrival time varies linearly with the liquid level. Given the known propagation speed of the electromagnetic wave, the time difference between the flange echo and the liquid surface echo is proportional to the one-way distance of the electromagnetic wave from the flange to the liquid surface. Combined with the pre-stored flange installation height, the current liquid level can be uniquely determined.

[0104] In this embodiment, the starting point index is a stable time reference point obtained in step S202 that is insensitive to amplitude fluctuations; it actually corresponds to the characteristic position of the flange echo. The ending point index of the target sampling subsequence represents the characteristic position of the actual liquid surface echo. The difference between the two can be used to determine the time difference between the flange echo and the liquid surface echo in the echo signal, and then the liquid level height currently measured by the guided wave radar level gauge can be determined based on this time difference.

[0105] For example, the liquid level height can be calculated according to the following formula (1).

[0106] Formula (1);

[0107] Where L represents the liquid level height; v represents the electromagnetic wave velocity, that is, the wave velocity of the high-frequency signal or echo signal; t represents the time difference between the flange echo and the liquid surface echo; and H is the flange installation height (known).

[0108] Here, the time difference t is calculated as follows: Time difference t = (End point index - Start point index) × Sampling interval; for example, after a series of echo processing steps, if the end point index is confirmed to be 3200, the start point index to be 1400, and the microcontroller's (i.e., single-chip microcomputer) sampling interval is 1ms, then the time difference t = (3200 - 1400) × 1 = 1800ms. It should be noted that this data is for illustrative purposes only and is not actual engineering data.

[0109] In other words, this embodiment can determine the distance between the flange and the liquid surface in the guided wave radar level gauge based on the time difference and the electromagnetic wave velocity. This allows us to determine the liquid level height based on that distance.

[0110] The process of determining the electromagnetic wave speed can be as follows: obtain the frequency of the transmitted pulse signal, the preset speed correction amount and the current period value of the difference frequency signal used for time axis extension, and determine the electromagnetic wave speed according to the frequency of the transmitted pulse signal, the speed correction amount and the current period value of the difference frequency signal, as detailed in the following formula (2).

[0111] Formula (2);

[0112] Where c represents the speed of light, which is a preset value; the theoretical speed of light is... m / s (meters per second); f represents the frequency of the transmitted pulse signal; q represents the speed correction amount, which is a preset value and is usually 0; temp_frq represents the current period value of the difference frequency signal.

[0113] Because the starting point is resistant to attenuation and the endpoint is derived from the real liquid surface echo selected by multi-dimensional feature screening, the calculated time difference has high repeatability and high anti-interference. The final liquid level height can still maintain high accuracy under complex working conditions such as foam, steam, turbulence, and material accumulation.

[0114] In summary, the guided wave radar level gauge echo signal processing method provided in this application considers the short travel time (nanosecond level) of the high-frequency signal emitted during level measurement by the guided wave radar level gauge, making real-time sampling difficult. To accurately obtain the level measurement value, this application obtains a sampling sequence based on the high-frequency signal emitted by the guided wave radar level gauge after it is powered on and stabilized. This sampling sequence is a sequence of multiple sampling points obtained by time-axis extension of the echo signal corresponding to the high-frequency signal and data sampling based on the extended signal. By extending the time axis, this application stretches the echo signal on the time axis, thereby enabling accurate acquisition of the echo signal at a lower sampling rate, reducing the requirements on the signal acquisition chip while ensuring measurement accuracy.

[0115] Next, this application determines the average amplitude of the peaks and troughs in the sampling sequence, and calculates the index of the point before the trough whose amplitude equals the average amplitude through linear interpolation, which serves as the starting point index. Since the starting point is based on the dynamic average of the peaks and troughs and is located before the trough, even if the foam layer decays, causing a significant decrease in the amplitude of the liquid surface echo, or if changes in the medium cause fluctuations in the reflection intensity, the position of this starting point on the time axis remains stable, providing a highly repeatable benchmark for subsequent time difference measurements.

[0116] Considering that echo signals are usually composed of a main echo (including flange echo and real liquid surface echo) and several tail interferences or false echoes, in order to accurately separate the real liquid surface echo from the complex echo signal and accurately measure the liquid level height based on the real liquid surface echo, this application further generates an envelope sequence based on the sampling sequence, selects multiple sampling sub-sequences with amplitudes higher than the envelope sequence from the sampling sequence, and determines the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence. Based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the multiple sampling sub-sequences respectively, a target sampling sub-sequence representing the real liquid surface echo is selected from the multiple sampling sub-sequences.

[0117] This application generates a dynamic envelope sequence as an adaptive threshold, which can automatically exclude noise, attenuation tails, and wide-range low-amplitude interference caused by foam, steam, etc., with amplitudes lower than the envelope, and retain only the sampling subsequence with stronger amplitude that may correspond to the actual reflection. Since real liquid surface echoes usually have high peak values, high signal-to-noise ratios and reasonable areas, while false echoes from the inner wall or agitator have narrow pulses and small areas, and abnormal reflections caused by material buildup or corrosion have low signal-to-noise ratios, this application can accurately identify real liquid surface echoes based on the differences in characteristics between real liquid surface echoes and interference echoes. This effectively solves the technical problem of separating the main echo and interference echoes under complex working conditions, and provides a reliable data foundation for subsequent accurate liquid level calculation.

[0118] Finally, considering that the high-frequency signal will generate a significant unidirectional flange echo at the connection point of the waveguide cable and waveguide rod, while generating a large reverse liquid surface echo at the liquid surface, given that the propagation speed of the high-frequency signal in the waveguide rod is known, the time difference between the flange echo and the liquid surface echo is linearly proportional to the one-way distance of the high-frequency signal from the flange to the liquid surface. Combined with the flange installation height, the current liquid level can be uniquely determined. Based on this, this application determines the time difference between the flange echo and the liquid surface echo in the echo signal according to the starting point index and the endpoint index corresponding to the target sampling subsequence, and determines the current liquid level measured by the guided wave radar level gauge based on the time difference, thus improving the accuracy of liquid level measurement.

[0119] In some embodiments of this application, the process of step S202, "calculating the index of the point whose amplitude is equal to the average amplitude before the trough by linear interpolation, and using it as the starting point index," is described in detail.

[0120] Specifically, in this embodiment, starting from the trough position, the nearest sampling point with an amplitude greater than or equal to the average amplitude is searched backward from the sampling sequence as the starting transition point. Linear interpolation is then performed based on the amplitude and index of the starting transition point to obtain the starting point index.

[0121] See Figure 3 The sampling sequence shown in this embodiment can be obtained by finding the sampling point with the largest amplitude (i.e., the sampling point where the peak is located) and the sampling point with the smallest amplitude (i.e., the sampling point where the trough is located) in the sampling sequence. The average amplitude can be obtained by calculating the average of the largest amplitude and the smallest amplitude.

[0122] Then, it can be obtained from Figure 3 Starting from the trough position shown, search forward (in the direction of decreasing index) for the nearest sampling point whose amplitude is greater than or equal to the average amplitude, such as... Figure 3 Starting from the trough, the amplitude of each sampling point forward of the trough gradually increases. Thus, the first sampling point with an amplitude greater than or equal to the average amplitude can be found as the starting transition point d.

[0123] Assume the index of the initial transition point is i, and the magnitude is Then the starting point index can be obtained using the following formula (3).

[0124] Formula (3);

[0125] in, This represents the amplitude of a sampling point located after the initial transition point in the sampling sequence. This represents the average amplitude. Indicates the starting point index.

[0126] In this embodiment, linear interpolation is used to accurately locate the starting point index before the trough. First, since the starting point is determined based on the dynamic average of the peak and trough and is located before the trough, this position is insensitive to fluctuations in the echo signal amplitude. Even if the echo amplitude is significantly attenuated due to absorption by the foam layer, changes in the dielectric constant of the medium, or long-distance propagation, the offset of the starting point on the time axis is still controlled within a very small range, effectively overcoming the "walking error" caused by changes in signal strength in the traditional fixed threshold method. Second, by searching forward for the nearest sampling point that meets the conditions and combining it with linear interpolation, the precise position of the starting point can be represented by a decimal index, obtaining a higher time resolution (i.e., subsampling accuracy) than the original sampling interval, providing a highly repeatable time reference for subsequent time difference measurements. In addition, this starting point positioning method only involves comparison and one linear interpolation operation, with low computational load and easy real-time execution in hardware devices, balancing accuracy and efficiency, thereby significantly improving the stability and reliability of liquid level measurement under complex working conditions.

[0127] In some other embodiments of this application, the process of "generating an envelope sequence based on the sampling sequence" in step S203 is described.

[0128] Specifically, in this embodiment, the average amplitude of each sampling point in the sampling sequence is first determined as the target value, denoted as... Optionally, the target value can be obtained by calculating the arithmetic mean of all sampling points in the entire sampling sequence, or by calculating the average value of a stable region after the starting point, in order to reduce the influence of front-end noise.

[0129] Next, starting from the starting point corresponding to the starting point index, search for values ​​with amplitudes greater than the target value in the sampling sequence moving backward (i.e., in the direction of increasing index). The first sampling point is denoted as Therefore, in this embodiment, all sampling points between the starting point and the first sampling point can be directly retained as the envelope start data. This part of the data is located in the starting segment of the echo leading edge, preserving the details of the original waveform.

[0130] for All subsequent sampling points can be filtered, such as by using a moving window maximum filtering method (e.g., a window length of 5-11 sampling points) or by using an exponentially weighted average for smoothing, to obtain the subsequent envelope data. Compared to the original extended signal, the subsequent envelope data can effectively follow the overall fluctuations of the extended signal while ignoring glitches.

[0131] Finally, the initial envelope data is concatenated with the subsequent envelope data to form a complete envelope sequence.

[0132] In this embodiment, the envelope sequence can dynamically adapt to changes in the amplitude of different echoes, automatically excluding noise below the envelope, wide and low-amplitude interference caused by bubbles, and the partial attenuation tail after the main echo from the sampling subsequence. Simultaneously, the envelope's initial segment retains crucial information about the leading edge, ensuring that the area near the starting point is not distorted by filtering. This method does not require manually setting a fixed threshold, is highly versatile, and has low computational cost, making it more suitable for embedded real-time processing.

[0133] In some other embodiments of this application, the process of determining the endpoint index corresponding to each sampling subsequence described above is explained in detail.

[0134] For any given sampling subsequence, first determine the sampling point located at the peak position. For ease of subsequent description, we will denote this as the peak sampling point. And determine the envelope value corresponding to the peak sampling point from the envelope sequence, that is, the envelope value at the index position of the peak sampling point. .

[0135] The first step is to sample the peak points. amplitude and envelope value Calculate the first value .

[0136] Optional, first value The calculation process is as follows: calculate the first difference between the amplitude of the peak sampling point and the envelope value, perform linear scaling on the first difference to obtain the scaled value, add the scaled value to the envelope value, and use the sum as the first value, for example, see the first value shown in the following formula (4):

[0137] Formula (4).

[0138] The second step is to sample from the peak point. Starting from the beginning, search backwards in the sampled subsequence for values ​​whose amplitude is less than or equal to the first value, following the direction of decreasing index. The nearest sampling point is used as the first endpoint transition point. .

[0139] This embodiment determines the first value through linear scaling, making the first endpoint transition point... It can adaptively land at the appropriate position on the trailing edge of the echo. This design allows for flexible parameter adjustment for different level gauge hardware and different media types, enhancing the versatility and adaptability of the algorithm.

[0140] The third step is to sample the peak points. amplitude Transition point to the first endpoint amplitude Calculate the second value .

[0141] Optional, second value The calculation process is as follows: calculate the second difference between the amplitude of the peak sampling point and the amplitude of the first endpoint transition point, multiply the second difference by the preset amplitude of the true echo confirmation point, and add the product to the amplitude of the first endpoint transition point to obtain the second value, such as the following formula (5):

[0142] Formula (5);

[0143] in, Indicates the second value; This represents the amplitude of the actual echo confirmation point, which is a preset value. For example, in this embodiment, we take... =0.8.

[0144] This embodiment, by introducing the parameter of the actual echo confirmation point amplitude, can precisely control the relative position of the final echo endpoint on the echo trailing edge, such as... Hourly waveforms are more suitable for waveforms with steep rising edges and mild trailing edges. When the value is large, the endpoint is biased towards the peak, which is suitable for waveforms with good symmetry. This configurable positioning mechanism allows the algorithm to adapt to different application scenarios while ensuring the reliability of endpoint positioning.

[0145] Step 4: Sampling from the peak point Initially, at the transition point between the peak sampling point and the first endpoint. Between these two values, search forward along the direction of decreasing index for values ​​less than or equal to the second value. The nearest sampling point, as the second endpoint transition point. Its index is denoted as j, and its magnitude is denoted as j. .

[0146] Therefore, this embodiment can be based on the amplitude of the second endpoint transition point. Performing linear interpolation with index j yields an amplitude equal to the second value. The endpoint index.

[0147] Formula (6);

[0148] in, Indicates the endpoint index. This represents the amplitude of a sampling point located after the second endpoint transition point in the sampling sequence.

[0149] In this embodiment, a layered approximation combined with linear interpolation endpoint localization method is used to effectively overcome the irregular jitter caused by trailing and multipath interference in the echo trailing edge. This is achieved through two scaling operations (first taking 1 / 3 of the height point for coarse localization). Then, precise positioning is obtained. The final interpolated endpoint index It has subsampling accuracy and is insensitive to changes in trailing edge shape, thereby improving the reliability of subsequent liquid level measurements.

[0150] In some other embodiments of this application, the process of step S204, "selecting target sampling subsequences that characterize real liquid surface echoes from multiple sampling subsequences based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the multiple sampling subsequences respectively," is described in detail.

[0151] Assume that K sampled subsequences are obtained after envelope filtering. For each sampling subsequence ( Its peak amplitude has been calculated. echo signal-to-noise ratio and echo area .

[0152] First, the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling subsequence are normalized to obtain the normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area for each sampling subsequence, as follows: ,in, This represents the normalized peak amplitude corresponding to the k-th sampled subsequence. This represents the maximum value among the peak amplitudes corresponding to each sampled subsequence. This represents the normalized echo signal-to-noise ratio corresponding to the k-th sampled subsequence. This represents the maximum value of the echo signal-to-noise ratio corresponding to each sampled subsequence. This represents the normalized echo area corresponding to the k-th sampled subsequence. This represents the maximum value of the echo area corresponding to each sampling subsequence.

[0153] Secondly, the normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area corresponding to each sampling subsequence are weighted and summed to obtain the initial scale value corresponding to each sampling subsequence.

[0154] Formula (7);

[0155] in, This represents the initial scale value corresponding to the k-th sampled subsequence; This represents the weight corresponding to the normalized peak amplitude. This represents the weights corresponding to the normalized echo signal-to-noise ratio. The weights corresponding to the normalized echo area satisfy the following conditions: .

[0156] In practical applications, the three weights mentioned above can be determined based on actual industrial field experience. For example, under normal operating conditions, they can be set to... Higher weights are given to signal-to-noise ratio and peak intensity; in cases where severe foaming leads to a generally low signal-to-noise ratio, the area weight can be appropriately increased.

[0157] Optionally, this embodiment can also adjust the initial scale value according to material properties, cable length, multiple echoes, etc.

[0158] In addition, the initial scale value corresponding to each sampling subsequence can be normalized based on the initial scale value corresponding to each of the multiple sampling subsequences to obtain the normalized scale value corresponding to each sampling subsequence.

[0159] Formula (8);

[0160] in, This represents the normalized scale value corresponding to the k-th sampled subsequence. This represents the maximum value among the initial scale values ​​corresponding to each sampled subsequence.

[0161] Therefore, in this embodiment, the sampled subsequence with the largest normalized scaling value among multiple sampled subsequences can be used as the target sampled subsequence.

[0162] Of course, there may be cases where multiple sampling subsequences have the same normalized scaling value (or the difference is less than the preset threshold). Optionally, in this case, their echo widths can be further compared, and the sampling subsequence with an echo width closer to the historical average liquid level echo width can be selected as the target sampling subsequence.

[0163] This embodiment integrates the three dimensions of echo intensity (corresponding to peak amplitude), purity (corresponding to echo signal-to-noise ratio), and energy distribution (corresponding to echo area) into a comprehensive evaluation index through weighted comparison and secondary normalization of multiple features: peak amplitude, echo signal-to-noise ratio, and echo area. Compared with traditional methods that rely solely on peak values ​​or thresholds, this mechanism can effectively suppress narrow pulses (small area) generated by the inner wall of the container, trailing echoes (low signal-to-noise ratio) caused by material buildup, and random spikes (low signal-to-noise ratio) caused by the agitator. Since the true liquid surface echo performs optimally across all three dimensions, it almost always obtains the highest scaling value, thus ensuring the reliability of the screening results. Furthermore, the configurable weights make this method field-adjustable, further enhancing its applicability.

[0164] In some other embodiments of this application, referring to the description of step S205 above, "the distance between the flange and the liquid surface in the guided wave radar level gauge can be determined based on the time difference and the electromagnetic wave velocity." "This allows us to determine the liquid level height based on this distance." The process of "determining the liquid level height based on this distance" is described below.

[0165] Considering that a single distance measurement may have errors, in order to reduce the impact of errors on the accuracy of liquid level measurement, this embodiment can adopt a continuous measurement method.

[0166] During continuous measurement, each distance is obtained and treated as a candidate distance, which is stored in a sliding window buffer queue of length N, for example, N=10.

[0167] Therefore, for the N sampling sequences obtained from multiple consecutive measurements, the distance corresponding to each sampling sequence can be determined according to the method described above, thus obtaining N candidate distances.

[0168] In this embodiment, a truncated average algorithm can be used to remove the extreme large and small values ​​among multiple candidate distances, and calculate the average distance of the remaining candidate distances. For example, sort the 10 candidate distances, remove the 4 largest and 4 smallest values, keep only the 2 middle candidate distances, and then calculate the arithmetic mean as the distance mean.

[0169] Therefore, we can use the average distance... (i.e., in formula (1)) ), combined with the formula (1) above, determine the liquid level height.

[0170] In this embodiment, the truncated averaging algorithm, compared to simple averaging or first-order low-pass filtering, exhibits stronger robustness to extreme outliers (such as measurement spikes caused by turbulence or momentary obstruction from agitator blades), effectively eliminating these random disturbances without affecting the response speed of normal liquid level changes. Simultaneously, by retaining intermediate data, it avoids excessive delays caused by filtering during sudden liquid level changes, making it particularly suitable for dynamic liquid level measurement scenarios.

[0171] In one possible implementation, to further optimize the accuracy of the distance mean, this embodiment also provides a distance optimization strategy based on window filtering.

[0172] First, the parameters of the window filter are determined based on the on-site material parameters (such as the viscosity, dielectric constant, and foaming degree of the medium) and the damping time parameter set by the user. The longer the damping time, the stronger the filtering effect and the smoother the output; the shorter the damping time, the faster the response, but the weaker the ability to suppress transients.

[0173] Then, for each mean distance (or each distance calculated earlier), a fixed-length sliding data window is created, such as a window length of 5. Whenever a mean distance is obtained... Add it to the window, and remove the oldest value from the window.

[0174] Next, a weighted average or exponential smoothing is performed on all the distance mean values ​​within the window. The smoothed distance mean values ​​are then substituted into formula (1) to output the final liquid level height.

[0175] By using window filtering to gradually adjust the distance mean, isolated abrupt changes caused by factors such as brief obstruction by agitator blades, random reflections from turbulence, and communication noise can be effectively suppressed, resulting in a more stable and continuous output liquid level value while preserving the true trend of liquid level changes. Users can flexibly set the damping time and window parameters according to on-site conditions (such as rapid feeding or violent shaking), achieving a balance between anti-interference and response speed, and further improving the instrument's adaptability in dynamic environments.

[0176] The above describes a guided wave radar level gauge echo signal processing method provided by the embodiments of this application. The following will describe the apparatus for performing the above guided wave radar level gauge echo signal processing method.

[0177] Please see Figure 5 , Figure 5 This is a schematic diagram of a guided wave radar level gauge echo signal processing device provided in an embodiment of this application. Figure 5 As shown, the guided wave radar level gauge echo signal processing device may include:

[0178] The echo sampling unit 501 is used to obtain a sampling sequence based on the high-frequency signal emitted by the guided wave radar level gauge after the guided wave radar level gauge is powered on and stabilized. The sampling sequence is a sequence of multiple sampling points obtained by performing data sampling based on the extended signal after the echo signal corresponding to the high-frequency signal is extended on the time axis.

[0179] The starting point determination unit 502 is used to determine the average amplitude of the peaks and troughs in the sampling sequence. It calculates the index of the point before the trough where the amplitude is equal to the average amplitude through linear interpolation, and uses it as the starting point index.

[0180] The multidimensional feature calculation unit 503 is used to generate an envelope sequence based on the sampling sequence, filter multiple sampling sub-sequences with amplitudes higher than the envelope sequence from the sampling sequence, and determine the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence.

[0181] The subsequence filtering unit 504 is used to filter the target sampling subsequence representing the real liquid surface echo from multiple sampling subsequences based on the peak amplitude, echo signal-to-noise ratio and echo area corresponding to the multiple sampling subsequences respectively.

[0182] The height calculation unit 505 is used to determine the time difference between the flange echo and the liquid surface echo in the echo signal based on the starting point index and the endpoint index corresponding to the target sampling subsequence, and to determine the liquid level height currently measured by the guided wave radar level gauge based on the time difference.

[0183] Each module in the aforementioned guided wave radar level gauge echo signal processing device can be implemented entirely or partially through software, hardware, or a combination thereof. For example, each module can be stored in software form within a microcontroller or microprocessor, allowing the microcontroller or microprocessor to call and execute the corresponding operations of each module.

[0184] This application also provides an electronic device, which may include at least one microcontroller (or microprocessor), wherein the microcontroller (or microprocessor) is used to execute embedded software programs to enable the electronic device to implement any of the guided wave radar level gauge echo signal processing methods provided in this application.

[0185] The electronic devices in the embodiments of this application may include, but are not limited to, microcontrollers (or microprocessors), peripheral interfaces, and peripheral circuits that meet functional and performance requirements.

[0186] A microcontroller can perform various appropriate actions and processes based on the embedded software program stored in Flash memory. Microcontrollers have various peripheral interfaces, such as a difference frequency signal interface for capturing the input of difference frequency signals; hardware interfaces such as multiplexers and transistors for controlling difference frequency adjustment; and an echo signal interface for ADC (Analog-to-Digital Converter) sampling.

[0187] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the guided wave radar level gauge echo signal processing methods provided in this application.

[0188] In one possible implementation, the computer program product is specifically adapted to an embedded software program product running on the hardware terminal of a guided wave radar level gauge. It undergoes lightweight compilation, algorithm tailoring, and real-time runtime adaptation specifically for the embedded microcontroller architecture built into the level gauge. This embedded software program product can adapt to the limited computing power, memory, and hardware resources of embedded devices. Relying on the device's underlying hardware mechanisms such as DMA (Direct Memory Access) data transmission, differential frequency adjustment, and clock synchronization, it efficiently completes the entire process of high-frequency echo signal equivalent time sampling, dynamic envelope sequence generation, multi-dimensional echo feature screening, sub-sampling precision feature point positioning, and multi-level filtering and noise reduction. It can operate stably and in real-time under complex interference conditions such as foam, steam, turbulence, and material buildup in industrial environments, accurately achieving high-precision and high-stability measurement of guided wave radar level. It should be understood that the computer program product of this application is not limited to the above-described embedded implementation. Any program carrier form that can execute the echo signal processing method of this application and achieve accurate level measurement falls within the protection scope of this application.

[0189] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, dedicated CPUs, dedicated memory, dedicated components, etc. Generally, any function completed by an embedded software program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This embedded software product is stored in a readable storage medium, usually the Flash memory of a microcontroller or microprocessor, so that the microcontroller or microprocessor executes the methods described in the various embodiments of this application.

Claims

1. A method for processing echo signals from a guided wave radar level gauge, characterized in that, include: After the guided wave radar level gauge is powered on and stabilized, a sampling sequence is obtained based on the high-frequency signal emitted by the guided wave radar level gauge. The sampling sequence is a sequence of multiple sampling points obtained by time-axis extension of the echo signal corresponding to the high-frequency signal and data sampling based on the extended signal. Determine the average amplitude of the peaks and troughs in the sampling sequence, and calculate the index of the point before the trough whose amplitude is equal to the average amplitude through linear interpolation, and use it as the starting point index; An envelope sequence is generated based on the sampling sequence. Multiple sampling sub-sequences with amplitudes higher than those of the envelope sequence are selected from the sampling sequence. The endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence are determined. Based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the multiple sampling sub-sequences, a target sampling sub-sequence representing the real liquid surface echo is selected from the multiple sampling sub-sequences. Based on the starting point index and the ending point index corresponding to the target sampling subsequence, the time difference between the flange echo and the liquid surface echo in the echo signal is determined, and the liquid level height currently measured by the guided wave radar level gauge is determined based on the time difference.

2. The guided wave radar level gauge echo signal processing method according to claim 1, characterized in that, The index of the point whose amplitude equals the average amplitude before the trough is calculated by linear interpolation, and used as the starting point index, includes: Starting from the position of the trough, search backwards in the sampling sequence for the nearest sampling point whose amplitude is greater than or equal to the average amplitude, and use it as the starting transition point; Linear interpolation is performed based on the magnitude and index of the starting transition point to obtain the starting point index.

3. The guided wave radar level gauge echo signal processing method according to claim 1, characterized in that, The step of generating an envelope sequence based on the sampled sequence includes: The average amplitude of each sampling point in the sampling sequence is determined as the target value; Starting from the starting point corresponding to the starting point index, the first sampling point with an amplitude greater than the target value is searched forward from the sampling sequence. The sampling points between the starting point and the first sampling point are used as the envelope start data. The sampling points after the first sampling point are filtered to obtain the envelope subsequent data. The envelope start data and the envelope subsequent data are concatenated to form the envelope sequence.

4. The guided wave radar level gauge echo signal processing method according to claim 1, characterized in that, The process of determining the endpoint index includes: From each of the sampling sub-sequences, a sampling point at the peak position is determined as the peak sampling point, and the envelope value corresponding to the peak sampling point is determined from the envelope sequence. The first value is determined based on the amplitude of the peak sampling point and the envelope value; Starting from the peak sampling point, search backwards from the sampling subsequence for the nearest sampling point whose amplitude is less than or equal to the first value, and use it as the first endpoint transition point; The second value is determined based on the amplitude of the peak sampling point and the amplitude of the first endpoint transition point; Starting from the peak sampling point, between the peak sampling point and the first endpoint transition point, the nearest sampling point with an amplitude less than or equal to the second value is searched forward and used as the second endpoint transition point; Linear interpolation is performed based on the amplitude and index of the second endpoint transition point to obtain the endpoint index whose amplitude is equal to the second value.

5. The guided wave radar level gauge echo signal processing method according to claim 4, characterized in that, Determining the first value based on the amplitude of the peak sampling point and the envelope value includes: Calculate the first difference between the amplitude of the peak sampling point and the envelope value; The first difference is linearly scaled to obtain the scaled value; The scaling value is added to the envelope value, and the sum is used as the first value.

6. The guided wave radar level gauge echo signal processing method according to claim 4, characterized in that, The step of determining the second value based on the amplitude of the peak sampling point and the amplitude of the first endpoint transition point includes: Calculate the second difference between the amplitude of the peak sampling point and the amplitude of the first endpoint transition point; Multiply the second difference by the preset amplitude of the true echo confirmation point, and then add the product to the amplitude of the first endpoint transition point to obtain the second value.

7. The method for processing echo signals from a guided wave radar level gauge according to claim 1, characterized in that, The step of selecting target sampling sub-sequences representing real liquid surface echoes from the plurality of sampling sub-sequences based on the peak amplitude, echo signal-to-noise ratio, and echo area corresponding to the plurality of sampling sub-sequences respectively includes: The peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling subsequence are normalized to obtain the normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area corresponding to each sampling subsequence. The normalized peak amplitude, normalized echo signal-to-noise ratio, and normalized echo area corresponding to each sampling subsequence are weighted and summed to obtain the initial scale value corresponding to each sampling subsequence. Based on the initial scale values ​​corresponding to the plurality of sampling subsequences respectively, the initial scale value corresponding to each sampling subsequence is normalized to obtain the normalized scale value corresponding to each sampling subsequence; The sampled subsequence with the largest normalized scaling value among the plurality of sampled subsequences is taken as the target sampled subsequence.

8. The method for processing echo signals from a guided wave radar level gauge according to claim 1, characterized in that, Determining the liquid level height currently measured by the guided wave radar level gauge based on the time difference includes: The frequency of the transmitted pulse signal, the preset speed correction amount, and the current period value of the difference frequency signal used for the time axis extension are obtained; The electromagnetic wave speed is determined based on the frequency of the transmitted pulse signal, the speed correction amount, and the current period value of the difference frequency signal. The distance between the flange and the liquid surface in the guided wave radar level gauge is determined based on the time difference and the electromagnetic wave velocity. The liquid level height is determined based on the distance.

9. The guided wave radar level gauge echo signal processing method according to claim 8, characterized in that, Determining the liquid level height based on the distance includes: Using the distance as a candidate distance, for the multiple sampling sequences obtained from consecutive measurements, the distance corresponding to each sampling sequence is determined according to the guided wave radar level gauge echo signal processing method of claim 8, so as to obtain multiple candidate distances; The truncated average algorithm is used to remove the extreme large and small values ​​among the multiple candidate distances, and the average distance is calculated for the remaining candidate distances; The liquid level height is determined based on the average distance.

10. A guided wave radar level gauge echo signal processing device, characterized in that, include: The echo sampling unit is used to obtain a sampling sequence based on the high-frequency signal emitted by the guided wave radar level gauge after the guided wave radar level gauge is powered on and stabilized. The sampling sequence is a sequence of multiple sampling points obtained by performing data sampling based on the extended signal after time-axis extension of the echo signal corresponding to the high-frequency signal. The starting point determination unit is used to determine the average amplitude of the peaks and troughs in the sampling sequence, and calculate the index of the point before the trough whose amplitude is equal to the average amplitude through linear interpolation, as the starting point index; A multi-dimensional feature calculation unit is used to generate an envelope sequence based on the sampling sequence, filter multiple sampling sub-sequences with amplitudes higher than the envelope sequence from the sampling sequence, and determine the endpoint index, peak amplitude, echo signal-to-noise ratio, and echo area corresponding to each sampling sub-sequence. The subsequence filtering unit is used to filter target sampling subsequences that characterize the real liquid surface echo from the multiple sampling subsequences based on the peak amplitude, echo signal-to-noise ratio and echo area corresponding to the multiple sampling subsequences respectively. The height calculation unit is used to determine the time difference between the flange echo and the liquid surface echo in the echo signal based on the starting point index and the ending point index corresponding to the target sampling sub-sequence, and to determine the liquid level height currently measured by the guided wave radar level gauge based on the time difference.