Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis...

5
Inferring Polished Rod Position from Torque Current of the Motor Emanuel Benício de A. Cajueiro, Ricardo de Araujo Kalid, Leizer Schnitman Postgraduate Program in Industrial Engineering Federal University of Bahia Rua Aristides Novis, nº 02, Escola Politécnica, Salvador, Bahia BRAZIL [email protected] Abstract: - It is well known that the dynamic position of the rod pumping aid in the diagnosis of onshore oil wells and can be used to control the pumping unit. Even today the acquisition of the position of the polished rod is made using physical transducers of position. However, this paper shows that the dynamic position of the polished rod can be inferred from torque current (which is given by sensorless vector AC-drive) of a three- phase induction motor using a nonlinear autoregressive model with exogenous input based on wavelet network (wavenet). The set of input-output data was collected from a pumping unit system installed in an oil-well developed for tests. The model orders were evaluated using Akaike's final prediction error (FPE). The results obtained in the validation step show that, for the experimental set used in this work, the best estimated model may be used in place of the physical transducer of position. Key-Words: - Sucker-rod pumping; polished rod position, system identification; NARX model; wavenet; wavelet. 1 Introduction Sucker-rod pumping is the artificial lift method for on shore oil wells most used all over the world [1]. This equipment transforms a rotary motion provided by prime mover in a reciprocating motion that is transferred to the downhole pump by a set of rods in the form of a vertical displacement, which provides mechanical energy to the fluid allowing its elevation to the surface [2]. The dynamic position of the polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump dynamometer card, which is a plot of the calculated loads at various positions of pump stroke, and represents the load the pump applies to the bottom of the rod string [3]. It is usually calculated from the surface dynamometer card, which is a relationship between the measured or predicted rod loads at the various positions through a complete stroke [2]. Since the 60´s many studies have been developed in order to build models that computer-aided are able to reproduce the dynamic behavior of sucker- rod pumping, as in [3]-[7]. However, due to the highly nonlinear nature of the relationship oil well/sucker-rod pump, the applicability of these studies for prediction or simulation on field in a real system requires much effort, and therefore, even today, the acquisition of the rod position is done using physical transducers. According [8] and [9], it is possible to model a dynamic system directly from input and output data measured; through of a structure model that does not use any priori information about the system behavior. This type of structure is known as black- box models. According [9], there are two main reasons for obtain a model from a dynamic system using the input-output data in a black box approach: “(1) even the best theoretical model built from equations of motion is still only an approximation of reality, (2) secondly, due to situations where the theoretical model is more complicated, or the physics of the process is poorly understood, the only reliable information is experimental data”. This paper uses a nonlinear black-box model to infer the polished rod position from the torque current of the three-phase AC induction motors. More specifically, a nonlinear autoregressive model with exogenous input (NARX) based on wavelet network (wavenet) [10], [11]. The main advantage in the use of torque current is that this information is given by sensorless vector AC-drive, which is used in most onshore wells for starting and speed control of AC induction motors. 2 NARX Model The nonlinear autoregressive with exogenous input models is based on the linear ARX model and is a Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications ISBN: 978-1-61804-028-2 283

Transcript of Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis...

Page 1: Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump

Inferring Polished Rod Position from Torque Current of the Motor

Emanuel Benício de A. Cajueiro, Ricardo de Araujo Kalid, Leizer Schnitman Postgraduate Program in Industrial Engineering

Federal University of Bahia Rua Aristides Novis, nº 02, Escola Politécnica, Salvador, Bahia

BRAZIL [email protected]

Abstract: - It is well known that the dynamic position of the rod pumping aid in the diagnosis of onshore oil wells and can be used to control the pumping unit. Even today the acquisition of the position of the polished rod is made using physical transducers of position. However, this paper shows that the dynamic position of the polished rod can be inferred from torque current (which is given by sensorless vector AC-drive) of a three-phase induction motor using a nonlinear autoregressive model with exogenous input based on wavelet network (wavenet). The set of input-output data was collected from a pumping unit system installed in an oil-well developed for tests. The model orders were evaluated using Akaike's final prediction error (FPE). The results obtained in the validation step show that, for the experimental set used in this work, the best estimated model may be used in place of the physical transducer of position. Key-Words: - Sucker-rod pumping; polished rod position, system identification; NARX model; wavenet; wavelet. 1 Introduction Sucker-rod pumping is the artificial lift method for on shore oil wells most used all over the world [1]. This equipment transforms a rotary motion provided by prime mover in a reciprocating motion that is transferred to the downhole pump by a set of rods in the form of a vertical displacement, which provides mechanical energy to the fluid allowing its elevation to the surface [2]. The dynamic position of the polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump dynamometer card, which is a plot of the calculated loads at various positions of pump stroke, and represents the load the pump applies to the bottom of the rod string [3]. It is usually calculated from the surface dynamometer card, which is a relationship between the measured or predicted rod loads at the various positions through a complete stroke [2].

Since the 60´s many studies have been developed in order to build models that computer-aided are able to reproduce the dynamic behavior of sucker- rod pumping, as in [3]-[7]. However, due to the highly nonlinear nature of the relationship oil well/sucker-rod pump, the applicability of these studies for prediction or simulation on field in a real system requires much effort, and therefore, even today, the acquisition of the rod position is done using physical transducers.

According [8] and [9], it is possible to model a dynamic system directly from input and output data measured; through of a structure model that does not use any priori information about the system behavior. This type of structure is known as black-box models. According [9], there are two main reasons for obtain a model from a dynamic system using the input-output data in a black box approach: “(1) even the best theoretical model built from equations of motion is still only an approximation of reality, (2) secondly, due to situations where the theoretical model is more complicated, or the physics of the process is poorly understood, the only reliable information is experimental data”.

This paper uses a nonlinear black-box model to infer the polished rod position from the torque current of the three-phase AC induction motors. More specifically, a nonlinear autoregressive model with exogenous input (NARX) based on wavelet network (wavenet) [10], [11]. The main advantage in the use of torque current is that this information is given by sensorless vector AC-drive, which is used in most onshore wells for starting and speed control of AC induction motors. 2 NARX Model The nonlinear autoregressive with exogenous input models is based on the linear ARX model and is a

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

ISBN: 978-1-61804-028-2 283

Page 2: Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump

subsystem of NARMAX (nonlinear autoregressive move average with exogenous input) model because it contains only its deterministic part [10]. The NARX attempts to explain the measured system output value, in function from previous outputs and current and previous input values, i.e. 푦(푘)= F 푥(푘) (1) where,

푥(푘) = y(k-1), … ,y(k-푛푎),푢(k –푛푘), … ,u(k – 푛푘 − 푛푏 + 1) (2) represents the memory of the model called vector of the regressors, 푦 and 푢 are the output and input data, respectively. 퐹 is a nonlinear function, 푘 is the discrete time instant, 푛 is the number of autoregressors, 푛 represents the number of exogenous regressors, and 푛 are the delay from input to the output in terms of the number of samples.

In order to improve the capture of the linearity in the sampled data set, it is possible to rewrite (1) as follows,

푦(푘)= F 푥(푘) + 푥(푘)휃 + 푙 (3)

where, 휃 represents the linear coefficients, and 푙 is the output offset. The capacity of approximation of 푥(푘)휃 + 푙 is discussed in full detail in [12]. 3 Wavenet The wavelets present in the wavenet structure used in this work form nonorthogonal bases and were proposed in [11] due to similarity among the inverse discrete wavelet transform (see [14] for more detail) and the neural networks of one hidden layer [13]. The basic idea is that a signal can be represented by a weighted sum of scaling and wavelet functions, as in (6). 푓(푥) = ∑ 푎 휑(퐷 (푥 − 푟)푄 − 푡 ) + ∑ 휔 휓(퐷 (푥 − 푟)푄 − 푡 ) + 푥(푘)푃휃 + 푙 (4) where,

휑(푥) = 푒| |

(5)

휓(푥) = dim(푥) − |푥| 푒| |

(6)

where, the Gaussian function (7) represents the scaling function ,and the second derivative of Gaussian function represents the wavelet function selected for this paper [15]. These functions were chosen because they offer good time-frequency localization [14]. Where 푥 is the vector of regressors dilated, translated and well-conditioned applying techniques of principal component analysis - PCA). 푓(푥) belongs to a family of radial wavelets and may constitute a frame1 of 퐿 (ℝ), if it meets certain conditions of stability [14]. Where r is the mean value of the regressor vector computed (1 x m), P is a matrix of the linear subspace (m x p), Q is a matrix of nonlinear subspace (m x q) obtained by principal component analysis applied to the regressors in 푥. 휃 is the vector of linear coefficients (p x 1), 푎 is the vector of coefficients associated with the scalons (s x 1), 휔 is the vector of coefficients associated with the wavelons (nw x 1); 퐷 is the dilatation matrix associated with scalons (s x 1), 퐷 is the dilatation matrix associated with wavelons (nw × 1); 푡 is the translation matrix associated with scalons (ns x q), 푡 is the translation matrix associated with wavelons (nw x q), 푙 is output offset (scalar), ns is the number of scalons and nw the number of wavelons. The wavelet network architecture used in this work is shown in Figure 2.

Remembering that the wavenet structure used in this work represents the nonlinear function of the NARX model. Therefore, for the nonlinear and linear part of the NARX model and wavenet, respectively, can be verified that: F(. ) (of the NARX model) = ∑ 푎 휑(. ) +∑ 휔 휓(. ) (of the wavenet); and 푥(푘)휃 + 푙 (of the NARX model) = 푥(푘)푃휃 + 푙 (of the wavenet).

The choice of the number of basis functions used in the structure wavenet of this paper was performed using the generalized cross-validation algorithm (GCV) [15]. This algorithm selects the best functions that contribute to minimize the estimation error

퐺퐶푉(푆) = ∑ (푓(푢 )− 푦 ) + 2 푆 휎 (7) Where, GCV is minimized with respect to S. 푓 is the approximation given by wavenet, S is the number of basis functions of the network, N is the length of 푢 . 푢 and 푦 are input and output sampled

1Wavelet frames provides a convenient method for the construction of multidimensional wavelets. The reader is referred to [15] for a detailed discussion about wavelet frames.

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

ISBN: 978-1-61804-028-2 284

Page 3: Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump

data belonging to the estimation data set, and 휎 is the noise variance estimated from 푢 and 푦 .

The estimation algorithms of network parameters are detailed in [15]. 4 Case Study 4.1 Oil well pump unit The experiment setup involves a pumping unit, and an oil well developed to tests, as shows Fig. 1. A fluid with low viscosity, such as light oil, was used in the well. A three-phase asynchronous induction motor with 5 HP, 6 poles, and speed nameplate of 1160 rpm controlled by an AC-driver was used as primary force to the pump unit, and a string potentiometer as position transducer. The experiment was accomplished under controlled conditions, simulating actual operating conditions. In this case, the well starts with high level in annulus. Pass to normal operating conditions, arriving at the condition in which the level in the annular is insufficient to complete filling of the piston chamber during the upward cycle. The frequency of pumping unit also was varied randomly in order to excite the dynamics of the system and to simulate normal operating conditions.

4.2 Choice of input signal The torque current was chosen as input variable in system identification because can be acquired directly from the read parameter of sensorless vectorial AC-drives, and because it is strongly correlated to the position change in the sucker rod. Recalling that the input current motor can be decomposed in two components: flux-producing current (IM) and torque-producing current (IR), as show in (8),

퐼 = 퐼 + 퐼 (8) where IS is the stator current [16]. The behavior of induction motors in a pumping unit motor is dynamic and cyclic. Throughout the stroke, torque and speed is continually changing as the motor reacts to the dynamic load [3]. The torque produced in the motor is proportional to cross vectorial product of 퐼 and 퐼 [16]. Increasing of the load on the motor shaft also increases the strength of magnetic field in stator and rotor. Naturally these changes can be captured through IS.

The interested reader is referred to [16] for further detail about sensorless vector AC-drives. 4.3 Data collection The torque current of the motor (generated by Ac-drive) and the position of polished rod, input (u) and output (y) data respectively, were sampled with a period of 0.05 seconds and a total of 31000 samples data were collected. The data set was split into two subsets, to create two independent data sets. In the case, the first range (푧푒 = {푢(1),푦(1), … ,푢(17000),푦(17000)}) was used for model estimation, and the second range (푧푣 ={푢(17001),푦(17001), … ,푢(31000),푦(31000)}) was used for model validation. Fig. 2 shows a window with 3000 samples of filtered input-output data.

4.4 Model order selection According [10], the choice of model order is a combination of prior knowledge of the system and trial and error. High dynamic order of the model can result in high variance error and increases its complexity, on other hand, underestimate the orders will result in biased model [9]. In this paper many orders where suggested and evaluated through Akaike’s final prediction error (FPE). The representation of FPE is defined as,

Figure 2. Output samples data (sucker-rod pumping position), (b) input samples data (torque current of the motor).

Figure 1. Oil well and pumping unit.

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

ISBN: 978-1-61804-028-2 285

Page 4: Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump

퐹푃퐸 = 푉 (휃|푍 ) (9) where, 푉 (휃|푧푒 ) = det ( ∑ 휀(푡, 휃 ) 휀(푡, 휃 ) ) is the loss function, 푧푒 is the estimation data, N is the length of the input or output data. 휀(푡,휃 ) = 푦 (푡)− 푦 (푡|휃 ) is the prediction error parameterized by 휃 , between measurement output y(t) and predicted output 푦(푡|휃), and 푛 is the number of estimated parameters. 4.5 Evaluating the Estimated Model It is possible to know how much (in percentage) the estimated models are able to infer the sucker-rod position from torque current motor. For an adequate evaluation was used the torque current present in validation data set (zv). The value of 100% corresponds to a perfect fit

푓푖푡 = 1 −∑ | |∑ | | × 100 (10)

where, yk (y, …, yN) is the measurement output, ysk (ys1, …, ysN) is the model output, , and 푦 is the mean of vector yk. 5 Results and Discussion Using the estimation data set ze, several orders were estimated and evaluated by the FPE. Table 1 summarizes the main results obtained after the estimation of the models. In case, the order M2, in which na=2, nb=3 and nk=1, with a number of 43 basis function selected by GCV, was pointed by FPE as the most appropriated to represent the dynamic of the system. Meaning of according to the FPE criterion, 푦(푘) predict by 4 regressors, in case y(k-1),y(k-2), u(k-1) and u(k-2) will outperform the others estimated models. Then, after simulate the model output, applying the torque current present in validation data set zv, and comparing with the measured position present in zv, was obtained a fit of 90.18%. However, after an exhaustive search by a most appropriate model then the model M2, the result obtained shows that the model M4, in which only the regressors y(t-1),y(t-2),y(t-3),u(t-1) and u(t-2) are input from the nonlinearity part of the NARX model (In other words, the regressor u(k-3) are input only of 푥(푘)휃 ) given a more adequate fit to experimental data then M2 (see Fig. 3).

Table 1 Summary for NARX models estimated

NARX Model

Standard Regressors [na nb nk]

Nonlinear regressor

FPE

Fit (%)

M1with

110 basis function

M2 with 43 basis function

M3 with 40 basis function

M4 with 34 basis function

[1 2 1]

[2 3 1]

[3 3 1]

[3 3 1]

y(k-1), u(k-1), u(k-2)

y(k-1), y(k-2), u(k-1), u(k-2),u(k-3)

y(k-1),y(t-2),y(k-3),u(k-1),u(k-2),u(k-3)

y(k-1),y(k-2),y(k-3),u(k-1),u(k-2)

3.58 10

5.67 10

5.79 10

5.69 10

64.47

90.18

85.95

92.48

6 Conclusion This paper has presented an estimate of a pumping unit system. The validity of the model was obtained by comparing the simulated output and measured output. The results obtained showed that the nonlinear ARX model based on wavenet with 34 basis functions outperformed all other models estimated, being sufficient to infer the position of the polished rod from torque current of three-phase induction motor, which is given by sensorless vector AC-drive. This show that is possible replaces the position sensor of position used in the sucker-rod pumping by a nonlinear black-box model, which can be embedded in a microprocessor system. References: [1] M. Cook and M. Graham, Hydrocarbon

exploration and production, Developments in Petroleum Science, No. 46, Elsevier, 2003.

Figure 3. Comparison between measured data zv (continuous line) with the output simulated for NARX model M4 (dashed

line). A window of 45 seconds.

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

ISBN: 978-1-61804-028-2 286

Page 5: Inferring Polished Rod Position from Torque Current of the ... · polished rod aid in the diagnosis of onshore wells, these diagnoses are generally made by interpretation of the pump

[2] H.B. Bradley, Petroleum Engineering Handbook, Third Printing Society of Petroleum Engineers, U.S.A., 1992.

[3] S. G. Gibbs and D. L. Miller, Inferring power consumption and electrical performance from motor speed in oil-well pumping units, IEEE Transactions on Industry Applications, Vol. 33, No. 1, January/February, 1997.

[4] S.G. Gibbs, Prediction of the behavior of a sucker-rod pumping system, J. Pet, Eng. pp., 1963, 769-778.

[5] D.R. Doty and Z Schmidt, An improved model for sucker-rod pumping, Soc. Pet. Eng., 1983, pp 34-41.

[6] S. Miska, A. Sharaki, and J.M. Rajtar, A simple model for computer-aided optimization and design of sucker-rod pumping systems, Journal of Petroleum Science and Engineering, 17, 1997, 303-312.

[7] M.H. Hojjati, S.A. Lukasiewicz, Modelling of sucker rod strings, Journal of Canadian Petroleum Technology 44 (12), 2005, 55–58.

[8] L. Ljung, Black-box models from input-output measurement, IEEE Instrumentation and Measurement, Technology Conference, Budapest, Hungary, May 21-23, 2001.

[9] T. Söderström and P. Stoica, System Identification, Prentice-Hall Int., London, 1989.

[10] O. Nelles, Nonlinear System Identification: From Classical Approaches to Neural Network and Fuzzy Models, Springer, 2001.

[11] Q. Zhang, and A. Benveniste, Wavelet networks, IEEE Trans. Neural Networks, NN-3(6),1992, 889-898.

[12] E. D. Sontag, Feedforward Nets for Interpolation and Classification, J.Comp.Syst.Sc, 1991.

[13] S. Haykin, Neural Networks: A Comprehensive Foundation, Pearson Education, 2nd Edition, 1998.

[14] I. Daubechies, Ten Lecture on Wavelets, Society for Industrial and Applied Mathematics, Pennsylvania, 1992.

[15] Q. Zhang, Using wavelet network in nonparametric estimation, IEEE Transactions on Neural Network, Vol. 8, No. 2, March 1997.

[16] M. Barnes, Practical Variable Speed Drives and Power Electronics, Elsevier, 1st edn, 2003.

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

ISBN: 978-1-61804-028-2 287