# ANN Approach for State Estimation of Hybrid Systems and Its Experimental Validation

Authors: Shijoh Vellayikot; M. V. Vaidyan
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

A novel artificial neural network based state estimator has been proposed to ensure the robustness in the state estimation of autonomous switching hybrid systems under various uncertainties. Taking the autonomous switching three-tank system as benchmark hybrid model working under various additive and multiplicative uncertainties such as process noise, measurement error, process–model parameter variation, initial state mismatch, and hand valve faults, real-time performance evaluation by the comparison of it with other state estimators such as extended Kalman filter and unscented Kalman Filter was carried out. The experimental results reported with the proposed approach show considerable improvement in the robustness in performance under the considered uncertainties.


---

## Body

## 1. Introduction

Many researchers focused their attention towards hybrid systems, because almost all the technological systems deal with the variables which are both continuous and discrete in nature [1–5]. Autonomous switching hybrid systems (AHS), in which the switching of discrete states is based on the values of continuous states [5], are considered in this work. Tank systems were widely used as the benchmark system for demonstrating the effectiveness of algorithms proposed for modeling, estimation, fault detection, fault isolation, and control operations in hybrid systems [6–11]. Most of such works were confined to simulation studies only [6–10]. But [11] deals with the experimental validation of the algorithms for modeling and control of nonlinear hybrid systems. In this context, the state estimation plays an important role in controlling the process variables of the hybrid systems with advanced control algorithm [9, 11, 12].Since 1960, state estimation has become a very important area of study in control engineering, as Kalman [13] had developed a well-known Kalman filter (KF) for the linear filtering and prediction problems. But almost all real systems possess some kind of nonlinearity. So, later on people started working on the extension of Kalman filter to the state estimation problems of nonlinear systems [12, 14–17]. Jazwinski [14] used an extended Kalman filter (EKF) for the estimation of states of nonlinear systems through local linearization. In this, the local linearization is carried out by Taylor series expansion, which requires the calculation of Jacobians of state transition operator at each time step. So this method is complex for higher-order systems [12]. Because of the discontinuity in hybrid systems due to the switching of discrete variables, it was suggested in [12] not to use EKF for the state estimation of AHS, especially in the regions where the discrete variables undergo frequent variations. In 1996, Julier et al. [15] proposed a new approach to the nonlinear state estimation problems and this uses the unscented transform principle, known as the unscented Kalman filter (UKF). Since this method follows a derivative-free approach, it was extensively utilized by the majority of the researchers working with nonlinear dynamics especially in hybrid systems [9, 11, 16, 17]. But the applicability of this algorithm in fast dynamic processes has to be investigated in detail in terms of estimation time requirement.Some works introduced different types of artificial neural networks (ANN) for modeling and observer design of nonlinear systems [18–26]. The same concepts were applied for the identification of a global model for hybrid systems using feed forward ANN by Messai et al. [20] and an adaptive, growing, and pruning radial basis function network by Alizadeh et al. [21]. Later these types of ANN models were utilized for the model-based predictive and adaptive control schemes for nonlinear systems. In this regard, a Lyapunov based neural network adaptive control scheme was developed by Hayakawa et al. [22], and this guaranteed an asymptotic stability of closed loop hybrid systems. Al Seyab and Cao [23] had used a continuous time recurrent neural network (CTRNN) model in the nonlinear model predictive control (NMPC) of nonlinear systems. Works were carried out for finding more dynamic and efficient ANN architectures for modeling the different types of nonlinear systems and for the utilization of such models in the online system identification [24], state estimation [25], and tracking control [26] of nonlinear systems. But the potential of ANN architecture for modeling was not extensively explored in the state estimation of hybrid systems, which is investigated in this work.Also, the effectiveness of the different state estimation algorithms for hybrid systems under various real-time uncertainties and constraints was not significantly investigated [9, 12]. This work proposes an ANN based state estimator (ANNSE) and carries out a detailed experimental investigation on its performance comparison with EKF and UKF based state estimators (EKFSE and UKFSE) [17] under different real-time uncertainties, such as parameter variation, noise variation, and some valve faults. The efficacies of the algorithms are demonstrated with the help of a benchmark three-tank hybrid system under real-time situations. The performance indices considered for the comparison are ISE criterion and the time required for estimation.The organization of the rest of the paper is as follows.In Section2, the proposed ANNSE is described along with a brief idea about the general state estimation schemes for nonlinear systems. Section 3 provides the details of the hybrid three-tank system used for the implementation of the algorithms. Experimental results of the performance comparison of the proposed ANNSE with EKFSE and UKFSE are presented in Section 4. Finally, Section 5 deals with conclusion and scope for further studies in the state estimation of AHS.


## 2. State Estimation in Nonlinear Systems

State estimation has gained a lot of attention from researchers working in the process industry in order to control various process variables efficiently [9–12]. The Kalman filter is one of the strongest tools used for estimating states of linear systems, while its nonlinear extensions like EKF and UKF are commonly used for the estimation problems of nonlinear systems. This algorithm requires a model of the actual system as well as some basic knowledge such as initial values of states and covariance of the system. Figure 1 gives the general block diagram representation of the general state estimator with prediction-correction approach.Figure 1
Block diagram of state estimator [17].The estimator receives input(
u
(
k
)
) and output (
y
(
k
)
) sampled from the process at each time step. The prediction model of the process gives a priori estimates of the states (
x
^
(
k
∣
k
-
1
)
) based on the input data and preassumed initial values for the state estimates (
x
^
(
0
)
). An innovation (
γ
(
k
∣
k
-
1
)
) between the actual output (
y
(
k
)
) and model output (
y
^
(
k
∣
k
-
1
)
) is then generated. Measurement update or correction part of the filter calculates a posteriori estimate of the states using this innovation and a priori state estimates. These estimated values are given as input to the model, along with the new input values from the sensor, for the next iteration.Now, consider the general representation of the hybrid systems(1)
x
˙
t
=
F
x
t
,
z
t
,
u
t
+
w
t
,
y
t
=
H
x
t
+
v
t
.In the above hybrid dynamic system equations,x and z represent the unobserved continuous and discrete states of the system, while u is a known exogenous input and y is the only measured output signal. For autonomous switching hybrid systems, z will be a function of x [5]. The process noise (
w
(
t
)
) and measurement noise (
v
(
t
)
) shown in Figure 1 are assumed as additive type zero-mean Gaussian white noise sequences (cf. (1)) with covariance matrices Q and R, respectively.TheF and H in (1) symbolize n-dimensional nonlinear state and output functions which are assumed to be known. ANNSE is proposed for estimating unobservable continuous states (
x
) of the hybrid process using the only measurable output (
y
) and the input measurements (
u
) in a recursive manner, so that this algorithm can be implemented online easily.


### 2.1. ANN Based State Estimation

ANN is one of the strongest tools used for the modeling of different types of systems [18–22]. The main advantage of ANN modeling is that it does not require any knowledge about the actual system; but rather the modeling is done on the basis of the data collected from the system. It is a black box modeling method, in which output is expressed as the linear combination of the inputs followed by a nonlinear activation function. Different types of ANN such as feed forward, recurrent, radial basis function, and dynamic neural networks are utilized for modeling of hybrid systems in literature [20, 21, 23, 24].The proposed ANNSE scheme is based on prediction-correction approach of the Kalman filter in which the correction part is replaced by a nonlinear autoregressive network with exogenous input (NARX). As a result, this algorithm does not require Jacobian matrix calculations in the correction part, and it becomes a derivative-free state estimation algorithm. Hence, it overcomes one of the main limitations of EKFSE [12].In the first step, a proper value for initial state vector has to be selected. Using this, a priori estimate of the states and outputs, based on the nonlinear state and output models of the system, are calculated as given below:(2)
x
^
(
k
∣
k
-
1
)
=
F
x
^
k
-
1
,
z
^
k
-
1
,
u
k
,
y
^
(
k
∣
k
-
1
)
=
H
x
^
(
k
∣
k
-
1
)
.The innovation between the actual output and predicted output is generated as(3)
γ
(
k
∣
k
-
1
)
=
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
.The updated state estimates are obtained using the nonlinear update equation as follows:(4)
x
^
(
k
)
=
K
NN
(
x
^
k
k
-
1
,
γ
(
k
∣
k
-
1
)
)
.
K
NN is the nonlinear ANN function that is performed by the recurrent multilayer perceptron with NARX structure. The details of NARX are given as NARX Strucutre. It receives a priori state estimates x
^
(
k
∣
k
-
1
) and innovation γ
(
k
∣
k
-
1
) as exogenous input and gives a posteriori state estimates x
^
(
k
) as output.The important and time-consuming step involved in the development of ANNSE is the training and tuning of the ANN. The training data, generated using EKFSE, cover the entire operating region of the system in order to ensure that the functioning of ANNSE is possible in the entire operating region. Tuning of the ANN is done by varying hidden layer neurons, number of output delays(
n
), and number of input delays (
m
) by keeping the integral square error (ISE) as the performance measure. The values of n and m and number of hidden layer neurons, for which the minimum ISE is obtained, are selected as the final ANN parameters which are listed in Table 1 along with other specifications. Even though the offline training is performed using the bulk data, its online validation is also carried out.Table 1
Values of different ANN parameters.
Parameter
Value
ANN structure
NARX
Number of hidden layers
1
Hidden layer neurons
5
Hidden layer activation function
“tansigmoid”
Output layer activation function
“purelin”
Number of epochs
100
Number of exogenous inputs
4
Number of delayed inputs
0
Number of outputs
3
Number of feedback output delays
2
Training method
Back propagation
Training function
Levenberg–Marquardt
Performance function
Mean square error


### 2.2. Kalman Based State Estimators for Nonlinear Systems

This section reviews the nonlinear extensions of Kalman filter for state estimation problems using EKF [14] and UKF [15].


#### 2.2.1. Extended Kalman Filter [14]

The EKF [14] was attempted to overcome the limitation of KF [13] by using a linearized approximation where the linearization was performed about the current state estimate. As per [12], the usage of EKF for the state estimation of hybrid systems is not allowed only at the point of mode switching. In the current problem of three-tank system explained in Section 3, this condition occurs only when the level in tanks is exactly 0.3 m. But the chances of reaching this situation are negligibly small as the measurements are taken only once in one second. EKF for the AHS is developed by defining different Jacobian functions for each mode of operation based on the discrete variables (z
1 and z
2). Also, in the case of level exactly 0.3 m, the Jacobian of the previous sampling instant is taken for the correction part of the state estimator. This may lead to negligible estimation error at that particular sampling instant.EKF involves the recursive estimation of the mean and covariance of the state. The functionF can be used to compute the predicted state from the previous estimate and similarly the function H can be used to compute the predicted measurement from the predicted state. However, F and H cannot be directly applied for the calculation of covariance. Instead, a matrix of partial derivatives (Jacobians) was computed at each time step with current predicted state and evaluated. This process essentially carries out the linearization of the nonlinear function around the current estimate.The predicted state estimates are obtained using a prediction model as in ANNSE(5)
x
^
(
k
∣
k
-
1
)
=
F
(
x
^
(
k
-
1
)
,
z
^
(
k
-
1
)
,
u
(
k
)
)
.The covariance matrix of estimation errors in the predicted estimates is obtained as (6)
P
^
(
k
∣
k
-
1
)
=
Φ
k
P
^
k
-
1
Φ
T
k
+
Q
,where Φ
(
k
) is nothing but the Jacobian matrix of partial derivatives of F with respect to x at x
^
(
k
-
1
):(7)
Φ
(
k
)
=
∂
F
∂
x
[
x
^
(
k
-
1
)
]
.The measurement prediction, innovation, and covariance matrix of innovation are computed as given below:(8)
y
^
(
k
∣
k
-
1
)
=
H
x
^
(
k
∣
k
-
1
)
,
γ
(
k
∣
k
-
1
)
=
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
,
V
(
k
)
=
C
k
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
+
R
,where C
(
k
) is the Jacobian matrix of partial derivatives of H with respect to x:(9)
C
(
k
)
=
∂
H
∂
x
[
x
^
(
k
-
1
)
]
.The Kalman gain is computed using the following equation: (10)
K
(
k
)
=
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
V
-
1
(
k
)
.The updated state estimates are obtained using the Kalman gain and the innovation(11)
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
γ
(
k
∣
k
-
1
)
.The covariance matrix of estimation errors is updated as follows:(12)
P
^
(
k
)
=
[
I
-
K
(
k
)
C
(
k
)
]
P
^
(
k
∣
k
-
1
)
.These steps are repeated for the entire process run with new estimates of state and covariance.


#### 2.2.2. Unscented Kalman Filter [15]

In order to overcome the limitations of EKF algorithm in the state estimation of nonlinear systems, Julier et al. [15] had proposed UKF. The main advantage of this estimator was that it does not require any Jacobian matrix calculation at each time step. This utilized the unscented transform principle for computing approximate solutions to the filtering problems. Unscented transform is a method of calculating the statistics of a random variable which undergoes nonlinear transformation. In this algorithm too, the initial values of state x
^
(
k
-
1
) and covariance P
^
(
k
-
1
) have to be chosen properly from the prior knowledge about the system. In the next step, 2
n
+
1 sigma points have to be identified such that x
^
(
k
-
1
) and P
^
(
k
-
1
) form their mean and covariance, respectively, as given below:(13)
x
^
0
=
x
^
k
-
1
,
(14)
x
^
i
=
x
^
k
-
1
±
n
+
λ
P
^
k
-
1
,where i
=
1,2
,
…
,
2
n and n is the dimension of the state vector. The λ in (14) is computed as (15)
λ
=
α
2
n
+
κ
-
n
.The spread of the sigma points around the mean,x
^
(
k
-
1
), is determined by α, whose value may vary between 0.001 and 1. The value of secondary scaling parameter, κ, is usually 0 for state estimation and (
3
-
n
) for parameter estimation [16]. Each sigma point is then passed through the nonlinear process model so that a cloud of 2
n
+
1 new sigma points is obtained as follows: (16)
x
^
i
(
k
∣
k
-
1
)
=
F
(
x
^
i
k
-
1
,
z
^
k
-
1
,
u
(
k
)
)
.Now these new sigma points are fed to measurement model as (17)
y
^
(
i
)
(
k
∣
k
-
1
)
=
H
(
x
^
(
i
)
(
k
∣
k
-
1
)
)
.Based on their statistics new mean x
^
(
k
∣
k
-
1
) and covariance P
^
(
k
∣
k
-
1
) are calculated:(18)
x
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
,
(19)
P
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
c
i
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
x
^
i
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
T
+
Q
.A priori estimate of the output is computed as(20)
y
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
.The associated weights in the calculation of mean, covariance, and output in (18)–(20) are obtained as (21)
W
m
(
0
)
=
λ
(
n
+
λ
)
,
W
c
(
0
)
=
λ
(
n
+
λ
)
+
1
-
α
2
+
β
,
W
m
(
i
)
=
W
m
(
i
)
=
1
2
n
+
λ
.Hereβ is employed to include the prior information about the distribution of the state and for Gaussian distribution, β
=
2 is selected as the optimum value [16]. The innovation covariance and the cross covariance between the innovation and a priori estimates are given below:(22)
P
y
y
=
∑
i
=
0
2
n
W
c
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
+
R
,
P
x
y
=
∑
i
=
0
2
n
W
c
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
.These values were used for the calculation of Kalman gain as (23)
K
k
=
P
x
y
P
y
y
-
1
.This Kalman gain is used for the measurement update of mean and covariance of the states as(24)
P
^
k
=
P
^
(
k
∣
k
-
1
)
-
K
k
P
y
y
K
T
(
k
)
,
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
[
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
]
.These new values of state and covariance are fed as input to the time update part for the next iteration.


## 2.1. ANN Based State Estimation

ANN is one of the strongest tools used for the modeling of different types of systems [18–22]. The main advantage of ANN modeling is that it does not require any knowledge about the actual system; but rather the modeling is done on the basis of the data collected from the system. It is a black box modeling method, in which output is expressed as the linear combination of the inputs followed by a nonlinear activation function. Different types of ANN such as feed forward, recurrent, radial basis function, and dynamic neural networks are utilized for modeling of hybrid systems in literature [20, 21, 23, 24].The proposed ANNSE scheme is based on prediction-correction approach of the Kalman filter in which the correction part is replaced by a nonlinear autoregressive network with exogenous input (NARX). As a result, this algorithm does not require Jacobian matrix calculations in the correction part, and it becomes a derivative-free state estimation algorithm. Hence, it overcomes one of the main limitations of EKFSE [12].In the first step, a proper value for initial state vector has to be selected. Using this, a priori estimate of the states and outputs, based on the nonlinear state and output models of the system, are calculated as given below:(2)
x
^
(
k
∣
k
-
1
)
=
F
x
^
k
-
1
,
z
^
k
-
1
,
u
k
,
y
^
(
k
∣
k
-
1
)
=
H
x
^
(
k
∣
k
-
1
)
.The innovation between the actual output and predicted output is generated as(3)
γ
(
k
∣
k
-
1
)
=
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
.The updated state estimates are obtained using the nonlinear update equation as follows:(4)
x
^
(
k
)
=
K
NN
(
x
^
k
k
-
1
,
γ
(
k
∣
k
-
1
)
)
.
K
NN is the nonlinear ANN function that is performed by the recurrent multilayer perceptron with NARX structure. The details of NARX are given as NARX Strucutre. It receives a priori state estimates x
^
(
k
∣
k
-
1
) and innovation γ
(
k
∣
k
-
1
) as exogenous input and gives a posteriori state estimates x
^
(
k
) as output.The important and time-consuming step involved in the development of ANNSE is the training and tuning of the ANN. The training data, generated using EKFSE, cover the entire operating region of the system in order to ensure that the functioning of ANNSE is possible in the entire operating region. Tuning of the ANN is done by varying hidden layer neurons, number of output delays(
n
), and number of input delays (
m
) by keeping the integral square error (ISE) as the performance measure. The values of n and m and number of hidden layer neurons, for which the minimum ISE is obtained, are selected as the final ANN parameters which are listed in Table 1 along with other specifications. Even though the offline training is performed using the bulk data, its online validation is also carried out.Table 1
Values of different ANN parameters.
Parameter
Value
ANN structure
NARX
Number of hidden layers
1
Hidden layer neurons
5
Hidden layer activation function
“tansigmoid”
Output layer activation function
“purelin”
Number of epochs
100
Number of exogenous inputs
4
Number of delayed inputs
0
Number of outputs
3
Number of feedback output delays
2
Training method
Back propagation
Training function
Levenberg–Marquardt
Performance function
Mean square error


## 2.2. Kalman Based State Estimators for Nonlinear Systems

This section reviews the nonlinear extensions of Kalman filter for state estimation problems using EKF [14] and UKF [15].


### 2.2.1. Extended Kalman Filter [14]

The EKF [14] was attempted to overcome the limitation of KF [13] by using a linearized approximation where the linearization was performed about the current state estimate. As per [12], the usage of EKF for the state estimation of hybrid systems is not allowed only at the point of mode switching. In the current problem of three-tank system explained in Section 3, this condition occurs only when the level in tanks is exactly 0.3 m. But the chances of reaching this situation are negligibly small as the measurements are taken only once in one second. EKF for the AHS is developed by defining different Jacobian functions for each mode of operation based on the discrete variables (z
1 and z
2). Also, in the case of level exactly 0.3 m, the Jacobian of the previous sampling instant is taken for the correction part of the state estimator. This may lead to negligible estimation error at that particular sampling instant.EKF involves the recursive estimation of the mean and covariance of the state. The functionF can be used to compute the predicted state from the previous estimate and similarly the function H can be used to compute the predicted measurement from the predicted state. However, F and H cannot be directly applied for the calculation of covariance. Instead, a matrix of partial derivatives (Jacobians) was computed at each time step with current predicted state and evaluated. This process essentially carries out the linearization of the nonlinear function around the current estimate.The predicted state estimates are obtained using a prediction model as in ANNSE(5)
x
^
(
k
∣
k
-
1
)
=
F
(
x
^
(
k
-
1
)
,
z
^
(
k
-
1
)
,
u
(
k
)
)
.The covariance matrix of estimation errors in the predicted estimates is obtained as (6)
P
^
(
k
∣
k
-
1
)
=
Φ
k
P
^
k
-
1
Φ
T
k
+
Q
,where Φ
(
k
) is nothing but the Jacobian matrix of partial derivatives of F with respect to x at x
^
(
k
-
1
):(7)
Φ
(
k
)
=
∂
F
∂
x
[
x
^
(
k
-
1
)
]
.The measurement prediction, innovation, and covariance matrix of innovation are computed as given below:(8)
y
^
(
k
∣
k
-
1
)
=
H
x
^
(
k
∣
k
-
1
)
,
γ
(
k
∣
k
-
1
)
=
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
,
V
(
k
)
=
C
k
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
+
R
,where C
(
k
) is the Jacobian matrix of partial derivatives of H with respect to x:(9)
C
(
k
)
=
∂
H
∂
x
[
x
^
(
k
-
1
)
]
.The Kalman gain is computed using the following equation: (10)
K
(
k
)
=
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
V
-
1
(
k
)
.The updated state estimates are obtained using the Kalman gain and the innovation(11)
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
γ
(
k
∣
k
-
1
)
.The covariance matrix of estimation errors is updated as follows:(12)
P
^
(
k
)
=
[
I
-
K
(
k
)
C
(
k
)
]
P
^
(
k
∣
k
-
1
)
.These steps are repeated for the entire process run with new estimates of state and covariance.


### 2.2.2. Unscented Kalman Filter [15]

In order to overcome the limitations of EKF algorithm in the state estimation of nonlinear systems, Julier et al. [15] had proposed UKF. The main advantage of this estimator was that it does not require any Jacobian matrix calculation at each time step. This utilized the unscented transform principle for computing approximate solutions to the filtering problems. Unscented transform is a method of calculating the statistics of a random variable which undergoes nonlinear transformation. In this algorithm too, the initial values of state x
^
(
k
-
1
) and covariance P
^
(
k
-
1
) have to be chosen properly from the prior knowledge about the system. In the next step, 2
n
+
1 sigma points have to be identified such that x
^
(
k
-
1
) and P
^
(
k
-
1
) form their mean and covariance, respectively, as given below:(13)
x
^
0
=
x
^
k
-
1
,
(14)
x
^
i
=
x
^
k
-
1
±
n
+
λ
P
^
k
-
1
,where i
=
1,2
,
…
,
2
n and n is the dimension of the state vector. The λ in (14) is computed as (15)
λ
=
α
2
n
+
κ
-
n
.The spread of the sigma points around the mean,x
^
(
k
-
1
), is determined by α, whose value may vary between 0.001 and 1. The value of secondary scaling parameter, κ, is usually 0 for state estimation and (
3
-
n
) for parameter estimation [16]. Each sigma point is then passed through the nonlinear process model so that a cloud of 2
n
+
1 new sigma points is obtained as follows: (16)
x
^
i
(
k
∣
k
-
1
)
=
F
(
x
^
i
k
-
1
,
z
^
k
-
1
,
u
(
k
)
)
.Now these new sigma points are fed to measurement model as (17)
y
^
(
i
)
(
k
∣
k
-
1
)
=
H
(
x
^
(
i
)
(
k
∣
k
-
1
)
)
.Based on their statistics new mean x
^
(
k
∣
k
-
1
) and covariance P
^
(
k
∣
k
-
1
) are calculated:(18)
x
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
,
(19)
P
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
c
i
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
x
^
i
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
T
+
Q
.A priori estimate of the output is computed as(20)
y
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
.The associated weights in the calculation of mean, covariance, and output in (18)–(20) are obtained as (21)
W
m
(
0
)
=
λ
(
n
+
λ
)
,
W
c
(
0
)
=
λ
(
n
+
λ
)
+
1
-
α
2
+
β
,
W
m
(
i
)
=
W
m
(
i
)
=
1
2
n
+
λ
.Hereβ is employed to include the prior information about the distribution of the state and for Gaussian distribution, β
=
2 is selected as the optimum value [16]. The innovation covariance and the cross covariance between the innovation and a priori estimates are given below:(22)
P
y
y
=
∑
i
=
0
2
n
W
c
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
+
R
,
P
x
y
=
∑
i
=
0
2
n
W
c
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
.These values were used for the calculation of Kalman gain as (23)
K
k
=
P
x
y
P
y
y
-
1
.This Kalman gain is used for the measurement update of mean and covariance of the states as(24)
P
^
k
=
P
^
(
k
∣
k
-
1
)
-
K
k
P
y
y
K
T
(
k
)
,
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
[
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
]
.These new values of state and covariance are fed as input to the time update part for the next iteration.


## 2.2.1. Extended Kalman Filter [14]

The EKF [14] was attempted to overcome the limitation of KF [13] by using a linearized approximation where the linearization was performed about the current state estimate. As per [12], the usage of EKF for the state estimation of hybrid systems is not allowed only at the point of mode switching. In the current problem of three-tank system explained in Section 3, this condition occurs only when the level in tanks is exactly 0.3 m. But the chances of reaching this situation are negligibly small as the measurements are taken only once in one second. EKF for the AHS is developed by defining different Jacobian functions for each mode of operation based on the discrete variables (z
1 and z
2). Also, in the case of level exactly 0.3 m, the Jacobian of the previous sampling instant is taken for the correction part of the state estimator. This may lead to negligible estimation error at that particular sampling instant.EKF involves the recursive estimation of the mean and covariance of the state. The functionF can be used to compute the predicted state from the previous estimate and similarly the function H can be used to compute the predicted measurement from the predicted state. However, F and H cannot be directly applied for the calculation of covariance. Instead, a matrix of partial derivatives (Jacobians) was computed at each time step with current predicted state and evaluated. This process essentially carries out the linearization of the nonlinear function around the current estimate.The predicted state estimates are obtained using a prediction model as in ANNSE(5)
x
^
(
k
∣
k
-
1
)
=
F
(
x
^
(
k
-
1
)
,
z
^
(
k
-
1
)
,
u
(
k
)
)
.The covariance matrix of estimation errors in the predicted estimates is obtained as (6)
P
^
(
k
∣
k
-
1
)
=
Φ
k
P
^
k
-
1
Φ
T
k
+
Q
,where Φ
(
k
) is nothing but the Jacobian matrix of partial derivatives of F with respect to x at x
^
(
k
-
1
):(7)
Φ
(
k
)
=
∂
F
∂
x
[
x
^
(
k
-
1
)
]
.The measurement prediction, innovation, and covariance matrix of innovation are computed as given below:(8)
y
^
(
k
∣
k
-
1
)
=
H
x
^
(
k
∣
k
-
1
)
,
γ
(
k
∣
k
-
1
)
=
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
,
V
(
k
)
=
C
k
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
+
R
,where C
(
k
) is the Jacobian matrix of partial derivatives of H with respect to x:(9)
C
(
k
)
=
∂
H
∂
x
[
x
^
(
k
-
1
)
]
.The Kalman gain is computed using the following equation: (10)
K
(
k
)
=
P
^
(
k
∣
k
-
1
)
C
T
(
k
)
V
-
1
(
k
)
.The updated state estimates are obtained using the Kalman gain and the innovation(11)
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
γ
(
k
∣
k
-
1
)
.The covariance matrix of estimation errors is updated as follows:(12)
P
^
(
k
)
=
[
I
-
K
(
k
)
C
(
k
)
]
P
^
(
k
∣
k
-
1
)
.These steps are repeated for the entire process run with new estimates of state and covariance.


## 2.2.2. Unscented Kalman Filter [15]

In order to overcome the limitations of EKF algorithm in the state estimation of nonlinear systems, Julier et al. [15] had proposed UKF. The main advantage of this estimator was that it does not require any Jacobian matrix calculation at each time step. This utilized the unscented transform principle for computing approximate solutions to the filtering problems. Unscented transform is a method of calculating the statistics of a random variable which undergoes nonlinear transformation. In this algorithm too, the initial values of state x
^
(
k
-
1
) and covariance P
^
(
k
-
1
) have to be chosen properly from the prior knowledge about the system. In the next step, 2
n
+
1 sigma points have to be identified such that x
^
(
k
-
1
) and P
^
(
k
-
1
) form their mean and covariance, respectively, as given below:(13)
x
^
0
=
x
^
k
-
1
,
(14)
x
^
i
=
x
^
k
-
1
±
n
+
λ
P
^
k
-
1
,where i
=
1,2
,
…
,
2
n and n is the dimension of the state vector. The λ in (14) is computed as (15)
λ
=
α
2
n
+
κ
-
n
.The spread of the sigma points around the mean,x
^
(
k
-
1
), is determined by α, whose value may vary between 0.001 and 1. The value of secondary scaling parameter, κ, is usually 0 for state estimation and (
3
-
n
) for parameter estimation [16]. Each sigma point is then passed through the nonlinear process model so that a cloud of 2
n
+
1 new sigma points is obtained as follows: (16)
x
^
i
(
k
∣
k
-
1
)
=
F
(
x
^
i
k
-
1
,
z
^
k
-
1
,
u
(
k
)
)
.Now these new sigma points are fed to measurement model as (17)
y
^
(
i
)
(
k
∣
k
-
1
)
=
H
(
x
^
(
i
)
(
k
∣
k
-
1
)
)
.Based on their statistics new mean x
^
(
k
∣
k
-
1
) and covariance P
^
(
k
∣
k
-
1
) are calculated:(18)
x
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
,
(19)
P
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
c
i
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
x
^
i
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
T
+
Q
.A priori estimate of the output is computed as(20)
y
^
(
k
∣
k
-
1
)
=
∑
i
=
0
2
n
W
m
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
.The associated weights in the calculation of mean, covariance, and output in (18)–(20) are obtained as (21)
W
m
(
0
)
=
λ
(
n
+
λ
)
,
W
c
(
0
)
=
λ
(
n
+
λ
)
+
1
-
α
2
+
β
,
W
m
(
i
)
=
W
m
(
i
)
=
1
2
n
+
λ
.Hereβ is employed to include the prior information about the distribution of the state and for Gaussian distribution, β
=
2 is selected as the optimum value [16]. The innovation covariance and the cross covariance between the innovation and a priori estimates are given below:(22)
P
y
y
=
∑
i
=
0
2
n
W
c
(
i
)
y
^
(
i
)
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
+
R
,
P
x
y
=
∑
i
=
0
2
n
W
c
(
i
)
x
^
(
i
)
(
k
∣
k
-
1
)
-
x
^
(
k
∣
k
-
1
)
h
h
h
·
y
^
i
(
k
∣
k
-
1
)
-
y
^
(
k
∣
k
-
1
)
T
.These values were used for the calculation of Kalman gain as (23)
K
k
=
P
x
y
P
y
y
-
1
.This Kalman gain is used for the measurement update of mean and covariance of the states as(24)
P
^
k
=
P
^
(
k
∣
k
-
1
)
-
K
k
P
y
y
K
T
(
k
)
,
x
^
(
k
)
=
x
^
(
k
∣
k
-
1
)
+
K
(
k
)
[
y
(
k
)
-
y
^
(
k
∣
k
-
1
)
]
.These new values of state and covariance are fed as input to the time update part for the next iteration.


## 3. Autonomous Switching Hybrid Three-Tank System [17]

The benchmark autonomous three-tank hybrid system, shown in Figure2, is used for demonstrating the efficacy of the proposed ANNSE and its performance comparison with EKFSE and UKFSE. It consists of three cylindrical tanks with corresponding cross-sectional area denoted by A
1, A
2, and A
3. These tanks are connected to each other and to sump through seven hand valves with valve coefficients denoted by k
1 to k
7 (experimental values are given in Table 9) and two variable speed pumps as shown in Figure 2.Figure 2
Schematic representation of autonomous three-tank hybrid system [17].The two inflows (Fin1 and Fin2) make the inputs, u, and the levels in the three tanks (h
1, h
2, and h
3) make the continuous states, x, of the system shown in the block diagram of estimator (Figure 1). The discrete variables (z
1 and z
2) are decided by the direction of flow through the 3rd and 4th hand valves and they in turn depend on the three water levels. Since the switching of discrete state variables is decided by the continuous state variables and further no external input is required for the switching of discrete variables, this system comes under the group of AHS.The value of continuous variable varies between 0 and overflow height (0.55 m) of corresponding tank continuously. The discrete variables,z
1 and z
2, may take the values 0, +1, or −1 depending on whether flows Q
3 and Q
4 are 0, towards tank 3 or away from tank 3, respectively [17]. Let the flow rate of water through the ith valve be Q
i, which is calculated using Bernoulli’s equation based on the upstream and downstream water heads and the corresponding valve parameters as below:(25)
Q
1
=
k
1
sign
h
1
-
h
3
2
g
h
1
-
h
3
,
Q
2
=
k
2
sign
h
2
-
h
3
2
g
h
2
-
h
3
,
Q
3
=
z
1
k
3
2
g
a
(
h
1
-
h
0
)
-
b
(
h
3
-
h
0
)
,
Q
4
=
z
2
k
4
2
g
c
(
h
2
-
h
0
)
-
b
(
h
3
-
h
0
)
,
Q
5
=
k
5
2
g
(
h
1
+
h
d
1
)
,
Q
6
=
k
6
2
g
(
h
3
+
h
z
)
,
Q
7
=
k
7
2
g
(
h
2
+
h
d
2
)
,where a, b, and c are used to indicate whether water in the three tanks is above or below the threshold level, h
0. Threshold level is the height of the middle interconnecting pipe from the bottom of the tanks. The dead heights of the 5th, 6th, and 7th valves from the tank bottom are represented by h
d
1, h
z, and h
d
2, respectively. Based on the volume balance equation, nonlinear state space representation of the system is as follows:(26)
d
h
1
d
t
=
1
A
1
Fin
1
-
Q
1
-
Q
3
-
Q
5
,
d
h
2
d
t
=
1
A
2
Fin
2
-
Q
2
-
Q
4
-
Q
7
,
d
h
3
d
t
=
1
A
3
Q
1
+
Q
2
+
Q
3
+
Q
4
-
Q
6
.This state space representation constitutes the prediction model of the state estimator shown in Figure1.


## 4. Results and Analysis

All the three state estimation algorithms explained in Section2 were simulated using Matlab for 15000 seconds and the sampling time considered was 1 second. Further, it was validated using the data collected from the experimental setup of autonomous three-tank hybrid system and the results are given in this section. LabVIEW and NI DAQ were used for data collection from the system. The discharge coefficients of different hand valves of the three-tank hybrid setup (shown in Figure 14), given in Table 9, were found by activating the actual system with the general input sequence, tabulated in Table 10. Other process parameters of the system are also given in Table 11.The estimators have been designed such that only one level (middle tank level,h
3) is available for measurement, and using this level as well as the two inputs (Fin1 and Fin2), all the three levels are estimated at each time step in an iterative manner. Two types of noises taken into account are process noise and measurement noise which are considered as additive Gaussian white noise [12]. By knowing the characteristics of the output level sensor, the measurement error covariance, R, is assumed to be known; the process noise covariance, Q, used in (6) and (19) is unknown and this is considered as the tuning factor for the state estimator. Both EKFSE and UKFSE are tuned for finding the optimal value of the tuning factor, such that the integral square error (ISE) between the actual and estimated states is minimized.Quantitative comparison of all the three estimators is also carried out in terms of ISE and estimation time. Figures4–12 are the graphical comparison of the estimators under various operating conditions in which the legend ACTUAL stands for the real-time data collected from the experimental setup. For better understanding of the performance comparison, expanded views of the graphs are provided in most of the cases. The abbreviations ISE1, ISE2, and ISE3 in Tables 2–8 are the corresponding integral square errors (expressed in m2s) in estimating levels in the 1st, 2nd, and 3rd tanks, respectively. Est. Time is the time requirement in seconds for estimating the states, once the data from the process is available.Table 2
ISE in estimating the three levels under normal operating conditions.
Estimator
ISE1
ISE2
ISE3
Est. Time
EKFSE
0.0597
0.0480
0.0336
0.0235
UKFSE
0.0599
0.0482
0.0337
0.0917
ANNSE
0.0634
0.0542
0.0070
0.0641Table 3
Performance measure of the state estimators under process–model parameter mismatch.
Mismatch factor
Estimator
ISE1
ISE2
ISE3
Est. Time
e
A
=
1
e
k
=
1.05
EKFSE
0.9079
1.0908
0.8325
0.0216
UKFSE
0.9185
1.0931
0.8336
0.1566
ANNSE
0.0964
0.0898
0.0071
0.1120
e
A
=
1.25
e
k
=
1
EKFSE
0.1454
0.1244
0.1106
0.0252
UKFSE
0.1479
0.1280
0.1117
0.1147
ANNSE
0.0696
0.0581
0.0071
0.0948
e
A
=
1.2
e
k
=
1.05
EKFSE
0.7945
0.8994
0.6773
0.0250
UKFSE
0.7983
0.9022
0.6798
0.0946
ANNSE
0.1083
0.0866
0.0071
0.0664
e
A
=
0.75
e
k
=
1
EKFSE
0.2521
0.2454
0.2303
0.0215
UKFSE
0.2634
0.2533
0.2314
0.1609
ANNSE
0.0690
0.0561
0.0070
0.1228
e
A
=
1
e
k
=
0.95
EKFSE
0.9246
1.0577
0.8327
0.0214
UKFSE
0.9341
1.0669
0.8328
0.1796
ANNSE
0.0954
0.1045
0.0071
0.1170
e
A
=
1.2
e
k
=
0.95
EKFSE
0.7267
0.8531
0.6458
0.0235
UKFSE
0.7387
0.8552
0.6420
0.0961
ANNSE
0.0894
0.1096
0.0071
0.0717Table 4
Performance measure of the state estimators under initial state vector mismatch (initial state vector for process:[0; 0; 0]; initial state vector for model: [0.1; 0.1; 0]).
Estimator
ISE1
ISE2
ISE3
Est. Time
Convergence time forh
1
Convergence time forh
2
Convergence time forh
3
EKFSE
0.0575
0.0563
0.0070
0.0245
12
16
14
UKFSE
0.1858
0.1941
0.0354
0.1040
400
350
320
ANNSE
0.1035
0.1601
0.0016
0.0667
75
125
18Table 5
Performance measure of the state estimators under higher degree of process noise.
Estimator
ISE1
ISE2
ISE3
Est. Time
EKFSE
0.9684
0.9724
0.9628
0.0245
UKFSE
0.9684
0.9718
0.9615
0.1006
ANNSE
1.0694
1.0447
0.2616
0.0722Table 6
Performance measure of the state estimators under noise contaminated input measurements.
Input noise factor
Estimator
ISE1
ISE2
ISE3
Est. Time
0.0001
EKFSE
0.0601
0.0481
0.0336
0.0242
UKFSE
0.0603
0.0482
0.0337
0.1171
ANNSE
0.0635
0.0536
0.0070
0.0728
0.003
EKFSE
0.7915
1.0372
0.6708
0.0253
UKFSE
0.7948
1.0404
0.6734
0.1164
ANNSE
0.1832
0.1696
0.0071
0.0765
0.01
EKFSE
5.2209
0.6269
0.7513
0.0244
UKFSE
5.2217
0.6276
0.7543
0.1167
ANNSE
2.1571
0.5078
0.0071
0.0796Table 7
Performance measure of the state estimators under different input sequence.
Estimator
ISE1
ISE2
ISE3
Est. Time
EKFSE
0.0225
0.0229
0.0234
0.0274
UKFSE
0.0228
0.0232
0.0234
0.1150
ANNSE
0.0249
0.0252
0.0042
0.0891Table 8
Performance measure of the state estimators valve fault conditions (clogging and leakage).
Condition
Estimator
ISE1
ISE2
ISE3
Est. Time
Clogging
EKFSE
0.8405
0.7793
0.9545
0.0259
UKFSE
0.8423
0.7806
0.9571
0.1440
ANNSE
0.0752
0.0732
0.0131
0.0827
Leakage
EKFSE
0.7645
0.5161
0.5407
0.0286
UKFSE
0.7659
0.5171
0.5422
0.0286
ANNSE
0.0951
0.1472
0.0126
0.0807Table 9
Discharge coefficients of hand valves.
Discharge coefficient
Value (m2)
Discharge coefficient
Value (m2)
k
1
2.6363E − 5
k
4
3.4316E − 5
k
2
2.4891E − 5
k
6
2.2538E − 5
k
3
3.7984E − 5
k
5, k
7
0Table 10
Values of inflows to the system with sampling instants.
Sampling instants
Fin1 (m3/s)
Fin2 (m3/s)
1–3000
1.7901E − 5
1.76062E − 5
3001–6000
3.60528E − 5
1.76062E − 5
6001–9000
3.60528E − 5
2.75055E − 5
9001–12000
1.7901E − 5
2.75055E − 5
12001–15000
1.7901E − 5
1.76062E − 5Table 11
Values of different system parameters.
Parameter
Value
Tank height
0.60 m
Tank overflow height
0.55 m
Rated flow rate of pumps
240 lph
Input voltage to pump
0–5 V
Tank inner diameter
0.15 m
Inter connecting pipes inner diameter
0.0125 m


### 4.1. Performance of the Estimators under Normal Operating Condition

Under normal operating condition, no other uncertainties except process noise and measurement noise are considered. Prediction model conditions were made as close as possible with that of the actual process. At this stage the performance of EKFSE and UKFSE was found to be better than that of ANNSE as shown in Figure3 and Table 2. Figure 4 gives the expanded view of the initial portion of Figure 3 for a better understanding of results of different algorithms.Figure 3
Evolution of three levels under normal operating conditions.Figure 4
Expanded view of evolution of three levels under normal operating conditions.Figure 5
Expanded view of evolution of three levels under process and model parameter mismatched condition (e
A = 1.2 and e
k = 1.05).Figure 6
An expanded view of evolution of three levels under initial state vector mismatch (initial state vector for process:[
0
;
0
;
0
]; initial state vector for model: [
0.1
;
0.1
;
0
]).Figure 7
Expanded view of evolution of three levels under higher degree of process noise.Figure 8
Expanded view of evolution of three levels under noise contaminated input measurements (input noise factor = 0.003).Figure 9
Evolution of three levels under different input sequence.Figure 10
Expanded view of evolution of three levels under clogging fault in hand valve 6.Figure 11
Expanded view of evolution of three levels under leakage fault in hand valve 5.Figure 12
General NARX structured ANN.


### 4.2. Performance of the Estimators under Various Uncertainties

Also various uncertainties have been considered in the performance analysis in order to investigate the robustness of these estimators. They are given below:(1)
process–model parameter mismatch,
(2)
initial state vector mismatch,
(3)
higher level of process noise,
(4)
noise in inflow measurement,
(5)
introduction of different input sequence,
(6)
clogging and leakage faults in hand valves.The uncertainties due to parameter mismatch and hand valve faults are directly getting multiplied with the states, while those due to process noise and measurement noise are considered additive in nature.


#### 4.2.1. Process and Model Parameter Mismatch

As the parameters (area of tanks and valve coefficients) used for the model are found out by human measurements, experiments, and calculations, the parameters of the prediction model and the actual system will never be identical. These variations have been considered in this work by introducing a parameter mismatch factor in the state estimators. As the magnitude of mismatch factor is increasing, the corresponding ISEs also get increased. Under this state of affairs, ANNSE is giving better estimates than other Kalman based state estimators. Both EKFSE and UKFSE were giving offset in the state estimates under parameter mismatched condition. The cases of both higher and lower model parameter values are considered and the corresponding quantitative performance measures were tabulated in Table3. Figure 5 shows the sample graph for estimation of states under process—model parameter mismatched condition (e
A
=
1.2 and e
k
=
1.05), where e
A and e
k are the mismatch factors in area and valve coefficients.


#### 4.2.2. Initial State Vector Mismatch

It has already been stated that the level in the third tank is only measurable. But the state estimation algorithm requires the initial value for all the state variables. So it is required to make some assumptions about the levels in the first and second tanks. These assumed values need not be the same as the actual value. In order to include this condition, a different initial state vector was considered for the prediction model of the algorithms, and along with the other two performance measures, the convergence time in seconds is also compared for the three methods as given in Table4. As we are interested in the initial convergence characteristics only, the estimation has been done for 3000 seconds in this case.The results show that all the algorithms are good enough in computing the estimated levels to the actual value, as it is clear from the expanded view of the evolution of the three levels, which is shown in Figure6. From Figure 6 and Table 4, it is clear that EKFSE is giving the fastest convergence, whereas the UKFSE is giving very slow convergence as compared to EKFSE and ANNSE.


#### 4.2.3. Higher Degree of Process Noise

At the time of implementation stage, the degree of process noise may become higher than that at the time of tuning the estimators. This condition is incorporated by increasing the noise in the actual process and keeping the same tuned value for process noise covariance (Q) of the estimator. The result shown in Figure 7 proves the robustness of the estimators under this condition. Performance indices of the three estimators are compared in Table 5.


#### 4.2.4. Noise Contaminated Input Measurements

In this case, input data with measurement noise was fed to the prediction model of the estimator. Random noise is added as the uncertainty in the input sequence. The performances of the three estimators are compared in Figure8 and Table 6, which shows that ANNSE is giving better estimates of the states under higher degree of input uncertainties.


#### 4.2.5. Applying an Input Sequence Different from Input Sequence of Tuning

In all the above-mentioned conditions, input sequence applied to the process exactly matches with the input sequence in the tuning of the estimators (cf. Table10). Now, the process was activated with a higher input sequence (Fin1 = 0.0000360528 m3/s and Fin2 = 0.0000275055 m3/s) from the beginning to the end of estimation (5000 sampling instants). The performance comparisons are given in Figure 9 and Table 7, which shows that all the estimators give satisfactory performance with a different input sequence, as in the case under normal condition.


#### 4.2.6. Clogging and Leakage Faults

Two types of faults in the hand valves, clogging and leakage faults, have also been considered in this work. These faults were introduced by partially closing one of the hand valves (6th valve) and partially opening the fully closed 5th hand valve at the 7500th sampling instants in separate runs. Performance of the ANNSE is much better than that of other two estimators under these hand valve faults (cf. Table8 and Figures 10 and 11). In this case, the inflows given to the tank are the same as that in Section 4.2.5 for the entire duration of the estimation.


## 4.1. Performance of the Estimators under Normal Operating Condition

Under normal operating condition, no other uncertainties except process noise and measurement noise are considered. Prediction model conditions were made as close as possible with that of the actual process. At this stage the performance of EKFSE and UKFSE was found to be better than that of ANNSE as shown in Figure3 and Table 2. Figure 4 gives the expanded view of the initial portion of Figure 3 for a better understanding of results of different algorithms.Figure 3
Evolution of three levels under normal operating conditions.Figure 4
Expanded view of evolution of three levels under normal operating conditions.Figure 5
Expanded view of evolution of three levels under process and model parameter mismatched condition (e
A = 1.2 and e
k = 1.05).Figure 6
An expanded view of evolution of three levels under initial state vector mismatch (initial state vector for process:[
0
;
0
;
0
]; initial state vector for model: [
0.1
;
0.1
;
0
]).Figure 7
Expanded view of evolution of three levels under higher degree of process noise.Figure 8
Expanded view of evolution of three levels under noise contaminated input measurements (input noise factor = 0.003).Figure 9
Evolution of three levels under different input sequence.Figure 10
Expanded view of evolution of three levels under clogging fault in hand valve 6.Figure 11
Expanded view of evolution of three levels under leakage fault in hand valve 5.Figure 12
General NARX structured ANN.


## 4.2. Performance of the Estimators under Various Uncertainties

Also various uncertainties have been considered in the performance analysis in order to investigate the robustness of these estimators. They are given below:(1)
process–model parameter mismatch,
(2)
initial state vector mismatch,
(3)
higher level of process noise,
(4)
noise in inflow measurement,
(5)
introduction of different input sequence,
(6)
clogging and leakage faults in hand valves.The uncertainties due to parameter mismatch and hand valve faults are directly getting multiplied with the states, while those due to process noise and measurement noise are considered additive in nature.


### 4.2.1. Process and Model Parameter Mismatch

As the parameters (area of tanks and valve coefficients) used for the model are found out by human measurements, experiments, and calculations, the parameters of the prediction model and the actual system will never be identical. These variations have been considered in this work by introducing a parameter mismatch factor in the state estimators. As the magnitude of mismatch factor is increasing, the corresponding ISEs also get increased. Under this state of affairs, ANNSE is giving better estimates than other Kalman based state estimators. Both EKFSE and UKFSE were giving offset in the state estimates under parameter mismatched condition. The cases of both higher and lower model parameter values are considered and the corresponding quantitative performance measures were tabulated in Table3. Figure 5 shows the sample graph for estimation of states under process—model parameter mismatched condition (e
A
=
1.2 and e
k
=
1.05), where e
A and e
k are the mismatch factors in area and valve coefficients.


### 4.2.2. Initial State Vector Mismatch

It has already been stated that the level in the third tank is only measurable. But the state estimation algorithm requires the initial value for all the state variables. So it is required to make some assumptions about the levels in the first and second tanks. These assumed values need not be the same as the actual value. In order to include this condition, a different initial state vector was considered for the prediction model of the algorithms, and along with the other two performance measures, the convergence time in seconds is also compared for the three methods as given in Table4. As we are interested in the initial convergence characteristics only, the estimation has been done for 3000 seconds in this case.The results show that all the algorithms are good enough in computing the estimated levels to the actual value, as it is clear from the expanded view of the evolution of the three levels, which is shown in Figure6. From Figure 6 and Table 4, it is clear that EKFSE is giving the fastest convergence, whereas the UKFSE is giving very slow convergence as compared to EKFSE and ANNSE.


### 4.2.3. Higher Degree of Process Noise

At the time of implementation stage, the degree of process noise may become higher than that at the time of tuning the estimators. This condition is incorporated by increasing the noise in the actual process and keeping the same tuned value for process noise covariance (Q) of the estimator. The result shown in Figure 7 proves the robustness of the estimators under this condition. Performance indices of the three estimators are compared in Table 5.


### 4.2.4. Noise Contaminated Input Measurements

In this case, input data with measurement noise was fed to the prediction model of the estimator. Random noise is added as the uncertainty in the input sequence. The performances of the three estimators are compared in Figure8 and Table 6, which shows that ANNSE is giving better estimates of the states under higher degree of input uncertainties.


### 4.2.5. Applying an Input Sequence Different from Input Sequence of Tuning

In all the above-mentioned conditions, input sequence applied to the process exactly matches with the input sequence in the tuning of the estimators (cf. Table10). Now, the process was activated with a higher input sequence (Fin1 = 0.0000360528 m3/s and Fin2 = 0.0000275055 m3/s) from the beginning to the end of estimation (5000 sampling instants). The performance comparisons are given in Figure 9 and Table 7, which shows that all the estimators give satisfactory performance with a different input sequence, as in the case under normal condition.


### 4.2.6. Clogging and Leakage Faults

Two types of faults in the hand valves, clogging and leakage faults, have also been considered in this work. These faults were introduced by partially closing one of the hand valves (6th valve) and partially opening the fully closed 5th hand valve at the 7500th sampling instants in separate runs. Performance of the ANNSE is much better than that of other two estimators under these hand valve faults (cf. Table8 and Figures 10 and 11). In this case, the inflows given to the tank are the same as that in Section 4.2.5 for the entire duration of the estimation.


## 4.2.1. Process and Model Parameter Mismatch

As the parameters (area of tanks and valve coefficients) used for the model are found out by human measurements, experiments, and calculations, the parameters of the prediction model and the actual system will never be identical. These variations have been considered in this work by introducing a parameter mismatch factor in the state estimators. As the magnitude of mismatch factor is increasing, the corresponding ISEs also get increased. Under this state of affairs, ANNSE is giving better estimates than other Kalman based state estimators. Both EKFSE and UKFSE were giving offset in the state estimates under parameter mismatched condition. The cases of both higher and lower model parameter values are considered and the corresponding quantitative performance measures were tabulated in Table3. Figure 5 shows the sample graph for estimation of states under process—model parameter mismatched condition (e
A
=
1.2 and e
k
=
1.05), where e
A and e
k are the mismatch factors in area and valve coefficients.


## 4.2.2. Initial State Vector Mismatch

It has already been stated that the level in the third tank is only measurable. But the state estimation algorithm requires the initial value for all the state variables. So it is required to make some assumptions about the levels in the first and second tanks. These assumed values need not be the same as the actual value. In order to include this condition, a different initial state vector was considered for the prediction model of the algorithms, and along with the other two performance measures, the convergence time in seconds is also compared for the three methods as given in Table4. As we are interested in the initial convergence characteristics only, the estimation has been done for 3000 seconds in this case.The results show that all the algorithms are good enough in computing the estimated levels to the actual value, as it is clear from the expanded view of the evolution of the three levels, which is shown in Figure6. From Figure 6 and Table 4, it is clear that EKFSE is giving the fastest convergence, whereas the UKFSE is giving very slow convergence as compared to EKFSE and ANNSE.


## 4.2.3. Higher Degree of Process Noise

At the time of implementation stage, the degree of process noise may become higher than that at the time of tuning the estimators. This condition is incorporated by increasing the noise in the actual process and keeping the same tuned value for process noise covariance (Q) of the estimator. The result shown in Figure 7 proves the robustness of the estimators under this condition. Performance indices of the three estimators are compared in Table 5.


## 4.2.4. Noise Contaminated Input Measurements

In this case, input data with measurement noise was fed to the prediction model of the estimator. Random noise is added as the uncertainty in the input sequence. The performances of the three estimators are compared in Figure8 and Table 6, which shows that ANNSE is giving better estimates of the states under higher degree of input uncertainties.


## 4.2.5. Applying an Input Sequence Different from Input Sequence of Tuning

In all the above-mentioned conditions, input sequence applied to the process exactly matches with the input sequence in the tuning of the estimators (cf. Table10). Now, the process was activated with a higher input sequence (Fin1 = 0.0000360528 m3/s and Fin2 = 0.0000275055 m3/s) from the beginning to the end of estimation (5000 sampling instants). The performance comparisons are given in Figure 9 and Table 7, which shows that all the estimators give satisfactory performance with a different input sequence, as in the case under normal condition.


## 4.2.6. Clogging and Leakage Faults

Two types of faults in the hand valves, clogging and leakage faults, have also been considered in this work. These faults were introduced by partially closing one of the hand valves (6th valve) and partially opening the fully closed 5th hand valve at the 7500th sampling instants in separate runs. Performance of the ANNSE is much better than that of other two estimators under these hand valve faults (cf. Table8 and Figures 10 and 11). In this case, the inflows given to the tank are the same as that in Section 4.2.5 for the entire duration of the estimation.


## 5. Conclusion

ANNSE was developed for the state estimation of autonomous switching hybrid system and its performance under different real-time operating conditions and uncertainties was compared with that of EKFSE and UKFSE both qualitatively and quantitatively. Even though a negligible compromise is made with the estimates at the mode switching point of AHS, EKFSE was found to be the best method for the real-time implementation of state estimation under normal operating conditions especially that with faster dynamics, as the estimation of AHS under normal operating condition as the estimation time is considerably small. Considering the estimation time given in Tables2–8, EKFSE method makes the lowest time whereas the UKFSE makes the highest for all the cases of operating conditions illustrated in this work. But under process–model parameter variations, noise affected input, and hand valve faults conditions the proposed ANNSE gave better estimates than the other two methods. It was observed that even though the ANN is trained using the data set of EKFSE, the better performance of ANNSE when the AHS is under these considered uncertainties, compared with the other methods, is obtained due to the following advantages of ANNSE.(i)
In the correction part of EKFSE and UKFSE, some approximation using linearization around the operating point is carried out, whereas, in ANNSE, nonlinear ANN is used to correct the a priori estimates.
(ii)
The correction part of ANNSE is completely parameter independent, which gives the better state estimates under parameter mismatch.
(iii)
ANN has built-in noise rejection capability.
(iv)
Dynamic ANN structure (NARX) selected is suitable for this application.
(v)
Training of the ANNSE is carried out with a very huge set of data which covers the entire operating region of the process.In the operating situation when the process noise exceeds its normal value used for training of filters, UKFSE was found to be a better estimator, as the ISEs are lowest when compared to EKFSE and ANNSE. In the case of initial state vector mismatch, EKFSE gave the estimates with very fast convergence to the actual value. In these two conditions also, the estimates of ANNSE were converging to the actual values, but the accuracy of estimation was found to be poor compared to other methods.In this work it was strongly recommended to use ANNSE for the state estimation of AHS under parameter uncertainties, noise contaminated input, and hand valve leakage and clogging conditions, EKFSE for the state estimation of AHS under normal operating conditions, initial state vector mismatch, and faster dynamic situations, and UKFSE for the state estimation of AHS with higher degree of process noise than that at the time of training. It is also concluded that the proposed ANNSE is a robust method compared to the conventional Kalman based methods, for the state estimation of AHS operating under different uncertainties (especially parameter uncertainties).As a scope of the work, since there is a chance for the process parameters, especially the valve coefficients, of getting changed, it is better to estimate the process parameters along with the states so that these estimated parameters can be used in the prediction model which may further lead to better estimates of the states. Present practice of using first principle model can be replaced with ANN prediction model, so that the estimation algorithm becomes a black box state estimation algorithm which does not require any knowledge about the system, except input output data collected from the actual system. Also, based on the proposed ANNSE, some control schemes can be developed, which may overcome the limitations with existing model-based controllers thereby ensuring the robustness in the control of hybrid systems under uncertainties. Instead of benchmark application, this proposed method can be applied for more realistic and killer engineering applications. Works in this connection can open up a new research direction.



---

*Source: 382324-2015-03-05.xml*