Ultrasonic flowmeter health assessment method based on mahalanobis distance and bayesian smoothing
By combining fluid dynamics and acoustic mechanisms to extract features and using Mahalanobis distance and Bayesian smoothing, the health assessment problem of ultrasonic flowmeters under harsh operating conditions was solved, enabling accurate fault tracing and reducing false alarms, thus improving the accuracy and reliability of the assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA JILIANG UNIV
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-23
AI Technical Summary
Existing ultrasonic flow meters are prone to aging and scaling under harsh operating conditions, resulting in decreased measurement accuracy. Furthermore, existing health assessment methods lack physical interpretation, ignore nonlinear coupling relationships, and have poor noise immunity, leading to frequent false alarms and poor maintenance guidance.
A method based on Mahalanobis distance and Bayesian smoothing is adopted, which combines fluid dynamics and acoustic mechanisms to extract common mode difference features and mechanism residual features. The degree of nonlinear coupling degradation is quantified by Mahalanobis distance, and a Bayesian information fusion model is introduced for smoothing update, outputting posterior health index and confidence level.
It enables accurate health assessment of ultrasonic flow meters, traces the cause of failure, improves the accuracy of early sub-health state identification, reduces false alarm rate, and ensures the robustness and reliability of assessment.
Smart Images

Figure CN122258993A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a health assessment method for ultrasonic flow meters based on Mahalanobis distance and Bayesian smoothing, belonging to the field of online monitoring technology for the operating status of industrial measuring instruments. Background Technology
[0002] Ultrasonic flow meters are widely used in industrial process control in petroleum, chemical, and water supply industries. Due to prolonged operation under harsh conditions, their internal acoustic probes are prone to aging and scaling. Combined with changes in the fluid medium, this often leads to decreased measurement accuracy or even equipment failure. Therefore, real-time online health assessment (PHM) of ultrasonic flow meters is of significant engineering importance.
[0003] Furthermore, existing ultrasonic flowmeter health assessment methods may have the following drawbacks: 1. Lack of physical interpretability in feature extraction. Existing technologies often employ deep learning models (such as variational autoencoders, VAEs, or neural networks) for end-to-end black-box feature extraction. When an alarm occurs, on-site personnel cannot trace the specific physical cause of the fault from the black-box model, resulting in poor maintenance guidance. 2. Ignoring the nonlinear coupling relationship between multidimensional variables. Traditional threshold alarm methods or assessment methods based on Euclidean distance assume that each monitored variable is independent. However, in actual physical laws, the parameters of the flowmeter are highly coupled, and traditional methods are prone to missing deep-seated, hidden faults that violate multivariate coupling. 3. Poor noise resistance, easily generating false alarms. Industrial sites frequently experience fluid bubbles, pressure shocks, and electromagnetic interference. Existing health index calculation methods usually rely directly on transient data at the current moment, lacking a smoothing mechanism for historical evolution trends, leading to frequent jumps in the health index and an extremely high false alarm rate, greatly reducing the engineering availability of the system. Summary of the Invention
[0004] This invention relates to a health assessment method for ultrasonic flow meters based on Mahalanobis distance and Bayesian smoothing.
[0005] The specific technical solution adopted in this invention is as follows:
[0006] S1. Obtain real-time multi-dimensional operating status data of the ultrasonic flow meter to be evaluated. The operating status data includes dual-channel sound velocity, linear flow velocity, hardware gain, uplink and downlink time difference, and fluid temperature and pressure data.
[0007] S2. Based on the operating status data, and combined with the fluid dynamics and acoustic mechanism models, extract the common mode difference features and mechanism residual features to construct a high-dimensional feature vector for the current moment.
[0008] S3. Obtain the baseline mean vector and covariance inverse matrix pre-established during the device health baseline period, and calculate the squared Mahalanobis distance between the current high-dimensional feature vector and the baseline mean vector to quantify the degree of nonlinear coupling degradation between multidimensional features.
[0009] S4. The squared Mahalanobis distance is mapped to the original health index through a negative exponential function, and a Bayesian information fusion model is introduced to combine the historical health prior variance and the current observation noise variance to smoothly update the original health index and output a posterior smoothed health index containing confidence.
[0010] S5. Based on the posterior smoothed health index, the health status level of the ultrasonic flow meter is adaptively classified, and when the condition is determined to be deteriorated, the dominant abnormal factor is extracted by calculating the standardized deviation of each dimension feature to achieve accurate source tracing of equipment failure.
[0011] The advantages and positive effects of this invention are as follows:
[0012] (1) This invention abandons the pure data-driven black box model and innovatively combines acoustic physical mechanisms to extract "common mode differential features" and "mechanism residual features". This gray box modeling method not only effectively cancels common mode interference such as ambient temperature, but also uses standardized deviation (Z-Score) to achieve accurate positioning of abnormal features, so that every status alarm can be traced back to the specific physical cause.
[0013] (2) This invention uses Mahalanobis distance instead of traditional Euclidean distance or single threshold determination, incorporating the nonlinear correlation between features into the calculation system. It can keenly capture and amplify minute degradation features that violate the correlation law of fluid mechanics, thereby improving the identification accuracy of early sub-health states.
[0014] (3) For industrial environments with high noise levels, this invention incorporates a Bayesian information fusion model after the health mapping stage. By dynamically balancing "historical health priors" and "current observation likelihood," the system can intelligently filter transient false alarms caused by the external environment, ensuring the robustness of the evaluation curve. Simultaneously, the output uncertainty (confidence) index provides a rigorous statistical basis for on-site operation and maintenance decisions. Attached Figure Description
[0015] When considered in conjunction with the accompanying drawings, the invention will be better understood and its accompanying advantages readily apparent from the following detailed description. However, the accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are intended to explain the invention and do not constitute an undue limitation thereof.
[0016] Figure 1 This is a schematic diagram of the overall method flow of the present invention.
[0017] Figure 2 This is a schematic diagram of the feature extraction and offline baseline modeling process of the present invention.
[0018] Figure 3 This is a schematic diagram of the online evaluation and Bayesian smoothing process of this invention. Detailed Implementation
[0019] The present invention will be further illustrated below with reference to the accompanying drawings and embodiments. However, these embodiments are merely illustrative, and the scope of protection of the present invention is not limited to these embodiments.
[0020] The following is a detailed description of the data acquisition process of the present invention: In the actual operation of the ultrasonic flow meter, the underlying operating data of the flow meter is synchronously acquired by the data acquisition unit at a set sampling frequency. The data dimensions acquired include, but are not limited to: the sound velocity of each channel ( ), linear current velocity of each channel ( Hardware gain of received signal () ), the uplink and downlink propagation time difference of ultrasonic signals ( ), and the real-time temperature of the fluid in the pipeline ( ) and pressure ( The collected raw multidimensional time series data undergoes median filtering to remove extreme points and is timestamped to ensure the physical synchronization of all data at the same time point.
[0021] Combination Figure 2 The feature extraction process of this invention is described in detail: For common-mode differential features, this method calculates the sound velocity difference or gain difference between symmetrical channels (e.g., Under healthy conditions, this difference should approach a stable constant; when a probe in a certain channel experiences localized scaling or aging, this difference will deviate significantly, thus effectively filtering out background interference caused by ambient temperature and pressure; for the mechanistic residual characteristics, this method introduces a state equation (such as the AGA8 / AGA10 standard) and utilizes real-time measured temperature... and pressure Calculate the theoretical speed of sound under the current operating conditions. Compare this with the actual measured physical speed of sound. Compare and calculate the residuals. The extracted common-mode difference features, mechanistic residual features, and standardized original sensitive parameters (such as time difference jitter rate) are concatenated to form a high-dimensional feature vector for the current moment. .
[0022] Combination Figure 2 Figure 3The nonlinear coupled degradation quantization based on Mahalanobis distance of the present invention is described in detail as follows: The system collects a large number of feature samples in advance during the "absolute health period" (baseline period) at the beginning of equipment operation, and calculates the baseline mean vector. The inverse matrix of the characteristic covariance matrix And store it locally or in a cloud-based model library. Obtain the high-dimensional feature vector at the current time step. The squared Mahalanobis distance is calculated using the following formula ( )
[0023] Combination Figure 3 The Bayesian health state smoothing and confidence update of the method of the present invention are described in detail below: The original health index is mapped to a range of 0 to 1 using a negative exponential function: ,in This is the sensitivity adjustment coefficient. The posterior health state from the previous time step is obtained as the prior expectation for the current time step, and the evolutionary variance of the state transition is set. The currently calculated... The observation likelihood is considered to have observation noise, and the dynamic variance of the current observation noise is calculated based on a recent data window. Using Bayesian filtering, the optimal Kalman gain (i.e., weighting factor) is dynamically calculated, fusing the "historical prior" and "current observation" to calculate the posterior smoothness health index at the current time. The Yesian update process synchronously outputs the uncertainty (i.e., posterior variance) of this health state estimate. If this variance is extremely large, it indicates that the system is currently in a period of strong noise and drastic fluctuations, and the system reduces its uncertainty regarding the current health state. The confidence level effectively suppresses false alarms.
[0024] During implementation, an adaptive threshold band needs to be set. Input threshold determination. When the system determines that a device has entered a "sub-healthy" or "faulty" state, the source tracing mechanism is triggered. This involves analyzing the current feature vector. Each dimension in The standardized deviation is calculated using the baseline parameters: Finally find The feature with the largest value is used as the dominant anomaly factor and the system outputs a judgment.
[0025] The above examples are only for the purpose of helping to understand the core idea of the present invention; at the same time, those skilled in the art will know that there will be changes in the specific implementation methods and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A health assessment method for ultrasonic flowmeters based on Mahalanobis distance and Bayesian smoothing, characterized in that, Includes the following steps: S1. Obtain real-time multi-dimensional operating status data of the ultrasonic flow meter to be evaluated. The operating status data includes dual-channel sound velocity, linear velocity, hardware gain, uplink and downlink time difference, and fluid temperature and pressure data. S2. Based on the operating status data, and combined with fluid dynamics and acoustic mechanism models, extract common-mode differential features and mechanism residual features to construct a high-dimensional feature vector at the current moment. S3. Obtain the baseline mean vector and covariance inverse matrix pre-established during the equipment health baseline period, and calculate the squared Mahalanobis distance between the high-dimensional feature vector at the current moment and the baseline mean vector to quantify the degree of nonlinear coupling degradation between multi-dimensional features. S4. Map the squared Mahalanobis distance to the original health index using a negative exponential function, and introduce a Bayesian information fusion model to combine the historical health prior variance and the current observation noise variance to smoothly update the original health index, outputting a posterior smoothed health index containing confidence. S5. Based on the posterior smoothed health index, adaptively classify the health status level of the ultrasonic flowmeter, and when it is determined to be in a deteriorated state, extract the dominant abnormal factor by calculating the standardized deviation of each dimension feature to achieve accurate source tracing of equipment failure.
2. The method according to claim 1, characterized in that: The extraction of common-mode differential features and mechanism residual features in step S2 specifically includes: calculating the sound velocity difference and / or gain difference between the symmetrical channels of the ultrasonic flowmeter as the common-mode differential features to offset the common-mode interference caused by fluid temperature and pressure; using the fluid state equation and combining real-time measured fluid temperature and pressure data to calculate the theoretical sound velocity under the current operating conditions, and using the difference between the actual measured physical sound velocity and the theoretical sound velocity as the mechanism residual features.
3. The method according to claim 1, characterized in that, The specific process of step S4 includes: using the formula Map the squared Mahalanobis distance to a raw health index between 0 and 1. ,in This is the sensitivity adjustment coefficient. The posterior health status of the previous time step is used as the prior expectation of the current time step, and the original health index is... The current observation likelihood value, which includes observation noise, is used as the basis for calculation. A Bayesian filtering algorithm is employed to calculate the dynamic Kalman gain. This gain is then fused with the prior expectation and the current observation likelihood value to obtain the posterior smooth health index. Simultaneously, the posterior variance is calculated as a confidence index to filter transient false alarms.
4. The method according to claim 1, characterized in that, The specific formula for calculating the standardized deviation of each feature dimension in step S5 is as follows: .in, For the first Standardization bias of 3D features The th feature vector at the current time 3D eigenvalues This represents the baseline mean of this feature dimension. This represents the baseline standard deviation of this feature. The feature with the largest standardized deviation is selected as the dominant anomaly factor, and the physical fault tracing results are output.
5. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method as described in any one of claims 1 to 4.