# Denoising and Trend Terms Elimination Algorithm of Accelerometer Signals

Authors: Peng Zhang; Jing Chang; Boyang Qu; Qifeng Zhao
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

Acceleration-based displacement measurement approach is often used to measure the polish rod displacement in the oilfield pumping well. Random noises and trend terms of the accelerometer signals are the main factors that affect the measuring accuracy. In this paper, an efficient online learning algorithm is proposed to improve the measurement precision of polish rod displacement in the oilfield pumping well. To remove the random noises and eliminate the trend term of accelerometer signals, the ARIMA model and its parameters are firstly derived by using the obtained data of time series of acceleration sensor signals. Secondly, the period of the accelerometer signals is estimated through the Rife-Jane frequency estimation approach based on Fast Fourier Transform. With the obtained model and parameters, the random noises are removed by employing the Kalman filtering algorithm. The quadratic integration of the period is calculated to obtain the polish rod displacement. Moreover, the windowed recursive least squares algorithm is implemented to eliminate the trend terms. The simulation results demonstrate that the proposed online learning algorithm is able to remove the random noises and trend terms effectively and greatly improves the measurement accuracy of the displacement.


---

## Body

## 1. Introduction

Indicator diagram is an important method to analyze the operating state of the oilfield pumping unit and sucker rod [1, 2]. The vertical motion displacement of polish rod in oil well is an essential part of the indicator diagram. However, the acceleration sensor signals are always mixed with various noises which are mostly composed of random noises and trend terms [2–4]. The random noises and trend terms errors induce huge integral signal waveform distortion which will greatly reduce the measurement accuracy of the indicator diagram displacement [3, 5]. Improving the measurement accuracy of the indicator diagram displacement is a key problem to be solved.To solve the problem mentioned above, the morphological filtering algorithm was proposed by Li et al. [6] while a moving average filter algorithm was used by Guo et al. [7, 8] to remove the noises of the acceleration sensor signals. Unfortunately, the performance of the morphological filtering algorithm is closely related to its structural elements and the algorithm is complex which impedes its practical engineering application. Although the moving average filter algorithm is simple and easy to use, the result of noise reduction is poor and the measurement accuracy of displacement measurement are unsatisfactory. In order to eliminate the trend term of the acceleration sensor signal, the commonly used method is firstly using least squares algorithm to fit the trend term dynamically and then using some techniques to remove it [5–9]. In general, these techniques are batch process methods which are not suitable for real-time application.Therefore, a real-time online learning-based noise deduction and trend term rejection method is proposed in this work. Firstly, the actual online measurement acceleration sensor signal is analyzed based on online learning method to obtain the autoregressive moving average model (ARMA) and its parameters [8, 10]. Then, the accelerometer signal cycle can be obtained by using the Fast Fourier Transform Rife-Jane frequency estimation method. Secondly, the Kalman filtering techniques are used to eliminate the online measured acceleration signal random noise based on the state-space model parameters from the online learning method result. And then the polish rod displacement can be obtained through quadratic integration. The trend items can be online eliminated in real-time by use of the windowed recursive least squares method.The structure of this paper is organized as follows. Section2 introduces the acquisition method of the test signal model based on online learning. In Section 3, the real-time theoretical approaches of removing noise and trend terms of the acceleration sensor signals are presented. Section 4 presents the simulation and experimental results of the measured acceleration signal to validate the effectiveness of the algorithm. Section 5 draws the conclusions.


## 2. The Test Signal Model Based on Learning Method

In this section, the time series modeling methods of the test signal as well as the Rife-Jane frequency estimation method of the time series model are presented. The frequency estimation method is based on the Fast Fourier Transform. The test signal model and its parameters can be obtained with the help of the two methods.


### 2.1. Time Series Modeling of the Test Signal

Time series analysis method [11–13] is a kind of modern statistical analysis method. The analysis method uses the parametric models to analyze and deal with the observed sequential random signal series. The contents of the time series model include acquisition, statistical analysis (stationary test and correlation analysis), the parametric pretreatment, model selection, model order determination, model coefficients estimation, and the feasibility validation of the model. Among the above contents, the determination of the model order, the estimation of the model coefficients, and the feasibility validation of the model are critical to the time series model.ARMA can be expressed as follows:(1)
φ
B
-
1
y
t
=
θ
B
-
1
ε
t
,where φ
(
B
-
1
)
=
1
+
∑
i
=
1
p
φ
i
B
-
i; θ
(
B
-
1
)
=
1
+
∑
i
=
1
q
θ
i
B
-
i. y
(
t
) is a random signal time series. ε
(
t
) is a white noise sequence, and p is the model order of autoregressive (AR) model. q is the model order of moving average (MA) model. φ
i stands for the aggression coefficient of the AR model. θ
i is the moving average coefficient.  B
-
i is the delay operator.Whenq
=
0, the ARMA model (formula (1)) degenerates into the AR model. And the AR model can be expressed as (2)
x
t
-
φ
1
x
t
-
1
-
φ
2
x
t
-
2
-
⋯
-
φ
p
x
t
-
p
=
ε
t
.Whenp
=
0, ARMA model (formula (1)) degenerates into the MA model. And the AR model can be expressed as (3)
x
t
=
z
t
-
θ
1
z
t
-
1
-
θ
2
z
t
-
2
-
⋯
-
θ
q
z
-
q
.Obviously, the AR model and MA model can be seen as a special case of the ARMA model. The differences among the three models are the respective characteristics of the model autocorrelation and partial autocorrelation function. AR model has a tailing autocorrelation function and a truncated partial autocorrelation function. MR model has a truncated autocorrelation function and a tailing partial autocorrelation function. The autocorrelation function and the partial autocorrelation function of AMMR model are both tailing. Suppose a stationary time series is drawn; the model type can be determined by the tailing and truncated features of the autocorrelation and partial autocorrelation function. And the model order can be determined based on the AIC criteria.AIC criteria consider both the interaction between the order and the residual of the model and the effect of the test data series length in the model which provides high accuracy for the estimation. AIC criteria are defined as follows:(4)
A
I
C
p
,
q
=
ln
⁡
σ
n
+
2
p
+
q
N
,where σ
n is the variance of the fitting residual error. p and q denote, respectively, the orders of the autoregressive model and the moving average model. N is the sample size. According to the value of p, q, the AIC value was calculated and the p, q which lead to the minimum AIC value are selected as the order of the model. Once the model order is determined, the model coefficients can be estimated by using the least squares method [8, 10, 14].The signal time series model according to given time series can be established by using the modeling method. The model can objectively describe the system characteristics. And the model parameter can also be determined.


### 2.2. Rife-Jane Frequency Estimation Method

The signal frequency can be obtained by use of Fast Fourier Transform (FFT). And the frequency accuracy is affected by the frequency resolution of FFT. If the signal frequency is not the integral multiple of the FFT frequency resolution, the barrier effects of the FFT will cause the spectral leakage, which will decrease the accuracy of the frequency estimation. Rife-Jane frequency estimation method can make up this defect [15–17]. The Rife-Jane frequency calculation procedure is as follows.LetS
(
k
) be the N-point FFT of the series x
(
n
). In view of the symmetry of the real FFT sequences, only N
/
2 points of the discrete spectrum should be considered. Then, (5) can be obtained:(5)
S
k
=
a
sin
⁡
π
k
-
f
0
T
2
sin
⁡
π
k
-
f
0
T
/
N
e
j
θ
0
N
-
1
/
N
k
-
f
0
T
π
,
k
=
0,1
,
2
,
…
,
N
2
-
1
.The index values of the discrete frequencies at the maximum amplitude of series S
(
k
) can be denoted as m. The signal frequency can be estimated with m, f
c
=
m
Δ
f. And Δ
f
=
f
s
/
N is the FFT frequency resolution, that is, the interval between adjacent spectral lines. When the signal frequency is not exactly an integer multiple of Δ
f, the actual frequency lies in the FFT main lobe lines between two maximum spectral lines. The maximum spectral line amplitude can be denoted as S
1
=
S
(
m
), and the second largest can be denoted as S
2
=
S
(
m
2
), m
2
=
m
±
1. According to α
=
S
2
/
S
1, the relative error of the actual frequency and coarse frequency can be obtained:(6)
δ
=
f
0
-
m
Δ
f
Δ
f
=
±
α
1
+
α
.The symbol of formula (6) is based on the left side or right side of the second largest spectral amplitude compared to maximum spectral amplitude. The signal actual frequency can be estimated with this method.


## 2.1. Time Series Modeling of the Test Signal

Time series analysis method [11–13] is a kind of modern statistical analysis method. The analysis method uses the parametric models to analyze and deal with the observed sequential random signal series. The contents of the time series model include acquisition, statistical analysis (stationary test and correlation analysis), the parametric pretreatment, model selection, model order determination, model coefficients estimation, and the feasibility validation of the model. Among the above contents, the determination of the model order, the estimation of the model coefficients, and the feasibility validation of the model are critical to the time series model.ARMA can be expressed as follows:(1)
φ
B
-
1
y
t
=
θ
B
-
1
ε
t
,where φ
(
B
-
1
)
=
1
+
∑
i
=
1
p
φ
i
B
-
i; θ
(
B
-
1
)
=
1
+
∑
i
=
1
q
θ
i
B
-
i. y
(
t
) is a random signal time series. ε
(
t
) is a white noise sequence, and p is the model order of autoregressive (AR) model. q is the model order of moving average (MA) model. φ
i stands for the aggression coefficient of the AR model. θ
i is the moving average coefficient.  B
-
i is the delay operator.Whenq
=
0, the ARMA model (formula (1)) degenerates into the AR model. And the AR model can be expressed as (2)
x
t
-
φ
1
x
t
-
1
-
φ
2
x
t
-
2
-
⋯
-
φ
p
x
t
-
p
=
ε
t
.Whenp
=
0, ARMA model (formula (1)) degenerates into the MA model. And the AR model can be expressed as (3)
x
t
=
z
t
-
θ
1
z
t
-
1
-
θ
2
z
t
-
2
-
⋯
-
θ
q
z
-
q
.Obviously, the AR model and MA model can be seen as a special case of the ARMA model. The differences among the three models are the respective characteristics of the model autocorrelation and partial autocorrelation function. AR model has a tailing autocorrelation function and a truncated partial autocorrelation function. MR model has a truncated autocorrelation function and a tailing partial autocorrelation function. The autocorrelation function and the partial autocorrelation function of AMMR model are both tailing. Suppose a stationary time series is drawn; the model type can be determined by the tailing and truncated features of the autocorrelation and partial autocorrelation function. And the model order can be determined based on the AIC criteria.AIC criteria consider both the interaction between the order and the residual of the model and the effect of the test data series length in the model which provides high accuracy for the estimation. AIC criteria are defined as follows:(4)
A
I
C
p
,
q
=
ln
⁡
σ
n
+
2
p
+
q
N
,where σ
n is the variance of the fitting residual error. p and q denote, respectively, the orders of the autoregressive model and the moving average model. N is the sample size. According to the value of p, q, the AIC value was calculated and the p, q which lead to the minimum AIC value are selected as the order of the model. Once the model order is determined, the model coefficients can be estimated by using the least squares method [8, 10, 14].The signal time series model according to given time series can be established by using the modeling method. The model can objectively describe the system characteristics. And the model parameter can also be determined.


## 2.2. Rife-Jane Frequency Estimation Method

The signal frequency can be obtained by use of Fast Fourier Transform (FFT). And the frequency accuracy is affected by the frequency resolution of FFT. If the signal frequency is not the integral multiple of the FFT frequency resolution, the barrier effects of the FFT will cause the spectral leakage, which will decrease the accuracy of the frequency estimation. Rife-Jane frequency estimation method can make up this defect [15–17]. The Rife-Jane frequency calculation procedure is as follows.LetS
(
k
) be the N-point FFT of the series x
(
n
). In view of the symmetry of the real FFT sequences, only N
/
2 points of the discrete spectrum should be considered. Then, (5) can be obtained:(5)
S
k
=
a
sin
⁡
π
k
-
f
0
T
2
sin
⁡
π
k
-
f
0
T
/
N
e
j
θ
0
N
-
1
/
N
k
-
f
0
T
π
,
k
=
0,1
,
2
,
…
,
N
2
-
1
.The index values of the discrete frequencies at the maximum amplitude of series S
(
k
) can be denoted as m. The signal frequency can be estimated with m, f
c
=
m
Δ
f. And Δ
f
=
f
s
/
N is the FFT frequency resolution, that is, the interval between adjacent spectral lines. When the signal frequency is not exactly an integer multiple of Δ
f, the actual frequency lies in the FFT main lobe lines between two maximum spectral lines. The maximum spectral line amplitude can be denoted as S
1
=
S
(
m
), and the second largest can be denoted as S
2
=
S
(
m
2
), m
2
=
m
±
1. According to α
=
S
2
/
S
1, the relative error of the actual frequency and coarse frequency can be obtained:(6)
δ
=
f
0
-
m
Δ
f
Δ
f
=
±
α
1
+
α
.The symbol of formula (6) is based on the left side or right side of the second largest spectral amplitude compared to maximum spectral amplitude. The signal actual frequency can be estimated with this method.


## 3. Real-Time Elimination Method of the Noise and Trend Terms

In this section, the basic principles of Kalman filtering are described. The method of transforming from ARMA model to the state-space model is proposed. Moreover, the recursive least squares trend terms removal method is discussed.


### 3.1. Basic Principles of Kalman Filtering

Kalman filtering principle uses the state-space model consisting of the state and observation equations to describe and study the system [18–20]. And the principle uses the recursive characteristics of the system state equations to make the best estimate of the system state by use of the recursive algorithm according to the linear unbiased minimum mean square error estimation criteria. It is suitable for online real-time estimation and analysis of the system state for a small amount of computation and storage requirement. However, Kalman filter must be used based on the reasonable state-space model of the studied system to make the best result. So the state-space model must be built strictly based on the specific research system and the specific research aim (such as time variant characteristics or time invariant characteristics). According to the specific state-space model, three recursive filter formulas can be selected. The recursive filter formulas are Kalman filter, Kalman predictor, and Kalman smoother. In this paper, the Kalman filter is selected as the estimation model of the system state.Let the system stateX
k at time k be driven by the system noise sequence, W
k. And the driving mechanism can be described as the state equation(7)
X
k
=
Φ
k
/
k
-
1
X
k
-
1
+
Γ
k
W
k
.And the measurement of X
k has linear characteristics. The measurement equation of X
k is (8)
Z
k
=
H
k
X
k
+
V
k
,where Φ
k
/
k
-
1 is the transition matrix from time k
-
1 to time k. Γ
k is the system noise driven matrix. H
k is the measurement matrix. V
k is the system measurement noise sequence. W
k is the system noise incentives sequences. At the same time, W
k and V
k should meet the following constraints:(9)
C
o
v
W
k
,
W
j
=
E
W
k
W
j
T
=
Q
k
δ
k
j
E
W
k
=
O
,
C
o
v
V
k
,
V
j
=
E
V
k
V
j
T
=
R
k
δ
k
j
E
V
k
=
O
,
C
o
v
W
k
,
V
j
=
E
W
k
V
j
T
=
O
,where Q
k is the variance matrix of system noise series, which is a nonnegative matrix. R
k is the variance matrix of the system measurement noise series, which is a negative matrix. By theorem [9], it is assumed that the estimation X
k of the system state satisfies (7). Z
k is the measuring amount of X
k which satisfies (8). The system noises matrix W
k and system measurement noises matrix V
k satisfy (9). The system noise variance matrix Q
k is a nonnegative matrix. The system measurement noise variance matrix is a negative matrix. And the measuring amount at k time is Z
k. The estimation of X
k is X
^
k. X
^
k can be estimated according to the following recursive procedure:(10)
X
^
k
/
k
-
1
=
Φ
k
/
k
-
1
X
^
k
-
1
X
^
k
=
X
^
k
/
k
-
1
+
K
k
Z
k
-
H
k
X
^
k
/
k
-
1
P
k
/
k
-
1
=
Φ
k
/
k
-
1
P
k
-
1
Φ
k
/
k
-
1
T
+
Γ
k
-
1
Q
k
-
1
Γ
k
-
1
T
K
k
=
P
k
/
k
-
1
H
k
T
H
k
P
k
/
k
-
1
H
k
T
+
R
k
-
1
P
k
=
I
-
K
k
H
k
P
k
/
k
-
1
.Equations (7), (8), (9), and (10) are the basic discrete Kalman filter equations. As long as the initial values X
^
0 and P
0 are obtained, the state estimate X
^
k at time k (k
=
1,2
,
…) can be recursively obtained based on the measurement Z
k at time point k. Generally, the initial value can be obtained from the equation X
^
0
=
μ
0
=
E
X
0, P
0
=
E
X
0
-
μ
0
X
0
-
μ
0
T. The numerical values of Q and R are taken based on the engineering experience in the practical engineering applications. Therefore, if the state-space model and associated initial value is known, the Kalman filter recursive formula can be used for the real-time filtering.


### 3.2. Transform Method from ARMA Model to System State-Space Model

If the test data time series have been obtained, the time series ARMA model can be formed based on the time series modeling. The ARMA model should be transferred to the system state-space model. And then the Kalman filtering state and measurement equations [18, 20] can be established.TheA
R
M
A
(
p
,
q
) model can be expressed as(11)
x
k
=
a
1
x
k
-
1
+
⋯
+
a
m
x
k
-
m
+
ε
k
+
b
1
ε
k
-
1
+
⋯
+
b
m
-
1
ε
k
-
m
+
1
,where ε
k is the white noise about time, m
=
max
⁡
(
p
,
q
+
1
). If i
>
p, then a
i
=
0. If i
>
q, then b
i
=
0. (Note: x
k is a time series that have a zero mean.) Then the above A
R
M
A
(
m
,
m
-
1
) model can be converted into a state-space model:(12)
X
k
=
Φ
X
k
-
1
+
Γ
k
W
k
,
Z
k
=
H
k
X
k
+
V
k
,where(13)
X
k
=
x
k
,
x
k
-
1
,
…
,
x
k
-
m
+
1
T
,
W
k
=
ε
k
,
ε
k
-
1
,
…
,
ε
k
-
m
+
1
T
,
H
k
=
1,0
,
…
,
0
1
×
m
,
Φ
m
×
m
=
a
∗
a
m
I
m
-
1
O
m
-
1
×
1
,
Γ
k
=
b
∗
O
m
-
1
×
m
,
a
∗
=
a
1
,
a
2
,
…
,
a
m
-
1
,
b
∗
=
1
,
b
1
,
…
,
b
m
-
1
.That is, the system state equation is (14)
x
k
x
k
-
1
⋮
⋮
x
k
-
m
+
1
=
a
1
a
2
⋯
a
m
-
1
a
m
1
0
⋯
0
0
0
1
⋱
0
0
⋮
⋱
⋱
⋱
⋮
0
⋯
0
1
0
∗
x
k
-
1
x
k
-
2
⋮
⋮
x
t
-
m
+
1
b
1
⋯
b
m
-
2
b
m
-
1
0
0
⋯
0
0
⋮
⋱
⋱
0
0
⋮
⋱
⋱
⋱
⋮
0
⋯
0
0
0
∗
ε
k
ε
k
-
1
⋮
⋮
ε
t
-
m
+
1
.The measurement equation is(15)
Z
k
=
1,0
,
…
,
0
1
×
m
∗
x
k
,
x
k
-
1
,
…
,
x
k
-
m
+
1
T
.Based on the above conversion, A
R
M
A
(
p
,
q
) model can be converted to the corresponding system state-space model. And the Kalman filter recursive formula can be used to filter time series in real time.


### 3.3. The Recursive Least Squares Method Principle for the Elimination of Trend Term

Linear least squares method [21–23] is commonly used in eliminating the line state baseline shift and the trend term of high order polynomial in engineering application. The steps of eliminating the trend term are as follows. First, suppose that the trend term polynomials are established, and the polynomials can be solved with equations listed in the least squares principle. Second, the trend term coefficient matrix and fitting curve can be calculated based on matrix method. Finally, subtracting the trend term fitting curve from the original signal curve can eliminate the trend term error.Recursive least squares method originates from the least squares method. In this paper, the recursive least squares algorithm is applied to eliminate the trend term. The recursive algorithms are derived as follows.Supposex
n
,
n
=
1,2
,
…
,
N is the time series with the sampling interval of h; the k-order polynomial, x
n, is used to fit the trend item. Assume(16)
x
n
=
∑
i
=
0
k
φ
i
n
h
i
,
n
=
1,2
,
…
,
N
,where N is the size of the selected initial test data series. And k is the highest order of the fitting polynomial. Equation (16) can be expressed in the form of matrix as (17)
X
N
=
T
N
φ
N
,where (18)
X
N
=
x
1
,
x
2
,
…
,
x
N
T
,
φ
N
=
φ
0
,
φ
1
,
…
,
φ
k
T
,
T
N
=
t
=
t
1
t
2
⋮
t
N
=
1
h
⋯
h
k
1
2
h
⋯
2
h
k
⋮
⋮
⋱
⋮
1
N
h
⋯
N
h
k
N
×
k
+
1
.The equation above can be obtained according to the least squares estimation principle:(19)
φ
N
=
T
N
T
T
N
-
1
T
N
T
X
N
.Let(20)
T
N
T
T
N
-
1
=
P
N
,
φ
N
=
P
N
T
N
T
X
N
.The recursive least squares equation based on the least squares estimation is derived as follows.Firstly assume new test data is measured,x
N
+
1, and it will build a new data series, x
n
,
n
=
1,2
,
…
,
N
,
N
+
1. So the model parameters should be estimated again. According to the above matrix arrangement form, the least squares estimation equation relative to data x
N
+
1 can be represented as(21)
φ
N
+
1
=
P
N
+
1
T
N
+
1
T
X
N
+
1
P
N
+
1
=
T
N
+
1
T
T
N
+
1
-
1
,where(22)
T
N
+
1
=
T
N
t
N
+
1
,
X
N
+
1
=
X
N
x
N
+
1
t
N
+
1
=
1
,
N
+
1
h
,
N
+
1
h
2
,
…
,
N
+
1
h
k
.Using the subblock matrix multiplication and matrix theory inverse formula can derive the recurrence equation (23) of the recursive least squares method as follows. And the detailed derivation method can be seen in [8]:(23)
P
N
+
1
=
I
k
+
1
-
P
N
t
N
+
1
T
t
N
+
1
1
+
t
N
+
1
P
N
t
N
+
1
T
P
N
K
N
+
1
=
1
1
+
t
N
+
1
P
N
t
N
+
1
T
P
N
t
N
+
1
T
φ
N
+
1
=
φ
N
+
K
N
+
1
x
N
+
1
-
t
N
+
1
φ
N
.From (23), it can be seen that φ
N
+
1, the new estimation of the model parameters, is the correction of the primary estimation, φ
N. And the correction term (K
N
+
1
x
N
+
1
-
t
N
+
1
φ
N) of the model parameters is the weighted processing of the difference of the new signal (x
N
+
1) and its estimation. The weighted coefficient is K
N
+
1. The current estimation of the new signal data x
N
+
1 can be expressed as(24)
x
^
N
+
1
=
t
N
+
1
φ
N
+
1
.Suppose the first N observation data of the test series x
n are known; P
N and φ
N can be calculated by using the recursive operation equation (23). P
N
+
1, K
N
+
1, φ
N
+
1,and x
^
N
+
1 can be obtained in the same way. Each step estimation result (x
^
N
+
1) of the recursive calculation processing is the trend term of the new signal data, x
N
+
1, where t
N
+
1
=
1
,
(
N
+
1
)
h
,
(
(
N
+
1
)
h
)
2
,
…
,
(
(
N
+
1
)
h
)
k. The trend term can be eliminated by subtracting the estimation result (x
^
N
+
1) from the new signal data (x
N
+
1).


## 3.1. Basic Principles of Kalman Filtering

Kalman filtering principle uses the state-space model consisting of the state and observation equations to describe and study the system [18–20]. And the principle uses the recursive characteristics of the system state equations to make the best estimate of the system state by use of the recursive algorithm according to the linear unbiased minimum mean square error estimation criteria. It is suitable for online real-time estimation and analysis of the system state for a small amount of computation and storage requirement. However, Kalman filter must be used based on the reasonable state-space model of the studied system to make the best result. So the state-space model must be built strictly based on the specific research system and the specific research aim (such as time variant characteristics or time invariant characteristics). According to the specific state-space model, three recursive filter formulas can be selected. The recursive filter formulas are Kalman filter, Kalman predictor, and Kalman smoother. In this paper, the Kalman filter is selected as the estimation model of the system state.Let the system stateX
k at time k be driven by the system noise sequence, W
k. And the driving mechanism can be described as the state equation(7)
X
k
=
Φ
k
/
k
-
1
X
k
-
1
+
Γ
k
W
k
.And the measurement of X
k has linear characteristics. The measurement equation of X
k is (8)
Z
k
=
H
k
X
k
+
V
k
,where Φ
k
/
k
-
1 is the transition matrix from time k
-
1 to time k. Γ
k is the system noise driven matrix. H
k is the measurement matrix. V
k is the system measurement noise sequence. W
k is the system noise incentives sequences. At the same time, W
k and V
k should meet the following constraints:(9)
C
o
v
W
k
,
W
j
=
E
W
k
W
j
T
=
Q
k
δ
k
j
E
W
k
=
O
,
C
o
v
V
k
,
V
j
=
E
V
k
V
j
T
=
R
k
δ
k
j
E
V
k
=
O
,
C
o
v
W
k
,
V
j
=
E
W
k
V
j
T
=
O
,where Q
k is the variance matrix of system noise series, which is a nonnegative matrix. R
k is the variance matrix of the system measurement noise series, which is a negative matrix. By theorem [9], it is assumed that the estimation X
k of the system state satisfies (7). Z
k is the measuring amount of X
k which satisfies (8). The system noises matrix W
k and system measurement noises matrix V
k satisfy (9). The system noise variance matrix Q
k is a nonnegative matrix. The system measurement noise variance matrix is a negative matrix. And the measuring amount at k time is Z
k. The estimation of X
k is X
^
k. X
^
k can be estimated according to the following recursive procedure:(10)
X
^
k
/
k
-
1
=
Φ
k
/
k
-
1
X
^
k
-
1
X
^
k
=
X
^
k
/
k
-
1
+
K
k
Z
k
-
H
k
X
^
k
/
k
-
1
P
k
/
k
-
1
=
Φ
k
/
k
-
1
P
k
-
1
Φ
k
/
k
-
1
T
+
Γ
k
-
1
Q
k
-
1
Γ
k
-
1
T
K
k
=
P
k
/
k
-
1
H
k
T
H
k
P
k
/
k
-
1
H
k
T
+
R
k
-
1
P
k
=
I
-
K
k
H
k
P
k
/
k
-
1
.Equations (7), (8), (9), and (10) are the basic discrete Kalman filter equations. As long as the initial values X
^
0 and P
0 are obtained, the state estimate X
^
k at time k (k
=
1,2
,
…) can be recursively obtained based on the measurement Z
k at time point k. Generally, the initial value can be obtained from the equation X
^
0
=
μ
0
=
E
X
0, P
0
=
E
X
0
-
μ
0
X
0
-
μ
0
T. The numerical values of Q and R are taken based on the engineering experience in the practical engineering applications. Therefore, if the state-space model and associated initial value is known, the Kalman filter recursive formula can be used for the real-time filtering.


## 3.2. Transform Method from ARMA Model to System State-Space Model

If the test data time series have been obtained, the time series ARMA model can be formed based on the time series modeling. The ARMA model should be transferred to the system state-space model. And then the Kalman filtering state and measurement equations [18, 20] can be established.TheA
R
M
A
(
p
,
q
) model can be expressed as(11)
x
k
=
a
1
x
k
-
1
+
⋯
+
a
m
x
k
-
m
+
ε
k
+
b
1
ε
k
-
1
+
⋯
+
b
m
-
1
ε
k
-
m
+
1
,where ε
k is the white noise about time, m
=
max
⁡
(
p
,
q
+
1
). If i
>
p, then a
i
=
0. If i
>
q, then b
i
=
0. (Note: x
k is a time series that have a zero mean.) Then the above A
R
M
A
(
m
,
m
-
1
) model can be converted into a state-space model:(12)
X
k
=
Φ
X
k
-
1
+
Γ
k
W
k
,
Z
k
=
H
k
X
k
+
V
k
,where(13)
X
k
=
x
k
,
x
k
-
1
,
…
,
x
k
-
m
+
1
T
,
W
k
=
ε
k
,
ε
k
-
1
,
…
,
ε
k
-
m
+
1
T
,
H
k
=
1,0
,
…
,
0
1
×
m
,
Φ
m
×
m
=
a
∗
a
m
I
m
-
1
O
m
-
1
×
1
,
Γ
k
=
b
∗
O
m
-
1
×
m
,
a
∗
=
a
1
,
a
2
,
…
,
a
m
-
1
,
b
∗
=
1
,
b
1
,
…
,
b
m
-
1
.That is, the system state equation is (14)
x
k
x
k
-
1
⋮
⋮
x
k
-
m
+
1
=
a
1
a
2
⋯
a
m
-
1
a
m
1
0
⋯
0
0
0
1
⋱
0
0
⋮
⋱
⋱
⋱
⋮
0
⋯
0
1
0
∗
x
k
-
1
x
k
-
2
⋮
⋮
x
t
-
m
+
1
b
1
⋯
b
m
-
2
b
m
-
1
0
0
⋯
0
0
⋮
⋱
⋱
0
0
⋮
⋱
⋱
⋱
⋮
0
⋯
0
0
0
∗
ε
k
ε
k
-
1
⋮
⋮
ε
t
-
m
+
1
.The measurement equation is(15)
Z
k
=
1,0
,
…
,
0
1
×
m
∗
x
k
,
x
k
-
1
,
…
,
x
k
-
m
+
1
T
.Based on the above conversion, A
R
M
A
(
p
,
q
) model can be converted to the corresponding system state-space model. And the Kalman filter recursive formula can be used to filter time series in real time.


## 3.3. The Recursive Least Squares Method Principle for the Elimination of Trend Term

Linear least squares method [21–23] is commonly used in eliminating the line state baseline shift and the trend term of high order polynomial in engineering application. The steps of eliminating the trend term are as follows. First, suppose that the trend term polynomials are established, and the polynomials can be solved with equations listed in the least squares principle. Second, the trend term coefficient matrix and fitting curve can be calculated based on matrix method. Finally, subtracting the trend term fitting curve from the original signal curve can eliminate the trend term error.Recursive least squares method originates from the least squares method. In this paper, the recursive least squares algorithm is applied to eliminate the trend term. The recursive algorithms are derived as follows.Supposex
n
,
n
=
1,2
,
…
,
N is the time series with the sampling interval of h; the k-order polynomial, x
n, is used to fit the trend item. Assume(16)
x
n
=
∑
i
=
0
k
φ
i
n
h
i
,
n
=
1,2
,
…
,
N
,where N is the size of the selected initial test data series. And k is the highest order of the fitting polynomial. Equation (16) can be expressed in the form of matrix as (17)
X
N
=
T
N
φ
N
,where (18)
X
N
=
x
1
,
x
2
,
…
,
x
N
T
,
φ
N
=
φ
0
,
φ
1
,
…
,
φ
k
T
,
T
N
=
t
=
t
1
t
2
⋮
t
N
=
1
h
⋯
h
k
1
2
h
⋯
2
h
k
⋮
⋮
⋱
⋮
1
N
h
⋯
N
h
k
N
×
k
+
1
.The equation above can be obtained according to the least squares estimation principle:(19)
φ
N
=
T
N
T
T
N
-
1
T
N
T
X
N
.Let(20)
T
N
T
T
N
-
1
=
P
N
,
φ
N
=
P
N
T
N
T
X
N
.The recursive least squares equation based on the least squares estimation is derived as follows.Firstly assume new test data is measured,x
N
+
1, and it will build a new data series, x
n
,
n
=
1,2
,
…
,
N
,
N
+
1. So the model parameters should be estimated again. According to the above matrix arrangement form, the least squares estimation equation relative to data x
N
+
1 can be represented as(21)
φ
N
+
1
=
P
N
+
1
T
N
+
1
T
X
N
+
1
P
N
+
1
=
T
N
+
1
T
T
N
+
1
-
1
,where(22)
T
N
+
1
=
T
N
t
N
+
1
,
X
N
+
1
=
X
N
x
N
+
1
t
N
+
1
=
1
,
N
+
1
h
,
N
+
1
h
2
,
…
,
N
+
1
h
k
.Using the subblock matrix multiplication and matrix theory inverse formula can derive the recurrence equation (23) of the recursive least squares method as follows. And the detailed derivation method can be seen in [8]:(23)
P
N
+
1
=
I
k
+
1
-
P
N
t
N
+
1
T
t
N
+
1
1
+
t
N
+
1
P
N
t
N
+
1
T
P
N
K
N
+
1
=
1
1
+
t
N
+
1
P
N
t
N
+
1
T
P
N
t
N
+
1
T
φ
N
+
1
=
φ
N
+
K
N
+
1
x
N
+
1
-
t
N
+
1
φ
N
.From (23), it can be seen that φ
N
+
1, the new estimation of the model parameters, is the correction of the primary estimation, φ
N. And the correction term (K
N
+
1
x
N
+
1
-
t
N
+
1
φ
N) of the model parameters is the weighted processing of the difference of the new signal (x
N
+
1) and its estimation. The weighted coefficient is K
N
+
1. The current estimation of the new signal data x
N
+
1 can be expressed as(24)
x
^
N
+
1
=
t
N
+
1
φ
N
+
1
.Suppose the first N observation data of the test series x
n are known; P
N and φ
N can be calculated by using the recursive operation equation (23). P
N
+
1, K
N
+
1, φ
N
+
1,and x
^
N
+
1 can be obtained in the same way. Each step estimation result (x
^
N
+
1) of the recursive calculation processing is the trend term of the new signal data, x
N
+
1, where t
N
+
1
=
1
,
(
N
+
1
)
h
,
(
(
N
+
1
)
h
)
2
,
…
,
(
(
N
+
1
)
h
)
k. The trend term can be eliminated by subtracting the estimation result (x
^
N
+
1) from the new signal data (x
N
+
1).


## 4. Simulation and Verification

A semiphysical simulation platform of pumping is built to simulate the working state of the field pumping unit. The online real-time recursive least squares algorithm to eliminate the noise and trend term of the acceleration signal is used to deal with the random noise and trend term. And the polish rod displacement of the semiphysical simulation platform of pumping can be calculated. Data processing can be divided into two phases: online real-time learning phase and eliminating phase of the noise and trend term.


### 4.1. Online Real-Time Learning Phase

Firstly, an acceleration signals series shall be measured from the semiphysical simulation platform in the online real-time learning phase. Then the time series model and parameters can be obtained by using the time series analysis techniques. Finally, the period of the acceleration signal is obtained by using the FFT transform. The Kalman model parameters, initial value, and signal period are all obtained to eliminate the noise and trend term of the acceleration signal.A series of acceleration signals are collected from the semiphysical simulation platform. The series are shown in Figure1 (the zero mean has not been processed). The sampling interval is 50 ms.Figure 1
Acceleration signal data for online treatment.The acceleration data in Figure1 should be stationary pretreated for stationed uncertainty of the signal. The stationary test methods include Data Figure test, autocorrelation test, characteristic root tests, and some other test methods. In this paper, the best test guidelines [24, 25] and nonparametric tests [26] stationary test methods are selected to test the stationarity of the acceleration sensor signal data.Upon stationary test, it can be found that the acceleration sensor signal in Figure1 is nonstationary. After a differential operation of the signal, the sequence stationary becomes acceptable. And the acceptable differentiated sequence is shown in Figure 2.Figure 2
Acceptable differentiated acceleration signal data.Based on the tailing or truncated characteristics of the autocorrelation function and partial autocorrelation function, the acceleration signal data in Figure2 can be treated and modeled with the time series model method. And the time series model of differenced acceleration signal data is A
R
M
A
(
5,12
). The AIC value is −3.7351. The time series model of the initial acceleration signal data is A
R
M
A
(
5,12
). Let y
(
t
)
=
x
(
t
)
-
x
(
t
-
1
); the A
R
M
A
(
5,12
) model can be expressed as (25)
y
t
-
3.13
y
t
-
1
+
2.846
y
t
-
2
+
0.341
y
t
-
3
-
1.698
y
t
-
4
+
0.6415
y
t
-
5
=
ε
t
-
3.629
ε
t
-
1
+
4.661
ε
t
-
2
-
1.932
ε
t
-
3
-
0.7725
ε
t
-
4
+
0.6819
ε
t
-
5
+
0.4247
ε
t
-
6
-
0.8283
ε
t
-
7
+
0.5138
ε
t
-
8
-
0.0917
ε
t
-
9
-
0.04688
ε
t
-
10
+
0.01492
ε
t
-
11
+
0.004096
ε
t
-
12
.By substitution of y
(
t
)
=
x
(
t
)
-
x
(
t
-
1
) into formula (25), x
(
t
) can be expressed as (26)
x
t
=
4.13
x
t
-
1
-
5.976
x
t
-
2
+
2.505
x
t
-
3
+
2.039
x
t
-
4
-
2.3395
x
t
-
5
+
0.6415
x
t
-
6
+
ε
t
-
3.629
ε
t
-
1
+
4.661
ε
t
-
2
-
1.932
ε
t
-
3
-
0.7725
ε
t
-
4
+
0.6819
ε
t
-
5
+
0.4247
ε
t
-
6
-
0.8283
ε
t
-
7
+
0.5138
ε
t
-
8
-
0.0917
ε
t
-
9
-
0.04688
ε
t
-
10
+
0.01492
ε
t
-
11
+
0.004096
ε
t
-
12
.Using (26) to fit the learning data, the result can be seen in Figure 3.Figure 3
Comparison chart of the fitting data and the original data.It can be seen from Figure3 that the fitting data from the ARIMA model can well fit the original data, which verifies the correctness of the ARIMA model.Then the built ARIMA model is transformed into the state-space model of Kalman filter. Referring to (14), (15), (16), and (17), it is clear that m value is 13. Substituting formula (26) into (12) and (14) obtains the state and measurement equations of Kalman filter. In this paper, X
0
=
[
x
(
13
)
,
…
,
x
(
1
)
] and u
0
=
E
(
X
0
) are selected. And the original value is selected as X
^
0
=
u
0
∗
[
1
,
…
,
1
]
1
×
13, P
0
=
E
(
X
0
-
μ
0
)
(
X
0
-
μ
0
)
T. By simulation, Q
=
0.05 and R
=
0.25 are selected in the end.The denoised signal is zero mean processed. The spectrogram can be obtained by using FFT algorithm. Let the sampling frequency of the signal series be 20 Hz. The subscript and amplitude of the maximum and second maximum amplitude signal point in the spectrogram can be obtained. Then the acceleration signals frequency can also be calculated, 0.2469, by using the frequency estimation method in Section2.1. So one complete period have 81 points. And the integration and eliminating the trend terms of the acceleration signal are done by adding windows of 81 points in the subsequent signal processing.


### 4.2. Real-Time Elimination of the Random Noise and Trend Term

The measured acceleration signal is treated with the Kalman filter to eliminate the random noises. And the denoised acceleration signal plot can be seen in Figure4.Figure 4
Comparison charts of the processed data and the original data.It can be seen from Figure4 that the glitch of the original data charts disappeared. And the denoises signal chart is smooth. So the majority of the random noise is filtered out.The displacement is obtained by integrating the acceleration signal with adding windows of 81 points in one complete period. The trend terms of velocity and acceleration signals are eliminated by using the recursive least squares method. Firstly, the integrated acceleration signal can be calculated and the trend terms of acceleration signals are online eliminated in real-time by using the recursive least squares method. The displacement is calculated and the trend terms of velocity signals are online eliminated in real-time in the same way. The acceleration signals are processed one period after another. So the trend terms are eliminated by adding windows of 81 points. In this paper, six-period acceleration signals have been filtered to eliminate the trend terms. The simulation results are shown in Figure5.Figure 5
Windowed elimination of trend items.It can be seen that the displacement plot has no trend terms fluctuations among signal periods. The trend terms of velocity and acceleration signals have been eliminated effectively by adding windows of 81 points.However, the same acceleration signals are also filtered by using the recursive least squares method without adding windows and the simulation results are shown in Figure6.Figure 6
Nonwindowed elimination of trend items.It can be seen that the trend terms of velocity are eliminated and the trend terms of displacement are eliminated from the global aspect as well. But the plots of velocity and displacement have obvious fluctuation tendency among adjacent local periods of the curves. The reason is that though the whole signal data of acceleration and velocity have been zero mean treated, the signal data of acceleration and velocity of each period have not been zero mean treated. So there will be some local trend terms of the displacement and velocity among adjacent local periods of the curves. And the displacement measurement error is relatively large.Comparing the results of the two methods, we can see that the windowed method is more effective in eliminating trend items.The maximum displacement of pumping rod movement is less than 1.60 m in the semiphysical simulation platform. Using the method studied in this paper combined with period windowing method, selecting the data of six consecutive periods, using Kalman filtering, taking integral operation, and eliminating trend term can obtain the displacement values of each period. And the displacements of each period are shown in Table1.Table 1
Displacement of each period.
Starting points
Displacement (m)
Relative error
1~81
1.6399
2.49%
82~162
1.6131
0.82%
163~243
1.5644
2.23%
244~324
1.5545
2.84%
325~405
1.5621
2.37%
406~686
1.6356
2.22%Table1 shows the displacements of each period, that is, the relative displacements between the highest and lowest points. And the relative displacements are very close to the actual values. The relative measurement error is less than 3%. The limit of the indicator diagram displacement error in the actual project is less than 5%. So this result can meet the requirements of the actual project. It also further validates the effectiveness of the real-time method to eliminate the noise and trend term of the acceleration signal.


## 4.1. Online Real-Time Learning Phase

Firstly, an acceleration signals series shall be measured from the semiphysical simulation platform in the online real-time learning phase. Then the time series model and parameters can be obtained by using the time series analysis techniques. Finally, the period of the acceleration signal is obtained by using the FFT transform. The Kalman model parameters, initial value, and signal period are all obtained to eliminate the noise and trend term of the acceleration signal.A series of acceleration signals are collected from the semiphysical simulation platform. The series are shown in Figure1 (the zero mean has not been processed). The sampling interval is 50 ms.Figure 1
Acceleration signal data for online treatment.The acceleration data in Figure1 should be stationary pretreated for stationed uncertainty of the signal. The stationary test methods include Data Figure test, autocorrelation test, characteristic root tests, and some other test methods. In this paper, the best test guidelines [24, 25] and nonparametric tests [26] stationary test methods are selected to test the stationarity of the acceleration sensor signal data.Upon stationary test, it can be found that the acceleration sensor signal in Figure1 is nonstationary. After a differential operation of the signal, the sequence stationary becomes acceptable. And the acceptable differentiated sequence is shown in Figure 2.Figure 2
Acceptable differentiated acceleration signal data.Based on the tailing or truncated characteristics of the autocorrelation function and partial autocorrelation function, the acceleration signal data in Figure2 can be treated and modeled with the time series model method. And the time series model of differenced acceleration signal data is A
R
M
A
(
5,12
). The AIC value is −3.7351. The time series model of the initial acceleration signal data is A
R
M
A
(
5,12
). Let y
(
t
)
=
x
(
t
)
-
x
(
t
-
1
); the A
R
M
A
(
5,12
) model can be expressed as (25)
y
t
-
3.13
y
t
-
1
+
2.846
y
t
-
2
+
0.341
y
t
-
3
-
1.698
y
t
-
4
+
0.6415
y
t
-
5
=
ε
t
-
3.629
ε
t
-
1
+
4.661
ε
t
-
2
-
1.932
ε
t
-
3
-
0.7725
ε
t
-
4
+
0.6819
ε
t
-
5
+
0.4247
ε
t
-
6
-
0.8283
ε
t
-
7
+
0.5138
ε
t
-
8
-
0.0917
ε
t
-
9
-
0.04688
ε
t
-
10
+
0.01492
ε
t
-
11
+
0.004096
ε
t
-
12
.By substitution of y
(
t
)
=
x
(
t
)
-
x
(
t
-
1
) into formula (25), x
(
t
) can be expressed as (26)
x
t
=
4.13
x
t
-
1
-
5.976
x
t
-
2
+
2.505
x
t
-
3
+
2.039
x
t
-
4
-
2.3395
x
t
-
5
+
0.6415
x
t
-
6
+
ε
t
-
3.629
ε
t
-
1
+
4.661
ε
t
-
2
-
1.932
ε
t
-
3
-
0.7725
ε
t
-
4
+
0.6819
ε
t
-
5
+
0.4247
ε
t
-
6
-
0.8283
ε
t
-
7
+
0.5138
ε
t
-
8
-
0.0917
ε
t
-
9
-
0.04688
ε
t
-
10
+
0.01492
ε
t
-
11
+
0.004096
ε
t
-
12
.Using (26) to fit the learning data, the result can be seen in Figure 3.Figure 3
Comparison chart of the fitting data and the original data.It can be seen from Figure3 that the fitting data from the ARIMA model can well fit the original data, which verifies the correctness of the ARIMA model.Then the built ARIMA model is transformed into the state-space model of Kalman filter. Referring to (14), (15), (16), and (17), it is clear that m value is 13. Substituting formula (26) into (12) and (14) obtains the state and measurement equations of Kalman filter. In this paper, X
0
=
[
x
(
13
)
,
…
,
x
(
1
)
] and u
0
=
E
(
X
0
) are selected. And the original value is selected as X
^
0
=
u
0
∗
[
1
,
…
,
1
]
1
×
13, P
0
=
E
(
X
0
-
μ
0
)
(
X
0
-
μ
0
)
T. By simulation, Q
=
0.05 and R
=
0.25 are selected in the end.The denoised signal is zero mean processed. The spectrogram can be obtained by using FFT algorithm. Let the sampling frequency of the signal series be 20 Hz. The subscript and amplitude of the maximum and second maximum amplitude signal point in the spectrogram can be obtained. Then the acceleration signals frequency can also be calculated, 0.2469, by using the frequency estimation method in Section2.1. So one complete period have 81 points. And the integration and eliminating the trend terms of the acceleration signal are done by adding windows of 81 points in the subsequent signal processing.


## 4.2. Real-Time Elimination of the Random Noise and Trend Term

The measured acceleration signal is treated with the Kalman filter to eliminate the random noises. And the denoised acceleration signal plot can be seen in Figure4.Figure 4
Comparison charts of the processed data and the original data.It can be seen from Figure4 that the glitch of the original data charts disappeared. And the denoises signal chart is smooth. So the majority of the random noise is filtered out.The displacement is obtained by integrating the acceleration signal with adding windows of 81 points in one complete period. The trend terms of velocity and acceleration signals are eliminated by using the recursive least squares method. Firstly, the integrated acceleration signal can be calculated and the trend terms of acceleration signals are online eliminated in real-time by using the recursive least squares method. The displacement is calculated and the trend terms of velocity signals are online eliminated in real-time in the same way. The acceleration signals are processed one period after another. So the trend terms are eliminated by adding windows of 81 points. In this paper, six-period acceleration signals have been filtered to eliminate the trend terms. The simulation results are shown in Figure5.Figure 5
Windowed elimination of trend items.It can be seen that the displacement plot has no trend terms fluctuations among signal periods. The trend terms of velocity and acceleration signals have been eliminated effectively by adding windows of 81 points.However, the same acceleration signals are also filtered by using the recursive least squares method without adding windows and the simulation results are shown in Figure6.Figure 6
Nonwindowed elimination of trend items.It can be seen that the trend terms of velocity are eliminated and the trend terms of displacement are eliminated from the global aspect as well. But the plots of velocity and displacement have obvious fluctuation tendency among adjacent local periods of the curves. The reason is that though the whole signal data of acceleration and velocity have been zero mean treated, the signal data of acceleration and velocity of each period have not been zero mean treated. So there will be some local trend terms of the displacement and velocity among adjacent local periods of the curves. And the displacement measurement error is relatively large.Comparing the results of the two methods, we can see that the windowed method is more effective in eliminating trend items.The maximum displacement of pumping rod movement is less than 1.60 m in the semiphysical simulation platform. Using the method studied in this paper combined with period windowing method, selecting the data of six consecutive periods, using Kalman filtering, taking integral operation, and eliminating trend term can obtain the displacement values of each period. And the displacements of each period are shown in Table1.Table 1
Displacement of each period.
Starting points
Displacement (m)
Relative error
1~81
1.6399
2.49%
82~162
1.6131
0.82%
163~243
1.5644
2.23%
244~324
1.5545
2.84%
325~405
1.5621
2.37%
406~686
1.6356
2.22%Table1 shows the displacements of each period, that is, the relative displacements between the highest and lowest points. And the relative displacements are very close to the actual values. The relative measurement error is less than 3%. The limit of the indicator diagram displacement error in the actual project is less than 5%. So this result can meet the requirements of the actual project. It also further validates the effectiveness of the real-time method to eliminate the noise and trend term of the acceleration signal.


## 5. Conclusions

This paper presents a real-time method to remove noises and eliminate trend terms based on online learning method and the platform pumping semiphysical simulation system verifies the feasibility and practicality of the proposed method. The new online real-time method can be summarized as follows. Firstly, the ARIMA model of the acceleration signal is constructed based on the time series analysis method. Secondly, the period of the acceleration signal is calculated by using the Rife-Jane frequency estimation method and the effect on the estimation precision of the acceleration signal period caused by the barrier effect is inhibited. Thirdly, the random noises of the acceleration signal are eliminated by using the Kalman filter algorithm and the recursive least squares method is used to online eliminate in real-time the trend term of the acceleration signal. The experimental results show that this method can effectively remove the noise of the acceleration signal and the trend terms of the displacement. It can control the displacement error within 3% which is 2% less than the actual displacement engineering requirements error (5%). In summary, the new method can greatly improve the measurement accuracy of the dynamometer displacement.



---

*Source: 2759092-2016-04-26.xml*