International Conference on Artificial Intelligence and Image Processing (ICAIIP'2012) Oct. 6-7, 2012 Dubai (UAE)
A New Fuzzy Based Method for Error Correction of Coriolis Mass Flow Meter in Presence of Two-phase Fluid Behrooz Safarinejadian, Mohammad Amin Tajeddini and Leila Mahmoodi
Abstract— Coriolis mass flow meters are one of the most accurate measuring tools for mass flow in industry. However, two-phase flow (gas-liquid) may cause severe operating difficulties as well as decreasing certitude in measurement. Due to considerable applications of these flow meters, it is necessary to find a method to correct the measurement error. In this paper, a method based on Fuzzy systems is offered to correct the error of Coriolis mass flow meters in presence of two-phase mode fluid. The ability of this method in error correction is indicated by testing with on-line experimental data. Another advantage of the proposed method is its low cost comparing to previous methods that needs special hardware for error correction.
In True mass flow meter method, a turbine flow meter with complicated mechanical design is used for measuring twophase fluid flow directly. High pressure drop through pipeline and vulnerability to corrosive fluid are disadvantages of this method [4]. Radioisotopes are used in Radionuclide method to measure mass flow directly. Disadvantages of this method are limited access to radioisotopes, necessary safety considerations and high technological costs [4]. In this paper a software-based error correction method is proposed for Coriolis mass flow meters as an accurate mass flow measuring tool for two-phase fluid. Coriolis mass flow meter, with 2% accuracy in mass flow measurement for single-phase mode [5], consists of four main parts: parallel tubes, coil driver, magnetic sensors and indicator . Two driving coils are used to oscillate the parallel tubes with phase difference of 180 degree. A vertical force called Coriolis force is exerted to both tubes while fluid is crossing simultaneous-oscillated tubes. Coriolis force, acting counter wise in the entrance and end of tubes, causes partial shape conversion in tubes. This diversion is measured by magnetic sensors placed in the entrance and end of tubes. The measured phase difference is related to mass flow rate in tubes. Resonant frequency is also related to fluid density, so this parameter is used to measure fluid density. The amplitude of tube diversion depends on temperature, so it can also be used as temperature measuring tool [6]. When flow tubes are oscillated in single-phase fluid, all components accelerate simultaneously. Flow meters accuracy depends on simultaneous acceleration of gas bubbles and liquid. However, error measurement is made because of highvolume of gas and low fluid viscosity. Two mentioned factors make bubbles not able to accelerate with fluid and cause errors [6]. Some studies in error correction of Coriolis mass flow meters are mentioned as below: Primary experimental researches which limit gas fraction in 6% to 9% have been done to correct Coriolis mass flow meter. It is assumed that the flow meters don’t work properly in upper gas fraction [5]. Another research has been done in modeling the two-phase fluid in Coriolis flow meter which established the bubble and effective mass model.It is assumed that the behavior of twophase fluid with small void fraction can be explained based on the effective mass of one bubble in liquid [7].
Keywords- Coriolis mass flow meter; error correction; two phase fluid mode; fuzzy system
1. INTRODUCTION
A
fluid in admixture form of liquid and gas is called twophase fluid. The turbulence generated in the presence of two-phase fluid, may results mass difference, which causes error in mass flow measurement, through flow meters. Because of the considerable role of such fluid in industrial processes, lots of methods have been tried to achieve more accurate measured values. These methods are described briefly as following: In noise analyzing method, mass flow is measured by comparing the received signals from accelerometer in twophase with the signals of single-phase mode [1]. Another method is flow regime identification methodology with neural networks and two –phase flow models. In this method the impedance of two-phase fluid is simulated in bubbly, slug, churn and annular modes then applied to a neural network. The network output shows the system mode and behavior [2]. A Combinational method for measuring mass flow in twophase mode is presented in [3] which two different groups of sensors are used in: First group including capacitive, inductive and ultrasonic sensors for the water ratio measurement; and the second group including ventury and pressure difference sensors for volume measurement and two pressure sensors for error compensation of ventury sensors. Internal sensor parameter dependency is one of the disadvantages. Behrooz Safarinejadian, Mohammad Amin Tajeddini and Leila Mahmoodi are with Electronic Department, Shiraz University of Technology, Shiraz, Iran. Email:
[email protected]
192
International Conference on Artificial Intelligence and Image Processing (ICAIIP'2012) Oct. 6-7, 2012 Dubai (UAE)
sensor signal. Sensor signal indicates phase and frequency of flow tube oscillation. Damping is calculated in “(1)”. 𝐷𝑎 = 𝑉𝐼𝐷 (1) 𝐴
Other research called Sensor validation has been done to evaluate the original limitation, errors and their effects on measurement of measuring tools including Coriolis flow meter [8]. A method using an alarm system has been offered when two-phase mode happens. As system alarms in two-phase mode, Pressure is increased. Pressure increment increases gas bubble solubility in fluid and decreases error in measurement. Special condition is needed for this method to be used [9]. In this paper, fuzzy system is used for error correction in Coriolis mass flow meter. Definite available flow meter parameters are given to designed fuzzy system as inputs, and error is estimated as output. Low cost is considered as an advantage comparing to mentioned hardware methods. The designed fuzzy system is described in section 2; evaluation on experimental data and conclusion are presented respectively in section 3 and 4.
Where𝐷𝑎 is damping factor; 𝐼𝐷 is driver supplied current; and 𝑉𝐴 is sensor signal. •
Drop in density
Void fraction is a widely used metric of two-phase flow meters. However, in practice, out of laboratory, it is rarely possible to achieve void fraction .Since void fraction is related directly to fluid density, change in density can be used instead of it. Therefore, drop in density as another system input, is an appropriate and nonlinear indicator of void fraction. Resonant frequency can effect on the density in Coriolis mass flow meter, this frequency depends on flow tube size via density calibration coefficients and temperature via deviation from the calibration temperature. The density in Coriolis meters can be calculated in “(2)”. ( 𝐷𝐶1 ∆𝑇+𝐷𝐶2 ) 𝑓 = + 𝐷𝐶3 + 𝐷𝐶4 ∆𝑇 (2) 2
II. FUZZY SYSTEM APPLIED FOR ERROR CORRECTION OF CORIOLIS MASS FLOW METER Fuzzy systems, based on if-then rules, can easily convert linguistic variables and expressions to mathematical formulas. The ability of these systems in modeling and approximating different phenomena makes it suitable for error modeling in Coriolis mass flow meter. Mamdani- type system, which is the most applicable fuzzy system, is used in this paper to resolve on-line incorrect measurement of the flow meter in two-phase mode [10]. Fuzzy system applied for error correction is shown in “Fig.1”.
𝑓
Where 𝜌 is density; 𝐷𝐶𝑖 is density calibration coefficient;
𝑓 is resonant frequency and ∆𝑇 is deviation from calibration
temperature. •
Apparent mass flow rate (
𝑲𝒈� 𝑺)
Subjecting to two-phase fluid, true mass flow rate is not available; but, the observed (faulty) flow rate from Coriolis flow meter can be included as input parameter for the fuzzy system.
A. Inputs of the Fuzzy System Error correction is assumed to be performed in constant temperature. Therefore, three accessible parameters of Coriolis mass flow meter are defined as inputs of the fuzzy system as below:
B. Fuzzifier and Defuzzifier of the Fuzzy System Singleton fuzzifier is selected for the system and its membership function is defined as “(3)”. 1 ; 𝑥 = 𝑥∗ (3) µ𝐴 ( 𝑥 ) = � 0 ; 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 Where 𝑥 ∗ is the crisp input. Deffuzifier membership function is defined as “4” for the system. This defuzzifier is called center average. 𝑌∗ = ∗
∑ 𝑤𝑙𝑦𝑙 ∑𝑤 𝑙
𝑙 = 1 ,2 ,… ,𝑚
(4)
𝑙
𝑌 is the output of the system; 𝑦 is the center of output membership function and 𝑤 𝑙 is its weight.
C. Training the System There are two main approaches to design a fuzzy system: first, is considering certain fuzzy structures for fuzzifier, defuzzifier and membership functions with variable parameters which will be determined by applying input-
output data to the system later. Second one is writing rules according to the input-output data sets and then determining the structure of fuzzy system. The second approach is used to design the fuzzy system in this paper. By considering singleton fuzzifier, center average deffuzifier and the product implication function, the digest form of the fuzzy system can be written as “(5)” [11]:
Fig.1. Designed Fuzzy system
•
Damping
In Coriolis flow meter, tubes are maintained to oscillate by using a positive feedback. As result of the feedback, driver supplied current is provided by multiplying a drive gain and 193
International Conference on Artificial Intelligence and Image Processing (ICAIIP'2012) Oct. 6-7, 2012 Dubai (UAE) 𝑟 ∑𝑀 � 𝑟 ∏𝑛 𝑟=1 𝑦 𝑖=1 𝜇 𝑖 (𝑥𝑖 )
𝑓(𝑥) =
𝐴
(5)
𝑛 𝑟 ∑𝑀 𝑟=1 ∏𝑖=1 𝜇 𝑖 (𝑥𝑖 ) 𝐴
𝐷𝑖𝑛𝑒𝑤 = 𝐷𝑖 – 𝐷𝑐1 𝑒𝑥𝑝(−
𝑟
𝑟 is the number of rules (𝑟 = 1, 2, … , 𝑀); 𝑦� is the center of output membership function in the rth rule; 𝜇 𝐴𝑟 𝑖 (𝑥𝑖 ) is the defined membership functions of 𝑥𝑖 in the 𝑟th rule. For each input-output pairs, a rule must be defined. Therefore, the more the input-output paired data, the more rules must be written in the fuzzy rule base. Huge number of rules may make the designed system impractical. For overcoming this problem, different clustering methods can be used to put data in clusters with one rule for each cluster. In this paper, Fuzzy system is trained in two steps: first, clustering training data; second, writing rules using Look-up table method. The steps are discussed in the following: •
•
2
𝑟𝑎 2
�2�
)
𝑛
𝑗=1
𝑒𝑥𝑝 � −
��𝑥𝑖∗ − 𝑥𝑗 �� 𝑟𝑎 2
� � 2
2
𝑝
(6)
𝑛
�≥�
𝑗=1
exp �−
2
�|𝑥𝑖 − 𝑥𝑗|� 𝑟𝑎 2
� � 2
(9)
Writing rules using Look-up table method
𝑝
(𝑥0 , 𝑦0 ) 𝑝 = 1,2 , … . . , 𝑁; 𝑝 𝑦0 ∈ 𝑉 = �𝛼𝑦 , 𝛽𝑦 � ⊂ 𝑅 𝑝 𝑥0 ∈ 𝑈 = [𝛼1 , 𝛽1 ] × [𝛼2 , 𝛽2 ] × … . .× [𝛼𝑛 , 𝛽𝑛 ] ⊂ 𝑅𝑛 (10) 𝑗 𝑁𝑖 Fuzzy sets 𝐴𝑖 (𝑗 = 1,2, . . . , 𝑁𝑖 )are defined determinately in each[𝛼𝑖 , 𝛽𝑖 ]; completeness of fuzzy sets must be guaranteed in “(11)”. 𝑗 𝑗 (11) ∀ 𝑥𝑖 ∈ [𝛼𝑖 , 𝛽𝑖 ] ∋ 𝐴𝑖 ; 𝜇𝐴𝑖 (𝑥𝑖 )≠ 0 𝑝 𝑝 Membership values in 𝑥𝑜𝑖 (𝑖 = 1,2, … 𝑛) and 𝑦0 must be 𝑝 𝑝 determined for each input-output pairs (𝑥0 , 𝑦0 ) as regarded to 𝑗 antecedent fuzzy sets 𝐴𝑖 (𝑗 = 1,2, … … , 𝑁𝑖 ), and consequence fuzzy sets 𝐵𝑙 �𝑙 = 1,2, … . , 𝑁𝑦 �. Among 𝑁𝑖 memberships function defined for 𝑥𝑖 (𝑖 = 1,2,3 … ), membership function 𝑝 with maximum value in 𝑥𝑜𝑖 as shown in “(12)” is assigned to 𝑝 𝑝 x i in the rule corresponding to input-output pair (𝑥0 , 𝑦0 ). 𝑗∗ 𝑝 𝑗 𝑝 𝜇𝐴𝑖 (𝑥0𝑖 ) ≥ 𝜇𝐴𝑖 �𝑥0𝑖 � 𝑗 = 1,2, … , 𝑁𝑖 (12)
𝑟𝑎 is a positive constant which shows the neighborhood zone; 𝑥𝑖 is an input data; 𝑥𝑗 is a nominated cluster center. Cost function for ith dimension is calculated by putting 𝑝 different input data, 𝑥𝑖 , in “(6)”. Input data with maximum cost function wins as the first cluster center as following “(7)” and “(8)”. 𝐷𝑖∗ = �
)
After data clustering using k-means algorithm with initial centers provided by subtractive algorithm; the rules must be written for each cluster. Look-up table method is used to write rules in this paper. In Look-up table method, when N inputoutput paired data exist like “(10)”;
Clustering is used as a partitioning tool for a set of inputoutput paired data in order to make clusters of members with similar features. K-means clustering method is selected among various clustering methods in this paper[12],[13]. The convergence of k-means clustering method depends on initial values for cluster centers. In this paper, initial cluster centers have been determined by subtractive algorithm in order to solve this problem. In subtractive algorithm accessible data points, normalized in a hypercube, are nominated to be cluster centers. First a cost function is defined as “(6)”. ��𝑥𝑖 −𝑥𝑗 ��
𝑟𝑏 2
�2�
2
𝑟𝑏 is a positive constant greater than 𝑟𝑎 , in order to prevent adjacent centers to win in algorithm; usually 1.5 time more than 𝑟𝑎 .The same as first iteration, algorithm continues with the new cost function to find other cluster centers.
Clustering training data
𝐷𝑖 = ∑𝑛𝑗=1 𝑒𝑥𝑝( −
��𝑥𝑖−𝑥𝑐1𝑖 ��
∗
Membership function 𝐵𝑙 is appointed to output following the same instruction “(13)”. ∗ 𝑝 𝑝 𝜇𝐵𝑙 (𝑦0 ) ≥ 𝜇𝐵𝑙 �𝑦0 � 𝑙 = 1,2, … … . , 𝑁𝑦 (13) 𝑝 𝑝 Therefore, a rule is provided related to (𝑥0 , 𝑦0 ) as bellow: ∗ 𝑗∗ 𝑗∗ 𝑗∗ If 𝑥1 𝑖𝑠𝐴1 and 𝑥2 𝑖𝑠 𝐴2 …….and 𝑥𝑛 𝑖𝑠 𝐴𝑛 then y is 𝐵𝑙 If contradicted rules appear in rule base, a strength degree is assigned to each rule like “(14)”; then the rule with maximum degree is chosen as bellow:
�
𝑖 = 1 ,2 ,…𝑛 (7) 𝐷𝑖∗ is maximum value for cost function and 𝑥𝑖∗ is input data with maximum value for cost function. Therefore, (8) 𝑥𝑐1 = 𝑥𝑖∗ 𝑖 = 1 ,2 ,…𝑛 𝐷𝑐1 = 𝐷𝑖∗ The cost function must be updated, using 𝐷𝑐1 and 𝑥𝑐1 to continue the algorithm, as shown in “(9)”. D. Outputs of the Fuzzy System Proposed fuzzy system has been designed to estimate the error in Coriolis flow meter encountering two-phase flowThe error is used to find accurate measured flow in “(15)”. 𝑓 ∗𝑒𝑟𝑟𝑜𝑟 𝑓𝑐 =𝑓𝑖 +( 𝑖 ) (15) 100 Where 𝑓𝑐 is Corrected mass flow rate and 𝑓𝑖 is Apparent mass flow rate. The ability of presented method has been evaluated on experimental data in next section.
𝑗∗
𝑝
∗
𝑝
(14) 𝐷=∏𝑛𝑖=1 𝜇𝐴𝑖 (𝑥0𝑖 )𝜇𝐵𝑙 (𝑦0 ) Rule base is arranged based on three groups of rules: consistent rules, rules with maximum strength degree among contradicted rules, linguistic rules based on conscious or expert science. III. SET UP AND EXPERIMENTAL DATA
Regard to three defined accessible parameters of Coriolis flow meter, input vector becomes, 𝑑𝑎𝑚𝑝𝑖𝑛𝑔 𝑑𝑟𝑜𝑝 𝑖𝑛 𝑑𝑒𝑛𝑠𝑖𝑡𝑦 � 𝑎𝑝𝑝𝑎𝑟𝑒𝑛𝑡 𝑚𝑎𝑠𝑠 𝑓𝑙𝑜𝑤 Since that clustering methods depend on range of data, data must be normalized. 21 Gaussian membership functions are defined completely and evenly for each normalized input dimensions and also normalized output as shown in “Fig.2”.
𝑋input =�
194
International Conference on Artificial Intelligence and Image Processing (ICAIIP'2012) Oct. 6-7, 2012 Dubai (UAE) Table I. Rule base
Training data, needed to design fuzzy system are different values of Coriolis error corresponding to different values of input vector. In order to Recording values of Coriolis error, liquid is flowed through a closed path tube by pump. The tube includes measuring tools and determined points for air injection and making two-phase mode. Load cell is used as error detection and comparison criteria. Experiment is performed for different values of input vector and error is recorded each time. Therefore, input-output paired data are provided to train fuzzy system. Normalized input-output pairs and initial cluster centers obtained by subtractive algorithm are exerted to K-means clustering method to provide 14 cluster centers. Cluster 𝑝 𝑝 centers are used as input-output pairs �𝑥0 , 𝑦0 �, 𝑝 = 1,2, … ,14, to write rules in Look-up table method. The rule base is shown in”Table.1”. The system is expected to estimate Coriolis flow meter error and to show accurate mass flow as result. The results of proposed method on test data are shown in “Fig.3”. Each figure is plotted for determined value of apparent mass flow meter. Horizontal axis indicates the number of sampled data corresponding to determined value of input vector. Actual flow rate differs regard to each value of input vector. Therefore, apparent mass flow rate, observed on Coriolis flow meter, is not valid any more. Qualify of the method to achieve accurate flow rate is obvious comparing to actual flow rate obtained from hardware methods. Results of a multilayer neural network on the same experimental data are shown in “Fig.4”. Regard to actual flow rate obtained from hardware methods, offered fuzzy method is again more qualified to correct mass flow rate in Coriolis flow meters.
Number Of rules
Number Of M.F 𝑦
da
dr
f
1
03
02
02
20
2
03
07
05
18
3
04
21
21
06
4
02
17
14
06
5
04
12
08
14
6
02
20
20
3
7
11
04
03
20
8
04
20
18
07
9
04
18
15
09
10
04
16
12
11
11
11
11
08
17
12
18
11
08
17
13
18
04
03
20
14
02
13
09
11
REFERENCES [1]
[2]
[3]
IV. CONCLUSION Coriolis mass flow meter’s high accuracy and benefits cause to great applications in industry. Instead of using expensive hardware methods, it is better to use low cost software-based method for error correction in presence of two-phase fluid. The proposed method, not only decreases the error of Coriolis mass flow meter to negligible extent; but also, its cost is very low. The proposed method’s ability in accuracy enhancement is obvious comparing to other software methods. This method can be optimized to achieve the best results using some optimization algorithms. This is being studied by the authors and will be published in near future.
[4]
[5]
[6]
[7]
[8] [9]
[10]
[11]
[12] [13]
195
R. P. Evans, J. G. Keller, A. Stephens, and J. Blotter, "Two-phase mass flow measurement using noise analysis," Idaho National Laboratory (INL)1999. Y. Mi, M. Ishii, and L. Tsoukalas, "Flow regime identification methodology with neural networks and two-phase flow models," Nuclear Engineering and Design, vol. 204, pp. 87-100, 2001. M. Meribout, N. Z. Al-Rawahi, A. M. Al-Naamany, A. Al-Bimani, K. Al Busaidi, and A. Meribout, "An Accurate Machine for Real-Time Two-Phase Flowmetering in a Laboratory-Scale Flow Loop," Instrumentation and Measurement, IEEE Transactions on, vol. 58, pp. 2686-2696, 2009. J. Reimann, H. John, and U. Muller, "Measurements of two-phase mass flow rate: A comparison of different techniques," International Journal of Multiphase Flow, vol. 8, pp. 33-46, 1982. A. Skea and A. Hall, "Effects of gas leaks in oil flow on single-phase flowmeters," Flow Measurement and Instrumentation, vol. 10, pp. 145150, 1999 R. Liu, M. Fuent, M. Henry, and M. Duta, "A neural network to correct mass flow errors caused by two-phase flow in a digital coriolis mass flowmeter," Flow Measurement and Instrumentation, vol. 12, pp. 53-63, 2001. M. Henry, D. Clarke, N. Archer, J. Bowles, M. Leahy, R. Liu, J. Vignos, and F. Zhou, "A self-validating digital Coriolis mass-flow meter: an overview," Control engineering practice, vol. 8, pp. 487-506, 2000. Z. Feng, Q. Wang, and K. Shida, "A review of self-validating sensor technology," Sensor Review, vol. 27, pp. 48-56, 2007. M. N. Al-Khamis, A. A. Al-Nojaim, and M. A. Al-Marhoun, "Performance evaluation of coriolis mass flowmeters," Journal of energy resources technology, vol. 124, p. 90, 2002. L. A. Zadeh, "Toward a theory of fuzzy information granulation and its centrality in human reasoning and fuzzy logic," Fuzzy sets and systems, vol. 90, pp. 111-127, 1997. M. Tang, H. W. Yang, W. D. Hu, and W. X. Yu, "Construction of Mamdani type probabilistic fuzzy system," Systems Engineering and Electronics, vol. 34, pp. 323-327, 2012. A. K. Jain, "Data clustering: 50 years beyond K-means," Pattern Recognition Letters, vol. 31, pp. 651-666, 2010. V. Patel and R. Mehta, "Data Clustering: Integrating Different Distance Measures with Modified k-Means Algorithm," 2012, pp. 691-700.
International Conference on Artificial Intelligence and Image Processing (ICAIIP'2012) Oct. 6-7, 2012 Dubai (UAE)
Fig.2. Membership functions
Fig.3. Result of fuzzy system
Fig.4. Result of neural network
196