Next Article in Journal
Influence of Ice Fragments on the Scraping Effect of Rock–Ice Avalanches: Insights from Physical Model Experiments
Previous Article in Journal
A Comprehensive Approach to Bias Mitigation for Sentiment Analysis of Social Media Data
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimization of the Monte Carlo Simulation to Improve the Calibration Uncertainty of Volume Meters for Hydrocarbons Custody Transfer

by
Agustín García-Berrocal
1,
Cristina Montalvo
1,*,
Pablo Carmona
2 and
Raúl García-Álvarez
1
1
EXOLUM Chair in Metrology, Energy and Fuels Department, Universidad Politécnica de Madrid (UPM), Ríos Rosas 21, 28003 Madrid, Spain
2
EXOLUM Corporation S.A., Titán 13, 28045 Madrid, Spain
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(24), 11472; https://doi.org/10.3390/app142411472
Submission received: 18 October 2024 / Revised: 3 December 2024 / Accepted: 4 December 2024 / Published: 10 December 2024

Abstract

:
Since its publication by ISO in 1993, the GUM document has become the model to follow for the estimation of measurement uncertainty in the industry. However, the document itself recognizes its limitations in justifying the level of coverage. The calibration of volumetric meters for the custody transfer of liquid products can be affected by these limitations. The objective of this work is to calculate the calibration uncertainty of such meters by applying the Monte Carlo method of Supplement 1 of the GUM document (GUM-S1). In this way, the use of the classic GUM method is avoided. Therefore, the adaptive implementation of the Monte Carlo method (AMCM) has been applied to optimize the calibration uncertainty of a positive displacement meter against a standard tank in an ISO 17025 accredited volume laboratory. These meters are used for custody transfer in liquid hydrocarbon logistics where any reduction in the uncertainty estimation may have an important economic impact. Several innovations are proposed when applying AMCM; regulation of AMCM convergence by applying the Student’s t-distribution, validation of repeatability and filtering of outliers by performing 50 iterations of the AMCM, and characterization of the measurand’s Probability Density Function (PDF) which results in a Flatten–Gaussian. This work proves that the GUM method does not assign the correct PDF. The uncertainty estimation is reduced by 7.1% compared to the GUM method.

1. Introduction

The first edition of The Guide to the Expression of Uncertainty in Measurement (GUM) was published in 1993 by the Comité International des Poids et Mesures (CIPM) and the International Bureau of Weights and Measures (BIPM) as ISO/IEC Guide 98 [1] and since then it has been used as an industry standard for estimating measurement uncertainty. This method, also known as GUF (GUM Uncertainty Framework) is based on the law of propagation of uncertainty (LPU). Nevertheless, it has certain limitations when the model function is not linear and when the Probability Distribution Function (PDF) is not Gaussian.
It is common to use GUM to estimate the uncertainties of custody transfer meters (turbines and positive displacement meters) involved in large economic and fiscal transactions [2,3,4,5]. A reduction or increase in the uncertainty in this type of operation implies economic consequences, so the uncertainty evaluation should be performed as accurately as possible. Therefore, these inherent limitations of GUM do not allow a correct optimization of the calibration uncertainties of these meters, which has considerable importance from an economic as well as a legal point of view [6].
Hence, this work proposes to replace the classical GUM method of variance propagation by the propagation of PDF through the Monte Carlo method (MCM) [7,8]. The main strength of the MCM is that, to estimate the expanded uncertainty, it avoids using the central limit theorem and the application of Student’s t-distribution with certain effective degrees of freedom, whenever that theorem is not applicable.
The purpose of this paper is to address a key challenge for the petroleum industry: the implementation of the GUM-S1 scheme to improve the calibration of the measurement systems used to perform custody transfer. Currently, the uncertainties related to the API-MPMS regulation [9]—internationally accepted by the entire oil industry—are calculated by applying the classical GUM method. There is still a research gap regarding the application of the GUM-S1 scheme to overcome the limitations of the classical GUM method. There are no references in the literature to the application of the GUM-S1 scheme in relation to the measurement systems regulated by API-MPMS [9]. Therefore, a first application is presented for one of the most important cases: the calibration of a master meter against a standard proving tank. This case can be used as a reference for the calibration of a master meter against a bidirectional prover, and even for the calibration of the prover itself. In this way, the calibration of standard meters ensures the metrological traceability of all the logistics operator’s dynamic volume measurement systems.
There are different examples in the literature where the GUM method has been validated by MCM [10,11,12,13,14]. Examples of hydrocarbons metrology can also be found, though not many [2,3,4].
For this purpose, the GUM-S1 (Monte Carlo method (MCM)) scheme of Supplement 1 of the GUM document has been used as a starting point, and methodological innovations are proposed to optimize the application of the MCM, which can be useful beyond custody transfer meters. It must be kept in mind that the number of samples M in MCM is critical since different results could be obtained when repeating the simulation [15,16]. In fact, according to GUM-S1, there is no guarantee that a specific pre-assigned number will suffice. Specifically, inside the GUM-S1 scheme, the adaptive implementation of the MCM (AMCM) is chosen to optimize M. Examples of application of this method can be found in the literature [17,18,19,20].
In this work, the following innovations are proposed when applying AMCM in the calibration of a flow meter against a proving tank:
(a)
Regulation of AMCM convergence by applying the Student’s t-distribution coverage factors (with the possibility to select the confidence level).
(b)
Validation of repeatability and filtering of outliers by performing 50 iterations of the AMCM to ensure numerical stability of the results within the selected tolerance.
(c)
Characterization of the measurand’s PDF, combining skewness and kurtosis analysis of the AMCM results and performing normality contrasts of a sample of the measurand’s PDF.
These improvements are not only applicable in the case of custody transfer meters but can be useful in any of the AMCM applications.
To validate the efficacy of the proposed methodology, this scheme is applied to the calibration results of a Positive Displacement Meter (PD) against a 5000 L standard tank in an ISO 17025 [21] accredited volume laboratory. In this calibration, the proposed methodology allows for a reduction in the uncertainty compared to GUM.
Thus, it has been proven that using the GUM methodology does not assign the PDF of the result correctly because the proposed AMCM obtains a distribution that is neither Gaussian nor Student’s t-type. The relative expanded uncertainty obtained is reduced by 7.1% with AMCM compared to GUM method.
A Flatten–Gaussian distribution [22,23] is proposed as the PDF of the final result. The use of this PDF guarantees the uncertainty requirement to be transferable to other users. In fact, only if the PDF is known, further Monte Carlo simulation can be performed.

2. Experimental Set-Up of the Calibration

In this work, the experiment under study is the calibration of a flow meter against a standard proving tank. Next, we will show how the classic GUM method is applied. The result of the calibration is the ratio between the volume measured by the meter V METER and the reference volume V REFERENCE , in this case, the proving tank volume. This ratio is referred to as the Meter Factor (MF) [9], so
M F i = V REFERENCE , i V METER , i
The subscript i refers to the fact that the MF is calculated three times because the experiment comprises three measurements or runs. The reference volume needs to be corrected because the calibration normally takes place at a temperature t ¯ i different from the reference temperature t REF (15 °C), so Equation (1) becomes
M F i = V TANK , i 1 + k v t ¯ i t REF V METER , i
With k v being the cubic expansion coefficient of the tank material, V TANK , i is the volume measured by the tank at temperature t ¯ i , that is the average of the three temperature indications (ti1,2,3) measured at the tank:
t ¯ i = t i 1 + t i 2 + t i 3 3
Since three runs are measured, MF is
M ¯   F ¯ = i = 1 3 M F i n
There is also a tolerance repeatability limit above which the calibration would be withdrawn.
The schematic calibration set-up can be seen in Figure 1, as it appears in the control room of the calibration facility. This scheme includes all the components of the calibration facility and not only the ones used for this work. The calibration lab consists of two pipe provers (prover 1 and prover 2, seen in Figure 1) which receive the real products that are previously filtered by the filtering system (see real products for calibrations in Figure 1 and the filtering system in such figure). The location of the meters under calibration are also indicated (meters under calibration in the diagram). There is a dashed line that connects the 5000 L standard proving tank (at the bottom of Figure 1 and appearing as a 5000 L container) with the meter under calibration. So, the meters can be calibrated either by the tanks or by the provers. A Coriolis meter can be calibrated in the same way as a positive displacement meter if it is fitted with a system that translates its measurement signal into electrical pulses.
Figure 2 presents a photograph of the 5000-litre tank and a meter under calibration (in the figure, the meter is a Coriolis mass flow meter).
The general technical specifications of Coriolis meters are as follows.
-
Accuracy of 0.1% to 2%. When operating at low flow rates, accuracy increases as the flow rate increases. As the flow rate reaches higher values, accuracy stabilizes. Therefore, in general, accuracy may depend on the flow rate, although not specified by the manufacturer. For example, in [4], flow rate coefficients in the order of 0.001% h/m3 are determined in the range of 60 m3/h to 165 m3/h.
-
Typical turndown ratio of 100:1. If the meter has a curved tube, it can increase up to 200:1, while if it has a straight tube (like the one in the Figure 1) the turndown ratio is limited to 30:1 to 50:1 and the accuracy is also worse.
-
Zero stability. Due to mechanical tolerances, process effects, and even installation, the Coriolis meter may give a measurement signal in zero flow conditions. This value is small in absolute terms, but it has an impact on low flow rates, where the Coriolis effect is smaller. Coriolis meters must be “zeroed” in zero flow conditions to correct for this systematic effect.

3. Adaptation of the Model Function for GUM-S1

According to GUM, there are two approaches to obtain the estimated value of the measurand Y: method 1 and method 2 [24]. Method 1 refers to obtaining y from
y = f X ¯ 1 , X ¯ 2 , , X ¯ N
where X ¯ 1 , X ¯ 2 , , X ¯ N are the arithmetic means of each input quantity and f is the model function.
Method 2 refers to obtaining the estimate y as
Y ¯ = k = 1 n Y k / n
In general, if the model is not linear both methods are not compatible. If the repeatability range of the input quantities is low, both can be compatible.
The GUM-S1 method cannot implement method 2. If both methods are not compatible, only method 1 would be meaningful in the MCM (Monte Carlo method) framework as it requires a model function to obtain the measurand.
In case of lack of repeatability, both approaches are incompatible, the model cannot be linearized, and GUM cannot be used: GUM-S1 should be used with method 1.
In this work, it is shown how the application of GUM-S1 affects the measurand representation, considering the model function of the meter factor (MF) of a calibrated meter against a proving tank. When applying the GUM method, uncertainty calculation and measurand estimation can be independent; that is, method 1 can be used to estimate uncertainty and method 2 can be used to estimate the measurand. In fact, this is the situation in this case. However, if MCM is used, method 1 should be applied both for measurand and uncertainty estimation.
The MF calculation is performed in Equation (2) by using method 2. So, in order to apply GUM-S1, Equation (2) should be adapted [9]. The proposal of this work is substituting the type A evaluation of uncertainty of the measurand by a global additive contribution of a rectangular shape.
Therefore, the adapted model function of the calibration against a proving tank is as follows:
M F = V TANK 1 + k v t + δ t e t REF V METER + δ M F REP
where the quantities, t, VMETER and VTANK are detailed in the following equations:
t = t ¯ + δ t c a l + δ t r e s + δ t d r i f t + δ t c o r r
V T A N K = V ¯ T A N K + δ V T A N K , c a l + δ V T A N K , r e s + δ V T A N K , d r i f t + δ V T A N K , r a n g e
V M E T E R = V ¯ M E T E R + δ V M E T E R , r e s
Also, δ M F REP is a zero-mean random variable whose range is twice the repeatability tolerance and whose probability distribution is uniform (rectangular). This global correction is due to random effects.
When applying the Monte Carlo method, the PDFs of the input quantities must be assigned as prior quantities based on the metrologist’s judgement [25]. The explanation of every input quantity as a random variable and its related probability density function PDF is detailed in Table 1.

4. General Methodology for Monte Carlo Simulation

In the classical GUM method, two types of calculations are specified: the estimated value of the measurand and the typical uncertainty estimation, both calculations are separated and independent [1]. In GUM-S1, the simulation with random samples does not allow such separation [8].
According to [8], GUM-S1 provides a general approach to obtain an approximate numerical representation G of the distribution function GY for the measurand Y. The heart of the approach is repeated sampling from the PDFs for the input quantities Xi and the evaluation of the model in each case. The general description of the MCM approach would be as follows:
(a)
Select the number M of Monte Carlo trails to be made.
(b)
Generate M vectors, by sampling from the assigned PDFs, as realizations of the input quantities (Xi).
(c)
For each such vector, form the corresponding model value of Y, yielding M model values.
(d)
Sort these M models in strictly increasing order to provide G.
(e)
Use G to form an estimate y of Y and the standard uncertainty u(y) associated with y.
(f)
Use G to form an appropriate coverage interval for Y, for a stipulated coverage probability p, computing ylow and yhigh being ylow is 2.5th percentile (P2.5) and yhigh 97.5th percentile (P97.5), if a 95% confidence level is desired.
When the PDF is not symmetrical, the uncertainty is not symmetrical either and the coverage factor is no longer meaningful. In fact, the coverage factor k is not considered in GUM-S1.
In GUM-S1, the expanded uncertainty is directly calculated with the approximate numerical representation of the PDF (GY) and there is no need to assume certain hypotheses on the normality or the effective degrees of freedom in a Student’s t-distribution.
If the MCM approach is used only for estimating the uncertainty, it must be proven that the measurand value y given by the MCM is compatible with the result given by the classical GUM method. When applying MCM the sample size M must be chosen. If the sample size is not large enough, different results could be obtained when repeating the simulation. According to GUM-S1, M could be in the order of 106 but there is no guarantee that this or any specific pre-assigned number will suffice [8]. In this work, the adaptive Monte Carlo method (AMCM) was selected as this procedure controls the repeatability of the result and optimizes M, though its programming is more complicated. Nevertheless, in practice, a certain lack of repeatability is observed in the AMCM results, especially in the extreme percentiles of the PDF.
A basic implementation of an adaptive Monte Carlo procedure involves carrying out an increasing number of Monte Carlo trials until the various results of interest have stabilized in a statistical sense. AMCM is based on going from an M sample to a larger one of size h × M with a better statistical significance, being h a certain positive integer. The h value is obtained through an iterative process. Starting from the first sample of M size, more M-sized samples are generated independently at every iteration. The size samples which are being generated increase by 2 × M, 3 × M, 4 × M, …, h × M until the statistical significance of h × M sample is optimal compared with the numerical tolerance of the measurand typical uncertainty u y .
The optimal sample is used to estimate the measurand value, its typical uncertainty, and consequently the expanded uncertainty. In the MCM framework, the numerical tolerance δ is the semi-width which delimits the last significant decimal of u y , and oscillates according to the number of significant figures selected to express u y . In this work, the number of significant figures is always two.
According to the GUM-S1 scheme, the value of M must be 104 in order to reach a coverage probability less or equal to 99%, which allows an equivalent Gaussian k = 2 coverage probability (k = 3 could not be reached). For a coverage larger than 99%, M must be increased. The determination of h requires optimizing the statistics in every iteration. Therefore, the statistical descriptors y , u y , y l o w , y h i g h related to the h samples independently generated, are obtained. This results in a h-sized sample for every descriptor. The corresponding sample means would be y ¯ , u ¯ y , y ¯ l o w , y ¯ h i g h . The standard deviation from these are also calculated s y ¯ , s u ¯ y , s y ¯ l o w , s y ¯ h i g h . In GUM-S1 the final h selected h*, must be the first which complies with 2 s y ¯ , 2 s u ¯ y , 2 s y ¯ l o w , 2 s y ¯ h i g h being less than the numerical tolerance δ.

5. Proposals for AMCM Improvement

The selection criteria for the h value in GUM-S1 assumes that the mean values of the statistical descriptors y , u y , y l o w , y h i g h at every iteration follow a normal distribution and therefore, such selection criterion would have a 95.45% confidence level. Strictly speaking, this is correct when h is large enough, but in practice, this is not so. This implies that the factor multiplying s y ¯ , s u ¯ y , s y ¯ l o w , s y ¯ h i g h is underestimated.
In this work, the first proposal is to use a coverage factor from a Student’s t-distribution with h − 1 degrees of freedom. In the case that the number of degrees of freedom is large enough and compatible with Gaussian statistics, the Student’s t-distribution itself will be very similar to a Gaussian and the GUM-S1 criteria could be used. In principle, the Student’s t-distribution coverage factor which should be used would be the one corresponding to a 95.45% confidence level, as in GUM-S1 the standard deviations s y ¯ , s u ¯ y , s y ¯ l o w , s y ¯ h i g h are multiplied by 2. A higher confidence level could be used (for instance 99.73%) but this would imply more iterations to converge h.
It is proposed to use the t-Student factor instead of the z factor of the normal distribution used by GUM-S1 to correct the misuse of applying the z factor of the normal distribution to a case of small samples. That is, it is proposed to correctly treat the small samples obtained with the first iterations of the method (for example, when there are two or three elements at the beginning). As is well known, when the samples increase in size, the z factor is adequate. But it is also well known that when the samples increase in size, t-Student tends to z.
Therefore, the first improvement proposal for AMCM consists of changing the acceptance and rejection criterion for h from GUM-S1 so that this criterion is also adaptive; that is, the stricter the criterion the lower the h value. The level of confidence in the optimization of h would be 95.45% (GUM-S1) or higher depending on the requirements in each case.
As a second improvement, this work proposes the validation of the AMCM repeatability by using δ as a reference. In practice, when a new cycle of iterations is performed, the lack of repeatability could lead to the variability of y , u y , y l o w , y h i g h and a new value of h, h h would be obtained. Therefore, the proposal considers R repetitions of the adaptive cycle and checks if y , u y , y l o w , y h i g h are changing if rounded according to δ. This rounding process is conducted first in u y according to δ and then in y , y l o w , y h i g h according to u y .
The precision of the final results of AMCM must be always adjusted to δ; otherwise, a spurious variability would always be observed. In order to come up with a stable result, the R values for y , u y , y l o w , y h i g h will be averaged and rounded according to δ. The stability will be confirmed by calculating the standard deviations of the sample means multiplied by 2 or 3, depending on the requirements, and the results will be checked to be zero after rounded according to δ. This will ensure that the repeatability of the results y , u y , y l o w , y h i g h will have a 95.45% or 99.73% confidence level whenever R is large enough. In this work, R is taken as 50.
The explanation for taking 50 iterations of the adaptive cycle is as follows. When repeating the application of the AMCM, the authors have found that the results fluctuate, which provides a certain lack of definition to the result. The authors wish to make explicit a fact that is not reflected in GUM-S1, because GUM-S1 tacitly assumes that the adaptive nature of the CMMA itself avoids fluctuation when repeating the cycle. Therefore, targeting this minor shortcoming of the CMMA is an innovation that cannot be assessed by comparing it to a situation where the “innovation” is not applied. The number 50 is taken as a rule of thumb to ensure the application of the central limit theorem, as is often stated in practical applications of statistics. A total of 50 iterations of the CMMA cycle ensure that the sample means of the results follow a normal distribution. Therefore, the standard deviations of the sample means are well estimated from the sample standard deviations. Furthermore, taking 50 iterations verifies that the standard deviations of the sample means are zero within the limits of the numerical tolerance of the CMMA, which provides stable final results. If more than 50 iterations were taken, the above would still be valid. Further research would involve trying to estimate the minimum number of iterations (less than 50) to stabilize the result.
In the third place, the diagnosis of the empirical PDF of the measurand is proposed. For that purpose, the estimation of skewness and kurtosis are combined with normality contrasts. An index of deviation from normality based on the kurtosis is proposed to quantify the diagnostics. It must be checked that the skewness is zero to validate the symmetry of the interval [ y l o w , y h i g h ] in respect to y, before calculating the expanded uncertainty and the k factor. Three hypothesis tests are proposed: distribution function tests (Lilliefors and Anderson–Darling test), momentum tests (D’Agostino and Omnibus de D’Agostino tests for skewness and kurtosis), and squared minimum correlation (Shapiro–Wilk). With these tests, the samples are checked to be normal with a 95% confidence level. If there is no rejection, normality cannot be assured.
Statistical analysis of the measurand is a recommended guideline and specific guidelines to follow are indicated for this. This is an innovation that cannot be assessed by comparing it with a situation in which the “innovation” is not applied. And its goodness is based on the proven fact that kurtosis can qualitatively detect whether the application of the coverage factor prescribed by the classic GUM method is incorrect.
In Figure 3 there is a flow chart representing all the steps of the proposed methodology.

6. Results and Discussion

The case presented is the calibration of a flow meter against a standard tank to obtain the meter factor (MF). The results are gathered in two tables: Table 2 shows the results for the meter factor, its standard uncertainty, and its lower and upper limits for AMCM and GUF; and Table 3 shows the results for the expanded uncertainty, the coverage factor, the relative expanded uncertainty (W), and the numerical tolerance δ for both methods.
As can be seen, AMCM U(MF) is lower than GUF. This means a 7.1% decrease in relative expanded uncertainty W(MF). MF from AMCM is identical to MF from GUF: which implies that the model function is linear within the range of the input quantities.
The GUF value for u(MF) with two significant figures is identical to the value for AMCM: the law of propagation of uncertainty of the GUM method could be applied in this case to estimate the standard uncertainty.
The AMCM value for de U(MF) is 6% lower than the GUF value due to the different coverage factors of both methods, so the MF distribution is not Gaussian.
The tests applied reject the normality, and the kurtosis values (−0.55) are lower than in a normal distribution.
The normality deviation index shows a deviation of −18.3% in respect to a Gaussian.
The classical GUM method would never result in the correct PDF as the Student’s t-distribution has a positive excess kurtosis.
In Figure 4, the MF histogram as obtained from the AMCM is fitted to a normal distribution. As can be observed, the resulting distribution is clearly deviated from the Gaussian with a negative excess kurtosis.
Though the MF model function can be linearized, the deviation from normality indicates that the conditions for the central limit theorem are not fulfilled.
According to GUM-S1 in NOTE 4 of the 5.7.2 subsection, the lack of normality is due to the fact that the rectangular distribution assigned to the MF repeatability is dominant. This can be proved by simulating the PDF and removing the repeatability contribution. The function model result of the sum of a Gaussian and a dominant rectangular distribution is a Flatten–Gaussian PDF [22] as it is the one proposed for the MF.
A specific simulation (non-adaptive) of 105 samples has been carried out to fit the empirical distribution to a Flatten–Gaussian PDF whose equation is [22] as follows:
g MF ( ξ ) = A exp a ( ξ c ) 2 b ( ξ c ) 4
where A is a normalization constant, a and b are parameters dependent on the distribution momenta and, c, is the best estimate of the MF. The fitting plot is shown in Figure 5 and the estimated parameters are presented in Table 4. The goodness of fit is given by the adjusted R-Squared whose value is 0.99914.
Finally, it has been checked that the estimated A is compatible with the A value (0.03868) calculated from a and b with the expression given in [22].
Some authors also detect a non-Gaussian dominant component but they do not identify it as such [14]. Other authors interpret the presence of a rectangular dominant component as a consequence of the lack of a linearity measurement model [10] but in fact, the model was linear. The use of this PDF guarantees the uncertainty requirement to be transferable to other users. In fact, only if the PDF is known, further Monte Carlo simulations can be performed.

7. Conclusions

In this work, the expanded uncertainty of the ratio between measured volume and reference volume called Meter Factor (MF) for the calibration of a flow meter against a proving tank is estimated by using the adaptive Monte Carlo method. In this way, the shortcomings of the traditional GUM method are avoided and the following innovations for the AMCM are proposed:
The convergence regulation of the AMCM by applying the coverage factors of a Student’s t-distribution.
The repeatability validation of the AMCM through the realization of 50 iterations of the adaptive cycle to assure the numerical stability of the results.
The analysis of the measurand PDF by estimating its skewness, kurtosis, and testing its normality.
For the flow meters used in the custody transfer and calibrated against a standard proving tank, the proposed methodology reduces the uncertainty compared to the one calculated through GUM.
In fact, for the case study, it was proved that GUM did not result in the correct PDF qualitatively for the MF as it is neither a Gaussian nor a Student’s t-distribution. The analytical expression proposed for the PDF of the MF is a Flatten–Gaussian.

Author Contributions

Conceptualization, A.G.-B. and P.C.; methodology, A.G.-B.; software, A.G.-B. and C.M.; validation, A.G.-B., C.M. and P.C.; formal analysis, A.G.-B., C.M. and R.G.-Á.; investigation, A.G.-B. and C.M.; resources, P.C., A.G.-B. and C.M.; writing—original draft preparation, A.G.-B. and C.M.; writing—review and editing, A.G.-B., C.M., P.C. and R.G.-Á.; visualization, C.M. and R.G.-Á.; supervision, P.C.; project administration, A.G.-B.; funding acquisition, A.G.-B. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been funded by the EXOLUM-UPM Chair in Metrology at the Universidad Politécnica de Madrid with project number P060607550. This program develops the scientific collaboration between UPM (Spain) and EXOLUM Corporation, with the purpose of promoting knowledge of metrology. EXOLUM is the leading company in Spain for oil product transportation and storage and is one of the largest private companies in its sector at an international level. In addition, the authors wish to thank the Metrology Laboratory of EXOLUM in Loeches (Madrid) for providing the data analyzed in this work.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are not available due to commercial and confidentiality restrictions.

Acknowledgments

The authors would like to thank Carlos García-Berrocal for careful review of the language of the manuscript.

Conflicts of Interest

Author Pablo Carmona was employed by EXOLUM Corporation S.A. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Abbreviations

AMCMadaptive Monte Carlo method
APIAmerican petroleum institute
API MPMSAPI Manual of Petroleum Measurement Standards
BIPMInternational Bureau of Weights and Measures
CIPMComité International des Poids et Mesures
GUFGUM Uncertainty Framework
GUM ISOGuide to the Expression of Uncertainty in Measurement
GUM-S1Supplement 1 of the GUM
IECInternational Electrotechnical Commission
ISOInternational Organization for Standardization
LPULaw of Propagation of Uncertainty
MCMMonte Carlo method
MFMeter Factor
PDFProbability Density Function

References

  1. Joint Committee for Guides in Metrology (JCGM). Evaluation of Measurement Data—An Introduction to the ‘Guide to the Expression of Uncertainty in Measurement’ and Related Documents; International Organization for Standardization: Geneva, Switzerland, 2008; Volume 3. [Google Scholar]
  2. Castro, H.F.F. Validation of the GUM using the Monte Carlo method when applied in the calculation of the measurement uncertainty of a compact prover calibration. Flow Meas. Instrum. 2021, 77, 101877. [Google Scholar] [CrossRef]
  3. Castro, H.F.F. Mathematical modeling applied to the uncertainty analysis of a tank prover calibration: Understanding the influence of calibration conditions on the GUM validation using the Monte Carlo method. Flow Meas. Instrum. 2024, 96, 102547. [Google Scholar] [CrossRef]
  4. García-Berrocal, A.; Montalvo, C.; Carmona, P.; Blázquez, J. The Coriolis mass flow meter as a volume meter for the custody transfer in liquid hydrocarbons logistics. ISA Trans. 2019, 90, 311–318. [Google Scholar] [CrossRef] [PubMed]
  5. Barateiro, C.; Faria, A.; Filho, J.F.; Maggessi, K.; Makarovsky, C. Fiscal Measurement and Oil and Gas Production Market: Increasing Reliability Using Blockchain Technology. Appl. Sci. 2022, 12, 7874. [Google Scholar] [CrossRef]
  6. Savio, E.; De Chiffre, L.; Carmignato, S.; Meinertz, J. Economic benefits of metrology in manufacturing. CIRP Ann. 2016, 65, 495–498. [Google Scholar] [CrossRef]
  7. Kacker, R.; Sommer, K.-D.; Kessel, R. Evolution of modern approaches to express uncertainty in measurement. Metrologia 2007, 44, 513. [Google Scholar] [CrossRef]
  8. JCGM 101: Evaluation of Measurement Data—Supplement 1 to the ‘Guide to the Expression of Uncertainty in Measurement’—Propagation of Distributions Using a Monte Carlo Method. Available online: https://www.sci.utah.edu/~kpotter/Library/Papers/jcgm:2008:PDMC/index.html (accessed on 28 May 2024).
  9. API MPMS 4.9.3—Manual of Petroleum Measurement Standards Chapter 4-Proving Systems Section 9-Methods of Calibration for Displacement and Volumetric Tank Provers Part 3—Determination of the Volume of Displacement Provers by the Master Meter Method of Calibration Measurement Coordination|GlobalSpec. Available online: https://standards.globalspec.com/std/9958017/API%20MPMS%204.9.3 (accessed on 28 May 2024).
  10. Alkhatib, H.; Neumann, I.; Kutterer, H. Uncertainty modeling of random and systematic errors by means of Monte Carlo and fuzzy techniques. J. Appl. Geod. 2009, 3, 67–79. [Google Scholar] [CrossRef]
  11. Chen, A.; Chen, C. Comparison of GUM and Monte Carlo methods for evaluating measurement uncertainty of perspiration measurement systems. Measurement 2016, 87, 27–37. [Google Scholar] [CrossRef]
  12. Forster, M.; Seibold, F.; Krille, T.; Waidmann, C.; Weigand, B.; Poser, R. A Monte Carlo approach to evaluate the local measurement uncertainty in transient heat transfer experiments using liquid crystal thermography. Measurement 2022, 190, 110648. [Google Scholar] [CrossRef]
  13. Mahmoud, G.M.; Hegazy, R.S. Comparison of GUM and Monte Carlo methods for the uncertainty estimation in hardness measurements. Int. J. Metrol. Qual. Eng. 2017, 8, 14. [Google Scholar] [CrossRef]
  14. Runje, B.; Horvatic, A.; Alar, V.; Medic, S.; Bosnjakovic, A. Examples of measurement uncertainty evaluations in accordance with the revised GUM. J. Phys. Conf. Ser. 2016, 772, 012008. [Google Scholar] [CrossRef]
  15. Willink, R. Difficulties arising from the representation of the measurand by a probability distribution. Meas. Sci. Technol. 2009, 21, 015110. [Google Scholar] [CrossRef]
  16. Cox, M.G.; Siebert, B.R.L. The use of a Monte Carlo method for evaluating uncertainty and expanded uncertainty. Metrologia 2006, 43, S178. [Google Scholar] [CrossRef]
  17. Li, Y.; Wang, Z.; Tang, Y.; Shang, Z. Application of adaptive Monte Carlo method to evaluate pose uncertainty in monocular vision system. Opt. Eng. 2022, 61, 061413. [Google Scholar] [CrossRef]
  18. Singh, J.; Bura, N.; Kaushik, K.; Kumaraswamidhas, L.A.; Sharma, N.D. Investigation of contribution of number of trials in Monte Carlo simulation for uncertainty estimation for a pressure balance. Trans. Inst. Meas. Control 2021, 43, 3615–3624. [Google Scholar] [CrossRef]
  19. Wen, X.L.; Zhao, Y.B.; Wang, D.X.; Pan, J. Adaptive Monte Carlo and GUM methods for the evaluation of measurement uncertainty of cylindricity error. Precis. Eng. 2013, 37, 856–864. [Google Scholar] [CrossRef]
  20. Wübbeler, G.; Harris, P.M.; Cox, M.G.; Elster, C. A two-stage procedure for determining the number of trials in the application of a Monte Carlo method for uncertainty evaluation. Metrologia 2010, 47, 317. [Google Scholar] [CrossRef]
  21. ISO/IEC 17025:2017; General Requirements for the Competence of Testing and Calibration Laboratories. ISO: Geneva, Switzerland, 2017.
  22. Blázquez, J.; García-Berrocal, A.; Montalvo, C.; Balbás, M. The coverage factor in a Flatten–Gaussian distribution. Metrologia 2008, 45, 503. [Google Scholar] [CrossRef]
  23. Fotowicz, P. Modified Monte Carlo Method for Calculating the Expanded Measurement Uncertainty. In Progress in Automation, Robotics and Measuring Techniques: Volume 3 Measuring Techniques and Systems; Springer International Publishing: Berlin/Heidelberg, Germany, 2015; Volume 352, pp. 67–74. [Google Scholar] [CrossRef]
  24. Bich, W.; Callegaro, L.; Pennecchi, F. Non-linear models and best estimates in the GUM. Metrologia 2006, 43, S196. [Google Scholar] [CrossRef]
  25. Singh, J.; Kumaraswamidhas, L.A.; Bura, N.; Sharma, N.D. A Monte Carlo simulation investigation on the effect of the probability distribution of input quantities on the effective area of a pressure balance and its uncertainty. Measurement 2021, 172, 108853. [Google Scholar] [CrossRef]
Figure 1. Calibration set-up scheme.
Figure 1. Calibration set-up scheme.
Applsci 14 11472 g001
Figure 2. Photograph of the tank and a flow meter under calibration in the facility.
Figure 2. Photograph of the tank and a flow meter under calibration in the facility.
Applsci 14 11472 g002
Figure 3. Flow chart of the proposed methodology.
Figure 3. Flow chart of the proposed methodology.
Applsci 14 11472 g003
Figure 4. In red, a histogram of the empirical PDF of the MF in red bars. In blue, normal fit.
Figure 4. In red, a histogram of the empirical PDF of the MF in red bars. In blue, normal fit.
Applsci 14 11472 g004
Figure 5. Flatten–Gaussian fit (blue) of the MF empirical distribution (red bars).
Figure 5. Flatten–Gaussian fit (blue) of the MF empirical distribution (red bars).
Applsci 14 11472 g005
Table 1. Explanation of input quantities in the model function.
Table 1. Explanation of input quantities in the model function.
Input QuantityContribution to the MF Model FunctionPDF
δ M F REP Repeatability of the MFRectangular
δ t e Temperature gradient inside the tankRectangular
t ¯ Average measured temperature in the tankConstant
δ t c a l Calibration of temperature sensor in the tankGauss
δ t r e s Resolution of temperature sensor in the tankRectangular
δ t d r i f t Drift of temperature sensor in the tankRectangular
δ t c o r r Correction of temperature sensor in the tankRectangular
V ¯ T A N K Average measured volume in the tankConstant
δ V T A N K , c a l Calibration of tank volumeGauss
δ V T A N K , r e s Resolution of tank volumeRectangular
δ V T A N K , d r i f t Drift of tank volumeRectangular
δ V T A N K , r a n g e Range of tank volumeRectangular
V ¯ M E T E R Average measured meter volumeConstant
δ V M E T E R , r e s Resolution of meterRectangular
Table 2. Meter factor and standard meter factor uncertainty for both methods: AMCM and GUF.
Table 2. Meter factor and standard meter factor uncertainty for both methods: AMCM and GUF.
AMCMGUF
MF1.02451dimensionlessMF1.02451dimensionless
u(MF)0.00036dimensionlessu(MF)0.0003565dimensionless
MFlow1.02384dimensionlessMFlowN/A-
MFhigh1.02518dimensionlessMFhighN/A-
Table 3. Meter factor expanded uncertainty, coverage factor, W and numerical tolerance δ for both methods: AMCM and GUF.
Table 3. Meter factor expanded uncertainty, coverage factor, W and numerical tolerance δ for both methods: AMCM and GUF.
AMCMGUF
U(MF)0.00067dimensionlessU(MF)0.000713dimensionless
k1.86dimensionlessk2dimensionless
W(MF)0.065%W(MF)0.070%
δ0.000005dimensionlessδN/A-
Table 4. Estimated parameters from the Flatten–Gaussian fit.
Table 4. Estimated parameters from the Flatten–Gaussian fit.
Estimated ParameterStandard Error
A = 0.038600.00015
a = 1.766 × 1060.062 × 106
b = 3.616 × 10120.162 × 1012
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

García-Berrocal, A.; Montalvo, C.; Carmona, P.; García-Álvarez, R. Optimization of the Monte Carlo Simulation to Improve the Calibration Uncertainty of Volume Meters for Hydrocarbons Custody Transfer. Appl. Sci. 2024, 14, 11472. https://doi.org/10.3390/app142411472

AMA Style

García-Berrocal A, Montalvo C, Carmona P, García-Álvarez R. Optimization of the Monte Carlo Simulation to Improve the Calibration Uncertainty of Volume Meters for Hydrocarbons Custody Transfer. Applied Sciences. 2024; 14(24):11472. https://doi.org/10.3390/app142411472

Chicago/Turabian Style

García-Berrocal, Agustín, Cristina Montalvo, Pablo Carmona, and Raúl García-Álvarez. 2024. "Optimization of the Monte Carlo Simulation to Improve the Calibration Uncertainty of Volume Meters for Hydrocarbons Custody Transfer" Applied Sciences 14, no. 24: 11472. https://doi.org/10.3390/app142411472

APA Style

García-Berrocal, A., Montalvo, C., Carmona, P., & García-Álvarez, R. (2024). Optimization of the Monte Carlo Simulation to Improve the Calibration Uncertainty of Volume Meters for Hydrocarbons Custody Transfer. Applied Sciences, 14(24), 11472. https://doi.org/10.3390/app142411472

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop