CN117010297A - Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle - Google Patents

Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle Download PDF

Info

Publication number
CN117010297A
CN117010297A CN202310980407.4A CN202310980407A CN117010297A CN 117010297 A CN117010297 A CN 117010297A CN 202310980407 A CN202310980407 A CN 202310980407A CN 117010297 A CN117010297 A CN 117010297A
Authority
CN
China
Prior art keywords
measurement
electromagnetic flowmeter
flow
distribution
obs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310980407.4A
Other languages
Chinese (zh)
Inventor
吴银锋
于宁
冯仁剑
李庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202310980407.4A priority Critical patent/CN117010297A/en
Publication of CN117010297A publication Critical patent/CN117010297A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C60/00Computational materials science, i.e. ICT specially adapted for investigating the physical or chemical properties of materials or phenomena associated with their design, synthesis, processing, characterisation or utilisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/08Probabilistic or stochastic CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/26Composites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/08Thermal analysis or thermal optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Geometry (AREA)
  • Mathematical Optimization (AREA)
  • Fluid Mechanics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Measuring Volume Flow (AREA)

Abstract

An electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle comprises five steps: step one: determining the installation positions of the electromagnetic flowmeter and the pressure and temperature measuring device on the pipeline; step two: establishing a measurement model of the electromagnetic flowmeter; step three: determining a probability density function of the input quantity of the measurement model and prior information of flow measurement; step four: obtaining posterior distribution of the flow according to a Bayesian formula; step five: and sampling posterior distribution by adopting a Markov chain Monte Carlo method to obtain uncertainty information of the flow so as to finish uncertainty evaluation of the electromagnetic flowmeter. The invention adopts a measurement uncertainty evaluation method based on the Bayesian statistical principle to complete the uncertainty evaluation of the electromagnetic flowmeter measurement, and the method is based on the Bayesian statistical principle, can fully integrate prior information and current sample information of flow measurement, deduce posterior distribution and realize the uncertainty evaluation of the electromagnetic flowmeter measurement.

Description

Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle
Technical Field
The invention designs an electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle, and belongs to the field of electromagnetic flowmeters of flow measuring instruments.
Background
The electromagnetic flowmeter is an instrument for measuring the volume flow of conductive liquid, and consists of an electromagnetic flow sensor and an electromagnetic flow converter which are connected with a display, record, integrate, regulating instrument or a computer network to form a flow measuring system. The electromagnetic flowmeter has close relation with economic development, national defense construction and the like, has very wide application fields, such as petrochemical industry, hydropower, metallurgical pharmacy, textile printing and dyeing, papermaking, environmental protection, water conservancy, municipal administration and the like, and has increasingly outstanding importance of flow measurement quality in various fields.
Measurement uncertainty assessment guidelines (Guide to the Expression of Uncertainty in measurement, GUM), monte Carlo method (Monte Carlo Method, MCM) currently employed for electromagnetic flowmeters are problematic. For example, the use of the GUM method requires that the linear mathematical model and the input amount be independent of each other, and when these conditions are not satisfied, uncertainty provided by the GUM method may be unreliable. The Monte Carlo method is a tool, consistent with the general GUM method. The main difference is that the Monte Carlo method does not propagate uncertainty through a linearized model, but rather calculates an approximation of the output PDF by modeling the input PDF. The inclusion interval may be derived from the output number PDF without assuming that the output quantity PDF is gaussian, t-distributed or any other distribution. But for complex models it may take a slightly longer time to achieve higher quality results. Therefore, the electromagnetic flowmeter measurement uncertainty evaluation method based on the Bayesian statistical principle provided by the invention has very important significance for completing the uncertainty evaluation of the electromagnetic flowmeter flow measurement and improving the quality evaluation of the electromagnetic flowmeter measurement result.
Disclosure of Invention
The invention aims to provide an electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle, which accurately and reasonably completes the electromagnetic flowmeter uncertainty evaluation, and specifically comprises the following steps:
step 1: according to the installation requirement, installing an electromagnetic flowmeter (1) on the pipeline for measuring the volume flow of the fluid in the pipeline; on the premise of not affecting the measurement precision of the electromagnetic flowmeter, a pressure measuring device (2) and a temperature measuring device (3) are arranged at the upstream or downstream of the pipeline to measure parameters such as the diameter of the pipeline, the temperature of the fluid, the pressure, the time and the like.
Step 2: and (3) taking the temperature, the pressure and the pipeline diameter as input quantities, and establishing an electromagnetic flowmeter measurement model of the fluid flow.
Step 3: and determining a probability density function of the input quantity of the electromagnetic flowmeter measurement model by measuring the sample value, and taking historical measurement data of the electromagnetic flowmeter as prior information of the flow value.
Step 4: and fusing prior information of the flow and measurement information such as temperature, pressure, pipeline diameter and the like according to a Bayesian formula to obtain posterior distribution of the flow.
Step 5: the posterior distribution is sampled by adopting a Markov chain Monte Carlo method (MCMC method), and a sample set of the posterior distribution is obtained by adopting a numerical calculation mode. The sample set of posterior distributions contains uncertainty information for the flow: the best estimate, standard uncertainty, and confidence interval with specific probability are included, namely the uncertainty evaluation of the electromagnetic flowmeter is completed.
The measurement model in the step 2 can be described as:
the model sets the volume flow Q, the fluid temperature T and the pipeline pressure P, Q in the pipeline obs Is the flow value and the measurement repeatability Q which are obtained by measuring an electromagnetic flowmeter rep To be connected. Wherein K is 1 And K 2 Is a coefficient, can be measured from calibration data, T 1 ,T 0 Respectively when measuringThe etching temperature and the prescribed room temperature, C is the temperature constant, and is determined by the resistance material; p (P) 2 ,P 1 The pressure values measured by the two pressure measuring devices are respectively. Measurement repeatabilityThe standard deviation of the flow of the pipeline is estimated by repeated measurement, and n is the measurement times.
The Bayesian formula in the step 4 is as follows:
π(Q,θ|q obs )∝l(q obs |Q,θ)π(Q)π(θ)
wherein pi (Q, θ|q) obs ) For the joint posterior distribution of flow values, l (q obs I Q, θ) is a likelihood function of the flow measurement data, pi (Q) is a priori distribution determined by flow a priori information, pi (θ) is a joint distribution of θ. θ= (T, P, v) D ) Flow observation q obs Obtained from a measurement model, the expression is
q obs =h(θ,Q)+ξ+Q rep
Wherein the error term of the normal distribution of the observed value
The specific steps of the MCMC method in the step 5 are as follows:
1) Input state transition matrix P, smooth distribution pi (Q, θ|q obs ) Setting a state transition frequency threshold as TH and the number of samples as n;
2) Obtaining initial state value x from simple probability distribution sampling 0
3) A smoothly distributed sample set is obtained using the for loop:
fort=0to TH+n-1
a) From a conditional probability distribution Q (x|x t ) Mid-sampling to obtain sample x *
b) Sampling u from uniform distribution
c) If u < alpha (x) t ,x * ) Then accept the transfer, i.e. x t+1 =x * The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, no transfer is accepted, i.e. x t+1 =x t
Sample set (x) TH ,x TH+1 ,...,x TH+n-1 ) I.e. a stationary distribution pi (Q, θ|q) obs ) A corresponding sample set.
In the step 5, the method consists of smoothly distributing pi (Q, theta|q obs ) Calculating the corresponding sample set to obtain the optimal estimated value mu and standard uncertaintyAnd confidence intervals with a specific probability, etc. The calculation formula of the best estimation value and the standard uncertainty is as follows:
confidence interval of specific probability isWherein k is an inclusion factor, and is obtained by querying a distribution table according to the confidence probability and the degree of freedom.
The invention has the advantages that:
1) The invention provides an electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle, which is not limited by a linear model when a measurement model of an electromagnetic flowmeter is established, and can consider more complex and diversified electromagnetic flowmeter measurement uncertainty sources;
2) The invention provides an electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle, wherein the introduced prior information can define the range of flow values, and the uncertainty evaluation result can be more accurate by fusing the prior information of the flow with the current sample information.
Drawings
FIG. 1 is a flow chart of an electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle;
FIG. 2 is a flow chart of the steps of the MCMC method of the present invention;
fig. 3 is a schematic diagram of the pipe installation position of the electromagnetic flowmeter, the pressure testing device and the temperature testing device in the invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, a flow chart of the present invention is shown, and specific steps of the method of the present invention corresponding to the flow chart are as follows:
step 1: according to the installation requirement, installing an electromagnetic flowmeter (1) on the pipeline for measuring the volume flow of the fluid in the pipeline; on the premise of not affecting the measurement precision of the electromagnetic flowmeter, a pressure measuring device (2) and a temperature measuring device (3) are arranged at the upstream or downstream of the pipeline to measure parameters such as the diameter of the pipeline, the temperature of the fluid, the pressure, the time and the like.
Step 2: and (3) taking the temperature, the pressure and the pipeline diameter as input quantities, and establishing an electromagnetic flowmeter measurement model of the fluid flow.
Step 3: and determining a probability density function of the input quantity of the electromagnetic flowmeter measurement model by measuring the sample value, and taking historical measurement data of the electromagnetic flowmeter as prior information of the flow value.
Step 4: and fusing prior information of the flow and measurement information such as temperature, pressure, pipeline diameter and the like according to a Bayesian formula to obtain posterior distribution of the flow.
Step 5: the posterior distribution is sampled by adopting a Markov chain Monte Carlo method (MCMC method), and a sample set of the posterior distribution is obtained by adopting a numerical calculation mode. The sample set of posterior distributions contains uncertainty information for the flow: the best estimate, standard uncertainty, and confidence interval with specific probability are included, namely the uncertainty evaluation of the electromagnetic flowmeter is completed.
The measurement model in the step 2 can be described as:
the model sets the volume flow Q, the fluid temperature T and the pipeline pressure P, Q in the pipeline obs Is the flow value and the measurement repeatability Q which are obtained by measuring an electromagnetic flowmeter rep To be connected. Wherein K is 1 And K 2 Is a coefficient, can be measured from calibration data, T 1 ,T 0 The temperature at the measurement time and the specified room temperature are respectively, and C is a temperature constant and is determined by a resistance material; p (P) 2 ,P 1 The pressure values measured by the two pressure measuring devices are respectively. Measurement repeatabilityThe standard deviation of the flow of the pipeline is estimated by repeated measurement, and n is the measurement times.
The Bayesian formula in the step 4 is as follows:
π(Q,θ|q obs )∝l(q obs |Q,θ)π(Q)π(θ)
wherein pi (Q, θ|q) obs ) For the joint posterior distribution of flow values, l (q obs I Q, θ) is a likelihood function of the flow measurement data, pi (Q) is a priori distribution determined by flow a priori information, pi (θ) is a joint distribution of θ. θ= (T, P, v) D ) Flow observation q obs Obtained from a measurement model, the expression is
q obs =h(θ,Q)+ξ+Q rep
Wherein the error term of the normal distribution of the observed value
The specific steps of the MCMC method in the step 5 are as follows:
1) Input state transition matrix P, smooth distribution pi (Q, θ|q obs ) Setting a state transition frequency threshold as TH and the number of samples as n;
2) Obtaining initial state value x from simple probability distribution sampling 0
3) A smoothly distributed sample set is obtained using the for loop:
fort=0 to TH+n-1
a) From a conditional probability distribution Q (x|x t ) Mid-sampling to obtain sample x *
b) Sampling u from uniform distribution
c) If u < alpha (x) t ,x * ) Then accept the transfer, i.e. x t+1 =x * The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, no transfer is accepted, i.e. x t+1 =x t
Sample set (x) TH ,x TH+1 ,...,x TH+n-1 ) I.e. a stationary distribution pi (Q, θ|q) obs ) A corresponding sample set.
In the step 5, the method consists of smoothly distributing pi (Q, theta|q obs ) Calculating the corresponding sample set to obtain the optimal estimated value mu and standard uncertaintyAnd confidence intervals with a specific probability, etc. The calculation formula of the best estimation value and the standard uncertainty is as follows:
confidence interval of specific probability isWherein k is an inclusion factor, and is obtained by querying a distribution table according to the confidence probability and the degree of freedom.
As shown in fig. 2, a flow chart of the steps of the MCMC method of the present invention is shown.
Fig. 3 shows a schematic view of the piping installation of the electromagnetic flowmeter (1), the pressure measuring device (2) and the temperature measuring device (3). The temperature measuring device and the pressure measuring device are arranged at the upstream and downstream positions of the electromagnetic flowmeter and are used for measuring the temperature and the pressure at the positions nearby the electromagnetic flowmeter.

Claims (5)

1. An electromagnetic flowmeter measurement uncertainty evaluation method based on a Bayesian statistical principle is characterized by comprising the following steps of: the method specifically comprises the following steps:
step 1: according to the installation requirement, installing an electromagnetic flowmeter (1) on the pipeline for measuring the volume flow of the fluid in the pipeline; on the premise of not affecting the measurement precision of the electromagnetic flowmeter, a pressure measuring device (2) and a temperature measuring device (3) are arranged at the upstream or downstream of the pipeline to measure parameters such as the diameter of the pipeline, the temperature of the fluid, the pressure, the time and the like.
Step 2: and (3) taking the temperature, the pressure and the pipeline diameter as input quantities, and establishing an electromagnetic flowmeter measurement model of the fluid flow.
Step 3: and determining a probability density function of the input quantity of the electromagnetic flowmeter measurement model by measuring the sample value, and taking historical measurement data of the electromagnetic flowmeter as prior information of the flow value.
Step 4: and fusing prior information of the flow and measurement information such as temperature, pressure, pipeline diameter and the like according to a Bayesian formula to obtain posterior distribution of the flow.
Step 5: the posterior distribution is sampled by adopting a Markov chain Monte Carlo method (MCMC method), and a sample set of the posterior distribution is obtained by adopting a numerical calculation mode. The sample set of posterior distributions contains uncertainty information for the flow: the best estimate, standard uncertainty, and confidence interval with specific probability are included, namely the uncertainty evaluation of the electromagnetic flowmeter is completed.
2. The electromagnetic flowmeter measurement uncertainty evaluation method based on the bayesian statistical principle according to claim 1, wherein the method comprises the following steps of: the measurement model in the step 2 can be described as:
the model sets the volume flow Q, the fluid temperature T and the pipeline pressure P, Q in the pipeline obs Is composed of electromagnetic flowmeterMeasured flow value and measurement repeatability Q rep To be connected. Wherein K is 1 And K 2 Is a coefficient, can be measured from calibration data, T 1 ,T 0 The temperature at the measurement time and the specified room temperature are respectively, and C is a temperature constant and is determined by a resistance material; p (P) 2 ,P 1 The pressure values measured by the two pressure measuring devices are respectively. Measurement repeatabilityThe standard deviation of the flow of the pipeline is estimated by repeated measurement, and n is the measurement times.
3. The electromagnetic flowmeter measurement uncertainty evaluation method based on the bayesian statistical principle according to claim 1, wherein the method comprises the following steps of: the Bayesian formula in the step 4 is as follows:
π(Q,θ|q obs )∝l(q obs |Q,θ)π(Q)π(θ)
wherein pi (Q, θ|q) obs ) For the joint posterior distribution of flow values, l (q obs I Q, θ) is a likelihood function of the flow measurement data, pi (Q) is a priori distribution determined by flow a priori information, pi (θ) is a joint distribution of θ. θ= (T, P, v) D ) Flow observation q obs Obtained from a measurement model, the expression is
q obs =h(θ,Q)+ξ+Q rep
Wherein the error term of the normal distribution of the observed value
4. The electromagnetic flowmeter measurement uncertainty evaluation method based on the bayesian statistical principle according to claim 1, wherein the method comprises the following steps of: the specific steps of the MCMC method in the step 5 are as follows:
1) Input state transition matrix P, smooth distribution pi (Q, θ|q obs ) Setting a state transition frequency threshold as TH and the number of samples as n;
2) From the slaveSampling the simple probability distribution to obtain an initial state value x 0
3) A smoothly distributed sample set is obtained using the for loop:
for t=0to TH+n-1
a) From a conditional probability distribution Q (x|x t ) Mid-sampling to obtain sample x *
b) Sampling u from uniform distribution
c) If u is<α(x t ,x * ) Then accept the transfer, i.e. x t+1 =x * The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, no transfer is accepted, i.e. x t+1 =x t
Sample set (x) TH ,x TH+1 ,...,x TH+n-1 ) I.e. a stationary distribution pi (Q, θ|q) obs ) A corresponding sample set.
5. The electromagnetic flowmeter measurement uncertainty evaluation method based on the bayesian statistical principle according to claim 1, wherein the method comprises the following steps of: in the step 5, the method consists of smoothly distributing pi (Q, theta|q obs ) Calculating the corresponding sample set to obtain the optimal estimated value mu and standard uncertaintyAnd confidence intervals with a specific probability, etc. The calculation formula of the best estimation value and the standard uncertainty is as follows:
confidence interval of specific probability isWherein k is an inclusion factor, and is obtained by querying a distribution table according to the confidence probability and the degree of freedom.
CN202310980407.4A 2023-08-07 2023-08-07 Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle Pending CN117010297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310980407.4A CN117010297A (en) 2023-08-07 2023-08-07 Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310980407.4A CN117010297A (en) 2023-08-07 2023-08-07 Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle

Publications (1)

Publication Number Publication Date
CN117010297A true CN117010297A (en) 2023-11-07

Family

ID=88561434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310980407.4A Pending CN117010297A (en) 2023-08-07 2023-08-07 Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle

Country Status (1)

Country Link
CN (1) CN117010297A (en)

Similar Documents

Publication Publication Date Title
CN110514390B (en) Three-hole pressure probe measurement two-dimensional flow field uncertainty evaluation method
Kim et al. Experimental and numerical analysis of heat transfer phenomena in a sensor tube of a mass flow controller
Carlander et al. Installation effects on an ultrasonic flow meter with implications for self diagnostics
Yazdanshenasshad et al. Neural-network-based error reduction in calibrating utility ultrasonic flow meters
Chen et al. Study on flow field and measurement characteristics of a small-bore ultrasonic gas flow meter
Chen et al. Flowrate estimation of horizontal gas–water slug flow based on venturi tube and conductance sensor
US6732596B2 (en) Critical gas flow measurement apparatus and method
Ficco et al. Field verification of thermal energy meters through ultrasonic clamp-on master meters
CN117010297A (en) Electromagnetic flowmeter measurement uncertainty evaluation method based on Bayesian statistical principle
CN105571661B (en) The computational methods of electromagnetic flowmeter instrument characteristic coefficient based on error of indication fitting
Straka et al. Segmental orifice plates and the emulation of the 90-bend
CN116698141A (en) Speed measurement error correction method and system for ultrasonic flowmeter under different working conditions
Chun et al. Diagnostic flow metering using ultrasound tomography
Adefila et al. Calibration of an averaging pitot tube for gaseous CO 2 flowmetering
CN116295733A (en) Method for predicting calibration coefficient of large-caliber pitot tube for liquid
CN114812707B (en) Metering method of ultrasonic meter
Liu et al. Novel liquid flow sensor based on differential pressure method
Carlander et al. Installation effects on an ultrasonic flow meter
Sârbu Modern water flowmeters: Differential pressure flowmeters
Mattingly The characterization of a piston displacement-type flowmeter calibration facility and the calibration and use of pulsed output type flowmeters
Branch The effects of an upstream short radius elbow and pressure tap location on orifice discharge coefficients
Zanker et al. Qualification of a flow conditioning device according to the new API 14.3 procedure
Douglas Field Flow Measurements for Pipe Installations With Non-Ideal Conditions
CN115684652B (en) Meter rectification effect analysis method
Shchelchkov et al. Technique of Transferring Fluid Mass and Volume Units in a Flow and of Mass and Volumetric Flow Rates of Fluid by Means of Indirect Measurements

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination