Method, system, equipment and medium for analyzing measurement error and reason of ultrasonic flowmeter

By constructing a digital simulation model of an ultrasonic flow meter and introducing an error injection module, combined with real-time data correction and machine learning, the problem of multi-source error identification in ultrasonic flow meter measurement error analysis was solved, achieving high-precision error analysis and root cause tracing.

CN121723889APending Publication Date: 2026-03-24SANXIA JINSHAJIANG YUNCHUAN HYDROPOWER DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing ultrasonic flow meters have measurement errors in practical applications, and it is difficult to fully reflect the combined effect of multiple sources of error and its propagation mechanism through experimental methods or simplified models. There is a lack of high-precision, multi-parameter, and traceable digital simulation methods.

Method used

A digital simulation model of an ultrasonic flow meter is constructed, and an error injection module is introduced to collect actual flow meter data in real time and coordinate the correction with virtual simulation data. The model parameters are dynamically adjusted through optimization algorithms, and a disturbance experiment is conducted using the error injection module to generate a spatiotemporal database. The causes of errors are then analyzed in conjunction with a machine learning model.

Benefits of technology

It enables quantitative analysis and root cause identification of multi-source errors, improves the accuracy of error identification and root cause tracing capabilities, and the simulation model can continuously reflect the actual operating status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723889A_ABST
    Figure CN121723889A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical simulation, in particular to an ultrasonic flowmeter measurement error and reason analysis method, system and device and a medium. According to an actual flowmeter structure, an ultrasonic flowmeter digital simulation model is constructed, and an error injection module is introduced into the ultrasonic flowmeter digital simulation model; based on the constructed ultrasonic flowmeter digital simulation model, actual flowmeter data are collected in real time, the actual flowmeter data and virtual simulation data are adopted for collaborative sampling and correction, parameters of the ultrasonic flowmeter digital simulation model are dynamically adjusted through an optimization algorithm, and the ultrasonic flowmeter digital simulation model with the dynamically adjusted parameters is used for simulating the ultrasonic flowmeter. The error injection module is used for carrying out a disturbance experiment on a key error source, generating a space-time database, establishing a machine learning model, inputting the generated space-time database and cooperative correction data into the machine learning model, analyzing and outputting a root cause of an error, and improving the accuracy of error identification and the root cause traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of numerical simulation technology, and in particular to a method, system, device, and medium for analyzing measurement errors and causes of ultrasonic flow meters. Background Technology

[0002] Ultrasonic flow meters, as important instruments for fluid flow measurement, are widely used in industrial process control, energy metering, and environmental monitoring due to their advantages such as having no moving parts, high measurement accuracy, and wide applicability. Compared with traditional mechanical flow meters, ultrasonic flow meters achieve non-contact measurement by detecting the propagation time of ultrasonic signals in the fluid or the Doppler frequency shift, greatly improving the reliability and adaptability of metering.

[0003] However, due to the influence of various factors such as fluid dynamics, sound wave propagation characteristics, and ambient temperature changes, ultrasonic flowmeters are prone to measurement errors in practical applications. For example, factors such as fluid velocity distribution, pipe inner wall roughness, transducer installation deviation, bubble inclusion, and temperature gradient can all cause sound wave path deviation, sound time difference measurement errors, or signal attenuation. Furthermore, the generation and evolution of errors under multi-physics coupling are highly complex and nonlinear, posing significant challenges to accurate modeling and error analysis. Existing flowmeter error analysis methods mostly employ experimental methods or simplified models, which struggle to fully reflect the combined effects and propagation mechanisms of multi-source errors under actual operating conditions, and lack high-precision, multi-parameter, and traceable digital simulation methods. Therefore, developing a novel simulation model that integrates the coupling effects of multiple physics fields such as fluid dynamics, acoustics, and thermodynamics, and incorporates error injection, real-virtual collaborative correction, and causal attribution analysis, is of great significance for achieving accurate quantification, root cause tracing, and compensation optimization of ultrasonic flowmeter measurement errors. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method, system, equipment, and medium for analyzing the measurement errors and causes of ultrasonic flow meters. This addresses the problem that existing flow meter error analyses often rely on experimental methods or simplified models, which are insufficient to fully reflect the combined effects and propagation mechanisms of multiple error sources under actual operating conditions.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for analyzing the measurement error and causes of an ultrasonic flow meter, including: Based on the actual flow meter structure, a digital simulation model of the ultrasonic flow meter is constructed, and an error injection module is introduced into the digital simulation model of the ultrasonic flow meter. Based on the constructed ultrasonic flow meter digital simulation model, real-time data from the actual flow meter is collected. The actual flow meter data and virtual simulation data are sampled and corrected collaboratively. The parameters of the ultrasonic flow meter digital simulation model are dynamically adjusted through optimization algorithms. Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the error injection module is used to conduct disturbance experiments on key error sources and generate a spatiotemporal database. A machine learning model is established, and the generated spatiotemporal database and collaborative correction data are input into the machine learning model to analyze and output the root causes of the errors.

[0007] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method includes: constructing a digital simulation model of the ultrasonic flowmeter based on the actual flowmeter structure, and introducing an error injection module into the ultrasonic flowmeter digital simulation model, including: Based on the actual flow meter structure, a full three-dimensional digital twin is constructed, and adjustable error parameters are introduced; Based on a full three-dimensional digital twin, the model is verified in stages to ensure that the prediction deviation is within the preset range across all operating conditions, thus completing the establishment of the digital simulation model of the ultrasonic flow meter. An error injection module is introduced into the digital simulation model of the ultrasonic flow meter.

[0008] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method includes: based on the constructed ultrasonic flowmeter digital simulation model, real-time acquisition of actual flowmeter data, collaborative sampling and correction of actual flowmeter data and virtual simulation data, and dynamic adjustment of the parameters of the ultrasonic flowmeter digital simulation model through optimization algorithms, including: Based on the constructed digital simulation model of the ultrasonic flow meter, the actual flow meter data is collected in real time by deploying an acquisition system on a physical flow sampler; The objective function of the optimization algorithm is constructed by using collaborative sampling and calibration of actual flow meter data and virtual simulation data. Based on the objective function of the optimization algorithm, the digital simulation model of the ultrasonic flow meter is self-corrected through incremental learning.

[0009] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method includes: based on the dynamically adjusted parameters of the ultrasonic flowmeter digital simulation model, using an error injection module to conduct disturbance experiments on key error sources, generating a spatiotemporal database, including: Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the key error sources are subjected to disturbance experiments using the error injection module. By analyzing spatiotemporal data, we trace the error propagation path and develop path optimization algorithms for computational optimization. Based on the tracked error propagation path, the system error response is continuously captured, error response data is recorded, and a dynamic graph of the error propagation path is constructed to generate a spatiotemporal database.

[0010] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method employs collaborative sampling and correction of actual flowmeter data and virtual simulation data to construct an optimization algorithm objective function, including: The adaptive optimization algorithm aims to minimize the residuals of virtual and real observations. The objective function is: in, Let be the parameter vector to be optimized. This represents the simulated value at the i-th observation point. To correspond to the measured values, The weighting factors are assigned based on the sensor's accuracy. λ is the regularization term, and λ is the penalty coefficient.

[0011] The beneficial effects of this preferred technical solution are as follows: it uses simulation data to make up for the lack of field measurement data in terms of working condition coverage, while using measured data to constrain and correct the simulation model, it introduces a weighting factor based on sensor accuracy to achieve differentiated processing, and uses regularization terms to avoid overfitting, thereby enhancing the physical rationality of parameter optimization.

[0012] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method includes: self-correcting the ultrasonic flowmeter digital simulation model through incremental learning based on the objective function of the optimization algorithm, including: The collaborative approximation process achieves model self-correction through online incremental learning. It receives real-world data packets every 5 seconds and performs virtual-real state alignment to verify the residual norm, expressed as: in, Let be the error vector between the simulation model and the measured results at time t. Let L2 norm be the error vector. For parameters The objective function for the variable is... This is the set of model parameters.

[0013] As a preferred embodiment of the ultrasonic flowmeter measurement error and cause analysis method described in this invention, the method includes: tracing the error propagation path through spatiotemporal data analysis and developing a path optimization algorithm for computational optimization, including: Error propagation path tracing is achieved through a spatiotemporal correlation algorithm, and the dynamic response function expression is: Where τ is the time lag and ξ is the spatial displacement vector. As an observation indicator, Let y be the mean. Let y be the variance; The system tracks three typical paths: the fluid dynamics path, the sound wave propagation path, and the thermo-coupling path. Develop a path optimization algorithm based on causal inference, and construct a Bayesian network between the error source and the measurement output y: in, For a given set of error parameters The conditional probability of the measured output y. For the error source parameter set, Error parameters Influence causal transition probability, for Influence on fluid velocity field The probability, For the fluid velocity vector field, Time delay of velocity field propagation to sound The transition probability, This is the time delay for sound wave propagation; The transition probability is calculated using information entropy, and its expression is: in, Error parameters Mutual information between the measured output y and the measurement output y. For joint probability, for Marginal probability, Let y be the marginal probability.

[0014] The beneficial effects of this preferred technical solution are as follows: it dynamically tracks three typical error paths—fluid dynamics, acoustic wave propagation, and thermodynamic coupling—using a spatiotemporal correlation algorithm, and constructs a probabilistic model from the error source to the measurement output using a Bayesian network, quantifying the causal transition probability between them with information entropy. This transforms the error propagation mechanism from qualitative judgment to quantitative analysis, establishing the correlation between the error source and the final indicated value.

[0015] Secondly, the present invention provides a system for analyzing the measurement error and causes of an ultrasonic flow meter, comprising: The model building module constructs a digital simulation model of the ultrasonic flow meter based on the actual flow meter structure, and introduces an error injection module into the digital simulation model of the ultrasonic flow meter. The collaborative calibration and model optimization module, based on the constructed ultrasonic flow meter digital simulation model, collects actual flow meter data in real time, uses collaborative sampling and calibration of actual flow meter data and virtual simulation data, and dynamically adjusts the parameters of the ultrasonic flow meter digital simulation model through optimization algorithms; The path analysis module, based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, uses the error injection module to conduct disturbance experiments on key error sources and generate a spatiotemporal database. The root cause analysis and output module establishes a machine learning model, inputs the generated spatiotemporal database and collaborative correction data into the machine learning model, analyzes the root causes of the errors, and outputs the results.

[0016] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of a method for analyzing the measurement error and causes of an ultrasonic flow meter.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for analyzing the measurement error and causes of an ultrasonic flow meter.

[0018] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention constructs a three-dimensional digital simulation model based on the actual equipment structure, and achieves adaptive adjustment of model parameters through virtual-real collaborative correction and incremental learning mechanisms, enabling the simulation model to continuously reflect the actual operating state. By introducing an error injection module and a spatiotemporal database generation mechanism, the disturbance process of key error sources is simulated across the entire operating range, and the error propagation path and impact relationships are tracked. Combined with a path optimization algorithm based on causal inference, quantitative analysis and root cause identification of multi-source errors are performed, improving the accuracy of error identification and the ability to trace root causes. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0020] Figure 1This is a schematic diagram of the overall process of an ultrasonic flowmeter measurement error and cause analysis method according to an embodiment of the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0022] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for analyzing the measurement error and causes of an ultrasonic flow meter is provided, including: To address the issue that existing flowmeter error analyses often rely on experimental methods or simplified models, which fail to fully reflect the combined effects and propagation mechanisms of multiple error sources under actual operating conditions, this invention provides a method for analyzing the measurement errors and causes of ultrasonic flowmeters.

[0023] S1: Based on the actual flow meter structure, construct a digital simulation model of the ultrasonic flow meter, and introduce an error injection module into the digital simulation model of the ultrasonic flow meter.

[0024] S2: Based on the constructed ultrasonic flow meter digital simulation model, real-time data from the actual flow meter is collected. The actual flow meter data and virtual simulation data are sampled and corrected collaboratively. The parameters of the ultrasonic flow meter digital simulation model are dynamically adjusted through optimization algorithms.

[0025] S3: Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the error injection module is used to conduct disturbance experiments on key error sources and generate a spatiotemporal database.

[0026] S4: Establish a machine learning model, input the generated spatiotemporal database and collaborative correction data into the machine learning model, analyze the root causes of the errors and output the results.

[0027] Therefore, by constructing a digital simulation model with an integrated error injection module and combining real-time collected field data with virtual data for collaborative correction, dynamic optimization of model parameters was achieved. Then, the corrected model was used to conduct disturbance experiments to generate a spatiotemporal database covering various error conditions. Finally, machine learning methods were used to mine the root causes of errors from the data, so that error analysis no longer depends on isolated measured data or pure theoretical simulation, thus improving the accuracy of error attribution.

[0028] Example 2, refer to Figure 1As an embodiment of the present invention, based on the above embodiment, a method for analyzing the measurement error and causes of an ultrasonic flow meter is provided.

[0029] In this embodiment of the application, step S1 involves constructing a digital simulation model of the ultrasonic flow meter based on the actual flow meter structure, and introducing an error injection module into the ultrasonic flow meter digital simulation model, including the following steps A1-A3: A1: Based on the actual flow meter structure, construct a full three-dimensional digital twin and introduce adjustable error parameters.

[0030] Based on the actual flow meter structure, a full three-dimensional digital twin was constructed, incorporating fluid dynamics, sound wave propagation, and heat conduction.

[0031] Adjustable error parameters are introduced into the model, such as local temperature disturbances, slight deviations in sensor position, and roughness of the pipe inner wall.

[0032] The digital simulation model of the ultrasonic flow meter is a precise digital reproduction of the physical structure of the actual instrument. Utilizing 3D geometric modeling, it reconstructs a complete assembly based on engineering drawings of the actual flow meter, including the measuring pipe section, ultrasonic transducer mounting cavity, flange connections, and fluid inlet / outlet transition section. The model accurately preserves all critical dimensional features, paying particular attention to the transducer tilt angle, the location of acoustic path reflection points, and the geometric details of the fluid boundary layer region. The minimum mesh size is controlled to 0.1 mm to ensure sound field resolution.

[0033] In the implementation of the fluid dynamics module, this simulation model employs the widely used finite volume method to discretize and solve the three-dimensional transient Navier-Stokes equations globally. Facing complex turbulent states from laminar to high Reynolds numbers, a multi-nested meshing strategy ensures wall Y⁺ compatibility. Large eddy simulation (LES) or Reynolds-averaged Navier-Stokes equations can be switched as needed to capture realistic boundary layer development dynamics and secondary vortex structures. Inlet and outlet velocity boundary conditions of the fluid domain can be dynamically loaded, and real-time flow data is synchronized with an external operating condition database via Python / C++ API, achieving consistency between the flow field and instrument operating conditions. For different roughness conditions at the wall, a modified model based on a stochastic height field is introduced. The rough element structure is parameterized using the Weierstrass-Mandelbrot fractal algorithm and mapped to the actual wall normal shear stress boundary conditions, effectively reflecting the disturbance effects of pipe surface casting errors and operational wear on fluid motion.

[0034] The acoustic propagation module performs full-space time-varying calculations of three-dimensional sound wave propagation in non-uniform flow fields based on the finite-difference time-domain method. Specifically, it employs a high-order central difference scheme to discretize pressure and particle velocity using an interleaved grid, and selects the parameters of the sound source injection pulse through fast Markov random sampling, achieving accurate tracking of the sound path under different transducer layouts and emission angles. To reflect the influence of minute perturbations in temperature or composition within the flow field on the sound velocity, the sound velocity field c(x,y,z,t) is coupled in real-time with the fluid temperature and density distribution, and a thermoacoustic coupling correction equation is used to calculate the transit time and attenuation characteristics online. For boundary conditions, a viscoelastic impedance model is used to simulate partial reflection and absorption on the pipe wall, automatically switching to discontinuous acoustic impedance at bubble or weld locations to reproduce abnormal sound reflection, diffraction, and scattering phenomena. Signal post-processing extracts time-domain and frequency-domain features in real-time using the short-time Fourier transform (STFT) mode and directly inputs them to the error assessment and parameter optimization module.

[0035] The heat conduction module is based on the Fourier heat conduction equation, combined with CFD and external multiphysics field solutions. The model supports the superposition calculation of heat conduction, convection and radiation effects at multi-layer material boundaries. Local temperature perturbations are achieved by applying spatially adjustable heat flux on the sensor surface, allowing the setting of Gaussian distribution or abrupt regional heat flux boundaries, reflecting in real time the temperature drift under operating conditions and the thermal diffusion effects of high-power components. The temperature field within the unit layer is directly coupled with the mechanical stiffness parameters, automatically calculating the relative coordinate drift caused by thermal expansion, especially compensating for acoustic path geometric errors caused by structural micro-deformation under high flow and long-term operation conditions.

[0036] Error parameters are designed using parameterized variable boundary conditions: local temperature disturbances are simulated by applying a spatially gradient-controlled heat flux boundary to the sensor surface to mimic uneven heat diffusion; slight deviations in sensor position are addressed by dynamically modifying the transducer mounting coordinate transformation matrix (translation vector). and rotation matrix The sound wave emission angle is adjusted; the roughness of the pipe inner wall is modeled using a random height field function, and roughness peaks are generated based on the Weierstrass-Mandelbrot fractal algorithm (Rq value controllable from 10-100 μm). This parameter directly affects the shear stress distribution of the fluid wall and the sound wave scattering effect. Furthermore, electronic delay drift is reserved (…). Interface variables such as acoustic impedance mutation (simulating weld defects) are used, and all error parameters can be adjusted in batches through JSON configuration files.

[0037] A2: Based on a full three-dimensional digital twin, the model is verified in stages to ensure that the prediction deviation is within the preset range across the entire operating condition, thus completing the establishment of the digital simulation model of the ultrasonic flow meter.

[0038] Model validation was conducted in stages. First, the accuracy of the acoustic time-of-flight calculation was verified by comparing it with the classical flow theory solution under ideal operating conditions (steady-state laminar flow, constant temperature at 20℃, zero error parameters) (requiring an error of <0.1%). Next, dynamic testing was performed on a physical calibration device. The reliability of multi-field coupling was cross-validated using measured data from a high-precision RTD temperature sensor and a laser Doppler velocimeter (LDV) with simulation results. Thermoelastic coupling deformation error was assessed by capturing the temperature deformation field of the physical instrument using a thermal imager and a digital image correlation (DIC) system, and then using a reverse calibration of the material thermal expansion coefficient parameter library to ultimately ensure that the flow velocity prediction deviation was <0.5% across the entire operating range.

[0039] A3: Introduce an error injection module into the digital simulation model of the ultrasonic flow meter.

[0040] The error injection module allows setting the randomness, amplitude, and duration of disturbances to achieve dynamic evolution simulation of errors.

[0041] The core architecture of the error injection module consists of three parts: a disturbance type library, random control, and dynamic evolution.

[0042] The disturbance type library predefines more than ten scalable physical disturbance modes, the implementation of which relies on a mathematical description of the failure mechanism under real working conditions: transient bubble disturbance is implemented through a coupled VOF (Volume of Fluid) multiphase flow model, injecting a swarm of bubbles that follow a preset particle size distribution (such as the Rosin-Rammler distribution) at a specified spatiotemporal coordinate. Each bubble is simulated using a spring-like oscillator model to simulate its oscillation and deformation process, and the resulting acoustic wave scattering phase shift is calculated; reflected noise interference is based on ray acoustics theory, automatically generating abnormal reflection points (simulating corrosion or welds) at preset positions on the inner wall of the pipe, and modifying the local boundary acoustic impedance characteristics ( , This represents the change in acoustic impedance at the local boundary. For fluid density, The speed of sound in a fluid. An additional echo signal is generated by adding a dimensionless noise intensity factor to characterize the effect of noise or stray characteristics on acoustic impedance, and superimposed on the original transducer received waveform. Fluid disturbance wave packets are generated using a synthetic turbulence method, calling a pre-stored LES large eddy simulation turbulence energy spectrum template (such as the Von Karman spectrum) to inject an adjustable-intensity vortex structure at a specified flow direction location. This vortex automatically deconstructs and disturbs the flow field profile during mainstream convection. All disturbance models are connected to the simulation environment via an API interface.

[0043] The stochastic control module employs a hierarchical design, modeling the occurrence of disturbances as a multi-level probabilistic process. First, in the macroscopic event-driven layer, this module uses a Poisson process as its core to determine the triggering frequency of major disturbance events. For example, the average generation rate of bubble swarms is modeled as a Poisson distribution, with an expected value λ (e.g., 0.5 times / second) set to simulate low-probability, transient macroscopic disturbance events such as bubble formation. This process uses a high-performance pseudo-random number generator to extract samples in real time. Within each time step of the main simulation loop, it determines whether a disturbance has occurred at the current moment, thereby dynamically generating a disturbance "occurrence window" to ensure the model has excellent statistical consistency and physical plausibility.

[0044] After a disturbance event is triggered, the micro-parameter sampling layer is entered, where the Monte Carlo method is used to sequentially determine the spatial, dynamic, and lifetime characteristics of each event. The spatial distribution of disturbance locations employs Latin hypercube sampling (LHS). This method significantly improves the uniformity and variance convergence speed of the disturbance source location distribution in high-dimensional space through reasonable stratification and equal-probability sampling of the three-dimensional fluid domain. In its implementation, LHS involves pre-constructing a spatial partitioning mapping table and independently extracting a set of non-repeating random intervals for each disturbance in each spatial dimension, resulting in uniform coverage of all potential disturbance source points across the entire domain.

[0045] Regarding the perturbation intensity (taking bubble diameter as an example), the distribution is set to a truncated normal distribution. This process first generates standard normal distribution samples (mean 2 mm, standard deviation 0.5 mm), then restricts their values ​​to the interval [0.1 mm, 5 mm]. Any samples exceeding the upper or lower bounds are automatically rejected and resampled, ensuring all perturbation parameters are within the physically realizable range and eliminating the interference of extreme outliers on the overall simulation results. A similar mechanism can also be applied to other perturbation intensity parameters such as acoustic reflection coefficient and electronic delay.

[0046] The duration of the disturbance is modeled using a Weibull distribution. The duration is then controlled by the Weibull distribution (e.g., fluid wave packet lifetime). , The lifetime of the fluid wave packet. The scale parameter or the proportional parameter of the lifetime distribution determines the time scale of the typical lifetime. Let [0,1] be a uniformly distributed random variable within the interval [0,1]. The shape parameter controls the thick tail of the lifetime distribution and the "steepness" of the wave packet disappearance characteristics. The lifetime of a disturbance event (such as the duration of a fluid wave packet) exhibits significant thick tails and variable steepness. Therefore, by introducing a scale parameter (controlling the timescale of the typical lifetime) and a shape parameter (adjusting the steepness of the lifetime distribution and the probability of extreme values), along with a uniformly distributed baseline variable in the 0-1 interval, and segmenting the sampling according to the Weibull probability density function, the specific lifetime of each disturbance from start to finish can be obtained. This method is flexible, easy to calibrate parameters, and can accurately reproduce the statistical characteristics of the actual duration of disturbances in the fluid.

[0047] All perturbation parameters and probability distributions are centrally managed using XML structured configuration. Custom data tags allow for flexible definition of the probability distribution, parameter ranges, and spatial weights for each physical region and event type. For example, in a subdomain near the pipe wall, increasing the local probability density can enhance the directional probability of events such as bubbles / defects near the wall (e.g., increasing the probability density by 30%). Once parameters are adjusted, they take effect dynamically without requiring a simulation restart, significantly improving testing efficiency and flexibility.

[0048] The simulation timeline is managed using a sophisticated event-driven model. Under the coordination of a unified, high-precision master clock, each macroscopic disturbance event is mapped to a separate simulation "event object." A customized event scheduler polls the simulation time step, controlling the "on / off" state of the disturbance based on Poisson trigger nodes. The start, duration, and termination of events are all strictly scheduled with millisecond-level resolution, achieving precise controllability of disturbance behavior in the simulation time domain. The overall design ensures both high physical realism and statistical representativeness of the disturbance injection process, while also facilitating systematic error analysis and model calibration.

[0049] Dynamic evolution enables real-time interaction between perturbations and multiphysics fields. Upon bubble injection, the fluid module instantly solves the bubble-liquid two-phase flow coupling equations, simultaneously updating the flow density and pressure fields. The acoustic module recalculates the sound propagation path based on the perturbed medium parameters and quantifies the sound signal distortion (such as the ratio of bubble diameter d to sound wavelength λ) using an equivalent scattering cross-section model. (Time-triggered Mie scattering calculation); reflected noise interference dynamically modifies the acoustic boundary condition coefficient matrix, and superimposes abnormal reflection terms in each iteration of the time-domain solver.

[0050] It should be noted that by constructing a full three-dimensional digital twin and integrating a parameterized error injection module, accurate simulation of the multi-physics coupling process of the ultrasonic flowmeter and dynamic error evolution simulation were achieved. The reliability of the simulation results across the entire operating range was ensured through phased model verification.

[0051] In this embodiment of the application, step S2 involves real-time acquisition of actual flow meter data based on the constructed ultrasonic flow meter digital simulation model. The actual flow meter data and virtual simulation data are used for collaborative sampling and correction. The parameters of the ultrasonic flow meter digital simulation model are dynamically adjusted through an optimization algorithm, including the following steps B1-B3: B1: Based on the constructed digital simulation model of the ultrasonic flow meter, the actual flow meter data is collected in real time by deploying a data acquisition system on a physical flow sampler.

[0052] A nanosecond-level synchronous acquisition system was deployed on a physical flowmeter prototype, with four pairs of piezoelectric ultrasonic transducers (center frequency 1MHz) arranged along the fluid flow direction. The time difference between the propagation of acoustic waves in and out of the flow was accurately measured using FPGA hardware. With a resolution of up to 0.1 ns, an array of 12 PT1000 temperature sensors (accuracy ±0.1℃) is embedded in the pipe wall to monitor the evolution of the fluid thermal boundary layer. A Coriolis mass flow meter is also installed as a reference source. All sensor signals are synchronously sampled at a rate of 250 kSPS via a 24-bit ADC, and clock deviations at each node are kept <100 ns using a Time-Sensitive Network (TSN) protocol. The raw data stream is pushed to the twin platform in real time via an industrial IoT gateway.

[0053] B2: The objective function of the optimization algorithm is constructed by using actual flow meter data and virtual simulation data for collaborative sampling and correction.

[0054] B3: Based on the objective function of the optimization algorithm, the digital simulation model of the ultrasonic flow meter is self-corrected through incremental learning.

[0055] In this embodiment of the application, the optimization algorithm used in step B2 is specifically an adaptive optimization algorithm: The core of real-virtual collaboration lies in establishing a two-way dynamic calibration loop between physical instruments and digital simulation models.

[0056] The adaptive optimization algorithm aims to minimize the residuals of virtual and real observations. The objective function is: in, Let be the parameter vector to be optimized. This represents the simulated value at the i-th observation point. To correspond to the measured values, The weighting factors are assigned based on the sensor's accuracy. λ is the regularization term, and λ is the penalty coefficient.

[0057] The optimization problem is solved using a hierarchical parallel strategy. The primary optimization uses gradient descent based on the adjoint method to quickly track temperature drift, and the sound velocity gradient is embedded in the fluid control equations. : in, The speed of sound in a fluid. For time, For fluid velocity vector, For gradient operators, These are the thermal boundary layer parameters of the thermal diffusion system. This is a temperature source term.

[0058] The temperature compensation model fits the thermal boundary layer parameters in real time using the Levenberg-Marquardt algorithm. Advanced optimization uses a covariance matrix adaptive evolution strategy (CMA-ES) to handle non-smooth parameters (such as roughness abrupt changes). Finding the optimal solution set through population evolution in a dimensional parameter space .

[0059] In an optional implementation, the optimization algorithm in step B2 can also employ a genetic algorithm. In scenarios where parameters are discrete, gradients are unavailable, or there are constraint boundaries, the algorithm gradually optimizes the parameter combination through encoding, selection, crossover, and mutation operations in multiple generations of evolution, and selects the optimal individual based on the fitness function to achieve adaptive adjustment of the model under complex working conditions.

[0060] In another optional implementation, the optimization algorithm in step B2 can also adopt a multi-objective evolutionary algorithm. In scenarios where multiple performance indicators need to be traded, the Pareto optimality principle is adopted to generate the optimal solution set under multiple indicators such as error, energy consumption, and delay, so that the model can dynamically select the optimal operating parameters and achieve comprehensive performance balance optimization.

[0061] In this embodiment of the application, the self-correction of the ultrasonic flow meter digital simulation model through incremental learning in step B3 adopts online incremental learning: The collaborative approximation process achieves model self-correction through online incremental learning. It receives real-world data packets every 5 seconds and performs virtual-real state alignment to verify the residual norm, expressed as: in, Let be the error vector between the simulation model and the measured results at time t. Let L2 norm be the error vector. For parameters The objective function for the variable is... This is the set of model parameters.

[0062] If the threshold is exceeded (e.g., a 1.5% flow rate error) triggers a three-step closed loop: 1) Temporal Feature Extractor Analysis The phase modulation mode separates system error from random noise components; 2) Parameter sensitivity analysis to calculate the eigenvalues ​​of the Hessian matrix: in, It is the second-order partial derivative of the objective function with parameter set θ as independent variable, corresponding to the i-th and j-th parameters, i.e., the elements of the Hessian matrix. For the i-th adjustable parameter, This is the j-th adjustable parameter.

[0063] 3) While maintaining the stability of CFD calculations, the error interface variable θ in the simulation model is updated incrementally. The corrected twin prediction results are fed back to the optimizer through the residual feedback channel, forming a continuously iterative learning loop.

[0064] In one alternative implementation, the self-correction of the ultrasonic flow meter digital simulation model through incremental learning in step B3 can also be achieved using batch incremental learning. In scenarios where the data acquisition cycle is long and the system state changes slowly, the system collects complete batches of measured data at certain time intervals and then uniformly performs model updates. By minimizing the cumulative loss function of the virtual-real difference, the parameters are corrected in batches.

[0065] In another alternative implementation, the self-correction of the ultrasonic flow meter digital simulation model through incremental learning in step B3 can also be achieved by transfer incremental learning. In scenarios where different operating conditions are switched or the fluid medium changes, the key feature weights of the model under the old operating conditions are retained through the transfer learning mechanism, and the differential parameters are only locally updated when new operating condition data arrives.

[0066] In this embodiment of the application, step S3, based on the dynamically adjusted parameters of the ultrasonic flowmeter digital simulation model, utilizes the error injection module to conduct disturbance experiments on key error sources and generate a spatiotemporal database, including the following steps C1-C3: C1: Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the key error sources are subjected to disturbance experiments using the error injection module.

[0067] The engine for error evolution analysis is built on a calibrated digital simulation model. Its core process first uses the error injection module to conduct controlled perturbation experiments on key error sources in the simulation environment.

[0068] To address three typical errors—temperature drift, bubble interference, and abrupt changes in wall roughness—the system employs a parameter separation experimental design: for single-factor perturbations, parameters are set... in, Let be the temperature perturbation increment at the spatiotemporal point (x,t). This represents the amplitude of temperature oscillation. For the perturbation frequency, For spatial coordinates, The location of the heat source reference point or disturbance center. This represents the spatial decay length of the temperature disturbance.

[0069] Simulate the influence of periodic heat sources and injection frequency The range of 0.001-1Hz corresponds to the thermal inertia characteristics of industrial sites; multi-factor coupled disturbances are combined by arranging parameters according to a Latin square matrix, for example, simultaneously activating bubble swarms (diameter distribution d~N(1.5mm,0.3mm)) and turbulent wave packets (turbulence intensity I=5%~20%), and controlling the correlation by introducing a disturbance decoupling factor matrix. : Where i ∈ observation index, j ∈ error source, Error source Unit change causes observed index The relative rate of change.

[0070] The system automatically executes over 500 parameter combinations during a 72-hour simulation, capturing 200 full physics field snapshots per second (including velocity fields). Sound pressure field Temperature field And it is streamed to a distributed database through a high-speed data pipeline.

[0071] C2: Track error propagation paths through spatiotemporal data analysis and develop path optimization algorithms for computational optimization.

[0072] C3: Based on the tracking error propagation path, continuously capture system error response, record error response data, construct a dynamic graph of error propagation path, and generate a spatiotemporal database.

[0073] Visualization employs multiple encoding techniques to reveal the evolutionary mechanism: the spatial dimension reconstructs the three-dimensional error field through streamline drawing techniques, for example, using HSV color mapping (blue→red represents error influence of 0~100%) to render the sound pressure gradient field. The sound scattering shadow area caused by the bubble cloud is clearly displayed; the error accumulation process at the measurement point is shown using a dynamic heatmap in the time dimension. in, The cumulative propagation error at the measurement point, Let τ be the sound wave propagation time delay error deviation. Time is the integral variable.

[0074] An error propagation subgraph was generated, and a path topology graph generator was developed: the physical model is discretized into a weighted directed graph. Vertex set V = {grid nodes}, edge set E is modeled using Darcy flow probability: in, Let e ​​be the weight of edge e. Let e ​​be the pressure difference between the two ends of edge e. Let e ​​be the distance / length to the node connected by edge e. For cross-sectional area, It is proportional to the sign.

[0075] The system automatically identifies the K paths with the highest weights: in, For the k-th path with the maximum weight, To find the independent variable that maximizes a certain function, This is the sum of the edge weights along the selected path.

[0076] Transform the abstract error flow into a visualized energy transfer pipeline.

[0077] A specially designed condition monitoring channel captures the system response throughout its entire lifecycle—recording instantaneous velocity profile distortion in parallel as the vortex wave packet flows through the acoustic path. A correlation function with the acoustic time difference offset δ(Δt) is used to construct a dynamic map of the error propagation path. The framework outputs a three-dimensional spatiotemporal database containing timestamps, physical field snapshots, and error indicators in real time in HDF5 format, providing high-resolution input for subsequent source tracing.

[0078] In this embodiment of the application, the spatiotemporal correlation algorithm is used in step C2 to track the error propagation path through spatiotemporal data analysis: Error propagation path tracing is achieved through a spatiotemporal correlation algorithm, and the dynamic response function expression is: Where τ is the time lag and ξ is the spatial displacement vector. As an observation indicator, Let y be the mean. Let y be the variance; Fluid dynamics path (e.g., abrupt roughness change → boundary layer velocity distortion) → Sound wave propagation time difference δ(Δt)), sound wave propagation path (e.g., bubble oscillation → sound scattering phase shift) → Signal-to-noise ratio (SNR) decreases), thermal coupling path (e.g., ambient temperature gradient → pipe wall expansion and deformation) → Sound path angle deviation ); Develop a path optimization algorithm based on causal inference, and construct a Bayesian network between the error source and the measurement output y: in, For a given set of error parameters The conditional probability of the measured output y. For the error source parameter set, Error parameters Influence causal transition probability, for Influence on fluid velocity field The probability, For the fluid velocity vector field, Time delay of velocity field propagation to sound The transition probability, This is the time delay for sound wave propagation; The transition probability is calculated using information entropy, and its expression is: in, Error parameters Mutual information between the measured output y and the measurement output y. For joint probability, for Marginal probability, Let y be the marginal probability.

[0079] In an optional implementation, step C2, which involves tracking the error propagation path through spatiotemporal data analysis, can also employ a dynamic time warping algorithm. In scenarios where there is a nonlinear time delay in the error propagation process, the algorithm calculates the minimum cumulative distance between different time series, aligns the error evolution trajectory in the time dimension, and thus identifies the synchronous propagation path of temperature disturbances or acoustic wave phase changes.

[0080] In another optional implementation, step C2, which involves tracking the error propagation path through spatiotemporal data analysis, can also employ the principal component dynamic decomposition method. In scenarios where the error is continuously distributed in the spatial dimension and exhibits strong temporal regularity, the main dynamic modes can be extracted by decomposing the time-series snapshot matrix, and the energy contribution and propagation direction corresponding to different modes can be analyzed to achieve the identification and visualization of the main error path.

[0081] It should be noted that high-dimensional spatiotemporal data were systematically generated through controlled perturbation experiments, and a dynamic propagation path map from the error source to the measurement output was constructed by using spatiotemporal correlation algorithms and causal inference models. The complex error propagation process was transformed into a quantifiable network topology, and a causal propagation mechanism of error under multi-physics coupling was established through Bayesian networks and information entropy calculation.

[0082] In this embodiment of the application, step S4 involves establishing a machine learning model, inputting the generated spatiotemporal database and collaborative correction data into the machine learning model, analyzing and outputting the root causes of the errors, including the following steps D1-D3: D1: Input the generated spatiotemporal database and co-correction data into the machine learning model to construct a dynamic graph of the physical state.

[0083] Using spatiotemporal databases and collaborative correction data as inputs, a dynamic diagram of physical state is constructed. : Node set Contains N entities, One sensor node, Features of individual fluid mesh center points and key error injection points (such as bubble cluster centroids): in, For the velocity vector, This is the sound pressure level. For residuals, type identifier Distinguish between physical entity categories, Let be the feature vector of the i-th node at time t. For position The velocity vector at that point For position The temperature at that location This is the sound pressure level. For the local residual, This is a one-hot encoding, representing the node type.

[0084] Adjacency Matrix Defined through physical field coupling mechanism: in, The physical characteristic attenuation length, The sound attenuation coefficient is... For temperature gradient, Let be the edge weight between nodes ij. Let be the Euclidean distance between nodes i and j. The physical characteristic attenuation length, As the unit vector in the mainstream direction, The sound attenuation coefficient is... It is the sigmoid activation function. For hot link weight parameters, Let represent the temperature gradient between nodes i and j.

[0085] D2: Analyze and output the root causes of errors through machine learning models.

[0086] In this embodiment of the application, step D2 uses a spatiotemporal graph convolutional network to analyze the root cause of the error and output the results. A spatiotemporal graph convolutional network (ST-GCN) is used in conjunction with a Bayesian attention mechanism.

[0087] Spatial convolutional layers perform message passing: in, For a message sent from node j at level l to node i, For the l-th layer multilayer perceptron, Let i be the hidden state of node i at level l. For elements of the adjacency matrix, Let j be the hidden state of node j at level l. Let l be the learnable weight matrix of the l-th layer. It is a non-linear activation function. This represents the attention weight.

[0088] Attention weight Calculated through physical sensing mechanisms: in, To constrain spatial correlation, The spatial penalty factor is derived from path topology graph optimization. Let i be the query vector for node i. Let be the key vector of node j. The feature dimension, This is the space penalty function.

[0089] Causal temporal convolutional layers employ dilated convolution: in, Let be the output of node i at time t. The weights of the τth time convolution kernel are... The length of the temporal convolution kernel. This refers to the expansion factor. The hierarchy grows exponentially to capture long-term dependencies, ensuring that the output at time t depends only on historical data.

[0090] Bayesian attribution decoder: Define the probability of causal relationship: in, The probability that a certain causal relationship exists. It is the Sigmoid activation function. For learnable weight vectors, The hidden features of the cause node, These are the hidden features of the result nodes.

[0091] The final root cause confidence score is calculated using variational inference: in, For nodes The confidence level for the root cause. For approximate posterior Expectations This is a probabilistic model for predicting errors given the root cause node states and graph structure. For nodes Hidden features, It is a dynamic graph structure. Let KL divergence be the posterior and prior divergence. These are approximate posterior distribution parameters. It is a priori distribution and is subject to physical constraints of the path topology graph.

[0092] Where the prior distribution Physical constraints are provided by the path topology graph.

[0093] Attribution and Quantitative Output: The system performs two levels of analysis: Coarse-grained source tracing generates a dynamic attribution heatmap and calculates node-level influence factors. in, Let be the influence factor of the i-th node on the overall error. For systematic error observations, Let be the gradient of the system error with respect to the embedding features of node i. For nodes Attribution confidence for the root cause The sum of all attribution confidence scores.

[0094] Fine-grained attribution: For complex coupled scenarios (such as the combined effect of "bubbles + roughness"), solve counterfactual inferences: in, To represent the virtual graph after removing candidate root cause nodes, graph masking is used. In a total cause-effect graph The following error output results, These are candidate root cause nodes.

[0095] Error Quantitative Decomposition Formula: in, For nodes Quantitative contribution to error, The output of the system error under the change of graph structure. This is the system output derivative as the mixing parameters change.

[0096] In one alternative implementation, step D2 can also use a graph transformation network to analyze and output the root cause of the error through a machine learning model. In scenarios where the acoustic field disturbance and the fluid temperature field are coupled over a long distance, a self-attention mechanism can be used to achieve global feature interaction. The physical coupling weight matrix can be used as an attention mask to guide the model to focus on the main physical path and achieve global correlation analysis of the error source.

[0097] In another optional implementation, step D2 can also use a physical information neural network to analyze and output the root cause of the error through a machine learning model. In scenarios where the flow field characteristics can be described by partial differential equations, variables such as flow velocity, sound pressure, and temperature are input into the network. Combined with the control equation to constrain the loss function, the learning process satisfies the physical conservation law, thereby extracting the physical root cause of the error.

[0098] In summary, this invention constructs a digital twin model of an ultrasonic flowmeter that incorporates multi-physics coupling, including fluid dynamics, acoustics, and thermodynamics. This model realistically reproduces the flowmeter's operating state under actual conditions, enabling flexible injection and control of multiple types and sources of measurement errors. Through real-virtual collaborative parameter correction and graph neural network-driven data analysis, the accuracy of error identification and root cause tracing are effectively improved, allowing for intuitive tracking and visualization of error propagation paths. This method overcomes the limitations of traditional error analysis models, such as poor adaptability to complex operating conditions and low parameter adjustment efficiency.

[0099] Example 3: To verify the beneficial effects of the present invention, the following simulation experiment was conducted.

[0100] This invention integrates ANSYS Fluent for fluid dynamics simulation and COMSOL Multiphysics for acoustic and thermal field simulation in ultrasonic flowmeter error analysis. All 3D structural modeling was completed on the SolidWorks platform. After model building, a multiphysics co-simulation interface (e.g., MPCCI coupler) is used to achieve real-time data and status sharing. The experiment, taking the influence of different inner wall roughness on flowmeter measurement error as an example, details the steps as follows: First, a 3D structural model was built in SolidWorks based on the actual flowmeter engineering drawings, and the fluid field distribution under different internal wall roughness conditions (Ra=0 μm, Ra=20 μm, Ra=50 μm) was simulated using ANSYS Fluent. Simultaneously, COMSOL Multiphysics was used to simulate the ultrasonic wave propagation path and velocity variations, temperature distribution, and other key parameters such as the ultrasonic wave's time of flight were calculated. In all simulation conditions, the temperature was uniformly set to 25℃, and other possible interference factors (such as bubbles, sensor position offset, etc.) were set to zero to highlight the effect of roughness.

[0101] After simulation, the device was installed on a calibration test platform, and the inner wall roughness level was set to match the simulation. Multi-channel echo flight time and final flow measurement results were collected at a standard flow rate (10.00 m³ / h). During the experiment, the measured data were compared with the corresponding operating condition data obtained from the simulation. The parameter correction interface built into the digital twin model was used to correct mismatched parameters, iteratively optimizing the model accuracy. Finally, using Bayesian networks and graph neural network tools, in-depth attribution analysis was conducted on the contribution rate, error propagation path, and root cause confidence of different error sources.

[0102] Table 1 Experimental Conditions and Parameter Settings

[0103] Table 2 Actual Data Acquired by Flow Meter

[0104] Table 3 Simulation Measurement Results Data Table

[0105] Table 4. Partial Data Table of Error Propagation and Attribution Analysis

[0106] Analysis of experimental results: A multiphysics digital twin model constructed using SolidWorks, ANSYS Fluent, and COMSOL Multiphysics can faithfully reproduce the flow and acoustic characteristics of ultrasonic flowmeters under different internal wall roughness conditions. The simulated flow rate and echo time are highly consistent with the measured values, with a maximum error of only 0.2%, fully validating the model's effectiveness. Attribution analysis results show that the contribution rate of roughness to the error increases significantly linearly with its value, becoming the dominant influencing factor under high roughness conditions. Meanwhile, because the simulation precisely controls parameters such as temperature and installation deviations, their influence remains below 0.1%. Experiments also revealed that the parameter correction interface of the digital twin model can automatically track error residuals and dynamically adjust simulation parameters, continuously improving model accuracy. Furthermore, through causal and quantitative analysis using Bayesian networks and graph neural networks, the error propagation path becomes more intuitive, and the root cause attribution results provide theoretical support for subsequent flowmeter structure optimization (such as reducing internal wall roughness and improving installation processes) and the development of intelligent compensation algorithms. Overall, the simulation modeling and analysis method proposed in this invention takes into account both physical accuracy and data intelligence, and has strong practical engineering promotion and application value.

[0107] Example 4 illustrates a schematic scheme for analyzing the measurement error and causes of an ultrasonic flow meter. It should be noted that the technical solution of this ultrasonic flow meter measurement error and cause analysis system belongs to the same concept as the technical solution of the ultrasonic flow meter measurement error and cause analysis method described above. Details not described in detail in this embodiment can be found in the description of the ultrasonic flow meter measurement error and cause analysis method described above.

[0108] This embodiment also provides a system for analyzing the measurement error and causes of ultrasonic flow meters, including: The model building module constructs a digital simulation model of the ultrasonic flow meter based on the actual flow meter structure, and introduces an error injection module into the digital simulation model of the ultrasonic flow meter. The collaborative calibration and model optimization module, based on the constructed ultrasonic flow meter digital simulation model, collects actual flow meter data in real time, uses collaborative sampling and calibration of actual flow meter data and virtual simulation data, and dynamically adjusts the parameters of the ultrasonic flow meter digital simulation model through optimization algorithms; The path analysis module, based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, uses the error injection module to conduct disturbance experiments on key error sources and generate a spatiotemporal database. The root cause analysis and output module establishes a machine learning model, inputs the generated spatiotemporal database and collaborative correction data into the machine learning model, analyzes the root causes of the errors, and outputs the results.

[0109] This embodiment also provides an electronic device suitable for analyzing the measurement errors and causes of ultrasonic flow meters, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for analyzing the measurement errors and causes of ultrasonic flow meters as proposed in the above embodiment.

[0110] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements a method for analyzing the measurement error and causes of an ultrasonic flow meter as proposed in the above embodiments.

[0111] The storage medium proposed in this embodiment and the method for analyzing the measurement error and causes of an ultrasonic flow meter proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0112] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0113] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for analyzing measurement errors and their causes in an ultrasonic flow meter, characterized in that, include: Based on the actual flow meter structure, a digital simulation model of the ultrasonic flow meter is constructed, and an error injection module is introduced into the digital simulation model of the ultrasonic flow meter. Based on the constructed ultrasonic flow meter digital simulation model, real-time data from the actual flow meter is collected. The actual flow meter data and virtual simulation data are sampled and corrected collaboratively. The parameters of the ultrasonic flow meter digital simulation model are dynamically adjusted through optimization algorithms. Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the error injection module is used to conduct disturbance experiments on key error sources and generate a spatiotemporal database. A machine learning model is established, and the generated spatiotemporal database and collaborative correction data are input into the machine learning model to analyze and output the root causes of the errors.

2. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 1, characterized in that, The process involves constructing a digital simulation model of the ultrasonic flowmeter based on the actual flowmeter structure, and introducing an error injection module into the ultrasonic flowmeter digital simulation model, including: Based on the actual flow meter structure, a full three-dimensional digital twin is constructed, and adjustable error parameters are introduced; Based on a full three-dimensional digital twin, the model is verified in stages to ensure that the prediction deviation is within the preset range across all operating conditions, thus completing the establishment of the digital simulation model of the ultrasonic flow meter. An error injection module is introduced into the digital simulation model of the ultrasonic flow meter.

3. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 2, characterized in that, The constructed ultrasonic flowmeter digital simulation model acquires real-time actual flowmeter data, employs collaborative sampling and correction of actual flowmeter data and virtual simulation data, and dynamically adjusts the parameters of the ultrasonic flowmeter digital simulation model through optimization algorithms, including: Based on the constructed digital simulation model of the ultrasonic flow meter, the actual flow meter data is collected in real time by deploying an acquisition system on a physical flow sampler; The objective function of the optimization algorithm is constructed by using collaborative sampling and calibration of actual flow meter data and virtual simulation data. Based on the objective function of the optimization algorithm, the digital simulation model of the ultrasonic flow meter is self-corrected through incremental learning.

4. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 3, characterized in that, The ultrasonic flowmeter digital simulation model based on dynamically adjusted parameters uses an error injection module to conduct disturbance experiments on key error sources, generating a spatiotemporal database, including: Based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, the key error sources are subjected to disturbance experiments using the error injection module. By analyzing spatiotemporal data, we trace the error propagation path and develop path optimization algorithms for computational optimization. Based on the tracked error propagation path, the system error response is continuously captured, error response data is recorded, and a dynamic graph of the error propagation path is constructed to generate a spatiotemporal database.

5. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 4, characterized in that, The method of collaborative sampling and correction using actual flow meter data and virtual simulation data to construct an optimization algorithm objective function includes: The adaptive optimization algorithm aims to minimize the residuals of virtual and real observations. The objective function is: in, Let be the parameter vector to be optimized. This represents the simulated value at the i-th observation point. To correspond to the measured values, The weighting factors are assigned based on the sensor's accuracy. λ is the regularization term, and λ is the penalty coefficient.

6. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 5, characterized in that, The self-correction of the ultrasonic flowmeter digital simulation model based on the objective function of the optimization algorithm through incremental learning includes: The collaborative approximation process achieves model self-correction through online incremental learning. It receives real-world data packets every 5 seconds and performs virtual-real state alignment to verify the residual norm, expressed as: in, Let be the error vector between the simulation model and the measured results at time t. Let L2 norm be the error vector. For parameters The objective function for the variable is... This is the set of model parameters.

7. The method for analyzing measurement errors and causes of ultrasonic flowmeters as described in claim 6, characterized in that, The step of tracing the error propagation path through spatiotemporal data analysis and developing a path optimization algorithm for computational optimization includes: Error propagation path tracing is achieved through a spatiotemporal correlation algorithm, and the dynamic response function expression is: Where τ is the time lag and ξ is the spatial displacement vector. As an observation indicator, Let y be the mean. Let y be the variance; The system tracks three typical paths: the fluid dynamics path, the sound wave propagation path, and the thermo-coupling path. Develop a path optimization algorithm based on causal inference, and construct a Bayesian network between the error source and the measurement output y: in, For a given set of error parameters The conditional probability of the measured output y. For the error source parameter set, Error parameters Influence causal transition probability, for Influence on fluid velocity field The probability, For the fluid velocity vector field, Time delay of velocity field propagation to sound The transition probability, This is the time delay for sound wave propagation; The transition probability is calculated using information entropy, and its expression is: in, Error parameters Mutual information between the measured output y and the measurement output y. For joint probability, for Marginal probability, Let y be the marginal probability.

8. A system for analyzing measurement errors and causes of ultrasonic flow meters, using the method described in any one of claims 1-7, characterized in that, include: The model building module constructs a digital simulation model of the ultrasonic flow meter based on the actual flow meter structure, and introduces an error injection module into the digital simulation model of the ultrasonic flow meter. The collaborative calibration and model optimization module, based on the constructed ultrasonic flow meter digital simulation model, collects actual flow meter data in real time, uses collaborative sampling and calibration of actual flow meter data and virtual simulation data, and dynamically adjusts the parameters of the ultrasonic flow meter digital simulation model through optimization algorithms; The path analysis module, based on the digital simulation model of the ultrasonic flow meter with dynamically adjusted parameters, uses the error injection module to conduct disturbance experiments on key error sources and generate a spatiotemporal database. The root cause analysis and output module establishes a machine learning model, inputs the generated spatiotemporal database and collaborative correction data into the machine learning model, analyzes the root causes of the errors, and outputs the results.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.