Ultrasonic Flowmeter Data Processing Method Based on Multi-channel Signal Feature Extraction
By employing multi-channel signal feature extraction and local verification methods, the problem of peak counting deviation in ultrasonic flow meters under complex operating conditions was solved, achieving efficient and reliable flow calculation.
Patent Information
- Application Number
- CN202611440111.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing ultrasonic flow meters have difficulty accurately identifying and correcting peak counting deviations under complex operating conditions, resulting in inaccurate flow calculations. Current technologies rely on external references and cannot effectively solve the overall fluctuation problem caused by signal distortion.
A multi-channel signal feature extraction method is adopted. By extracting positive peaks and negative troughs as candidate feature points, and combining calibration data and time interval relationships, abnormal segments are identified and verified, and candidate insertion or deletion sequences are generated. Local repair and fusion are performed using the number of abnormal intervals, the number of polarity errors, and the interval residuals to achieve self-consistency verification.
It improves the flow meter's computational efficiency and robustness under harsh operating conditions, reduces microprocessor computational overhead, and enhances the reliability and anti-interference capability of flow calculation.
Smart Images

Figure CN123111394A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ultrasonic flow meter data processing technology, and relates to an ultrasonic flow meter data processing method based on multi-channel signal feature extraction. Background Technology
[0002] Time-of-flight ultrasonic flow meters calculate flow velocity by measuring the time difference between the propagation of ultrasonic waves in a fluid along and against the flow direction. They are widely used in industrial pipe networks and fluid process metering. The core of this measurement principle lies in accurately locating a time anchor point for calculating the propagation time from the received waveform, which is often severely attenuated and accompanied by noise. Typically, the system designates a specific characteristic peak in the received signal envelope as this target anchor point, and the absolute accuracy of its identification directly determines the validity of the reference coordinates for flow velocity calculation.
[0003] However, when ultrasonic waves propagate through fluids in closed pipes, they are highly susceptible to drastic temperature changes in the fluid medium, bubble scattering, and high-frequency electromagnetic interference in industrial environments. These physical and electrical interferences can cause microsecond-level dynamic distortions in the received waveform, manifesting as sudden drops in the amplitude of local peaks or random superposition of spikes and glitches. Under such complex operating conditions, ensuring that the Nth peak identified by the system in each measurement cycle is indeed the physically true target peak becomes crucial for maintaining the long-term measurement reliability of the flowmeter.
[0004] Current data processing methods for feature peak extraction and localization suffer from a fundamental logical blind spot. Existing technologies generally rely on set amplitude thresholds, envelope detection algorithms, or time difference comparisons between multiple channels to find and locate target waves. These processing logics all follow a unidirectional counting principle: detect extreme points, count them sequentially according to time, and then directly call the time corresponding to the Nth number. This mechanism harbors a self-referential defect: the system assumes that the peak counting action itself is absolutely correct, lacking an internal verification mechanism for the peak sequence counting behavior. When a real peak fails to trigger the threshold due to local signal attenuation, or when a false extreme value is induced by high-frequency spikes, the numbering of the entire peak sequence will be misaligned. Existing systems mechanically extract only the misaligned Nth extreme value, directly causing a huge jump in propagation time across an entire period. Although some technologies attempt to passively eliminate these abrupt changes by comparing multi-channel data or historical trends, this highly dependent and lagging intervention completely ignores the self-consistency inherent in the timing structure of a single-channel waveform. As a result, when faced with continuous distortion conditions, the flow meter can often only passively discard data and cannot fundamentally identify and correct the underlying counting deviation. Summary of the Invention
[0005] In view of the problems existing in the prior art, the present invention provides an ultrasonic flow meter data processing method based on multi-channel signal feature extraction to solve the above-mentioned technical problems.
[0006] To achieve the above and other objectives, the technical solution adopted by the present invention is as follows: This invention provides a data processing method for ultrasonic flow meters based on multi-channel signal feature extraction, the method comprising: Acquire the following data for each channel: the downstream received waveform, the upstream received waveform, the transmission trigger time, the sampling time interval, the transducer frequency parameters, the target positive wave peak number, and the channel calibration data. The channel calibration data includes the calibration start time, start time window, and fixed delay corresponding to the channel and the propagation direction, as well as the sound path and channel angle corresponding to the channel. Positive peaks and negative troughs are extracted as candidate feature points within the receiving interval of each received waveform. The actual half-cycle is determined based on adjacent candidate feature points. The starting positive peak is determined by combining the calibration start window, amplitude change, polarity alternation relationship and time interval. Based on the interval multiple of the time interval between adjacent candidate feature points relative to the actual half-cycle, the correspondence between the parity and polarity of the interval multiple, and the interval residual, the missed detection segment and the false point segment are identified. Each abnormal segment is cyclically verified: the verification half-cycle is determined by the normal candidate feature points outside the abnormal segment that have not been added or deleted; candidate addition sequences are generated for missed detection segments, candidate deletion sequences are generated for pseudo-point segments, and two types of sequences are generated simultaneously for abnormal segments that meet both identification conditions; the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals are calculated for the pre-processing sequence and each candidate sequence using the same verification half-cycle, and the three indicators are compared in turn, and only the first candidate sequence with different indicators less than the pre-processing sequence and the best comparison result among all candidate sequences is adopted; After adopting the candidate sequence, the update half-cycle is determined by the normal candidate feature points outside the abnormal segment. When the update half-cycle is within the allowable range and the deviation from the actual half-cycle does not exceed the update threshold, the actual half-cycle is updated, and the abnormal segment is re-identified until there is no abnormal segment before the target positive wave peak. If the abnormal segment cannot be repaired or there is still an abnormal segment after reaching the upper limit of the number of cycles, the corresponding propagation direction is marked as invalid. The propagation time in the forward direction and the propagation time against the current for each channel are calculated based on the target positive wave peak, along with their reliability. The flow velocity for each channel is calculated based on the channel calibration data, and the flow velocities for each channel are filtered and fused according to their reliability to obtain the flow velocity measurement value.
[0007] As described above, the ultrasonic flowmeter data processing method based on multi-channel signal feature extraction provided by the present invention has at least the following beneficial effects: This invention extracts the positive peak and negative trough sequences from a single-channel received waveform and constructs an intrinsic actual half-cycle reference based on the time interval between adjacent extreme points. It directly utilizes the strict mapping relationship between the interval multiples, the parity of the interval multiples, and their polarity, as well as the interval residuals, to establish a self-consistent verification mechanism for peak counting behavior in the underlying data link. This processing logic effectively breaks the rigid framework of traditional flowmeters, which can only passively rely on external references such as multi-channel comparison or historical trends to correct jump errors. It fundamentally fills the logical blind spot where existing technologies cannot perform internal verification of the authenticity of peak location counting itself. At the computer's internal performance level, this mechanism reduces the complexity of waveform fitting or full-band cross-correlation operations to logical comparison and floating-point residual calculation for discrete time interval arrays, significantly reducing the floating-point operation overhead and memory usage of the microprocessor. This allows embedded systems to accurately and in real-time identify missed and false point segments caused by bubble or electromagnetic spike interference with extremely low computing power, significantly improving the computational efficiency and anti-interference response speed of the underlying signal analysis.
[0008] This invention further constructs a set of local parallel hypothesis and iterative verification logic for the identified abnormal segments. Specifically, it generates independent candidate insertion and deletion sequences for missed detections and false points, respectively. Using the verification half-cycle calculated from pure feature points outside the abnormal segment, it performs local micro-quantitative evaluation of each branch sequence from three dimensions: the number of abnormal intervals, the number of polarity errors, and the total residual. This selects the unique optimal topology repair path. Finally, during multi-channel fusion, the statistical data of this repair process is converted into quantified data credibility for weighting. This dynamic repair and weight adaptive strategy avoids the drawback of traditional hard threshold filtering, which easily leads to the loss of true flow characteristics. At the underlying algorithm architecture, it strictly converges data verification within an extremely narrow local anomaly time window, avoiding the CPU instruction cycle waste caused by repeated traversal of the entire sequence. Simultaneously, with this bottom-up data self-repair and credibility defense fusion mechanism, it effectively prevents the drag on the overall system calculation process caused by the integer cycle measurement jumps caused by single-channel distortion, greatly enhancing the robustness of the industrial flow calculation model under harsh fluid conditions and the overall reliability of the system operation. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram showing the connection of each step in the method provided by the present invention.
[0011] Figure 2 Simulation diagram showing the comparison of the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals for different candidate sequences within the same evaluation range, provided by this invention.
[0012] Figure 3 This is a schematic diagram of the operation logic for step five of the present invention.
[0013] Figure 4 This is a schematic diagram illustrating the identification of missed detection sections and false point sections provided by the present invention.
[0014] Figure 5 The original received waveform and candidate feature point annotation diagram provided by the present invention. Detailed Implementation
[0015] The present invention will be further described in detail below with reference to specific embodiments. The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the inventive concept or exceed the scope defined by the claims, all of which should fall within the protection scope of the present invention.
[0016] Example 1: Please see Figure 1-5 As shown, the ultrasonic flowmeter data processing method based on multi-channel signal feature extraction includes the following steps: Step 1: Obtain the downstream and upstream received waveforms, transmission trigger time, sampling time interval, transducer frequency parameters, target positive wave peak number, and channel calibration data for each channel. The channel calibration data is a pre-established and stored set of parameters for each channel, obtainable through factory calibration, on-site calibration after installation, or zero-current calibration. The channel calibration data includes at least the calibration start time, start time window, and fixed delay corresponding to the current channel and propagation direction, as well as the sound path and channel angle corresponding to the current channel. The calibration start time and start time window are used to assist in determining the starting positive wave peak, the fixed delay is used for subtraction during propagation time calculation, and the sound path and channel angle are used to calculate the channel velocity based on the downstream and upstream propagation times.
[0017] Positive peaks and negative troughs are extracted as candidate feature points within the receiving interval of each received waveform. The actual half-cycle is determined based on adjacent candidate feature points, and the starting positive peak is determined by combining the calibration start window, amplitude change, polarity alternation relationship and time interval.
[0018] Preferably, the determination of the receiving interval, candidate feature points, and actual half-cycle includes: Multiple equal-length windows are set in the reference sampling segment before the arrival of the received signal. The cumulative value of the absolute value of the sampled values in each window is calculated. The arrival threshold is determined based on the average value and standard deviation of the cumulative value. The first window whose cumulative value is continuously greater than the arrival threshold is determined as the starting window of the receiving interval. Starting from the initial window, extract the local maximum and local minimum values, which are denoted as positive peaks and negative troughs, respectively, and determine the time of each local extremum based on the sampling time interval; Calculate the amplitude difference between each local extremum and its adjacent reverse local extremums on both sides, and take the smaller of the two amplitude differences as the prominence. Record each candidate feature point according to time, amplitude, polarity, prominence, and whether it is the original extracted extremum. The nominal half-cycle is determined based on the transducer's nominal frequency, and the allowable half-cycle range is determined based on the allowable frequency range. The median value is calculated from adjacent time intervals within the allowable half-cycle range with opposite polarities at both ends. The first deviation ratio of each adjacent time interval relative to the median value is calculated. Time intervals with a first deviation ratio greater than a preset ratio are eliminated, and the median value of the remaining time intervals is determined as the actual half-cycle. Wherein, the first deviation ratio is the absolute value of the difference between adjacent time intervals and the median value divided by the median value. When the number of remaining time intervals is less than a preset number, the nominal half-cycle is determined as the actual half-cycle.
[0019] Preferably, the determination of the starting positive peak includes: Obtain the calibration start time and start time window corresponding to the current channel and propagation direction from the channel calibration data, and find the amplitude stability segment within the start time window where the amplitude change is continuously within the preset range after the positive wave peak amplitude increases continuously. Using the positive wave peaks within the amplitude stability segment as candidate starting positive wave peaks, check whether the polarity of the preset number of candidate feature points starting from each candidate starting positive wave peak alternates, and calculate the interval residual of their adjacent time intervals relative to the actual half-cycle. Retain the candidate starting positive wave peaks with alternating polarity and each interval residual not exceeding the preset starting residual, and select the one with the smaller time deviation from the calibration starting time as the starting positive wave peak; when the time deviations are the same, select the one with the smaller total interval residual as the starting positive wave peak. If there is no candidate positive peak that meets the conditions within the calculation window, the corresponding received waveform will be marked as invalid.
[0020] In practice, the process of acquiring waveform data, extracting feature points, determining the half-period, and calculating the starting positive peak is specifically calculated and operated as follows: First, regarding the determination of the receiving interval, the system extracts a segment of pure background noise data located before the expected arrival of the received signal, after the ultrasonic transducer's transmission trigger moment, as a reference sampling segment. Let the sampling time interval be... The reference sampling segment consists of a discrete sequence of voltage sample values x(n). This reference sampling segment is divided into multiple consecutive data windows of equal length, each containing... Each sampling point. The preset logic for the window length is based on the transducer's nominal frequency. The requirement is that the window length covers a complete half-cycle, therefore the preset... .
[0021] The system calculates the sum of the absolute values of the sampled values within each window. The calculation formula is: ; In the formula, The absolute amplitude integral result for the j-th window is given in volts. Let be the voltage value of the i-th sampling point within this window.
[0022] Subsequently, the integral results of all reference sampling segments are calculated. average and standard deviation And thus determine the arrival threshold Th of the received signal, calculated using the following formula: ; In the formula, The voltage integration threshold for determining the effective arrival of ultrasonic signals is measured in volts. The arrival determination coefficient is a preset value, determined by the channel calibration data for the current channel and the current propagation direction. Specifically, during factory calibration or installation calibration, the calibration received waveform corresponding to the current channel and propagation direction is recorded, and the amplitude of the positive wave peak calculated from the calibration start point is obtained from this calibration received waveform. Pre-launch noise baseline amplitude And the median amplitude of the peak of the positive wave during the amplitude stability period within the calibration start window. And calculate using the following formula: ; To determine the voltage amplitude of the positive peak at the calibration start point in the calibration waveform, in volts, the voltage value of the first positive peak in the amplitude stability section within the calibration start window is taken. The baseline voltage amplitude at the receiver before transmission triggering is obtained from the average voltage within a preset silent sampling period before transmission. The median value of the positive wave peak amplitude within the stable amplitude range of the calibration starting time window, in volts, is obtained by statistically analyzing the amplitudes of several consecutive positive wave peaks in the calibration waveform. The calibration waveform refers to the typical received signal waveform acquired by the same transmitting and receiving circuits under zero flow rate, standard temperature, and pressure conditions during factory static water tank calibration of this channel. In actual measurement, the median value of the i-th positive wave peak amplitude within the current starting time window... satisfy Only then is it included in the subsequent amplitude continuity judgment. In the formula, and All values are voltage amplitudes in the currently received waveform, in volts. The value is obtained from the average of the silent sampling period before the current launch trigger. It is obtained from the median value of the peak amplitude of the positive wave during the stable amplitude segment within the current calculation window.
[0023] The system follows the above window length. Slide the window point by point along the time axis and calculate the integral result of the current window. When the result is greater than or equal to the threshold Th for three consecutive windows, the starting point of the first window that is greater than the threshold is determined as the starting time point of the receiving interval.
[0024] After entering the receiving range, the system begins to extract local extrema. It compares the voltage values of three adjacent sampling points, and when the condition is met... When x(n) is positive, it is marked as a positive peak; otherwise, when x(n) satisfies the condition... The time marker is designated as a negative trough. Record the occurrence time of each extreme value. With corresponding voltage value To eliminate spurious extrema caused by high-frequency noise spikes, the prominence of each local extremum was calculated. : ; In the formula, This is the current extreme voltage. and These are the reverse local extreme voltages immediately on either side of the time axis, both in volts. This represents the minimum absolute drop of the extreme value relative to the adjacent reverse trough or peak. The system records all extracted local extreme values in chronological order, including their time, polarity, and prominence, forming a set of candidate feature points.
[0025] When determining the actual half-cycle, the nominal parameters are not used directly; instead, calculations are performed based on the actual waveform. First, the nominal frequency of the transducer is used... Obtain the nominal half-cycle The allowable interval of half a cycle is set according to the allowable frequency range of the transducer bandwidth. Calculate the time interval between all adjacent extreme values. Filter out those with opposite polarities at both ends and values located at within As a valid set.
[0026] The median of the time intervals within the valid set is used to obtain the center value of the interval. Then calculate each time interval relative to First deviation ratio : ; In the formula, This represents the proportion of the first deviation of the m-th adjacent time interval relative to the median value; The time interval between the m-th adjacent reverse local extrema, in seconds, is obtained by subtracting the times of the two candidate feature points; This is the median value of the adjacent time intervals currently included in the statistics, in seconds (s).
[0027] Eliminate The time interval data, the first preset deviation ratio It is determined by the transducer's allowable half-cycle range: ; in, and These are the lower and upper limits of the permissible half-cycle range, respectively, both in seconds, and are derived from the permissible frequency range. , ; and These are the lower and upper limits of the transducer's permissible frequency range, respectively, in Hertz. When When the corresponding time interval is not included in the median value statistics of the actual half-cycle, this calculation method is based on the fact that... to The acceptable cycle range of the transducer in this channel has been defined. Essentially, it represents the relative half-width of the allowed half-cycle range with respect to its midpoint.
[0028] The median value of the remaining time interval after elimination is calculated again and used as the actual half-cycle of the received waveform. If the number of remaining intervals that meet the criteria is less than 5, then the current waveform signal-to-noise ratio is considered insufficient for statistical analysis, and the result is directly adopted. As .
[0029] If the remaining number of time intervals is less than the preset statistical number, the nominal half-cycle will be determined as the actual half-cycle. The preset statistical number is preferably 5 time intervals; if the target positive wave peak sequence number is set in the channel calibration data... If the value is greater than 5, the preset statistical quantity is taken as follows. In other words, the preset statistical quantity is 5 and... The larger of the two values. The setting logic is as follows: the time interval of 5 adjacent half-cycles should cover at least 2 complete oscillation cycles, and the median value statistics should still retain representativeness when there are 1 to 2 discrete error points; when the target positive wave peak number is large, the number of statistics should not be less than the target positive wave peak number, so that the actual half-cycle estimation can cover the target peak area to be located in the subsequent stage, and avoid determining the global half-cycle based only on the short first segment waveform.
[0030] Finally, the system needs to determine the starting positive peak. The starting time for static calibration of the water flow is read from the channel calibration data. and tolerance window width Extracting time range As the starting time window.
[0031] Within the initial calculation window, identify the stable amplitude segment of the waveform. First, the amplitude of the positive wave peak must show an increasing trend for three consecutive cycles, i.e. Then, the amplitude variation ratio between adjacent positive wave peaks was calculated. : ; in, Let be the relative change in amplitude of the i-th positive wave peak relative to the previous copolar positive wave peak, which is dimensionless; and These are the voltage amplitudes of two adjacent positive wave peaks of the same polarity, in volts, obtained directly from the original received waveform.
[0032] When multiple consecutive positive peaks At that time, it is confirmed that the amplitude has entered a stable phase.
[0033] Specifically, in the calibration received waveform, the amplitude stability segment already confirmed within the calibration starting time window is selected, and the amplitude of each adjacent positive wave peak of the same polarity within this stability segment is calculated according to the above formula. The maximum value among them is taken as the current audio channel and the current propagation direction. :in, This is used to calibrate the relative change in amplitude of the corresponding positive peak in the waveform. In actual measurement, if at least two consecutive positive peaks of the same polarity satisfy... If the amplitude of a positive wave peak is within a certain range, it is considered to have entered the amplitude stability range. This is because the stability range in the calibration waveform already reflects the transducer ringing attenuation, circuit gain, and receiver noise level of the channel under normal installation conditions. Therefore, the maximum relative change in the calibration stability range is used as the upper limit. Specifically, during calibration, at least 10 cycles of calibration waveform are collected for the channel in a static water tank. The amplitude stability range within the calibration start window is then selected. The criterion for determining the amplitude stability range is the rate of change of amplitude of at least three consecutive positive wave peaks of the same polarity. Less than 0.15, calculate these The maximum value is the value of that channel. .
[0034] In this embodiment, the candidate feature points are numbered in chronological order as follows: ,in This represents the voltage amplitude of the i-th candidate feature point, in volts, obtained from the sampled voltage of the original received waveform at that candidate feature point. Since positive peaks and negative troughs normally alternate, if the i-th candidate feature point is a positive peak, then the preceding positive peak of the same polarity adjacent to it is usually the (i-2)-th candidate feature point. Determine whether the amplitudes of adjacent positive wave peaks of the same polarity are still in the rising phase. This determination does not involve comparing two adjacent arbitrary extreme values, but rather comparing the amplitude changes of two adjacent positive wave peaks.
[0035] Taking the positive wave peak within the stable segment as the candidate point, four consecutive characteristic points are selected from the next segment. If they satisfy the alternating positive and negative polarity, the total time interval residual is calculated. : ; reserve For candidate points whose residuals are less than the preset starting residual, calculate their time and time. The absolute value of the time deviation. The candidate point with the smallest time deviation is selected as the starting point for calculating the positive wave peak; if multiple candidate points with the same time deviation exist, then the one with the smallest time deviation is selected. The smaller one. If no candidate point that meets the above alternation rule and residual constraint is found within the time window, it is determined that the current ultrasonic signal has severe distortion or severe attenuation, and the corresponding received waveform is directly marked as invalid and not included in subsequent calculations.
[0036] The above technical steps first address the problem of initial misjudgment or missed judgment when the circuit noise floor changes due to a fixed threshold by setting a threshold through a floating standard deviation of the background noise. Second, by comparing the prominence of different values, the aim is to eliminate pseudo-stagnation points caused by high-frequency electromagnetic interference superimposed on the normal low-frequency acoustic waveform. When determining the actual half-cycle, instead of relying on the nameplate nominal value, two rounds of median value statistics and the first deviation ratio are used for elimination. This technique aims to eliminate the Doppler effect and the change in signal wavelength caused by fluid sound velocity drift with temperature, obtaining a cycle reference under the current real flow state. Finally, the starting positive peak is found through dual constraints of time calibration and the rate of change of the peak envelope, fundamentally avoiding the whole-cycle jump phenomenon caused by the overall signal attenuation when relying solely on the absolute amplitude threshold to find the starting point.
[0037] Step 2: Identify missed detection segments and false point segments based on the time interval between adjacent candidate feature points relative to the actual half-cycle, the correspondence between the parity and polarity of the interval multiple, and the interval residual.
[0038] Preferably, the identification of missed detection segments and false point segments includes: Starting from the initial positive wave peak, calculate the ratio of the time interval between adjacent candidate feature points to the actual half-cycle. The positive integer closest to the ratio is taken as the interval multiple, and the absolute value of the difference between the product of the time interval, the interval multiple, and the actual half-cycle is taken as the interval residual. When the interval multiple is one, the interval residual does not exceed the preset residual, and the polarities of the two ends are opposite, the corresponding interval is determined as a normal interval; If the interval multiple is not less than two, the interval residual does not exceed the preset residual, and the polarity of the two ends is the same when the interval multiple is even and the polarity of the two ends is opposite when the interval multiple is odd, the interval between the candidate feature points at the corresponding two ends will be determined as the missed detection segment. If the time interval between adjacent points is not greater than the preset proportion of the actual half-cycle, or if three consecutive candidate feature points do not maintain polarity alternation, the corresponding range will be determined as a pseudo-point segment. When the same range simultaneously meets the identification conditions for both missed detection segments and false point segments, both types of anomaly markers are retained.
[0039] In the specific implementation process, after the system determines the initial positive wave peak and the actual half-cycle, the waveform data processing enters the initial screening stage for abnormal sections. The data input for this stage is the initial positive wave peak and the subsequent set of candidate feature points arranged in chronological order. For ease of calculation, the initial positive wave peak is denoted as the first node, and adjacent candidate feature points are extracted sequentially. Let the time of the previous feature point be denoted as . The polarity is The current feature point's time is The polarity is The unit of time is seconds, and the polarity P is a dimensionless identifier, with a value of 1 for positive peaks and -1 for negative troughs.
[0040] The system first calculates the time interval between adjacent candidate feature points. Based on this time interval, its relationship to the actual half-cycle is calculated. The ratio, the formula is: In this formula, The time difference between adjacent candidate feature points is in seconds. Its physical meaning is the actual acoustic time between the two points, which is derived from the underlying timer. The actual half-cycle is measured in seconds. Its physical meaning is the reference half-wave time under the current fluid environment, derived from the statistical results of the preceding steps. This is the original interval ratio, calculated to measure how many theoretical half-cycles the current time interval contains. Subsequently, the system... Perform rounding to the nearest integer, and record the positive integer closest to the ratio as the interval multiple. Furthermore, the system calculates the interval residual for this time interval. The calculation formula is: . in the formula The interval residual, measured in seconds, physically represents the absolute deviation between the actual time interval and the ideal integer multiple time interval, aiming to quantify the phase shift of the current feature point on the time axis.
[0041] To classify the calculation results, the system introduces a preset residual threshold. . The time interval used to determine whether adjacent candidate feature points can still be considered as the corresponding integer number of half-cycles is determined by the allowed half-cycle range and the current actual half-cycle: ; The first preset deviation ratio, The current actual half-cycle, in seconds, is determined by the median of the preceding valid adjacent time intervals. Using this setting method, the residual threshold changes with the current actual half-cycle while still being constrained by the transducer's allowable frequency range, avoiding setting the residual threshold to a fixed time value unrelated to the channel frequency.
[0042] When both conditions are met and When the polarities of the two ends are opposite, the system determines the area between the two points as a normal interval and does not mark it as abnormal.
[0043] When it appears and In cases where parity is an issue, the system needs to determine whether it belongs to a missed detection segment. The system uses modulo operations to make this determination. Parity: If That is, when the interval multiple is even, it is required that at this time... The two ends have the same polarity; if That is, when the interval multiple is odd, it is required that at this time... The polarities at both ends are opposite. When the above correspondence is satisfied, the system determines the region between these two candidate feature points as the missed detection segment. The physical basis is that the polarity of the ultrasonic signal must reverse once every half cycle. If several feature points are missing, after an even number of half cycles, the polarity should reverse an even number of times, and the polarity of the beginning and end should remain consistent; after an odd number of half cycles, the polarity of the beginning and end should be opposite. If the time span meets the condition but the polarity relationship does not match, it indicates that the problem is not simply a missed detection issue.
[0044] For identifying false point segments, the system uses two conditions: judgment based on excessively short time intervals and judgment based on alternating polarities. The first condition is the judgment based on adjacent time intervals: when the time interval between adjacent candidate feature points is too short... satisfy When this happens, the range of adjacent candidate feature points is marked as a pseudo-point segment. Among these, The time interval between the (i-1)th candidate feature point and the ith candidate feature point is expressed in seconds. The lower limit of the allowable half-cycle range is expressed in seconds.
[0045] The second item is polarity alternation judgment: the polarity of the candidate feature point is denoted as... positive wave peak negative wave trough In a normal oscillating waveform, adjacent local extrema should satisfy: ; If three consecutive candidate feature points Appeared in ; or ; This indicates that there is at least one pair of adjacent candidate feature points with the same polarity, which is inconsistent with the basic temporal relationship of alternating positive peaks and negative troughs. Therefore, the time range covered by these three candidate feature points is marked as a pseudo-point segment.
[0046] The reason for setting the above two conditions is that the time interval between the actual adjacent positive and negative extreme values cannot be less than half a cycle corresponding to the highest frequency allowed by the transducer, and the adjacent local extreme values of the actual oscillation signal should maintain alternation between positive and negative. If the time is too short or the polarity is adjacent and the same, it indicates that the candidate point is more likely to come from noise spikes, secondary glitches or local mis-extraction.
[0047] In practical signal processing, due to the random superposition of noise, a region may experience compound anomalies. For example, a real peak may not be extracted due to signal attenuation, resulting in a time interval of three and a half cycles between adjacent extraction points, satisfying the condition... The system detects a missed detection condition; however, within this interval, due to a sudden change in high-frequency interference, a spike with an incorrect polarity is extracted, causing the polarity of this point to not alternate normally with the previous point. In response to this situation where both missed detection and pseudo-point segment identification conditions are triggered simultaneously within the same time span, the system does not force exclusion but instead marks this range as an overlapping abnormal segment and retains both the missed detection mark and the pseudo-point mark in memory, so that both abnormal possibilities can be simultaneously input into the subsequent repair and verification stages.
[0048] In the actual operation of ultrasonic flow meters, scattering from bubbles in the fluid can cause a sharp local attenuation of the signal, resulting in a true peak value below the threshold and leading to physical missed detections. Meanwhile, electromagnetic interference from industrial equipment such as frequency converters can superimpose steep spikes on the waveform, causing physical false points. By multiplying the time interval relative to the actual half-cycle and strongly coupling it with the odd-even reversal pattern of the waveform, this step can accurately determine the type and boundary range of signal distortion without altering the original waveform data. This transforms blind global smoothing filtering into targeted processing for specific intervals and specific fault types.
[0049] Step 3: Perform cyclical verification on each abnormal segment: Determine the verification half-cycle based on the normal candidate feature points outside the abnormal segment that have not been added or deleted; generate candidate addition sequences for missed detection segments, generate candidate deletion sequences for pseudo-point segments, and generate two types of sequences simultaneously for abnormal segments that meet both identification conditions; use the same verification half-cycle to calculate the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals for the pre-processing sequence and each candidate sequence, compare the three indicators in turn, and only use the first candidate sequence whose different indicators are less than those of the pre-processing sequence and whose comparison result is the best among all candidate sequences.
[0050] Preferably, the generation of candidate insertion sequences and candidate deletion sequences includes: For the missed detection segment, the number of missing feature points is obtained by subtracting one from the interval multiple. The time interval between the candidate feature points at both ends of the missed detection segment is divided into the same number of intervals as the interval multiple. The boundary time of each adjacent interval is used as the prediction time. The prediction polarity of each prediction time is determined in sequence according to the polarity of the candidate feature points at the beginning of the missed detection segment. Local extrema of the predicted polarity are searched in the original received waveform with each predicted time as the center. The found local extrema are then added to the candidate feature point sequence to form a candidate addition sequence. When multiple local extrema exist within the same search range, corresponding candidate addition sequences are formed for each. If no corresponding local extrema are found, a placeholder is set at the predicted time. The placeholder has the predicted polarity and records the predicted time, predicted polarity, placeholder identifier, and non-detected extremum identifier. The placeholder uses the same data fields as the candidate feature points. Specifically, the time field is the predicted time, the polarity field is the predicted polarity, the amplitude field and prominence field are set to null or preset invalid values, the "whether it is an original extracted extremum" field is set to "no," the placeholder identifier field is set to "yes," and the non-detected extremum identifier field is set to "yes." The placeholder is used to maintain the continuity of the feature point sequence in time and polarity, but it is not considered a local extremum directly detected from the original received waveform. For pseudo-point segments, delete a single candidate feature point or multiple adjacent candidate feature points within the pseudo-point segment to form a candidate deletion sequence; For segments that have both types of anomaly markers, the order of insertion and deletion is not predetermined, and candidate insertion sequences and candidate deletion sequences are generated simultaneously.
[0051] In the specific implementation process, after the system completes the initial screening of the raw data and marks the missed and false point segments, it is necessary to perform substantive repair and comparison on these abnormal segments. To avoid phase misjudgment caused by directly using the global actual half-cycle under conditions of drastic flow velocity jumps or local temperature changes, the system needs to establish a local reference benchmark for the currently processed abnormal segment. The system searches for pairs of normal candidate feature points without any modification on the time axis from both ends of the current abnormal segment outwards, extracts the time interval between adjacent normal points, and calculates the median value of these time intervals, which is defined as the verification half-cycle for this round of comparison. .
[0052] For data segments marked as missed detections, the system uses the interval multiple calculated in the preceding sequence. The number of missing feature points in this segment is determined to be Subsequently, the starting time of the missed detection segment was used as the starting time. and the finish line Using a time boundary, the time span is divided equally using linear interpolation to obtain the predicted locations of each missing point. The specific calculation formula is as follows: ; in, Let j be the j-th prediction time, in seconds. Its physical meaning is the theoretical arrival time of the feature point on the ideal acoustic waveform if it were not lost; j is the interpolation index number, ranging from 1 to... Positive integers, dimensionless; and These are the time coordinates of the known feature points at both ends of the missed detection section, in seconds; The formula is used to divide a longer time span into segments that conform to the physical propagation period, providing time anchors for subsequent local searches in the original waveform.
[0053] After obtaining the predicted time, the system determines the starting point polarity. The formula for determining the corresponding polarity of each prediction point is as follows: Next, the system circles each of the original received waveforms. Open a time search window; the lower limit of the search window is... The upper limit is .in, The search window width factor is usually set to 0.20. This is based on the quality factor limitation of the piezoelectric ceramic transducer. The high-frequency phase jitter caused by the turbulence of the pipeline fluid usually does not exceed 20% of the peak time offset in half a cycle. If the search window is set to greater than 0.20, it is easy to mistakenly include the actual troughs or peaks of adjacent cycles into the current window.
[0054] The system searches within the search window for voltage extreme values with the same predicted polarity. If a matching extreme value is found, it is inserted as a supplementary point into the original feature point sequence, constructing a candidate data branch. If multiple matching extreme values exist within the same search window, each extreme value is inserted individually, thus constructing multiple parallel candidate branches. If no matching voltage extreme value exists within the search window, then... The position is directly filled with a time point with a predicted polarity identifier, which is marked as a placeholder without assigning a specific voltage amplitude, thereby ensuring the integrity of the timing and polarity alternation.
[0055] For areas marked as false points, the processing logic focuses on elimination. The system eliminates each candidate feature point within the area one by one, or eliminates multiple temporally adjacent feature points in combination, and reconnects the remaining nodes after elimination to form multiple different candidate elimination branches. For areas that are marked with both missed detections and false points, the system does not make a priori qualitative assessment of the fault type, but instead summarizes the aforementioned derived supplementary data branches and elimination data branches together as the entire candidate data group participating in this round of comparison.
[0056] To objectively evaluate which candidate branch best conforms to the physical propagation laws of ultrasound in fluids, the system defines an evaluation window that includes the current abnormal segment and K candidate feature points before and after it. K represents the number of boundary extension points, set to 4. The reason for this setting is that taking 4 points before and after is equivalent to extending outward by approximately 2 complete ultrasound lengths, which ensures both the local specificity of the evaluation range and that the processed data segment does not produce abrupt phase steps when connected to the original data boundary.
[0057] Within the evaluation window, the system adopts a unified approach. Three quantitative indicators were calculated for the original sequence before processing and for each candidate branch. The first indicator was the number of outlier intervals. The statistical window of adjacent time intervals and The number of intervals where the absolute value of the difference is greater than 0.2 times T_{cal}; the second term is the number of polarity errors. The first term counts the number of times the product of the polarities of two adjacent points equals 1; the second term is the total interval residual. The calculation formula is: ; The meaning is the sum of the deviations between the actual time taken and the ideal half-cycle time for all two adjacent points within the evaluation window; The total number of adjacent intervals contained within the evaluation window; The time difference between the nth adjacent feature points within the window, in seconds, is derived from the time series data of the corresponding candidate branch. The half-cycle is used for verification, with the unit being seconds; the purpose of this formula is to finely quantify the overall phase distortion of each branch on the time axis.
[0058] The system follows The system compares the values of each candidate branch with the pre-processing sequence in a sequential order. Only the branch with the smallest value for the first differing indicator (less than the pre-processing sequence) is selected as the improvement branch. If an improvement branch exists, its data replaces the current abnormal segment data. If all indicators of all candidate branches are greater than or equal to the pre-processing sequence, it indicates that no addition or removal assumptions can reduce signal distortion; the system retains the original abnormal segment data and terminates the current operation on that segment.
[0059] The technical objective of this implementation step is to overcome the limitations of traditional ultrasonic flowmeter data processing that relies on a single threshold for hard filtering. In industrial settings, signal cliffs caused by bubble obstruction and peak distortion caused by inverter interference often occur in tandem. Simply relying on filtering algorithms can easily lead to smooth misalignment of the true phase. This step does not pre-determine whether the signal is missed or a false point appears, but rather transforms all physically possible recovery paths into parallel data hypothesis branches. By utilizing the inherent alternation of acoustic polarities and equidistant time intervals as constraints within the same local evaluation window, each hypothesis branch competes for data under a unified standard. Various comparison indicators delve from the topological continuity of the local waveform to the microscopic residuals of phase shift, ensuring that the final selected repair data is closest to the original propagation state of the fluid in a physical acoustic sense, thereby achieving high-fidelity restoration of the ultrasonic received signal under complex, high-noise conditions.
[0060] Step 4: After adopting the candidate sequence, the update half-cycle is determined by the normal candidate feature points outside the abnormal segment. When the update half-cycle is within the allowable range and the deviation from the actual half-cycle does not exceed the update threshold, the actual half-cycle is updated, and the abnormal segment is re-identified until there is no abnormal segment in front of the target positive wave peak. If the abnormal segment cannot be repaired or there is still an abnormal segment after reaching the upper limit of the number of cycles, the corresponding propagation direction is marked as invalid.
[0061] Preferably, the comparison of the check half-cycle and candidate sequence in the cyclic check includes: Exclude the current abnormal segment, the preset number of candidate feature points on both sides of the current abnormal segment, the occupant points, and the local extrema added in this round. Select adjacent candidate feature points with opposite polarity, an interval multiple of one, and an interval residual not exceeding the preset verification residual from the remaining original candidate feature points, and use the median value of their time interval as the verification half-cycle. If the number of time intervals that meet the conditions is less than the preset number, use the current actual half-cycle as the verification half-cycle. Within the same evaluation range that includes the current abnormal segment and a preset number of candidate feature points on both sides, a verification half-cycle is used to calculate the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals for the pre-processed sequence and each candidate sequence. The comparison order is set based on the severity priority of signal distortion: the number of abnormal intervals directly reflects the number of missing or redundant feature points, which is the most fundamental topological error; polarity error reflects the disorder of phase relationship between adjacent points, and its severity is second; the total residual is a fine quantification of phase deviation, and has the least impact. Therefore, comparing them in sequence can prioritize ensuring the periodic continuity and polarity alternation of the waveform.
[0062] First, compare the number of abnormal intervals. If the values are the same, compare the number of polarity errors. If both are the same, compare the total number of interval residuals. The candidate sequence with the first different index being less than the untreated sequence is identified as the improved sequence. If there are multiple improved sequences, select the candidate sequences with the smaller values of each index in the same order. If no improvement sequence exists, keep the current abnormal segment unchanged and mark it as unrepairable.
[0063] Preferably, the actual half-cycle update and cycle termination conditions include: After selecting the candidate sequence, the abnormal segment being processed, the number of candidate feature points on both sides of the abnormal segment, the occupant point, and the local extreme value added in this round are excluded. From the remaining original candidate feature points, adjacent candidate feature points with opposite polarities and an interval multiple of one are selected, and the update half-cycle is determined according to their time interval. If the update half-cycle is within the allowable half-cycle range and the second deviation ratio between the update half-cycle and the current actual half-cycle does not exceed the preset update ratio, the update half-cycle replaces the actual half-cycle; otherwise, the actual half-cycle remains unchanged. Based on the actual half-cycle, abnormal segments are re-identified, and the loop continues in the time sequence of each abnormal segment; The predicted position of the target positive wave peak is determined based on the starting time of the positive wave peak, the target positive wave peak number, and the actual half-cycle. When there are no abnormal segments between the starting positive wave peak and the predicted position of the target positive wave peak, a continuous feature point sequence is formed. If there are unrepairable abnormal segments within the range, or if there are still abnormal segments after reaching a preset number of cycles, the corresponding propagation direction is marked as invalid.
[0064] In the specific implementation process, after the system constructs multiple candidate data sets for the current abnormal section, an objective evaluation benchmark needs to be established to select the data modification scheme that best matches the physical reality. Since the propagation speed of ultrasound in a fluid is affected by local temperature and velocity steps, using a globally uniform half-cycle as a benchmark can easily lead to accumulated phase errors. Therefore, the system adopts a local reference benchmark, i.e., a calibration half-cycle, in this step.
[0065] The system searches outwards from both ends of the currently processed abnormal segment, excluding all nodes within the current abnormal segment and nodes on both sides of the segment. The candidate feature points, all nodes marked as placeholders, and the extreme points added in this round of hypotheses. This is the number of boundary isolation points, dimensionless, and preset to 4. The preset logic is as follows: abnormal sections are often accompanied by local waveform oscillations. Isolating 4 points outward for about 2 complete acoustic cycles can avoid the distortion edge and obtain the background signal unaffected by the current interference.
[0066] The system extracts features from the remaining original candidate feature points that are adjacent to each other with opposite polarities and whose time interval is the current actual half-cycle. The deviation does not exceed The system calculates the time interval between adjacent feature point pairs and takes the median value as the verification half-cycle. If the number of time intervals meeting the above extraction conditions is less than 5, it indicates that the number of locally valid waveforms is too small. In this case, the current global actual half-cycle is directly used. As .
[0067] Next, the system determines a common evaluation range, which covers the current abnormal segment and both sides thereof. 1 feature point. Within this range, the system uses a verification half-cycle. Three evaluation indicators were calculated for the original data before processing without any modifications and for each alternative data group.
[0068] The first indicator is the number of abnormal intervals. The time difference between adjacent nodes within the system's calculation range ,like ,but Add 1.
[0069] The second indicator is the number of polarity errors. The system checks the polarity of adjacent nodes within its range. and ,like ,but Add 1.
[0070] The third indicator is the total interval residual. The calculation formula is: .
[0071] After the calculation is completed, the system performs indicator comparisons sequentially. The system compares the three indicators of each candidate data group with the indicators of the original data before processing, in the following order: The system only retains the candidate data group whose first numerical difference is less than the original data as an improvement plan. For example, if a candidate data... Equal to the original data, but If the value is less than the original data, the candidate data is selected. Then, among all the selected improvement plans, the system selects the group with the smallest value according to the same ranking principle, and determines this as the final adopted modification plan, replacing the original abnormal segment's data with the data from this plan. If none of the candidate data groups are better than the pre-processing data in the comparison, the system keeps the original data of the current abnormal segment unchanged and adds an unrepairable marker to that segment.
[0072] After completing the aforementioned local data replacement, the system needs to dynamically update the global periodic reference based on the repaired waveform. The system then excludes the previously processed abnormal segments and their adjacent regions from the replaced global feature point set. For each point, a vacancy point, and a replacement point, select pairs of points with opposite polarities and time intervals that match the span of a single cycle from the remaining points. Calculate the median of the time intervals between these pairs and denote it as the update half-cycle. .
[0073] The system Perform two condition checks: First, determine Is it within the half-cycle physical range allowed by the transducer bandwidth? Inside; secondly, calculate its second deviation ratio relative to the current actual half-cycle. The calculation formula is: ; in, The second deviation ratio is dimensionless and its physical meaning is the relative rate of change of the new reference period compared to the old period. The update half-cycle, in seconds, is derived from the statistics of normal waveforms after local repair; The current actual half-cycle, in seconds, is derived from the global statistics of the preceding steps; the purpose of this formula is to limit the abrupt change in the base cycle.
[0074] If the system determines that Then use Replace the current As a new actual half-cycle, otherwise maintain constant. In the initial deviation ratio Based on the formula, take half of the base value. ; This represents the maximum allowable relative change ratio during actual half-cycle updates; using The reason is that the initial actual half-cycle estimation needs to accommodate all discrete samples within the allowed frequency range of the vocal tract, while the actual half-cycle update occurs after local repair, and the update amplitude should be smaller than the initial screening amplitude, so as to avoid a jump in the global half-cycle caused by an abnormal addition or deletion of points.
[0075] It should be noted that the first preset ratio is used in the initial actual half-cycle determination stage, representing a single adjacent time interval. relative to the median value of the current time interval The first deviation ratio; and the second deviation ratio, used in the actual half-cycle update phase, represents the update half-cycle. Compared to the current actual half-cycle The deviation ratio. The first preset ratio is used to eliminate discrete time intervals participating in the initial statistics, and the second preset ratio is used to limit the update magnitude of the actual half-cycle in the repair iteration.
[0076] After updating the actual half-cycle, the system uses the new... Returning to step two, recalculate the time interval ratio and residual for each node starting from the initial positive wave peak, and identify any new abnormal segments. This identification and repair process proceeds forward along the time axis.
[0077] To determine when to terminate the above investigation process, the system calculates the predicted arrival position of the target's positive wave peak in real time. The calculation formula is: ; in, The predicted position of the target positive wave peak, in seconds, physically represents the theoretical anchor point on the time axis of the characteristic wave peak used for the final velocity calculation. Since adjacent positive wave peaks are separated by a full cycle (two and a half cycles), this is used... Calculate the predicted position of the target's positive wave peak; The starting point of the positive wave peak, determined by the preceding steps, is in seconds and originates from the envelope calibration in the first step. The target positive peak number is derived from the specified peak position during factory calibration, usually designated as the 3rd to 5th peaks with the most concentrated energy. The current actual half-cycle is expressed in seconds; the purpose of this formula is to define the physical endpoint boundary of the data repair work.
[0078] When the starting positive peak reaches When no more abnormal segment markers appear, the system determines that the repair is complete, forming a continuous feature point sequence.
[0079] The quantitative standard for the absence of abnormal segments is as follows: all identified missed detection segments, false point segments, and unrepairable segments are recorded as the abnormal segment set. If the time range of any abnormal segment is consistent with... If there is an intersection, it is considered that there is still an abnormal segment within the target range; if the number of intersections is equal to 0, it is considered that there is no abnormal segment between the starting positive wave peak and the expected position of the target positive wave peak, and a continuous feature point sequence is formed.
[0080] If there are segments marked as unrepairable within this range, or if the system performs a recursive check on the current waveform more than or equal to the preset number of loops. If abnormal segments still exist, the system will directly mark the current propagation direction of that channel as invalid data (either downstream or upstream) and stop the calculation for that waveform. The setting of 10 times is based on the following: In a typical industrial measurement cycle, if a channel requires more than 10 iterations for repair in a single measurement, it indicates that the original waveform has been severely damaged. Continuous repair will only introduce cumulative errors and is highly unlikely to be restored. Therefore, 10 is taken as the safety limit.
[0081] Traditional algorithms mostly employ fixed time windows and fixed waveform periods. When fluid temperature changes abruptly, causing a change in sound velocity, the wavelength will be compressed or stretched. The existing fixed calculation window may misjudge normal peaks as abnormal. This section uses a mechanism combining local verification optimization and baseline-constrained updates, allowing the system to slowly and adaptively adjust its perception of the standard period based on normal surrounding fluid acoustic feedback while repairing obvious breakpoints.
[0082] Step 5: Calculate the downstream propagation time, upstream propagation time and reliability of each channel based on the target positive wave peak. Calculate the flow velocity of each channel based on the channel calibration data, and filter and merge the flow velocities of each channel according to their reliability to obtain the flow velocity measurement value.
[0083] Preferably, the determination of the propagation time includes: Starting from the initial positive wave peak, only the positive wave peaks in the continuous feature point sequence are numbered in chronological order, and the positive wave peak with the same number as the target positive wave peak is taken as the target positive wave peak; When the target positive peak is a local extremum obtained from the original extraction or re-search, the time of the local extremum is taken as the time of the target positive peak. When the target positive wave peak is an occupied site, extract the non-occupied positive wave peaks on both sides of the occupied site and their numbers, perform linear fitting on the positive wave peak numbers and corresponding times, and determine the target positive wave peak time based on the target positive wave peak number and the fitting result; If the number of non-occupied positive wave peaks used for fitting is less than the preset number or the fitting residual is greater than the preset fitting residual, the corresponding propagation direction will be marked as invalid. The propagation time in the corresponding propagation direction is obtained by subtracting the transmission trigger time and the fixed delay in the channel calibration data from the peak time of the target positive wave.
[0084] Preferably, the determination of the reliability of the propagation time includes: If the target positive wave peak is the original extracted local extremum, and no local extremum filling, candidate feature point deletion, site setting, or time fitting is performed between the starting positive wave peak and the target positive wave peak, the propagation time confidence level is determined as the direct detection level. The target positive peak is a local extremum obtained from the original extraction or re-search. If the number of processing steps between the starting positive peak and the target positive peak does not exceed a preset number of processing steps, and the total amount of interval residuals does not exceed a preset confidence residual, the propagation time confidence level is determined as the repair detection level. The number of processing steps is the sum of the number of point-level adjustments made to the candidate feature point sequence between the starting positive peak and the target positive peak. Adding a re-searched local extremum, deleting a candidate feature point, or setting a placeholder point are each counted as one processing step. If multiple point-level adjustments occur simultaneously in the same abnormal segment, the actual number of adjusted points is accumulated. When the target positive peak time is obtained by linear fitting, it is not evaluated according to the repair detection level, but according to the fitting level. When the target positive wave peak time is obtained by linear fitting and the fitting residual does not exceed the preset fitting residual, the propagation time reliability is determined as the fitting level; If a continuous feature point sequence cannot be formed, there are unrepairable abnormal segments, abnormal segments still exist after reaching the upper limit of the number of cycles, or the determination conditions of the first three levels are not met, the propagation time credibility will be determined as an invalid level. The reliability of the direct detection level, the repair detection level, the fitting level, and the invalid level decreases in that order.
[0085] Preferably, the screening and fusion of the flow rates of each channel includes: Obtain the downstream and upstream propagation times for the same channel, and calculate the corresponding channel velocity based on the downstream and upstream propagation times, as well as the path length and channel angle in the channel calibration data; if the reliability of the propagation time in any direction is invalid, exclude the corresponding channel. The lower propagation time confidence level in the two propagation directions of the same channel is taken as the channel confidence level. Calculate the median value of the flow velocity in each effective channel, take the median value as the center value of the flow velocity, and calculate the channel deviation between the flow velocity in each effective channel and the center value of the flow velocity. The deviation thresholds for direct detection level, repair detection level and fitting level are set in descending order. The deviation threshold has a non-zero lower limit and increases or remains unchanged with the increase of the flow rate center value at the same confidence level. It also has an upper limit for the deviation threshold to exclude channels whose channel deviation is greater than the corresponding deviation threshold. The fusion weights of the direct detection level, the repair detection level, and the fitting level are set in descending order. The unexcluded channel flow velocities are weighted according to the fusion weights to obtain the flow velocity measurement value.
[0086] In practice, once the system completes the verification and repair of abnormal segments and forms a continuous sequence of feature points, the focus of data processing shifts from the topological recovery of the underlying acoustic waveforms to the calculation of macroscopic physical quantities and multi-channel fusion. This stage first requires determining the actual propagation time of each channel.
[0087] The system starts from the initial positive peak and traverses the sequence of continuous feature points along the time axis. During this process, the system only increments the numbering of nodes with a positive polarity (i.e., positive peaks) in chronological order; negative trough nodes are not included in the numbering. The system compares the numbered values with the preset target positive peak sequence number in the vocal tract calibration data. The matching positive peak is identified as the target positive peak.
[0088] The system handles the specific time coordinate of the target positive wave peak in two physical scenarios. The first scenario: if the target positive wave peak is a locally extracted extreme value, or an actual voltage extreme value point re-added through local search in the previous steps, the system directly uses the timestamp corresponding to that extreme value point as the target positive wave peak time. The second scenario: If the target positive wave peak is set as an occupied point with no actual voltage amplitude during the repair phase, it indicates that the real acoustic signal at that location is completely masked by noise. When the target positive wave peak is an occupied point, the system takes the adjacent non-occupied positive wave peaks before and after the occupied point as fitting samples. Let the number of the non-occupied positive wave peaks participating in the fitting be... The corresponding time is ,in Q represents the number of non-occupied positive peaks involved in the fitting. The system employs a univariate linear relationship: A least-squares fit is performed, where 'a' is the estimated time interval between adjacent positive peaks in seconds, physically corresponding to one complete cycle; and 'b' is the fit intercept in seconds. The target positive peak time after fitting is: ; The fitting residuals are calculated using the following formula: This fitting method utilizes the periodic stability of ultrasonic signals, linearly extrapolating the target peak time using known-numbered positive peak times. It is suitable for extreme cases where the actual peak is completely obscured. (Fitting residuals) It reflects the degree of deviation of the sample points from the ideal linear periodic relationship, and serves as the basis for the reliability of the fit; The fitting residual, expressed in seconds, characterizes the dispersion of the sample's positive wave peak time relative to the linear periodic relationship. When the number of non-occupied positive wave peaks Q used for fitting is less than 4, or... When this happens, the corresponding propagation direction will be marked as invalid. Here, we will... The upper limit of the fitting residual is used to ensure that the judgment of fitting validity and the verification of half-cycle statistics use the same time tolerance.
[0089] Sure Then, the system calculates the one-way propagation time in that propagation direction. The calculation formula is: ; The unit is seconds, which represents the time it takes for an ultrasonic wave to travel purely acoustically across a pipe in a fluid medium. The trigger time for transmission is in seconds and is recorded by a timer from the underlying hardware that sends a drive pulse. The system fixed delay, in seconds, is derived from the factory static water tank calibration data. Its physical meaning is the sum of the electromechanical conversion start-up delay of the ultrasonic transducer piezoelectric ceramic and the inherent group delay caused by the receiver's filter operational amplifier circuit.
[0090] Subsequently, the system needs to assign a credibility weight to the calculated propagation time to evaluate the data's reliability in subsequent multi-channel fusion. The system sets four discrete credibility levels: direct detection level (value 3); repaired detection level (value 2); fitting level (value 1); and invalid level (value 0). The larger the value, the higher the credibility.
[0091] The evaluation logic is as follows: If the target positive wave peak is the original extracted local extreme value, and the system has not performed any data modification operations such as insertion, deletion, placeholder or time fitting during the entire time interval from the starting positive wave peak to the target positive wave peak, it indicates that the received signal signal-to-noise ratio is excellent, and the system evaluates its propagation time reliability as the direct detection level.
[0092] If the target positive wave peak is a local extremum extracted or searched, but an abnormal segment repair occurred in the path preceding it, the system counts the total number of abnormal processing operations and the total amount of interval residuals within that path. When the number of processing operations is less than or equal to 3, and the total amount of interval residuals does not exceed the preset confidence residual, it indicates that although the waveform is subject to local interference, the macroscopic acoustic topology has been successfully restored. The system rates this as a repair detection level, where the preset confidence residual is set to [value missing]. This means that the cumulative phase drift has not exceeded half a cycle.
[0093] If the target positive wave peak itself cannot be obtained through actual measurement, and its timing is calculated entirely by linear fitting, and the fitting residuals in the pre-validation satisfy... The condition indicates that the data is a mathematical approximation derived from the surrounding physical laws, and the system evaluates it as a fitting level.
[0094] If a continuous sequence cannot be formed, there are unrepairable markers, the number of iterations is exhausted, or any of the conditions of the first three levels are not met, the system will classify it as an invalid level.
[0095] In multi-channel flow meter applications, the system acquires the downstream propagation time of the same physical channel. and the time of reverse propagation If the propagation time in either direction is deemed invalid, the system directly excludes that channel and does not calculate its velocity. If both bidirectional data are valid, the system calculates the linear velocity corresponding to that channel based on the ultrasonic time-of-flight method. The calculation formula is: ; Let be the linear velocity of the i-th channel, in meters per second, representing the average flow velocity of the fluid on the chord-length cross section, and aiming to quantify the kinetic energy state of a single layer of fluid; The path length of the i-th channel is in meters, derived from channel calibration data and determined by mechanical structure measurements. The channel angle between the ultrasonic emission axis of the i-th channel and the fluid flow direction is expressed in radians and is derived from the channel calibration data. and These represent the one-way propagation time for upstream and downstream directions, respectively, both in seconds, derived from the pre-propagation time calculation step. Simultaneously, the system extracts the smaller value between the upstream and downstream confidence levels for this channel as the overall channel confidence level for the i-th channel. This is based on the barrel effect principle, where the degradation of a one-way signal will directly reduce the overall accuracy of the two-way time difference.
[0096] To eliminate individual channel distortions caused by severe asymmetric flow or pipe wall deposits, the system performs a process on all calculated effective channel velocities. Calculate the median value and define it as the center value of the flow velocity. Next, the system calculates the absolute deviation between the flow velocity of each effective channel and the center value of the flow velocity. .
[0097] The system is based on the channel's trust level. Configure independent deviation thresholds for each channel The preset logic for this threshold is as follows: the lower the confidence level of the data, the smaller the tolerance for deviation from the center value of the flow velocity; at the same time, considering that the Reynolds number in the pipe increases and the turbulence intensity intensifies under high flow velocity conditions, the average flow velocity corresponding to different channels may show more significant normal differences. Therefore, at the same confidence level, the deviation threshold increases or remains unchanged as the center value of the flow velocity increases, in order to accommodate the differences between channels caused by the actual flow field distribution. To prevent the deviation threshold from approaching zero under low flow velocity or zero flow conditions, a non-zero lower limit is set for the deviation threshold; to prevent the deviation threshold from being infinitely amplified under high flow velocity conditions, an upper limit constraint is also set for the deviation threshold.
[0098] The formula for calculating the deviation threshold is: ; in, is the deviation threshold for the i-th channel, in meters per second; Let be the channel confidence level of the i-th channel, with a direct detection level of 3, a repair detection level of 2, a fitting level of 1, and an invalid level of 0. The credibility weighting function directly detects the corresponding level. Repair detection level corresponding Fitting level corresponds to Invalid level corresponding ; The lower limit of the non-zero velocity deviation is determined by the sampling time resolution, sound path calibration error, and the minimum resolvable flow velocity of the instrument, in meters per second; This is the channel deviation proportionality coefficient, used to characterize the permissible deviation in flow velocity consistency between channels of the instrument; The calibration flow rate or rated range flow rate given in the channel calibration data or instrument parameters, in meters per second; This represents the median flow velocity of each effective channel, expressed in meters per second.
[0099] when When it is close to zero, Depend on A non-zero threshold is provided to avoid incorrectly excluding normal channels under zero-flow or low-flow-rate conditions; when When it increases, Follow Monotonically increasing and gradually approaching This ensures that the deviation threshold increases at high flow rates but does not amplify indefinitely. For channels with an invalid credibility level, since these channels have already been excluded during the propagation time credibility assessment stage, they do not participate in the deviation threshold calculation and subsequent weighted fusion. At that time, exclude the flow rate of that channel.
[0100] This setting allows the direct detection level to have the largest tolerance range for deviation, followed by the repair detection level, and the fitting level to have the smallest tolerance range. The reason for this is that the propagation time corresponding to the direct detection level comes entirely from the original local extremum, which allows it to retain a large amount of flow field difference information. However, the target positive wave peak time of the fitting level is not the measured extremum, so it is more likely to introduce fusion error when it deviates from the center value of the flow velocity. Therefore, a smaller deviation threshold should be used.
[0101] The system compares the audio channels. With the corresponding ,exclude The singular channel data; for channels with an invalid confidence level, due to Furthermore, this channel has already been excluded during the propagation time credibility assessment stage, and therefore does not participate in the deviation threshold calculation and subsequent weighted fusion.
[0102] Finally, the system performs weighted fusion on the effective channel velocities retained after double screening, and calculates the velocity measurement values. The weighted fusion calculation formula is as follows: ; The unit is meters per second, which represents the equivalent average flow velocity across the entire cross-section of the pipe and is intended to serve as the final benchmark for integral calculation of volumetric flow rate. The total number of effective vocal tracts ultimately retained, dimensionless; The fusion weights are dynamically mapped based on channel credibility, and are dimensionless coefficients. The default logic for the weights is: they are directly calculated from the channel credibility level. ; Therefore, the weight corresponding to the direct detection level is 1, the weight corresponding to the repair detection level is 2 / 3, the weight corresponding to the fitting level is 1 / 3, and the weight corresponding to the invalid level is 0.
[0103] The technical objective of this implementation phase is to address the weight blind spot problem in data fusion of multi-channel ultrasonic flowmeters under complex fluid conditions. In traditional averaging or Gaussian debouncing algorithms, the velocity data of each channel is typically treated as a set of equally valuable values, ignoring the differences in attenuation caused by bubbles and eddies when different sound paths traverse the fluid. This solution quantifies and extracts the data residuals, repair attempts, and fitting states generated during feature extraction and interval repair of the bottom-level acoustic waves into four gradient propagation time reliability metrics. By mathematically binding this pure signal quality evaluation index with the upper-level deviation threshold and fusion weights, the system implements a non-equivalent defensive fusion mechanism: the purer the signal, the greater its influence and fault tolerance in the cross-sectional velocity model; the higher the degree of signal damage and reliance on mathematical repair, the stricter the system's fault tolerance review and the lower the assigned weight. This bottom-up, cross-layer data linkage avoids overall measurement failure due to local probe contamination or sudden flow field changes, significantly improving the instrument's measurement repeatability and robustness in harsh industrial environments from an engineering perspective.
[0104] It should be noted that the time-related thresholds involved in this embodiment are all determined based on the actual half-cycle, the allowable half-cycle range, or the channel calibration data; the amplitude-related thresholds are all obtained by statistically analyzing the voltage amplitude in the current received waveform or the channel calibration waveform; and the fusion weights are directly converted from the propagation time reliability level. The above parameters retain their corresponding physical dimensions during the calculation process, and the method of arbitrarily substituting dimensions is not used.
[0105] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0106] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0107] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data processing method for ultrasonic flowmeters based on multi-channel signal feature extraction, characterized in that, include: Acquire the following data for each channel: the downstream received waveform, the upstream received waveform, the transmission trigger time, the sampling time interval, the transducer frequency parameters, the target positive wave peak number, and the channel calibration data. The channel calibration data includes the calibration start time, start time window, and fixed delay corresponding to the channel and the propagation direction, as well as the sound path and channel angle corresponding to the channel. Positive peaks and negative troughs are extracted as candidate feature points within the receiving interval of each received waveform. The actual half-cycle is determined based on adjacent candidate feature points. The starting positive peak is determined by combining the calibration start window, amplitude change, polarity alternation relationship and time interval. Based on the interval multiple of the time interval between adjacent candidate feature points relative to the actual half-cycle, the correspondence between the parity and polarity of the interval multiple, and the interval residual, the missed detection segment and the false point segment are identified. Each abnormal segment is cyclically verified: the verification half-cycle is determined by the normal candidate feature points outside the abnormal segment that have not been added or deleted; candidate addition sequences are generated for missed detection segments, candidate deletion sequences are generated for pseudo-point segments, and two types of sequences are generated simultaneously for abnormal segments that meet both identification conditions; the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals are calculated for the pre-processing sequence and each candidate sequence using the same verification half-cycle, and the three indicators are compared in turn, and only the first candidate sequence with different indicators less than the pre-processing sequence and the best comparison result among all candidate sequences is adopted; After adopting the candidate sequence, the update half-cycle is determined by the normal candidate feature points outside the abnormal segment. When the update half-cycle is within the allowable range and the deviation from the actual half-cycle does not exceed the update threshold, the actual half-cycle is updated, and the abnormal segment is re-identified until there is no abnormal segment before the target positive wave peak. If the abnormal segment cannot be repaired or there is still an abnormal segment after reaching the upper limit of the number of cycles, the corresponding propagation direction is marked as invalid. The propagation time in the forward direction and the propagation time against the current for each channel are calculated based on the target positive wave peak, along with their reliability. The flow velocity for each channel is calculated based on the channel calibration data, and the flow velocities for each channel are filtered and fused according to their reliability to obtain the flow velocity measurement value.
2. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 1, characterized in that, The determination of the receiving interval, candidate feature points, and actual half-cycle includes: Multiple equal-length windows are set in the reference sampling segment before the arrival of the received signal. The cumulative value of the absolute value of the sampled values in each window is calculated. The arrival threshold is determined based on the average value and standard deviation of the cumulative value. The first window whose cumulative value is continuously greater than the arrival threshold is determined as the starting window of the receiving interval. Starting from the initial window, extract the local maximum and local minimum values, which are denoted as positive peaks and negative troughs, respectively, and determine the time of each local extremum based on the sampling time interval; Calculate the amplitude difference between each local extremum and its adjacent reverse local extremums on both sides, and take the smaller of the two amplitude differences as the prominence. Record each candidate feature point according to time, amplitude, polarity, prominence, and whether it is the original extracted extremum. The nominal half-cycle is determined based on the transducer's nominal frequency, and the allowable half-cycle range is determined based on the allowable frequency range. The median value is calculated from adjacent time intervals within the allowable half-cycle range with opposite polarities at both ends. The first deviation ratio of each adjacent time interval relative to the median value is calculated. Time intervals with a first deviation ratio greater than a preset ratio are eliminated, and the median value of the remaining time intervals is determined as the actual half-cycle. Wherein, the first deviation ratio is the absolute value of the difference between adjacent time intervals and the median value divided by the median value. When the number of remaining time intervals is less than a preset number, the nominal half-cycle is determined as the actual half-cycle.
3. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 2, characterized in that, Determining the starting positive peak includes: Obtain the calibration start time and start time window corresponding to the current channel and propagation direction from the channel calibration data, and find the amplitude stability segment within the start time window where the amplitude change is continuously within the preset range after the positive wave peak amplitude increases continuously. Using the positive wave peaks within the amplitude stability segment as candidate starting positive wave peaks, check whether the polarity of the preset number of candidate feature points starting from each candidate starting positive wave peak alternates, and calculate the interval residual of their adjacent time intervals relative to the actual half-cycle. Retain the candidate starting positive wave peaks with alternating polarity and each interval residual not exceeding the preset starting residual, and select the one with the smaller time deviation from the calibration starting time as the starting positive wave peak; when the time deviations are the same, select the one with the smaller total interval residual as the starting positive wave peak. If there is no candidate positive peak that meets the conditions within the calculation window, the corresponding received waveform will be marked as invalid.
4. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 3, characterized in that, The identification of missed detection sections and false detection sections includes: Starting from the initial positive wave peak, calculate the ratio of the time interval between adjacent candidate feature points to the actual half-cycle. The positive integer closest to the ratio is taken as the interval multiple, and the absolute value of the difference between the product of the time interval, the interval multiple, and the actual half-cycle is taken as the interval residual. When the interval multiple is one, the interval residual does not exceed the preset residual, and the polarities of the two ends are opposite, the corresponding interval is determined as a normal interval; If the interval multiple is not less than two, the interval residual does not exceed the preset residual, and the polarity of the two ends is the same when the interval multiple is even and the polarity of the two ends is opposite when the interval multiple is odd, the interval between the candidate feature points at the corresponding two ends will be determined as the missed detection segment. If the time interval between adjacent points is not greater than the preset proportion of the actual half-cycle, or if three consecutive candidate feature points do not maintain polarity alternation, the corresponding range will be determined as a pseudo-point segment. When the same range simultaneously meets the identification conditions for both missed detection segments and false point segments, both types of anomaly markers are retained.
5. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 4, characterized in that, The generation of candidate insertion and candidate deletion sequences includes: For the missed detection segment, the number of missing feature points is obtained by subtracting one from the interval multiple. The time interval between the candidate feature points at both ends of the missed detection segment is divided into the same number of intervals as the interval multiple. The boundary time of each adjacent interval is used as the prediction time. The prediction polarity of each prediction time is determined in sequence according to the polarity of the candidate feature points at the beginning of the missed detection segment. With each prediction time as the center, local extrema of the predicted polarity are searched in the original received waveform. The searched local extrema are then added to the candidate feature point sequence to form a candidate addition sequence. When there are multiple local extrema in the same search range, corresponding candidate addition sequences are formed respectively. When no corresponding local extrema are found, a placeholder point is set at the prediction time. The placeholder point has the predicted polarity, and the prediction time, prediction polarity, placeholder identifier, and non-detected extrema identifier are recorded. For pseudo-point segments, delete a single candidate feature point or multiple adjacent candidate feature points within the pseudo-point segment to form a candidate deletion sequence; For segments that have both types of anomaly markers, the order of insertion and deletion is not predetermined, and candidate insertion sequences and candidate deletion sequences are generated simultaneously.
6. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 5, characterized in that, The comparison of the check half-cycle and candidate sequence in cyclic check includes: Exclude the current abnormal segment, the preset number of candidate feature points on both sides of the current abnormal segment, the occupant points, and the local extrema added in this round. Select adjacent candidate feature points with opposite polarity, an interval multiple of one, and an interval residual not exceeding the preset verification residual from the remaining original candidate feature points, and use the median value of their time interval as the verification half-cycle. If the number of time intervals that meet the conditions is less than the preset number, use the current actual half-cycle as the verification half-cycle. Within the same evaluation range that includes the current abnormal segment and a preset number of candidate feature points on both sides, a verification half-cycle is used to calculate the number of abnormal intervals, the number of polarity errors, and the total number of interval residuals for the pre-processed sequence and each candidate sequence. First, compare the number of abnormal intervals. If the values are the same, compare the number of polarity errors. If both are the same, compare the total number of interval residuals. The candidate sequence with the first different index being less than the untreated sequence is identified as the improved sequence. If there are multiple improved sequences, select the candidate sequences with the smaller values of each index in the same order. If no improvement sequence exists, keep the current abnormal segment unchanged and mark it as unrepairable.
7. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 6, characterized in that, The actual half-cycle update and cycle termination conditions include: After selecting the candidate sequence, the abnormal segment being processed, the number of candidate feature points on both sides of the abnormal segment, the occupant point, and the local extreme value added in this round are excluded. From the remaining original candidate feature points, adjacent candidate feature points with opposite polarities and an interval multiple of one are selected, and the update half-cycle is determined according to their time interval. If the update half-cycle is within the allowable half-cycle range and the second deviation ratio between the update half-cycle and the current actual half-cycle does not exceed the preset update ratio, the update half-cycle replaces the actual half-cycle; otherwise, the actual half-cycle remains unchanged. Based on the actual half-cycle, abnormal segments are re-identified, and the loop continues in the time sequence of each abnormal segment; The predicted position of the target positive wave peak is determined based on the starting time of the positive wave peak, the target positive wave peak number, and the actual half-cycle. When there are no abnormal segments between the starting positive wave peak and the predicted position of the target positive wave peak, a continuous feature point sequence is formed. If there are unrepairable abnormal segments within the range, or if there are still abnormal segments after reaching a preset number of cycles, the corresponding propagation direction is marked as invalid.
8. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 7, characterized in that, Determining the timing of transmission includes: Starting from the initial positive wave peak, only the positive wave peaks in the continuous feature point sequence are numbered in chronological order, and the positive wave peak with the same number as the target positive wave peak is taken as the target positive wave peak; When the target positive peak is a local extremum obtained from the original extraction or re-search, the time of the local extremum is taken as the time of the target positive peak. When the target positive wave peak is an occupied site, extract the non-occupied positive wave peaks on both sides of the occupied site and their numbers, perform linear fitting on the positive wave peak numbers and corresponding times, and determine the target positive wave peak time based on the target positive wave peak number and the fitting result; If the number of non-occupied positive wave peaks used for fitting is less than the preset number or the fitting residual is greater than the preset fitting residual, the corresponding propagation direction will be marked as invalid. The propagation time in the corresponding propagation direction is obtained by subtracting the transmission trigger time and the fixed delay in the channel calibration data from the peak time of the target positive wave.
9. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 8, characterized in that, Determining the credibility of the dissemination time includes: If the target positive wave peak is the original extracted local extremum, and no local extremum filling, candidate feature point deletion, site setting, or time fitting is performed between the starting positive wave peak and the target positive wave peak, the propagation time confidence level is determined as the direct detection level. The target positive peak is a local extremum obtained from the original extraction or re-search. When the number of processing steps between the starting positive peak and the target positive peak does not exceed the preset number of processing steps, and the total amount of interval residuals does not exceed the preset confidence residual, the propagation time confidence level is determined as the repair detection level. The number of processing steps is the sum of the number of times the candidate feature point sequence is adjusted at the point level between the starting positive peak and the target positive peak. Adding a local extremum obtained from the re-search, deleting a candidate feature point, or setting a placeholder point are each counted as one processing step. When the target positive wave peak time is obtained by linear fitting and the fitting residual does not exceed the preset fitting residual, the propagation time reliability is determined as the fitting level; If a continuous feature point sequence cannot be formed, there are unrepairable abnormal segments, abnormal segments still exist after reaching the upper limit of the number of cycles, or the determination conditions of the first three levels are not met, the propagation time credibility will be determined as an invalid level. The reliability of the direct detection level, the repair detection level, the fitting level, and the invalid level decreases in that order.
10. The ultrasonic flowmeter data processing method based on multi-channel signal feature extraction according to claim 9, characterized in that, The selection and fusion of stream velocities for each channel includes: Obtain the downstream and upstream propagation times for the same channel, and calculate the corresponding channel velocity based on the downstream and upstream propagation times, as well as the path length and channel angle in the channel calibration data; if the reliability of the propagation time in any direction is invalid, exclude the corresponding channel. The lower propagation time confidence level in the two propagation directions of the same channel is taken as the channel confidence level. Calculate the median value of the flow velocity in each effective channel, take the median value as the center value of the flow velocity, and calculate the channel deviation between the flow velocity in each effective channel and the center value of the flow velocity. The deviation thresholds for direct detection level, repair detection level and fitting level are set in descending order. The deviation threshold has a non-zero lower limit and increases or remains unchanged with the increase of the flow rate center value at the same confidence level. It also has an upper limit for the deviation threshold to exclude channels whose channel deviation is greater than the corresponding deviation threshold. The fusion weights of the direct detection level, the repair detection level, and the fitting level are set in descending order. The unexcluded channel flow velocities are weighted according to the fusion weights to obtain the flow velocity measurement value.
