Abstract
This paper presents a new computational method for the decentralized multiphase flow measurement based on the interconnections between the two subsystems to precisely estimate the states of the multiphase flow at the gas refinery. The states of the condensate and gas sub-systems were separately estimated using the Differential Mean Value Theorem by considering the relationship between two subsystems, designing an observer and converting the conditions to linear matrix inequality. To check the stability and performance of the system against the changes, the Lyapunov theory has been used. The states behavior investigated with and without disturbance in the system output and dynamics. Additionally, the Unscented Kalman Filter based on the simplified drift flux model was used to estimate the states. It is found that both observers are capable to identify the states with some differences in performance and drift flux model is sufficient for estimation of parameters and states.
Keywords: Petroleum engineering, Soft computing, Control systems, Nonlinear control system, Computational fluid dynamics, Petroleum industry, Decentralized measurement system, Multi-phase flow, Condensate and gas, Soft sensor, Nonlinear observer, Mean value theorem, Unscented Kalman filter
Petroleum engineering; Soft computing; Control systems; Nonlinear control system; Computational fluid dynamics; Petroleum industry; Decentralized measurement system; Multi-phase flow; Condensate and gas; Soft sensor; Nonlinear observer; Mean value theorem; Unscented Kalman filter
1. Introduction
The growth of population and limitation of hydrocarbon sources in the world have resulted in higher demand which, in turn, continuously affect the price of these products. High price of energy resources, including oil and gas extracted from the well may be processed at the platform, or may be directly oil and gas, depicts the need for increased measurement precision. Although technological progresses in the field of single-phase fluid measurement have been acceptable and the existing systems are adequately accurate, they are not precise enough when are used for multiphase fluids (gas, liquid, solid). Due to the nature of the fluid extracted from the well and high fluid temperature and pressure variations over the long transportation pipeline, it may behave like a multiphase fluid. Therefore, it should be measured as a multiphase fluid either at the platform or the entrance of the refinery. Figure 1 presents a schematic of the input multiphase fluid (gas-liquids), distribution among different refinery units, and existing measurements (see Figure 2).
Figure 1.
Existing subsystems, the system boundaries, and the inlet and outlet of the subsystems.
Figure 2.

Schematic of Multi phase flow soft sensor.
In the recent years, the multiphase fluid measurement has attracted many researchers, and many studies have been conducted on different aspects and applications of it. Some researchers have used single phase conventional technologies to measure multiphase flow rate [1, 2, 3, 4], but due to the strong dependence of flow measurement on the composition and flow characteristics in two-phase fluids, these methods have a high level of measurement uncertainty. Some papers review different instruments, measurement strategies and principle technologies introduced until now and describes some methods such as inferential approach, phase separation, Microwave attenuation, Impedance method, gamma attenuation, cross-correlation method for measuring the velocity and phase fraction in multiphase flow in pipeline [5, 6, 7]. In [8] the mass flow rate is estimated in a gas–liquid two-phase flow through a measurement system consisting of a Venturi or orifice plate flow meter coupled to an impedance void meter of the non-intrusive resistance type. In [6, 7, 9] pulsed-array sonar clamp-on flow meters as the primary flow measurement devices have been coupled to an Equation of State based compositional model to facilitate the use of composition data. Some studies focus on using the non-intrusive instrumentations for estimation of multiphase flow specifications, for example, a study reviews the using, limitations and future developments of non-intrusive optical infrared sensing technique for gas–liquid flow characterization in pipes [10], and authors of [11] studied the effects of high viscosity on heavy oil two-phase flow characteristics such as pressure gradient, liquid holdup, slug frequency and slug liquid holdup using a non-intrusive advance instrumentation such as Electrical Capacitance Tomography. This technique is widely used for gas-solid two phase flow measurement but suffers from the nonlinear response of the measurement to the particle distribution [12, 13].
Due to the technological challenges, the conventional methods either are costly and need much equipment, or are not capable of making highly-accurate direct measurements. As a result, using soft sensors is a solution to overcome the existing problems and increase the accuracy of multiphase fluids measurement [14]. In this regard, the Different types of Kalman filter (KF) such as extended (EKF) or unscented (UKF) Kalman Filter area well-established technique for state estimation [15, 16].
As a result, a broad range of studies have concentrated on the application of inferential methods with a focus on wells subjected to gas lifting operation [17, 18, 19]. In [20], assuming that the lateral flows of the porous tubes are known, the volume fraction and different phase velocities were investigated. Despite numerous researches on the multiphase flow and soft sensors, the most attention has been concentrated on the multiphase fluids for drilling, gas lifting, and down-hole systems rather than multiphase flows in production units, refineries, and petrochemical plants [21, 22]. In most oil and gas platforms and production units like gas refineries, due to the fluid nature, lack of appropriate technology, and the high cost of the peripheral equipment, the direct measurement of the outlet fluid from the well is neither accurate nor even feasible.
The simplified drift flux model (DFM) is based on one momentum conservation equation, allows for transition between single and two phase flows, without predictions of flow-regime. In this model, multiphase fluid treats as a mixture but at any moment accounts an empirical slip law for the velocity difference between gas and liquid. The drift flux model (DFM) has been shown to typically have a better performance than other models for multiphase fluids [23, 24, 25]. In this paper, a simplified DFM is used.
Despite many studies on the multiphase flow measurement and soft sensors, there are scant studies on the flow measurement inside the refineries and petrochemical plants; therefore, this study intends to investigate this subject. Some studies have used DMVT capability in conversion of estimation error dynamics into linear parameter-varying (LPV) systems to ensure the validity of for the ordinary Lyapunov function, , which uses LMI to prove the convergence of the observer [26]. The existing flow measurement systems in a gas refinery's entrance have a high level of error and this low accuracy causes a large difference between the downstream and upstream flow measurement figures. Oil and gas production units are usually heavily instrumented with a large number of single/multiphase flow meters which have high establishment, maintenance and repair costs. For these reasons, soft sensors have been established as a serious powerful alternative to the traditional means in the process control of oil and gas fields [27]. Accordingly, this study intends to find a soft sensor to estimate multiphase fluids for two purposes: as a hot redundant system for the existing system and as a substitute for low-accurate available systems.
Some models have focused on monitoring of wells and parameter estimation for drilling, gas injection and gas lifting operations [17, 20] or they have used for parameter estimation and prediction of the primary variables in a single independent process like distillation towers, ammonia synthesis or reactors [28, 29]. But none of them are based on decentralized measurement and multiphase flow at the gas refinery's entrance considering the interconnections between plants.
The main contribution of this paper is, presenting a new form of the soft sensor using the new decentralized Lyapunov-based observer to measure the multiphase flow at the entrance of a gas refinery, which leads to better performance, higher accuracy, and repeatability.
In this paper, to show the performance of the proposed adaptive observer, it is evaluated against and compared with the Unscented Kalman Filter and HYSYS simulator using information collected from the actual process in a real gas refinery. Furthermore, DFM for flow characterization in the decentralized multiphase flow measurement system is evaluated.
The outstanding achievements accomplished with this soft sensor are as follows:
-
-
This soft sensor increases accuracy of multiphase flow measurement by using a relatively simple model, without the need to use the costly and high-maintenance multiphase measurement systems.
-
-
According to the API and AGA standards, acceptable accuracy of single phase fiscal flow measurement for gaseous is 1% and for liquids is 0.15%, using this soft sensor, RMSE metric for the liquid flow measurement is better than 0.12% and for the gas flow measurement is better than 0.34%. Thus, this technique not only can be used as an alternative to the costly multiphase measurement systems or low-accuracy conventional systems but also serves as a fault-detection system or as a backup when the existing measurement system is in fault or removed due to maintenance or replacement.
-
-
Evaluating the DFM for flow characterization in the decentralized multiphase flow measurement system consisting of two interconnected subsystems in the gas refinery inlet employing a decentralized Lyapunov-based observer and Unscented Kalman Filter.
-
-
Consistency of both estimators with the real process in a gas refinery in the South Pars Gas Complex (SPGC) in Iran is shown.
2. Gas refinery system
Most inlet flows to the gas refineries, consist of multiphase hydrocarbon fluids. The overall system comprises two large interconnected sub-systems. The condensate stabilization unit and gas reception unit are two main sub-systems of the gas refinery's processing plant. The existing subsystems, the system boundaries, and the inlet and outlet of the sub-system are as shown in Figure 1.
In this system, the multiphase fluid passes through a slug catcher immediately after entering the gas refinery. Given the fact that condensate is not extracted completely from gas, so outlet condensate from the slug catcher contains some gas and outlet gas from the slug catcher contains some condensate. For this reason slug catcher output is divided into two two-phase lines (a gas line containing some condensates and a condensate line containing some gas). It is evident that the main system was assumed as a decentralized system composed of two distinct interconnected sub-systems. The simplified drift flux model (DFM), as a representation of the law of conservation of mass and momentum, are used to handle multiphase fluid in a tube. The sub-systems are described separately using three equations (conservation of mass for the liquid, conservation of mass for the gas, and conservation of momentum for the mixture). Consequently, two sets of three equations are obtained.
In practice, input flow to the refinery is obtained from the measurement of the refinery's output gas. In that, the dry gas delivered to the export pipeline from the refinery output is measured with a single-phase flow meters, then, the amount received at upstream is calculated by the application of shrinkage factor. For example, the measured amount of dry gas was 46.8 million-square-feet per day (MMSCFD), and by applying the shrinkage factor (in this case is equal to 1.13), received gas from the upstream is reported as 52.88 MMSCFD. In contrast, the well production at upstream was reported as the amount of gas delivered to the plant based on the presence of a high-pressure Venturi meter and/or based on the opening of the wellhead Choke valve. According to above table, this production was reported 57.9 MMSCFD. This method produced an error rate of 8% in the upstream-downstream exchanges, indicating a high level of error and low level of accuracy. The main causes of the errors were:
-
•
Varying amounts of water, flare, fuel, etc. were assumed to be fix and certain.
-
•
Reported shrinkage factor dated back to the refinery's commissioning time; whereas, all of the process conditions have been changed, equipment's efficiency reduced, therefore shrinkage factor could not be assumed fix
-
•
The lack of accuracy of upstream meter and choke valve opening figures.
-
•
Multiphase flow at the upstream and refinery's entrance.
The mentioned items are the clear reasons for using soft sensors to reduce energy dissipation and increase condensate and gas measurement accuracy (see Table 1).
Table 1.
Input and output balance in real.
| (MMSCFD)Values | Title |
|---|---|
| 57.9 | sent reach gas (upstream) |
| 52.88 | Received reach gas (refinery) |
| 46.8 | Export gas to IGAT |
| 2.11 | Condensate |
| 1.97 | Fuel |
| 0.62 | Acid gas to sulfur production |
| 0.13 | Flare |
| 0.2 | Water content |
3. Dynamic model
The simplified drift flux model (DFM) are the main governing equations for flow in the pipe and law of conservation of mass and momentum have been used in dynamic models extraction in this study. This equations have been written for each subsystem separately in a way that for each subsystem, 3 equations are generated which are conservation of mass for liquid and gas and conservation of momentum for mixture and consequently, we will have 2 sets of a triple equation [20]. One-dimensional equations have been investigated by several researchers [30, 31, 32], due to the high ratio of length/diameter, negligible motion in the directions perpendicular to the flow axis, the flow direction is dominating and because the flow velocity profile is fully developed, so by carrying out averaging of Navier Stokes equations at each cross section, one-dimensional equations are obtained.
Some assumptions must be considered before writing equations:
-
1.
Condensate and water will be considered one phase liquid.
-
2.
The flow velocity will be considered only in the flow direction and in any other direction it will be ignored.
-
3.
Phase transfer is assumed ignorable.
-
4.
Subsystems interconnections assumed to be single phase never include any second-phase.
The system dynamic model is extracted from the simplified drift flux model (DFM) and finally by generalizing it into two subsystems, a solvable general format will be achieved. The conservation of mass and momentum in a control volume will be as follows [33]:
| (1) |
| (2) |
In these formula, p is the line pressure, ρ is the density, α is the volume fraction of each phase, u is the velocity and t shows the time and s is the length of pipe, τw is the shear stress between surfaces, is the interfacial interaction, is the friction losses and is the pipe inclination angle and m is the mass transformation degree and is the mass flow from external source. The phase transfer in the interconnected lines is considered zero and the mass flow from external source is equal to the flow in the interconnections between subsystems.
| (3) |
| (4) |
where L, G indexes are used for condensate and gas subsystems respectively, and are the relation between liquid and gas subsystems in a way that is the volume of extracted liquid from the gas subsystem to liquid process and is the volume of extracted gas from the liquid subsystem to gas process. is directly measurable by primary measuring elements such as orifice and it includes the following specifications:
-
1.
hi can be measured directly and has limited norms and it is Lipschitz, in other words:
| (5) |
-
2.
Interconnections between subsystems are single-phase and do not have second phase.
-
3.
There is no return from the counter process of hi and it is one way flow.
-
4.
Considered disturbances are bounded and .
Considering the limited states of the system, the nonlinear behavior of equations are Lipschitz with definite and limited range.
The law of conservation of momentum will be written for the mixture of each pipe. L, G indexes are used for different subsystems. L stands for condensate and gas mixture in liquid line of unit 103 and G stands for the mixture of condensate and gas in gas line of unit 100.
| (6) |
| (7) |
In the aforementioned conservation of momentum equations, the first equation is for the existing liquid and gas in the condensate line plus the inlet liquid of the interconnection of subsystems from gas process and the second equation is for the existing gas and condensate in gas line plus the received gas from the condensate subsystem.
As is seen in the left side of the equation, exists instead of pipe shear stress. As regards to the fact that most of the pipe friction relations are based on empirical curves to solve this equation, an accurate model of friction loss must be presented [20]:
| (8) |
where d is the pipe diameter and f is the friction factor which depends on pipe roughness and Reynolds number which Blasius correlation has been used for that [34]:
| (9) |
| (10) |
where d is the pipe diameter, V stands for velocity, ρ represent density and μ is viscosity. The mixture velocity and density are as follows:
| (11) |
| (12) |
Flow model is complemented by algebraic slip law so slip relation is taken in to account for difference between gas and liquid velocities and drift relation is taken into account for difference between gas and mixture velocities. Algebraic slip and drift is as follows [35]:
| (13) |
| (14) |
| (15) |
For viscosity, there are several models and the most famous one is Einstein [7]:
| (16) |
The gas pressure will be obtained as follows:
| (17) |
Gas is a compressible fluid and its density depends on the pressure and temperature. In this study, since temperature is assumed to be constant, gas density will depend on pressure and relation (17) will be used.
The important point to note is that the pressure gradient in the right side of the momentum equation will be considered for the total pressure of mixture which is possible for homogenous distribution, but for multi-fluid model using one pressure for all the mixture is not true and may cause inconsistency. Considered model for this study is based on the mentioned model in [7] and will be as follows:
| (18) |
| (19) |
| (20) |
| (21) |
| (22) |
| (23) |
| (24) |
where Ui is the state variable vector, Fi is the flux, hi is the interconnections of subsystems and Qi is the source term, i stands for various phases of flow and n is the number of existing phases, which is n = 2 in the present study and for this reason instead of using number, g or G is used for the gas phase and l or L is used for liquid phase.
As shown, pressure, velocity and phases volume fraction are state variables:
| (25) |
Available measurements are pressure sensors, refinery single-phase meters (that measure gas and liquids as a single-phase with high accuracy), existing analyzers and also inlet meters of refinery that have high uncertainty. The accuracy of existing systems for measuring single-phase gas and liquids located in the refinery outlet is based on MPMS section of API standard and is better than 0.15%, but the existing measuring system in the refinery inlet has more than 5% error which can just be applied for operational purpose, because of using orifice systems for multiphase liquid.
| (26) |
The model inputs are the subsystems interconnections which in this case are the amount of gas from the liquid subsystem to the gas production unit and the amount of liquid from the gas subsystem to the liquid subsystem
| (27) |
A solution for this matter is using Jacobian matrix F to U as follows:
| (28) |
Due to the existence of two dependent variables in F and U, it is a hard to use Jacobian, then in order to simplify the mathematical operation; one set of preliminary variables will be defined. Here, liquid volume fraction, pressure and velocity are selected as preliminary variables which are not unique. The point that must be taken into account is that in this formula, we have and if just for one repetition, we have zero determinant, the existing matrix is not reversible and no estimation will be done. To avoid having zero determinant and to overcome this problem, a new idea is presented and the main states are extracted based on primitive variables:
| (29) |
| (30) |
| (31) |
Changing the variables and defining new matrixes, equation form will be changed to the new following form:
| (32) |
The detail calculations of the new form of equations are presented in Appendix. A:
The decentralized system equations will be as follows:
| (33) |
| (34) |
Following the fact that in real existing process in the refinery, the outlet measured signals and system variables are exposed to disturbance. W1 and W2 are constant weight matrixes and is the disturbance vector and it is limited as and by adding disturbance to Eqs. (33) and (34), the general from of the equations become as follows:
| (35) |
4. Observer design
Here, based on system model, nonlinear observer is designed, first without considering disturbance and then by considering disturbance that affects dynamic and output signals. Most of the researches performed in the field of decentralized systems are by realizing the following inequalities and considering the interconnections between subsystems hi(v(t)) as an indefinite function. One of the important things that must be considered is the Jacobean limitation of this function that can be defined as follows [26]:
| (36) |
This inequality emphasizes that h(v(t)) is αi Lipchitz and Q(v(t)) is βi Lipchitz, such that:
The total system will be as follows:
| (37) |
where , , , , ., and it is assumed that they are differentiable versus v.
Using the matrixes and the general equations, the observer form is as follows:
| (38) |
The initial conditions are as follows:
where is the state estimation and L is the observer gain matrix. As mentioned earlier in this system, no control action is done and controller optimization is not followed and observer optimization is followed in such a way that estimation error converges to zero which means .
According to the existing interconnection between subsystems, the estimated error of dynamic is as follows:
| (39) |
where,
Considering the aforementioned formula, the augmented system will be as follows:
| (40) |
where it can be shown that:
| (41) |
To ensure asymptotical stability of system, the new LMI is calculated to achieve observer gain L.
5. Performance analysis
For stability analysis, we use Lyapunov method and define the following normal Lyapunov function:
| (42) |
Where Lyapunov matrix P is as follows:
| (43) |
where and are Lyapunov matrixes which are definite positive and it confirms the positivity of .
The issue is divided in to two parts: first we will analyze stability condition without the existence of disturbance and then we will consider the presence of disturbance. First, we consider that disturbance is zero where and for realizing this condition, we will survey .
| (44) |
This results in:
| (45) |
So if , based on definition 1 in Appendix B, the vectors H, Q and ΔQ can be written as follows:
| (46) |
Remark: As shown in Formula 45, these sentences do not have square form and for this reason a transform function is used to change to a square inequality form, so for this reason, by using Eq. (41), we will have:
| (47) |
where:
| (48) |
Based on Eq. (45) and the existing propositions in [36], the asymptotical stability conditions will become as follows:
| (49) |
Theorem 1 [37]:estimation error is asymptotically stable if there exist matrices and R of appropriate dimensions such that the following LMI is feasible:
where:
| (50) |
With this condition, LMI is feasible and observer optimization equals .
Theorem 2: In using Theorem 1, global system is stable in the sense of Lyapunov if there exist and observer gain with appropriate dimensions exists such that the following LMI is feasible:
| (51) |
| (52) |
To ensure if , the following LMI must be accessible:
| (53) |
where:
| (54) |
| (55) |
| (56) |
| (57) |
By multiplying the two sides of this inequality (Eq. (53)) by the following matrix and changing the variable , we will have:
| (58) |
As a result, the inequality (Eq. (53)) will be as follows:
| (59) |
Based on the proven Theorem 4.1 in [37], if LMI becomes feasible, by solving this, the observer optimization becomes .
Scenario 2: We assumed that which means that the system is considered in the presence of disturbance. For the proposed system model in (37) and designed observer in (38), this problem changes to observer design which leads to the determination of observer gain L in a way that the estimation error converges to zero [14]. In other words:
| (60) |
| (61) |
where is the scalar number which shows the disturbance attenuation level. To provide Eqs. (60) and (61), we must find Lyapunov function as follows:
| (62) |
To ensure Eq. (62) is acquired from Eqs. (60) and (61) is too simple. By integrating both sides of Eq. (48), we will have:
| (63) |
By considering that for all time span, , will be confirmed. The presented system in Eq. (37) and designed observer in Eq. (38) are accessible, if P and Z are found appropriately, then the following LMI is possible:
Thus, the mentioned LMI will be achieved in the following way:
| (64) |
It can observed that in this condition, LMI is also feasible by using Theorem 1 and solving that the observer gain will be .
6. Unscented Kalman Filter
The Kalman filter is a recursive estimator, which estimates the states and parameters of a linear systems by integrating measured data in real-time. It is initially developed for linear systems but several extensions of that exist for nonlinear systems which Unscented Kalman filter (UKF) is one of the most popular extensions because of its ease of implementation and simple concept. One of the most common way of applying the Kalman Filter (KF) for a nonlinear system is the augmented Extended Kalman Filter (EKF) with using linearization and estimating both the state and parameter vectors of the system. The EKF needs the Jacobian matrices which is difficult to obtain for higher order systems. Further, the linearization may introduce errors in the state estimation which may lead the state to diverge over time [38]. The Unscented Kalman Filter principle is simple and easy to implement as it does not require the calculation of Jacobian at each time step [39]. In [40, 41], it is shown that for nonlinear systems the unscented Kalman filter (UKF) has a better performance than other Kalman filter types. In UKF the propagation of the mean and covariance matrix of the estimation error is done through nonlinear transformations and sample points which are termed as sigma points around the mean value by using a deterministic sampling approach known as the unscented transformation [42].
The augmented state vector is defined by where X is the state and is the parameters of the model.
Each sigma point is propagated through the nonlinear process so that the augmented state vector for the discrete time step k is written as follows:
| (65) |
where is the zero mean white Gaussian noise. Measurements and corrupting zero mean white noise for discrete-time model will be added as follows:
| (66) |
The process noise covariance matrix () of UKF for system model and measurement noise covariance matrix () are as follows:
| (67) |
Choosing the () specifies trade-offs in the UKF design. Choosing larger () leads to faster convergence but typically more error in the estimation and choosing smaller () leads to slower convergence but typically less error in the estimation.
7. Simulation
In this article, measurements, data and information are acquired from a real process of a gas refinery in the POGC in Iran which are fed to HYSYS simulator. Because the results obtained from the DMVT simulation are time dependent and multiphase flow averaging over 24 h is constant, the averaged data is basically not suitable to determine the accuracy of the model thus getting this data from the refinery to prove the accuracy of the code is not the right justification. Therefore we need to provide another type of data that can validate the results of observer simulation, so the performance of the nonlinear observers based on DMVT model is evaluated against UKF based on a simplified model by using measurements from the HYSYS simulator.
The upwind scheme has been used for numerical solution. The use of the upwind discretization leads to a numerical scheme which is first order accurate in space. But for more accuracy we have used second order upwind scheme. Schematic of discretization is added in the article. To perform numerical solution of the drift flux model in the form of Eqs. (3) and (4), first, we discretized the spatial domain into a finite number of control volumes without overlapping between them. The mentioned differential equations are integrated over each control volume as Figure 3. Cell centers and length of the grid blocks of mesh is as follows:
| (68) |
| (69) |
Figure 3.
Discretization of spatial domain.
The values of the variables are located at the center of cells so is the block variables, so for each subsystem we have 24 nodes with a time step of 0.01second via 100 m length of the pipes. Pipes material is carbon steel ASTM A106 Seamless. Simulation is performed by using MATLAB in parallel by HYSYS simulator. We have used HYSYS with real process data to check the performance of designed observer and run the MATLAB code using measurement from the dynamic HYSIS simulator. All parameters and variables used in the simulation are in line with the existing process in the refinery. In the Table 2, the related information about a real process is mentioned:
Table 2.
Real process data for numerical solution.
| Pipe roughness (m*10−6) | Gas Density (kg/m3) | Gas Viscosity (Pa.s) | Liquid Viscosity (Pa.s) | Liquid Density (kg/m3) | Gas pipe Diameter (mm) | Liquid pipe Diameter (mm) |
|---|---|---|---|---|---|---|
| 45 | 12 | 1.9E-5 | 0.01 | 1000 | 457 | 203 |
The results of simulations are as shown in the following figures. Figure 4 shows the real and estimated total state variables of both subsystems. Because of the high number of trends and figures, the liquid phase fraction, density and velocity are illustrated separately in Figures 4, 5, 6, 7, 8, and 9. So velocities in gas and condensate pipes at node 12 as essential variables in flow measurement are illustrated in Figures 10 and 11. Node 12 is chosen just as a sample without any importance.
Figure 4.
Liquid phase fraction and its estimation in the Liquid pipe.
Figure 5.
Liquid phase fraction and its estimation in the Gas pipe.
Figure 6.
Density and its estimation in the condensate pipe.
Figure 7.
Density and its estimation in the Gas pipe.
Figure 8.
Velocity and its estimation in the condensate pipe.
Figure 9.
Velocity and its estimation in the Gas pipe.
Figure 10.
Gas line velocity at node 24.
Figure 11.
Condensate line velocity at node 24.
As it is shown, all states are estimated with reasonable accuracy.
Velocities and liquid fractions in gas and liquid pipes versus pipes length are illustrated in Figures 12 and 13. This results show that because of frictional losses, the velocity of fluid along the pipe length is reducing but liquid phase fraction is increasing. These variables are identified with reasonable accuracy by both estimators.
Figure 12.
Liquid fraction and velocity in condensate line.
Figure 13.
Liquid fraction and velocity in gas line.
The estimation of the liquid phase fraction in the gas and condensate subsystems versus the pipes length are shown in Figures 14 and 15, respectively. The estimates of both algorithms are converging quite fast, less than 20 min but the time factor is not shown in these figures. The DMVT-based observer has better performance than the UKF for estimation of the liquid phase fraction.
Figure 14.
Liquid fraction in the condensate line.
Figure 15.
Liquid fraction in the gas line.
HYSYS simulation was conducted based on this real process data, partially presented in Table 2. In this simulation, pressure control on the pipelines, as well as pressure and level control for storages were considered.
The RMSE metric for the DMVT-based observer and UKF for both models during the estimation period for the states in case of 1% error on the pipe pressure measurements, are summarized in Table 3.
Table 3.
RMSE metric for states.
| Method | Density | Velocity | Liquid Phase fraction |
|---|---|---|---|
| DMVT observer | |||
| UKF |
According to the RMSE metric Table 3, the DMVT-based observer has better performance than UKF for estimation of the states. Since the point wise volumetric flow rate is obtained by multiplying the velocity to the cross-sectional area and by multiplying the result to the density, the mass flow rate is evaluated. So because the line pressure has a direct effect on the states which are directly related to the mass flow rates in the subsystems, small inaccuracies in the line pressure measurement have a significant effect on the estimation of flow rate. As is clear from the figures, UKF needs more time to reach its asymptotic level of accuracy, therefore, also its performance is satisfactory but it is lower than performance of proposed observer.
8. Conclusion
In this article, the simplified drift flux model (DFM) is used for multiphase fluids at the gas refinery entrance, as a decentralized system composed of two subsystems, and converted into conventional equations, based on which a decentralized nonlinear observer was designed considering the subsystem interconnections. Then, its stability was investigated using DMVT and converting this system into a LPV system and the conditions into linear matrix inequality (LMI). Finally, a disturbance with bonded norm was applied to the system dynamics and output.
The HYSYS simulation is used to obtain the required measurements and the result of this simulation will be a reference for comparing the performance of proposed methods.
Additionally, the Unscented Kalman filter (UKF) based on the simplified drift flux model (DFM) was used to estimate the states then both methods' results are compared with the HYSYS simulation using the real process data, it is found that both observers (DMVT based and UKF) are capable to detect and identify the states using a simulated scenario with HYSYS simulator with some differences in performance and drift flux model (DFM) model is sufficient for estimation of parameters and states of the multiphase flow entering the gas refinery.
Although the results show that all states are identified with reasonable accuracy by both estimators, the DMVT-based observer has better performance than the UKF based on DFM for estimation of the flow characteristics of multiphase flow but the proposed DMVT observer is more sensitive to errors in the refinery's output and parameters of the model than the UKF. The simulation results indicate high efficiency of both estimation methods without needing observer gain, suggesting that the proposed methods are suitable for stable operational conditions and have high reliability.
Declarations
Author contribution statement
Abolfazl Varvani Farahani & Mohsen Montazeri: Conceived and designed the experiments; Performed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.
Funding statement
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Competing interest statement
The authors declare no conflict of interest.
Additional information
No additional information is available for this paper.
Appendix A. PDE detail calculation
Based on Equations 13 to 19, Formula 27 will be as follows:
Appendix B. DMVT Application
Definition 1: [26] We assume QUOTE and QUOTE and also that is differentiable on convex . If we have the S set as follows:
Then exists for i=1,…,n in such a way that:
Based on Definition 1 and Theorem 9 in [26], it can be concluded that one Z vector exists as follows: Such that:
where:
So if the vectors H, Q and ΔQ can be written as follows:
References
- 1.Wang Wenran T.Y. A new method of two-phase flow measurement by orifice plate differential pressure noise. Flow Meas. Instrum. 1995;6(4):265–270. [Google Scholar]
- 2.Sahand Pirouzpanah L.M., Çevik Muhammet, Gerald Multiphase flow measurements using coupled slotted orifice plate and swirl flow meter. Flow Meas. Instrum. 2014:157–161. [Google Scholar]
- 3.Johnson Stuart F.M.W. Development of a turbine meter for two-phase flow measurement in vertical pipes. Flow Meas. Instrum. 1995;6(4):179–282. [Google Scholar]
- 4.Shi X., Tan C., Dong F., Murai Y. Oil-gas-water three-phase flow characterization and velocity measurement based on time-frequency decomposition. Int. J. Multiph. Flow. 2019;111:219–231. [Google Scholar]
- 5.Magnus E., Tore B., Hallanger A. Gamma-ray tomography applied to hydro-carbon multi-phase sampling and slip measurements. Flow Meas. Instrum. 2010;21(3):240–248. [Google Scholar]
- 6.Najmedini M., Habibi R. “Multiphase flow Meter : a review. Oil Gas Petrochemicals Lett. 2017;2:1–13. [Google Scholar]
- 7.Thorn B.H.R., Johansen G.A. Three-phase flow measurement in the petroleum industry. Meas. Sci. Technol. 2013;24 [Google Scholar]
- 8.Luiz J., Oliveira G., César J., Verschaeren R., Van Der Geld C. Mass flow rate measurements in gas – liquid flows by means of a venturi or orifice plate coupled to a void fraction sensor. Exp. Therm. Fluid Sci. 2009;33(2):253–260. [Google Scholar]
- 9.Gysling D.L., Meters E. 28th Int. North Sea Flow Meas. Work., no. October. 2010. Clamp-on two phase measurement of gas condensate wells using integrated equation of state compositional models; pp. 1–18. [Google Scholar]
- 10.Sarkodie K., Fergusson-rees A., Diaz P. “A review of the application of non-intrusive infrared sensing for gas – liquid flow characterization. J. Comput. Multiph. Flows. 2018;10(1):43–56. [Google Scholar]
- 11.Baba Y.D., Aliyu A.M., Archibong A. Study of high viscous multiphase phase flow in a horizontal pipe. Heat Mass Transf. 2017;54:1–19. [Google Scholar]
- 12.Tan C., Jia J., Xu C., Sun Z., Ding F. Multiphase flow measurement: techniques and applications. IEEE Access. 2018;6:32673–32675. [Google Scholar]
- 13.Santos A.M., Alho A.T.P. 2018. Metrological Concerns in Multiphase Flow Measurement. [Google Scholar]
- 14.Santos E.N.D.O.S. Sensing platform for two-phase flow studies. IET Sci. Meas. Technol. 2019;7:5374–5382. [Google Scholar]
- 15.Luigi Fortuna M.G., Xibilia Salvatore Graziani, Rizzo Alessandro. Springer-Verlag; 2007. Soft Sensors for Monitoring and Control of Industrial Processes. [Google Scholar]
- 16.Nikoofard A., Johansen T.A., Kaasa G.O. Reservoir characterization in under-balanced drilling using low-order lumped model. J. Process Control. 2018;62:24–36. [Google Scholar]
- 17.Teixeira B.O.S., Castro W.S., Teixeira A.F., Aguirre L.A. Data-driven soft sensor of downhole pressure for a gas-lift oil well. Contr. Eng. Pract. 2014;22(1):34–43. [Google Scholar]
- 18.Grimstad B., Foss B. 2014. A Nonlinear , Adaptive Observer for Gas-Lift wells Operating under Slowly Varying Reservoir Pressure; pp. 2824–2829. [Google Scholar]
- 19.Yan Y., Wang L., Wang T., Wang X., Hu Y., Duan Q. “Application of soft computing techniques to multiphase fl ow measurement : a review. Flow Meas. Instrum. 2018;60:30–43. March. [Google Scholar]
- 20.Gryzlov R.F.M.A., Leskens M. A semi-implicit approach for fast parameter estimation by means of the extended Kalman filter. J. Process Control. 2011;21:510–518. [Google Scholar]
- 21.Nævdal G., Nygaard G. Nonlinear model predictive control scheme for stabilizing annulus pressure during oil well drilling. J. Process Control. 2006;16(7):719–732. [Google Scholar]
- 22.Amirhossein Nikoofard G.-O.K. 2014. Tor Arne Johansen, “Nonlinear Moving Horizon Observer for Estimation of States and,” in ASME 2014 Dynamic Systems and Control Conference; pp. 13–16. [Google Scholar]
- 23.Masella C.P.J.M., Tran Q.H., Ferre D. Transient simulation of two-phase flows in pipes simulation. Int. J. Multiph. Flow. 1998;24:739–755. [Google Scholar]
- 24.Aarsnes U.J.F., Di Meglio F., Evje S., Aamo O.M. ASME 2014 Dynamic Systems and Control Conference. 2014. Control-Oriented Drift-Flux Modeling of Single and Two-phase Flow for Drilling. [Google Scholar]
- 25.Luis A.A., Texeira Brono O.S., Castro Walance S., Texeira Alex F. Data driven soft sensor of downhole pressure for a gas lift oil well. Contr. Eng. Pract. 2014;22:34–43. [Google Scholar]
- 26.Zemouche A., Boutayeb M., Bara G.I. Observers for a class of Lipschitz systems with extension to H ∞ performance analysis. Syst. Control Lett. 2008;57:18–27. [Google Scholar]
- 27.Kadlec P., Gabrys B., Strandt S. Data-driven soft sensors in the process industry. Comput. Chem. Eng. 2009;33(4):795–814. [Google Scholar]
- 28.Shao W., Song Z., Yao L. Soft sensor development for multimode processes based on semisupervised. IFAC-PapersOnLine. 2018;51(18):614–619. [Google Scholar]
- 29.Shao W., Tian X., Wang P., Deng X., Chen S. Online soft sensor design using local partial least squares models with adaptive process state partition. Chemometr. Intell. Lab. Syst. 2015;144:108–121. [Google Scholar]
- 30.Azad M.A.K., Andallah L.S. An analytical solution of 1D Navier-Stokes equation. Int. J. Sci. Eng. Res. 2014;5(2):1342–1348. [Google Scholar]
- 31.Marmanis H., Hamman C., Kirby R. 2006. A One-Dimensional Model of the Navier-Stokes. [Google Scholar]
- 32.Beaulieu A., Foucault E., Braud P.S.P. A flowmeter for unsteady liquid flow measurements. Flow Meas. Instrum. 2011;22:131–137. [Google Scholar]
- 33.Aarsnes O., Di Meglio U.J.F., Evje F., Aamo S. In ASME 2014 Dynamic Systems and Control Conference. 2014. Control-oriented drift- flux modeling of single and two-phase ow for drilling. [Google Scholar]
- 34.Superpipe P. A new friction factor relationship for fully developed pipe flow. 2005;538:429–443. [Google Scholar]
- 35.França R.T., Lahey F. The use of drift-flux techniques for the analysis of horizontal twophase flows. Int. J. Multiph. Flow. 1992;18:787–801. [Google Scholar]
- 36.Boyd V.B.S., Ghaoui L.E., Ferron E. Studies in Applied Mathematics (SIAM); Philadelphia: 1994. Linear Matrix Inequalities in Systems and Control Theory. [Google Scholar]
- 37.Zemouche A., Boutayeb M., Bara G.I., Bd S. 2005. Observer Design for Nonlinear Systems : an Approach Based on the Differential Mean Value Theorem; pp. 6353–6358. [Google Scholar]
- 38.Kordić V. Vol. 1. TU Wien; Austria: 2006. Kalman Filter. [Google Scholar]
- 39.Kandepu R., Foss B., Imsland L. Applying the unscented Kalman filter for nonlinear state estimation. J. Process Control. 2008;18(7):753–768. [Google Scholar]
- 40.Simon D. Wiley; 2006. Optimal State Estimation: Kalman, H Infinity, and Nonlinear Approaches. [Google Scholar]
- 41.Binqi Zheng X.Y., Fu Pengcheng, Li Baoqing. A robust adaptive unscented Kalman filter for nonlinear estimation with uncertain noise covariance. Sensors. 2018;18(808) doi: 10.3390/s18030808. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Julier S.J., Uhlmann J.K. Unscented filtering and nonlinear estimation. Proc. IEEE. 2004;92(3) [Google Scholar]














