Estimation of Shallow Water Flow Based on Kalman Filter FEM

In this chapter, we present numerical examples of an estimation of shallow water flow based on Kalman filter finite element method (Kalman filter FEM). Shallow water equations are adopted as the governing equations. The Galerkin method, using triangular elements, is employed to discretize the governing equation in space, and the selective lumping method is used to discretize time. We describe the influence on the numerical results of setting the observation points.


Introduction
Conventionally, shallow water flow analysis based on the FEM has been carried out to investigate the marine environment, specifically coastal drift sand, storm surges, tsunamis, and so on [1,2].However, the computed results are rarely close to the observed values if the appropriate governing equation is not employed, the appropriate discretization technique is not applied to the governing equation, or the boundary conditions are not defined appropriately.This has prompted a great deal of inverse analysis in recent years, aiming to obtain flow fields that more closely approach the observed values.Boundary control analysis is one of these inverse analytic techniques, in which an unknown boundary condition is numerically determined by iterative computation such that the computed water elevation homes in on the target value or the observed value [3,4].Deterministic methods such as the adjoint variable or sensitivity equation methods are commonly employed.On the other hand, the stochastic approach has also been adopted, in which estimation of the flow field is employed using a Kalman filter.Removal of the noise data from the observed values and the flow field estimation are also performed.Conventionally, flow fields are estimated using Kalman filter FEM, and this method is applied to the practical coastal model [5,6].However, the effect of boundary conditions on the estimated flow field has not been investigated.This prompted us to research and describe in detail in this chapter the formulation of Kalman filter FEM and numerical experiments for flow estimation when changing the positions of observation points [7].

Concept of state estimation
In the Kalman filter, system and observation equations are employed.Eqs. ( 1) and ( 2) are sample equations: where ϕ, z, a, q, and r indicate the true value of the state variable, the observation value, the constant coefficient, the system, and the observation noise, respectively.n denotes the number of time steps.Figure 1 shows relationship between the observation and the estimation values.Here, and p indicate the estimation value for the state variable and estimation error.From Figure 1, it is found that the estimation value is expressed as a summation of the true value and the estimation error, and the observation value is expressed by the summation of the true value and the observation error.Based on this concept, our formulation of the Kalman filter is shown below.

Discretization of the governing equation
The shallow water equations, shown below, are employed as the governing equations.
, 0 , where u i , η, g, and h indicate flow velocity component for the x and y directions, water elevation, gravitational acceleration, and water depth, respectively.The Galerkin method and the selective lumping method are applied to discretize the governing equation.The discretized governing equation is written as Eq. ( 5) and is represented by Eq. ( 6), where Δ, ℎ, [S i ], [M], and denote the time increment, the mean water depth, the matrix for the pressure, the consistent mass matrix, and diagonal mass matrix, respectively.is represented by Eq. ( 7) by using the lumping parameter e(0 ≤ e ≤ 1).indicates the estimation value.
[ ] (1 The system equation in the Kalman filter is obtained by adding the vector represented by the multiplication of the driving matrix [Γ] and the system noise vector {g} and is shown as Eq. (8).Here, the vector {ø} indicates the vector of true value.The observation equation shown in Eq. ( 9) is also introduced.The vectors {z} and {r} and the matrix [H] denote the observation value and the observation noise vectors and the observation matrix.

Derivation of computational equations in the Kalman filter FEM
The process of modification of the estimation vector is referred to as "assimilation," and the estimation vector before and after assimilation is expressed by "(−)" and "(+)" marks, respectively.First of all, it is assumed that the estimated value after assimilation is expressed by the observation value and the estimated value before assimilation, and that the estimated value after assimilation, i.e., the optimal estimated vector, is expressed by Eq. ( 10).
Here, we consider the expected value for Eq.(12) in time.In addition, the expected value for vectors + 1 , ( + ) + 1 and ( − ) + 1 in time is assumed to be zero, and Eq. ( 12) is represented as Eq. ( 13).
where [I] denotes the unit matrix, and + 1 indicates the expected value of + 1 in time.Because of + 1 ≠ 0 , the following relation equation is obtained (see Eq. ( 14)).
where 1 + 1 is referred to as the Kalman gain matrix.
Next, let us consider the Kalman gain matrix 1 + 1 so as to minimize the trace norm of the error covariance matrix after assimilation.The estimation vector is represented by Eq. ( 16).
Here, the error covariance matrix after assimilation ( + ) + 1 , i.e., the predicted error covariance matrix, is expressed by the expected value of the error covariance matrix as shown in Eq. ( 18).
Also, in calculating Eq. ( 18), it is assumed that the expected value of the covariance matrix of the observation error and the estimation error before assimilation is a zero vector (see Eq. ( 19)).
where + 1 is the observation error covariance matrix, and is represented by Here, let us consider the Kalman gain matrix 1 + 1 so as to minimize the trace norm of the predicted error covariance matrix such as Consequently, we can obtain the equation for calculating the Kalman gain matrix, as shown in Eq. ( 21).
Next, let us consider the computation of the estimated error covariance matrix before assimilation ( − ) + 1 , i.e., the estimated error covariance matrix.First of all, Eq. ( 6) is represented as Eq. ( 23) based on the consideration expressed in Eq. (11).
Here, the estimated error covariance matrix ( − ) + 1 is also represented by the expected value of the error covariance matrix, as shown in Eq. ( 25).= 0 in the calculation in Eq. (25) allows Eq. ( 26) to be derived.
where is the system error covariance matrix and is represented by + 1 + 1 .

If the matrices [A],
[Q], and [R] are steady coefficient matrices, the computational algorithm can be divided into two parts: the computations of the Kalman gain matrix and the estimated value in time.The computational algorithm for the Kalman filter FEM is shown below.

Check of convergence: if
≤ then go to Step 6, else go to Step 2.

Numerical example 1
Figures 2 and 3, respectively, show the computational model and the position of observation points in the computation using the Kalman filter FEM.The estimation of shallow water flow was carried out based on the Kalman filter FEM.Table 1 shows the computational conditions.In this study, we simulated the observed data from the shallow water flow analysis based on the FEM.The boundary condition for the water elevation is given by η(t) = sin (t) on the lefthand side of the open channel, and the artificial observed data is obtained by summation of the numerical result and observation noise, i.e., the white noise.In the computation of the Kalman filter FEM shown in this section, the inflow boundary condition is ignored, and the artificial observation data flow velocities u x , u y , and water elevation η, i.e., the computational result by the FEM, are given at the observation points.The computational results are shown below.and 9, it can be seen that if the observation point is not set at the upstream side in the channel, the distribution of the water elevation cannot be appropriately obtained.Conversely, from the result of Case A, it can be said that the distribution of water elevation can be correctly obtained if the position of the observation point is appropriately given in the computational model.Figures 10 and 11 show the distribution of flow velocity u and v and water elevation η at T = 2.0 s.It can be seen that water elevation on the upstream side in Case B is not appropriately obtained in comparison with the result of Case A. Therefore, from this numerical example, it can be said that it is necessary to set the observation points uniformly in the computational domain.

Numerical example 2
In this section, the numerical experiment is carried out with the inflow boundary conditions given in Case B, shown in the previous section.An image diagram of the numerical example is shown in Figure 12.The inflow boundary condition is given by η(t) = sin (t).The computational conditions in this section are the same as in Table 1.As the computational result, Figure 13 shows the convergence criterion expressed by the Frobenius norm.It can be seen that the convergence criterion decreases and converges monotonically.A comparison of the results in Cases A and B shows that it is necessary to set the observation points uniformly in the computational domain to obtain a highly accurate estimation result.
In addition, when comparing the results in Case B and Case C, it is found that the estimation accuracy increases if the inflow boundary condition is taken into account.

Conclusions
In this study, flow field estimation analysis in an open channel was carried out based on the Kalman filter FEM.The shallow water equations were employed as the governing equations, and the Galerkin and the selective lumping methods were used to discretize the governing equation in space and time, respectively.In the numerical experiments, the observed value is created by adding white noise to the simulation result in the open channel model.The following conclusions were obtained from this study.
• The observation noise can be removed from the observed value by using Kalman filter FEM.
• When the observation points are set only on the downstream side of an open channel, the estimated water elevation on the upstream side is almost constant.

Figure 1 .
Figure 1.Diagram of the relationship between the observation and the estimation values.

Figures 4 and 5
show the convergence criterion expressed by the Frobenius norm.The equation for the Frobenius norm is shown in Step 5 of the flowchart in Section 4. It is seen that the convergence criterion monotonically decreases and converges.Figures 6 and 7 show the time history of water elevation at (x, y) = (5.0m, 0.4 m) in Case A and Case B, respectively.It is found that the observation noise can be removed in both cases.Figures 8 and 9 show the distribution of water elevation on line y = 0.4 m in Case A and Case B, respectively.From Figures 8

Figure 4 .
Figure 4. Convergence criterion in Case A.

Figure 5 .
Figure 5. Convergence criterion in Case B.

Figure 8 .
Figure 8. Distribution of water elevation on line y = 0.4 m in Case A.

Figure 9 .
Figure 9. Distribution of water elevation on line y = 0.4 m in Case B.

Figure 10 .
Figure 10.Distribution of flow velocity u and v and water elevation η at T = 2.0 s in Case A.

Figure 11 .
Figure 11.Distribution of flow velocity u and v and water elevation η at T = 2.0 s in Case B.
Figure 14 shows the time history of water elevation at (x, y) = (5.0m, 0.4 m) in Case C. It is found that the observation noise can be removed.Figure 15 shows the distribution of water elevation on line y = 0.4 m in Case C. From Figure 15, it is found that the distribution of the water elevation can be appropriately obtained in comparison with the result shown in Figure 9.In addition, Figure16shows the distribution of flow velocity u and v and water elevation η at T = 2.0 s.It is seen that water elevation on the upstream side can be more accurately obtained than with the result for Case B. Therefore, from this numerical experiment, it is necessary to give the boundary conditions if the computation of the flow field estimation is carried out based on the Kalman filter FEM, and the observation point cannot be uniformly given.

Figure 13 .
Figure 13.Convergence criterion in Case C.

Figure 15 .
Figure 15.Distribution of water elevation on line y = 0.4 m in Case C.

Figure 16 .
Figure 16.Distribution of flow velocity u and v and water elevation η at T = 2.0 s in Case C.

Table 2 .
Comparison of L 2 norm.

•
If the inflow boundary condition is given in the case where the observation points are positioned only on the downstream side of an open channel, the distribution of the water elevation can be appropriately obtained, including the upstream side in the open channel.