1.

## Introduction

A fundamental challenge in data assimilation lies in the computationally intractable process of estimating and updating the error covariance for high dimensional problems. Various methodologies, from ensemble-based methods to approaches of hybrid error covariance, have been extensively studied in the literature (Houtekamer and Zhang, 2016). Due to the limitation of computational power, the error covariance has to be estimated based upon a relatively small number of ensemble members. Rank deficiency, underestimation, and sampling errors are some notable drawbacks of these approaches. As a result, additional numerical treatments, such as covariance localisation and variance inflation, are required to improve the stability of algorithm and estimation accuracy. Some key parameters are critical for the effectiveness of these numerical treatments, for instance the radius of localisation and the magnitude of inflation. These parameters are estimated based on physical and statistical grounds and are validated through numerical experimentations (Bannister, 2008a, 2008b; Ménétrier et al., 2015).

In Gaspari and Cohn (1999), the magnitude and decay of error covariances are quantitatively outlined using correlation functions. The result has been widely used for the localisation of ensemble Kalman filters (EnKFs). Based on Schur product theorem, the element-wise multiplication of two positive definite matrices guarantees that the resulting symmetric matrix is a positive definite matrix itself. However, the underlying relationship between the parameter in a correlation function and the system model to be estimated is not clear. In this paper, we study some closely related subjects, the magnitude and decay of elements in error covariance, but taking a different approach. We derive and prove some quantitative characteristics of error covariance that are determined by various parts in a system model, including its dynamic model, the observation model and the covariances of random variables representing model uncertainties and observation error. The quantitative characteristics studied in this paper include the peak value and its location in the matrix, the decay rate from peak to bottom, the approximate sparsity pattern, etc.

The contributions of this paper consist of three parts. (i) We mathematically prove a theorem and several propositions on the quantitative characteristics of error covariance for linear Kalman filters. The results unveil some interconnections between system models and error covariance. (ii) We develop computational methods so that quantitative characteristics can be numerically computed. (iii) We demonstrate some potential applications of the discoveries through three examples. In the first example, we sketch the outline shape of error covariance using its peak and bottom value as well as the curve of a decay function. The method’s goal is not about replacing the need of estimating the error covariance in a process, such as EnKF or 4D-Var. Instead, the outline shape provides information that helps in the validation of an estimated error covariance if the full matrix is intractable or if its estimation is based on a relatively small ensemble size. In the second example, the quantitative characteristics of error covariance are used as an indicator of the upper bound for the localisation radius of an EnKF. In the third example, the results proved for linear systems are tested using a nonlinear model, the shallow water equations.

The theoretical approach in this paper is based on the use of the controllability Gramian of dynamical systems (see, for instance, Kailath (1980)). The concept has been widely used in control theory to measure the impact of a system’s inputs, such as the model uncertainty in this study, on the system’s trajectories. We prove that the error covariance of the Kalman-Bucy filter equals the difference between two controllability Gramians, in addition to the propagation of the initial background error covariance. This relationship leads to a matrix upper bound of the error covariance. Based upon the concept of duality in the control theory, each element in the upper bound matrix can be computed individually without the need of estimation of the entire error covariance matrix of a Kalman filter. This property makes the computational algorithms in this paper being component-based, i.e. the quantitative characteristics of error covariance can be computed over any given component in the matrix, such as a submatrix, a block of any shape, a row/column, etc. It is also proved that, if the observation measures a state variable, some elements in error covariance satisfy an inequality constraint.

In Section 2, the concept of controllability Gramian is introduced. The relationship between error covariance and controllability Gramian is proved. Then a matrix upper bound of error covariance is added. In Section 3.1, some quantitative characteristics of controllability Gramian, such as the location of peak covariance and the decay rate from peak to bottom, are proved. The tedious algebraic derivations in the proof are included in the Appendix at the end of the paper. In Section 3.2, an algebraic inequality of error covariance deduced from the observation model is proved. In Section 4, we introduce two computational algorithms that are component-based. Section 5 contains three examples demonstrating how to collectively apply the theorems and computational algorithms from previous sections to outline the features of the error covariance.

2.

## Error covariance and controllability Gramian

Shown in Figure 1 are two error covariance matrices of Kalman filters, one for a linear system of ordinary differential equations and the other for a Discretised shallow water equation. The x- and y- axes represent row and column indices, i and j; the z-axis represents the absolute value of the covariance, $|{P}_{ij}|.$ In this way, a matrix is visualised as a 3D graph. In this paper, the geometric outline of the 3D graph is referred as the shape of error covariance. Both graphs in Figure 1 have similar geometric patterns in which a large number of elements has relatively small value and the covariance has its peaks along one or multiple diagonal lines. Relative to their peak value, both matrices are approximately sparse. In this paper, the shape of error covariance is studied using a set of quantitative characteristics that include, but not limited to, the following list of quantifiable geometric properties:

Fig. 1.

Examples of Kalman filter error covariance.

• the peak value and its location,
• the decay rate from peak to bottom,
• inequality constraints of covariance elements.

For high dimensional problems, the true error covariance of a Kalman filter is computationally intractable. In mathematical analysis, a widely used idea in the estimation of an unknown variable is to find a computationally feasible upper/lower bound. In this section, we prove a relationship between the error covariance of Kalman-Bucy filters and two controllability Gramians. As a corollary of the relationship, a matrix upper bound of the error covariance is found. An advantage of this matrix upper bound is that the quantitative characteristics of its shape are computationally tractable. Let’s consider a dynamical system model defined by ordinary differential equations (ODEs)

((1a))
$\stackrel{̇}{x}\left(t\right)=Ax\left(t\right)+qw\left(t\right),$
((1b))
$y\left(t\right)=Hx\left(t\right)+rv\left(t\right)$
where $x\in {\mathbb{R}}^{n}$ is the state variable, $\stackrel{̇}{x}$ represents its time derivative, $y\in {\mathbb{R}}^{m}$ is the observation variable, $w\in {\mathbb{R}}^{n}$ and $v\in {\mathbb{R}}^{m}$ are zero-mean Gaussian white noises with an identity covariance. The matrices $q\in {\mathbb{R}}^{n×n}$ and $r\in {\mathbb{R}}^{m×m}$ determine the covariances of the model uncertainty and the observation error, respectively. Denote $Q=q{q}^{T}$ and $R=r{r}^{T}.$ Its Kalman-Bucy filter has the following form
((2a))
$\stackrel{̇}{\stackrel{̂}{x}}\left(t\right)=A\stackrel{̂}{x}\left(t\right)+K\left(t\right)\left(y\left(t\right)-H\stackrel{̂}{x}\left(t\right)\right),$
((2b))
$K\left(t\right)=P\left(t\right){H}^{T}{R}^{-1}$
((2c))
$\stackrel{̇}{P}\left(t\right)=AP\left(t\right)+P\left(t\right){A}^{T}+Q-K\left(t\right)RK{\left(t\right)}^{T}.$
where K(t) is the Kalman gain, P(t) is the estimation error covariance and y(t) represents observed data. Multiplying ${e}^{-At}$ and ${e}^{-{A}^{T}t}$ to (2c), we have
${e}^{-At}\stackrel{̇}{P}\left(t\right){e}^{-{A}^{T}t}-{e}^{-At}AP\left(t\right){e}^{-{A}^{T}t}-{e}^{-At}P\left(t\right){A}^{T}{e}^{-{A}^{T}t}={e}^{-At}\left(Q-K\left(t\right)RK{\left(t\right)}^{T}\right){e}^{-{A}^{T}t}$
This is equivalent to
$\frac{d}{dt}\left({e}^{-At}P\left(t\right){e}^{-{A}^{T}t}\right)={e}^{-At}\left(Q-K\left(t\right)RK{\left(t\right)}^{T}\right){e}^{-{A}^{T}t}$
The integration of this equation yields an integral equation of P(t)
((3))
$P\left(t\right)={e}^{At}P\left(0\right){e}^{{A}^{T}t}+{\int }_{0}^{t}{e}^{A\left(t-\tau \right)}\left(Q-K\left(\tau \right)RK{\left(\tau \right)}^{T}\right){e}^{{A}^{T}\left(t-\tau \right)}d\tau$
The integration on the right-hand side requires the history of K(t). If it is integrated in a subinterval $\left[{t}_{1},{t}_{2}\right]\subseteq \left[0,t\right],$ we have a matrix upper bound of the error covariance
((4))
$0\le P\left(t\right)\le {e}^{At}P\left(0\right){e}^{{A}^{T}t}+{\int }_{0}^{t}{e}^{A\left(t-\tau \right)}Q{e}^{{A}^{T}\left(t-\tau \right)}d\tau -{\int }_{{t}_{1}}^{{t}_{2}}{e}^{A\left(t-\tau \right)}K\left(\tau \right)RK{\left(\tau \right)}^{T}{e}^{{A}^{T}\left(t-\tau \right)}d\tau$
If t1 = t2, the second integration equals zero. The matrix upper bound, in this case, represents the error covariance without corrections using observation information. The integrals on the right-hand side of (3) and (4) are closely related to the concept of controllability Gramian in control theory.

Definition 1.

The controllability Gramian of the system

((5))
$\stackrel{̇}{x}\left(t\right)=Ax\left(t\right)+q\left(t\right)u,x\in {\mathbb{R}}^{n},A\in {\mathbb{R}}^{n×n},u\in {\mathbb{R}}^{p},q\in {\mathbb{R}}^{n×p}$
in the time interval $\left[{t}_{1},{t}_{2}\right]$ is
((6))
${G}^{C}\left({t}_{1},{t}_{2}\right)={\int }_{{t}_{1}}^{{t}_{2}}{e}^{A\left({t}_{2}-\tau \right)}q\left(\tau \right){q}^{T}\left(\tau \right){e}^{{A}^{T}\left({t}_{2}-\tau \right)}d\tau$
For the special case $\left[{t}_{1},{t}_{2}\right]=\left[0,t\right],$ we use a simpler notation, ${G}^{C}\left(t\right).$

The Gramian, a symmetric positive semidefinite matrix, is a quantitative measure of the sensitivity of system trajectories to the variation of the system’s input. If the Gramian has a set of large eigenvalues, then x(t) can reach any given state using a control input that has a relatively small L2-norm. The expressions in (3) and (4) are summarised in the following propositions.

Proposition 1.

The error covariance, P(t), of the Kalman-Busy filter (2) satisfies,

((7))
$P\left(t\right)={e}^{At}P\left(0\right){e}^{{A}^{T}t}+{G}^{C}\left(t\right)-{\stackrel{̂}{G}}^{C}\left(t\right)$
where${G}^{C}\left(t\right)$is the controllability Gramian of (1a) in the time interval$\left[0,t\right],{\stackrel{̂}{G}}^{C}\left(t\right)$is the controllability Gramian of the control system
((8))
$\stackrel{̇}{\stackrel{̂}{x}}\left(t\right)=A\stackrel{̂}{x}\left(t\right)+K\left(t\right)rv$
which is the Kalman-Bucy filter (2a) in which$y-H\stackrel{̂}{x}$is treated as a control input rv.

Proposition 2.

The error covariance, P(t), of the Kalman-Busy filter (2) has an upper bound matrix

((9))
$0\le P\left(t\right)\le {e}^{At}P\left(0\right){e}^{{A}^{T}t}+{G}^{C}\left(t\right)-{\stackrel{̂}{G}}^{C}\left({t}_{1},{t}_{2}\right)$
where$\left[{t}_{1},{t}_{2}\right]\subseteq \left[0,t\right]$. As a special case,
((10))
$0\le P\left(t\right)\le {e}^{At}P\left(0\right){e}^{{A}^{T}t}+{G}^{C}\left(t\right)$

Propositions 1 and 2 can be interpreted as follows. In addition to the propagation of P(0), P(t) is determined by the controllability Gramian of the system model subtracting the controllability Gramian of the Kalman filter. If we consider the model uncertainty, w, as a control variable, then its controllability Gramian represents the worst estimation error without any error correction. On the other hand, the controllability Gramian of the Kalman-Bucy filter represents the reduction of error covariance in the filtering process. A more controllable filter results in more aggressive error correction, thus smaller estimation error. Among the three terms in (9), we focus on the the second term, the controllability Gramian of the original system (1). However, the same computational algorithm that we use for the estimation of GC is also applicable to the propagation of initial error covariance, the first term in (9). It is summarised in Proposition 6. In this paper, we do not address the computation of the 3rd term in (9). Although this is a very important term that reduces the matrix upper bound using observation model, an efficient computational algorithm for this term in high dimensional spaces has yet to be found.

The inequality (10) has a discrete-time version. Consider the system model,

((11a))
${x}_{k}={A}_{k-1}{x}_{k-1}+{q}_{k-1}{w}_{k-1},{x}_{k}\in {\mathbb{R}}^{n},{A}_{k}\in {\mathbb{R}}^{n×n}$
((11b))
${y}_{k}={H}_{k}{x}_{k}+{r}_{k}{v}_{k},{y}_{k}\in {\mathbb{R}}^{m},{H}_{k}\in {\mathbb{R}}^{m×n}$
where wk and vk are serially uncorrelated random variables with a Gaussian distribution that has zero mean and identity covariance. Let ${Q}_{k}={q}_{k}{q}_{k}^{T}$ and ${R}_{k}={r}_{k}{r}_{k}^{T}.$ Its Kalman filter is a discrete-time system in the following form,
((12a))
${x}_{k}^{-}={A}_{k-1}{x}_{k-1}^{+},$
((12b))
${P}_{k}^{-}={A}_{k-1}{P}_{k-1}^{+}{A}_{k-1}^{T}+{Q}_{k-1}$
((12c))
${K}_{k}={P}_{k}^{-}{H}_{k}^{T}{\left({H}_{k}{P}_{k}^{-}{H}_{k}^{T}+{R}_{k}\right)}^{-1}$
((12d))
${x}_{k}^{+}={x}_{k}^{-}+{K}_{k}\left({y}_{k}-{H}_{k}{x}_{k}^{-}\right)$
((12e))
${P}_{k}^{+}={P}_{k}^{-}-{K}_{k}\left({H}_{k}{P}_{k}^{-}{H}_{k}^{T}+{R}_{k}\right){K}_{k}^{T}$
where ${x}_{k}^{+}$ and ${P}_{k}^{+}$ are the analysis state and analysis error covariance, ${x}_{k}^{-}$ and ${P}_{k}^{-}$ are the background state and background error covariance. Using mathematical induction, it is straightforward to prove the following upper bound of ${P}_{k}^{+}.$

Proposition 3.

((13))
${P}_{k}^{+}\le {A}_{k-1}\cdots {A}_{0}{P}_{0}^{+}{A}_{0}^{T}\cdots {A}_{k-1}^{T}+{G}_{k}^{C}$

where${G}_{k}^{C}$is the (discrete-time) controllability Gramian

((14))
${G}_{k}^{C}=\sum _{j=0}^{k-2}{A}_{k-1}{A}_{k-2}\cdots {A}_{j+1}{Q}_{j}{A}_{j+1}^{T}\cdots {A}_{k-2}^{T}{A}_{k-1}^{T}+{Q}_{k-1}$

Remark.

If the space dimension is high, the controllability Gramian is computationally intractable. However, there exist numerical methods that can compute individual elements in the Gramian, i.e. component-based algorithms. They are introduced in Section 4, including Proposition 5 for linear systems, Proposition 6 for the propagation of the initial error covariance, and (34) for nonlinear systems.

3.

## Some quantitative characteristics of the shape of error covariance

In this section, we prove a decay rate for ${G}^{C}\left(t\right)$ and a set of algebraic constraints for the error covariance of Kalman filters.

3.1.

### The decay rate of ${G}^{C}\left(t\right)$

Some quantitative characteristics of the shape of ${G}^{C}\left(t\right)$ can be mathematically proved and numerically computed. The main result in this section is inspired by the approximate sparsity pattern of exponential matrices proved in Iserles (2000). The following function, $c\left(\alpha ,x\right),$ is used repeatedly in the analysis,

((15))
$c\left(\alpha ,x\right)=\frac{{\alpha }^{|x|}}{|x{|}^{|x|}},\alpha >0,x\ne 0.$
Because $\underset{|x|\to \infty }{\mathrm{lim}}|x{|}^{1/|x|}=1,\underset{|x|\to \infty }{\mathrm{lim}}{\alpha }^{1/|x|}=1$ and $\frac{1}{e}<1,$ we know
$\begin{array}{c}c\left(\alpha ,x\right)={\left(\frac{{\alpha }^{1/|x|}}{|x{|}^{1/|x|}}\right)}^{{x}^{2}}>{\left(\frac{1}{e}\right)}^{{x}^{2}}\hfill \\ c\left(\alpha ,x\right)={\left(\frac{\alpha }{|x|}\right)}^{|x|}<{\left(\frac{1}{e}\right)}^{|x|}\hfill \end{array}$
provided that $|x|$ is large enough. This inequality and some properties of $c\left(\alpha ,x\right)$ are summarised as follows.

Lemma 1.

Suppose that α and x are positive numbers. Then$c\left(\alpha ,x\right)$is an increasing function of$\alpha >0$and a decreasing function of$x\in \left[\alpha ,\infty \right]$. Furthermore

$\underset{x\to \infty }{\mathrm{lim}}c\left(\alpha ,x\right)=0$
for any constant α. When$|x|\to \infty ,$
((16))
${e}^{-{x}^{2}}
i.e.$c\left(\alpha ,x\right)$decreases faster than exponential but slower than the rate of${e}^{-{x}^{2}}.$

In the following, a matrix A is said to be banded with bandwidth $s\ge 0$ if Aij = 0 whenever $|i-j|>s.$ If s = 0, then the matrix is diagonal.

Theorem 1.

Suppose that A and$Q=q{q}^{T}$in (1) are banded. For any t > 0, there exist positive constants$\overline{G}$, α, β, γ, and L so that

((17))

Note that the inequality (17) is an upper bound that approximates the decay of ${G}_{ij}^{C}$ as $|i-j|$ increases. It implies that ${G}^{C}\left(t\right)$ peaks around the diagonal in the matrix; and the value of $|{G}_{ij}^{C}|$ decreases faster than exponential if moving away from the diagonal. In this theorem, it is assumed that A is banded along the main diagonal. If A consists of multiple banded submatrices, simulations show that the error covariance peaks along corresponding sub-diagonals. In the following, the right-hand side of the equation (17) is called the decay function.

The proof of this theorem involves lengthy and tedious algebraic derivations, which is given in Appendix at the end of the paper. In (17), $|i-j|\to \infty$ implies that the result is meaningful only if $n\gg L,$ where n is the dimension of the state space. In fact, the results in Iserles (2000), the theoretical foundation of Theorem 1, are based upon the assumption that the bandwidth of A satisfies $s\ll n.$ Then L is much smaller than n. In Appendix, an analytic estimation of the parameters in (41), i.e. $\overline{G},$α, β, and γ is proved. However, the estimated value is conservative, which leads to a decay rate much slower than that of the true matrix. In Section 4, a numerical optimisation problem is formulated in (38) that allows to fit the optimal value of the parameters to the component-based estimate of the upper bound matrix (34). Showing in an example, the estimated decay function closely follows the true decay function of ${G}^{C}\left(t\right)$ as $|i-j|$ increases.

3.2.

### Some covariance constraints deduced from observation model

An error covariance, as a matrix, satisfies some constraints such as symmetry and positive definiteness. In the following, we prove some covariance constraints resulting from the observation model. In this section, the study is focussed on the discrete-time system (11) and its Kalman Filter (12).

Proposition 4.

Suppose the diagonal elements of${P}_{k}^{+}$are bounded by a positive number Pmax, i.e.

((18))
$|{\left({P}_{k}^{+}\right)}_{ii}|\le {P}_{\mathit{max}},1\le i\le n$
Then${P}_{k}^{+}$satsifies
((19a))
$0<{\left({H}_{k}{P}_{k}^{+}{H}_{k}^{T}\right)}_{ii}\le {\left({R}_{k}\right)}_{ii},1\le i\le m,$
((19b))
$|{\left({H}_{k}{P}_{k}^{+}\right)}_{ij}|<\sqrt{{\left({R}_{k}\right)}_{ii}{P}_{\mathit{max}}},1\le i\le m,1\le j\le n,j\ne i$
As a special case if the observation measures${\left({x}_{k}\right)}_{i}$for some$1\le i\le n$, then
((20a))
$0<{\left({P}_{k}^{+}\right)}_{ii}\le {\left({R}_{k}\right)}_{ii},$
((20b))
$|{\left({P}_{k}^{+}\right)}_{ij}|<\sqrt{{\left({R}_{k}\right)}_{ii}{P}_{\mathit{max}}},1\le j\le n,j\ne i,$

Different from the matrix upper bound in Theorem 1, the algebraic inequalities in Proposition 4 provide upper bounds for the individual elements in an error covariance. For example, if the sensor that measures the ith state variable, ${\left({x}_{k}\right)}_{i},$ is very accurate, then Rii is very small. In this case, (20) is a tight upper bound for ${\left({P}_{k}^{+}\right)}_{ij},1\le j\le n.$

Proof.

We prove (20) first. Without loss of generality, let i = 1. In this case, the first state variable, ${\left({x}_{k}\right)}_{1},$ is measured, i.e.

${H}_{k}=\left[\begin{array}{cc}\hfill 1& \hfill {0}_{1×\left(n-1\right)}\\ \hfill {\left({H}_{k}\right)}_{2:n,1}& \hfill {\left({H}_{k}\right)}_{2:n,2:n}\end{array}\right]$
where ${\left({H}_{k}\right)}_{2:n,1}$ is the first column of Hk starting from the second row, i.e. $i\ge 2.$ The submatrix ${\left({H}_{k}\right)}_{2:n,2:n}$ is similarly defined. Let Kk be the Kalman gain (12c). Define a new gain ${\stackrel{˜}{K}}_{k}.$ All rows of ${\stackrel{˜}{K}}_{k}$ equal that of Kk except for the first row, which is $\left[\begin{array}{ccccc}\hfill 1& \hfill 0& \hfill 0& \hfill \cdots & \hfill 0\end{array}\right],$ i.e.
((21a))
${\left({\stackrel{˜}{K}}_{k}\right)}_{ij}={\left({K}_{k}\right)}_{ij},1
((21b))
${\left({\stackrel{˜}{K}}_{k}\right)}_{1j}={\delta }_{1j},1\le j\le m$
The estimation using ${\stackrel{˜}{K}}_{k}$ is
${\stackrel{˜}{x}}_{k}^{+}={x}_{k}^{-}+{\stackrel{˜}{K}}_{k}\left({y}_{k}-{H}_{k}{x}_{k}^{-}\right)$
Then ${\stackrel{˜}{x}}_{k}^{+}$ equals the estimation using the Kalman filter except for the first state,
${\left({\stackrel{˜}{x}}_{k}^{+}\right)}_{1}={\left({y}_{k}\right)}_{1}$
Its error covariance is ${\left({R}_{k}\right)}_{11}.$ Because the Kalman gain minimises the trace of ${P}_{k}^{+}$ (see, for instance, Gelb and The Technical Staff (1974)), we have
${\left({P}_{k}^{+}\right)}_{11}=E\left({\left({\left({x}_{k}^{+}\right)}_{1}-{\left({x}_{k}\right)}_{1}\right)}^{2}\right)\le E\left({\left({\left({\stackrel{˜}{x}}_{k}^{+}\right)}_{1}-{\left({x}_{k}\right)}_{1}\right)}^{2}\right)={\left({R}_{k}\right)}_{11}$
i.e. (20a) holds true. Because Pk is positive definite, the following 2 × 2 matrix must be positive definite
$\left[\begin{array}{cc}\hfill {\left({P}_{k}^{+}\right)}_{11}& \hfill {\left({P}_{k}^{+}\right)}_{1j}\\ \hfill {\left({P}_{k}^{+}\right)}_{j1}& \hfill {\left({P}_{k}^{+}\right)}_{jj}\end{array}\right].$
for any $1\le j\le n.$ This implies that its determinant is greater than zero,
${\left({P}_{k}^{+}\right)}_{11}{\left({P}_{k}^{+}\right)}_{jj}-{\left({\left({P}_{k}^{+}\right)}_{1j}\right)}^{2}>0$
Therefore,
$|{\left({P}_{k}^{+}\right)}_{1j}|<\sqrt{{\left({P}_{k}^{+}\right)}_{11}{\left({P}_{k}^{+}\right)}_{jj}}$
This inequality implies (20b) because $0<{\left({P}_{k}^{+}\right)}_{11}\le {\left({R}_{k}\right)}_{11}$ and $0<{\left({P}_{k}^{+}\right)}_{jj}\le {P}_{\mathit{max}}.$

To prove (19), let’s focus on ${\left({H}_{k}\right)}_{1,1:n},$ the first row of Hk. The proof for other rows is similar. Because ${\left({H}_{k}\right)}_{1,1:n}$ is not a zero vector, we assume ${\left({H}_{k}\right)}_{11}\ne 0$ (if it is zero, we can re-arrange the index to move a nonzero element to the first position). Define an invertible matrix

((22))
$T=\left[\begin{array}{cc}\hfill {\left({H}_{k}\right)}_{11}& \hfill {\left({H}_{k}\right)}_{1,2:n}\\ \hfill {0}_{\left(n-1\right)×1}& \hfill {I}_{\left(n-1\right)×\left(n-1\right)}\end{array}\right],{T}^{-1}=\left[\begin{array}{cc}\hfill {\left({H}_{k}\right)}_{11}^{-1}& \hfill -{\left({H}_{k}\right)}_{11}^{-1}{\left({H}_{k}\right)}_{1,2:n}\\ \hfill {0}_{\left(n-1\right)×1}& \hfill {I}_{\left(n-1\right)×\left(n-1\right)}\end{array}\right].$
Obviously
((23))
${\left({H}_{k}\right)}_{1,1:n}{T}^{-1}=\left[\begin{array}{cccc}\hfill 1& \hfill 0& \hfill \cdots & \hfill 0\end{array}\right].$

Using T as a transformation we define a new state variable

$\stackrel{˜}{x}=Tx$
Its dynamical model is
((24a))
${\stackrel{˜}{x}}_{k}={\stackrel{˜}{A}}_{k-1}{\stackrel{˜}{x}}_{k-1}+{\stackrel{˜}{q}}_{k-1}{w}_{k},{\stackrel{˜}{A}}_{k-1}=T{A}_{k-1}{T}^{-1},{\stackrel{˜}{q}}_{k-1}=T{q}_{k-1}$
((24b))
${y}_{k}={\stackrel{˜}{H}}_{k}{\stackrel{˜}{x}}_{k}+{r}_{k}{v}_{k},{\stackrel{˜}{H}}_{k}={H}_{k}{T}^{-1}$
In ${\stackrel{˜}{H}}_{k},$ the first row is the unit vector (23). Therefore, the associated error covariance satisfies (20). Under the conditional probability distribution $P\left({\stackrel{˜}{x}}_{k}|{y}_{1:k}\right),$ the covariance is
((25a))
${\stackrel{˜}{P}}_{k}^{+}=E\left(\left({\stackrel{˜}{x}}_{k}-\text{mean}\left({\stackrel{˜}{x}}_{k}\right)\right){\left({\stackrel{˜}{x}}_{k}-\text{mean}\left({\stackrel{˜}{x}}_{k}\right)\right)}^{T}\right)$
((25b))
$=E\left(T\left({x}_{k}-\text{mean}\left({x}_{k}\right)\right)\left({x}_{k}-\text{mean}{\left({x}_{k}\right)}^{T}\right){T}^{T}\right)$
((25c))
$=T{P}_{k}^{+}{T}^{T}$
From (20), (22) and (25), we have
$0<{\left({H}_{k}{P}_{k}^{+}{H}_{k}^{T}\right)}_{11}={\left({\stackrel{˜}{P}}_{k}^{+}\right)}_{11}\le {\left({R}_{k}\right)}_{11},$
i.e. (19a) holds true. If $j\ne 1,$ then
$|{\left({H}_{k}{P}_{k}\right)}_{1j}|={\left({\stackrel{˜}{P}}_{k}^{+}\right)}_{1j}<\sqrt{{\left({R}_{k}\right)}_{11}{P}_{\mathit{max}}}$
Here, we use the same upper bound Pmax for both ${P}_{k}^{+}$ and ${\stackrel{˜}{P}}_{k}^{+}$ because (22) and (25) imply
${\left({P}_{k}^{+}\right)}_{2:n,2:n}={\left({\stackrel{˜}{P}}_{k}^{+}\right)}_{2:n,2:n}.$

4.

## Computational issues

The results in previous sections describe various aspects of error covariance. When applied collectively these results together give a global picture of the shape of error covariance. To summarise, we have proved the following quantitative characteristics of the shape of P(t):

• Upper bound
((26a))
$P\left(t\right)\le {e}^{At}P\left(0\right){e}^{{A}^{T}t}+{G}^{C}\left(t\right),\text{continuous}‐\text{time}$
((26b))
${P}_{k}^{+}\le {A}_{k-1}\cdots {A}_{0}{P}_{0}^{+}{A}_{0}^{T}\cdots {A}_{k-1}^{T}+{G}_{k}^{C},\text{discrete}‐\text{time}$
• Decay rate from peak
((27))
• Covariance constraints deduced from observation

If

((28a))
${\left({P}_{k}^{+}\right)}_{ii}\le {\left({R}_{k}\right)}_{ii},$
((28b))
$|{\left({P}_{k}^{+}\right)}_{ij}|<\sqrt{{\left({R}_{k}\right)}_{ii}{P}_{\mathit{max}}},1\le j\le n,j\ne i.$

Or in general

((28c))
$0<{\left({H}_{k}{P}_{k}^{+}{H}_{k}^{T}\right)}_{ii}\le {\left({R}_{k}\right)}_{ii},1\le i\le m,$
((28d))
$|{\left({H}_{k}{P}_{k}^{+}\right)}_{ij}|<\sqrt{{\left({R}_{k}\right)}_{ii}{P}_{\mathit{max}}},1\le i\le m,1\le jɤn,j\ne i,$

4.1.

### Computing the elements in ${G}^{C}\left(t\right)$

Definition 2.

The observability Gramian of the system

((29a))
$\stackrel{̇}{x}\left(t\right)=Ax\left(t\right),x\in {\mathbb{R}}^{n},$
((29b))
$y=H\left(t\right)x,y\in {\mathbb{R}}^{m},H\in {\mathbb{R}}^{m×n}$
at t = t1 in the time interval $\left[0,t\right]$ is
((30))
${G}^{O}\left(t\right)={\int }_{0}^{t}{e}^{{A}^{T}\left(\tau -{t}_{1}\right)}{H}^{T}\left(\tau \right)H\left(\tau \right){e}^{A\left(\tau -{t}_{1}\right)}d\tau$

The controllability Gramian has the same dimension as the error covariance. Therefore propagating the entire matrix along a trajectory is intractable for problems that have high dimensions. However, the Gramian matrix can be computed element-by-element. In control theory, given a system with state variable x and control input u

$\stackrel{̇}{x}\left(t\right)=Ax\left(t\right)+qu,x\in {\mathbb{R}}^{n},A\in {\mathbb{R}}^{n×n},q\in {\mathbb{R}}^{n×{n}_{u}},u\in {\mathbb{R}}^{{n}_{u}}$
its dual system is a linear system
((31a))
$\stackrel{̇}{z}\left(\tau \right)=-{A}^{T}z\left(\tau \right),z\in {\mathbb{R}}^{n}$
((31b))
${y}^{z}\left(\tau \right)={q}^{T}z\left(\tau \right),{y}^{z}\in {\mathbb{R}}^{{n}_{u}}$
where z is the dual state, and yz is the output of the dual system (Kailath, 1980).

Proposition 5.

Consider (1a) and its dual system (31).

(i) The controllability Gramian of (1a) in$\left[0,t\right]$equals the observability Gramian of (31) at t, which is

((32))
${G}^{C}\left(t\right)={\int }_{0}^{t}{e}^{-A\left(\tau -t\right)}Q{e}^{-{A}^{T}\left(\tau -t\right)}d\tau$

(ii) Let ei represent the ith basis vector of${\mathbb{R}}^{n}$. Let${z}_{i}\left(\tau \right)$and${z}_{j}\left(\tau \right)$be the solutions of (31) with final states${z}_{i}\left(t\right)={e}_{i}$and${z}_{j}\left(t\right)={e}_{j}$. Then

((33))
${\left({G}^{C}\left(t\right)\right)}_{ij}={\int }_{0}^{t}{z}_{i}^{T}\left(\tau \right)Q{z}_{j}\left(\tau \right)d\tau ,$

The formula (33) implies that individual elements in GC can be computed without the need to evaluate the entire matrix, provided that the dual system, or the adjoint model, can be numerically propagated reversely in time. Integrating the adjoint model twice, ${z}_{i}\left(\tau \right)$ and ${z}_{j}\left(\tau \right),$ one can compute three elements in the matrix, ${\left({G}^{C}\left(t\right)\right)}_{ii},{\left({G}^{C}\left(t\right)\right)}_{jj}$ and ${\left({G}^{C}\left(t\right)\right)}_{ij}={\left({G}^{C}\left(t\right)\right)}_{ji}.$

Proof.

Based on Definitions 1 - 2, Part (i) is obvious. To prove (ii), Note that ${z}_{i}\left(\tau \right)=\left({e}^{-{A}^{T}\left(\tau -t\right)}\right){e}_{i},$ where ei denotes the ith basis vector. Therefore, the ith row and jth column of ${G}^{C}\left(t\right)$ is the integration of the inner product of ${q}^{T}{z}_{i}\left(\tau \right)$ and ${q}^{T}{z}_{j}\left(\tau \right).$ Therefore, (33) holds, where $Q\left(\tau \right)=q\left(\tau \right){q}^{T}\left(\tau \right).$

The idea used in Proposition 5 is also applicable to the propagation of initial error covariance.

Proposition 6.

Suppose B0 is a matrix satisfying

$P\left(0\right)={B}_{0}{B}_{0}^{T}$
Consider the following dual system
$\begin{array}{c}\stackrel{̇}{z}\left(\tau \right)={A}^{T}z\left(\tau \right),z\in {\mathbb{R}}^{n}\\ {y}^{z}\left(\tau \right)={B}_{0}^{T}z\left(\tau \right),{y}^{z}\in {\mathbb{R}}^{n}\end{array}$
Let${z}_{i}\left(\tau \right)$and${z}_{j}\left(\tau \right)$be the solutions satisfying${z}_{i}\left(0\right)={e}_{i}$and${z}_{j}\left(0\right)={e}_{j}$. Then
${\left({e}^{At}P\left(0\right){e}^{{A}^{T}t}\right)}_{ij}={\int }_{0}^{t}{z}_{i}^{T}\left(\tau \right){B}_{0}{B}_{0}^{T}{z}_{j}\left(\tau \right)d\tau ,$
$={\int }_{0}^{t}{z}_{i}^{T}\left(\tau \right)P\left(0\right){z}_{j}\left(\tau \right)d\tau$

Propositions 5 and 6 are proved for continuous-time linear systems. To derive its discrete-time version, let $\Delta t$ be the step size, ${x}_{k}=x\left(k\Delta t\right),t=K\Delta t$ for some positive integer K. A Discretisation of (1a) is

${x}_{k}={e}^{A\Delta t}{x}_{k-1}+\overline{q}{v}_{k},\overline{q}=\sqrt{\Delta t}q$
Define
${z}_{s}\left(k\right)={e}^{\left(K-k\right)A\Delta t}{e}_{s},s=i,j$
Denote ${\overline{q}}^{T}\overline{q}$ by $\overline{Q}.$ The Euler Discretisation of (33) is
((34))
${G}_{ij}^{C}=\sum _{k=1}^{K-1}{z}_{i}^{T}\left(k\right)\overline{Q}{z}_{j}\left(k\right)+{\overline{Q}}_{ij}$
For a nonlinear system
${x}_{k}=M\left({x}_{k-1}\right)+\overline{q}{v}_{k}$
Given a trajectory ${\left\{{x}_{k}\right\}}_{k=0}^{K}.$ Let ${M}_{k}^{\ast }$ represent the adjoint model at xk. Then (34) is an approximation of controllability Gramian in which
((35))
${z}_{s}\left(k\right)={M}_{k}^{\ast }°{M}_{k+1}^{\ast }\cdots °{M}_{K-1}^{\ast }{e}_{s},s=i,j$
This nonlinear version is a form of empirical Gramians. It is used in various applications of nonlinear systems, from ocean dynamics, power systems, to WRF data assimilation (Kang amd Xu, 2009; Krener and Ide, 2009; Kang and Xu, 2012; Yoshimura et al., 2020).

4.2.

### Decay rate approximation

In the next, we introduce a method of approximating the parameters, $\left(\overline{G},\alpha ,\beta ,\gamma \right),$ in the decay function (27). Their value given in the proof of Theorem 1 (Appendix) is conservative, which results in a decay rate that is much slower than that of GC. If one can compute the value of a subset of elements in ${G}^{C}\left(t\right),$ which is possible as proved in Proposition 5, then we can find $\left(\overline{G},\alpha ,\beta ,\gamma \right)$ by using curve fitting. More specifically, assume that the set of elements

((36))
$\left\{{G}_{ij}^{C}|\left(i,j\right)\in \mathcal{I}\right\}$
is known, were $\mathcal{I}$ is an index subset for $i,j\in \left\{1,2,\dots ,n\right\}.$ It is easy to check that $c\left(\alpha ,x\right)$ reaches its maximum value at $x=\alpha /e.$ Set
((37))
$\beta =\frac{\alpha \gamma }{e}$
Then we compute the following minimisation
((38))
$\left(\overline{G},\alpha ,\gamma \right)=\mathrm{arg}\underset{{}_{\overline{G},\alpha ,\gamma }}{\mathrm{min}}\sum _{\left(i,j\right)\in \mathcal{I}}{\left(\overline{G}c\left(\alpha ,\alpha /e+\left(|j-i|\right)/\gamma \right)-|{G}_{ij}^{C}|\right)}^{2}$
In practical applications, the location of $\left(i,j\right)\in \mathcal{I}$ is important. We recommend selecting the set $\mathcal{I}$ so that the points are distributed with some close to the peak and some away from the peak. In the examples in Section 5, $\mathcal{I}$ contains five diagonals (Figure 2) for each block. It covers the range from the peak (along main diagonal in the examples) to the area where the elements of error covariance are very small (the tail of the decay function).

Fig. 2.

A partition of error covariance.

4.3.

### Component-based computation

Because the elements in GC can be computed individually using (33) or its Discretisation (34), one can focus on a given area or a block in a matrix to find its shape without the need to know the covariance value outside the block, thus the term ‘component-based.’ Three examples are given in Section 5. The main computational steps are summarised as follows.

1. Partition a large matrix into blocks shown in Figure 2. The elements in a matrix are represented by ‘*’ in the plot. A partition of the matrix consists of blocks of elements, which are represented by shaded areas with different colours. The partition is shown in the figure for the upper half of the matrix. The lower half has the same value due to the symmetry of error covariance.
2. The peak value in each block is the average of its diagonal. The computation of diagonal elements is based on (34), the Discretisation of (33).
3. Decay function is estimated using (38). To apply this formula of curve fitting, a set of elements in GC (represented by circles in Figure 2) is computed using (34).

Note that the results in Section 3.2, i.e. covariance constraints (28) deduced from observation model, are not included in these steps. The constraints can be applied to individual rows/columns separately in addition to the computed decay rate. It tends to be a more accurate upper bound but applicable to only special rows determined by the observation model.

5.

## Examples

In the following, we give three examples in which the quantitative characteristics in Section 3 are computed to approximate the upper bound matrix of the error covariance. The outline shapes of the upper bound matrix and the true error covariance are shown in plots. In the first example we demonstrate the computational algorithm. In the second example, the approximated outline shape of an upper bound matrix is used as an indicator of upper bound in the determination of localisation radius. The third example is a case study in which we explore the application of the results proved in previous sections to a nonlinear system that models a tsunami wave using the shallow water equations.

5.1.

### Example 1

The illustrative example has n = 150 state variables. This dimension is chosen because it is small enough so that the Kalman filter is computationally tractable; and it is large enough so that one can demonstrate the sparsity of error covariance. It is defined in the form of differential equation (1). The matrices are partially shown in (39). The A matrix is banded whose bandwidth is s = 8. For many methods of PDE Discretisation, the resulting ODE system has a bandwidth less than s = 8. To generate the elements in A, we first form a matrix using random numbers with the uniform distribution in $\left[-1,1\right].$ Then we add a diagonal matrix $aI$ to it, where a is chosen to make sure the system is stable, i.e. placing the real parts of all eigenvalues less than zero. Assuming that model uncertainty has its impact in a local area only, the matrix q is also banded in which s = 4; thus the bandwidth of $Q=q{q}^{T}$ is 8. The matrix associated with observation error is r. We assume a sensor sampling rate dt = 0.125. The elements of r in the Discretised model are random numbers uniformly distributed in $\left[-0.0113,0.0113\right].$ This range is about 2% of the standard deviation of the initial state. The observation measures x1, x50, x100, and x150. The initial error covariance is $P\left(0\right)=Q,$ i.e. the only known information about the background error is the model uncertainty. In the simulations, the final time is tf = 10.

((39))

The σQ value above is equivalent to continuous-time white noise of model uncertainty with a standard deviation $\sigma =0.6.$ The component-based computational method makes it possible to focus on any given area in the covariance matrix. In this example we divide the matrix into ten blocks. Each block is a strip of rows above the diagonal of the matrix (Figure 2). The goal is to approximate the shape of the error covariance in each block. The number of blocks in the partition depends on various factors. Basically, increasing the number of blocks refines the approximation with the cost of higher computational load. As the first step, we apply the inequalities (28) deduced from the observation model to this problem. More specifically, we have

$\begin{array}{c}{\left({P}_{k}^{+}\right)}_{ii}\le {\left({R}_{k}\right)}_{ii},i=1,50,100,150\\ |{\left({P}_{k}^{+}\right)}_{ij}|<\sqrt{{\left({R}_{k}\right)}_{ii}{P}_{\mathit{max}}},i=1,50,100,150,j\ne i,1\le j\le n\end{array}$
A guaranteed upper bound, Pmax, is not available. Using component-based computation based on the dual system, we compute the diagonal elements of GC to find that most of them satisfy ${G}_{i,i}^{C}<1.$ It indicates that ${P}_{\mathit{max}}\approx 1.$ So, the upper bound of error covariance along these four rows and columns can be determined, shown in Figure 3.

Fig. 3.

Rows and columns of error covariance constrained by the observation model.

In the next step, we approximate the peak value of each block. We use the peak value of GC as an approximation because the impact of the initial error decays rapidly for the stable system. The computation is based on (34), the Discretisation of (33). Then the average value is used to represent the peak value over each block. This is shown in Figure 4.

Fig. 4.

The approximate peak value of error covariance computed using an upper bound matrix.

Finally, we estimate the decay rate by finding the decay function $c\left(\alpha ,x\right)$ of the matrix upper bound. For this purpose, it is necessary to evaluate a subset of elements for each component. As shown in Figure 2, five diagonals are evaluated for each block. Then, the solution of (38) based on the computed $|{G}_{ij}^{C}|$ determines the parameter value in the decay function $c\left(\alpha ,x\right).$ The computations are based on the absolute value of entries in GC. The approximated shape of error covariance is shown in Figure 5 (left). For comparison, the plot of the matrix upper bound is also shown in Figure 5 (right). The approximate shape captures the the key feature, such as peak and decay, very well.

Fig. 5.

The approximated shape (left) and the matrix upper bound (right) of the error covariance.

For a more detailed comparison, the average value along the main diagonal as well as all other diagonals are shown in Figure 6 for every block. All computations are based on the absolute value of entries in covariance matrices. There are a total of ten blocks. The gap between the true error covariance and its matrix upper bound varies. Shown in Figure 7 are two enlarged plots from Figure 6. The plot on the left shows that the matrix upper bound (red) is quite close to the true error covariance (blue); and the approximated decay curve (green) is very close to both. In this block, the approximated shape is very close to the true shape of the error covariance. However, this is not always the case. The plot on the right shows a block in which the Kalman filter is very effective in making error corrections. As a result, the true error covariance is much smaller than the matrix upper bound. In this block, the matrix upper bound over estimates the true error covariance by a large amount. For improvement, one needs to compute the third term in (9), a problem that cannot be solved using the results in this paper. To summarise, the matrices of error covariance and its upper bound are computationally intractable for high dimensional problems. However, using the component-based algorithm, the decay function of the error covariance upper bound can be numerically computed over a given region.

Fig. 6.

The averaged error covariance along diagonals of blocks. The horizontal axis represents the indices of diagonals, where the middle point is the main diagonal. The vertical axis represents the average value of the elements in the error covariance along diagonals. The blue curve represents the true error covariance of a linear Kalman filter. The red curve is the matrix upper bound of error covariance. The green curve represents the approximated decay function.

Fig. 7.

The averaged error covariance along diagonals of two representative blocks. See the caption of Figure 6 for details.

5.2.

### Example 2

In applications of EnKFs, finding a localisation radius is essential to the filter’s accuracy. Because an upper bound matrix decays exponentially when $|i-j|$ increases (Theorem 1), this upper bound provides valuable information about the localisation radius. The matrices, A, q, and r in this example are generated in the same way as in Example 1 with some parameter value changes. More specifically, σQ and r in (39) are assigned the following value

$\begin{array}{c}{\sigma }_{Q}=0.0707\\ r=\left[\begin{array}{cccc}\hfill 0.0917& \hfill -0.1071& \hfill -0.0122& \hfill -0.0239\\ \hfill -0.0992& \hfill 0.0014& \hfill 0.0082& \hfill -0.1032\\ \hfill -0.0341& \hfill -0.0700& \hfill -0.0441& \hfill -0.0586\\ \hfill 0.0330& \hfill -0.0524& \hfill 0.0995& \hfill 0.0297\end{array}\right]\end{array}$
Similar to Example 1, the observation measures ${x}_{1},{x}_{50},{x}_{100}$ and x150. For the estimation of x(t), we use an EnKF in which the ensemble size is nens = 15. The localisation is based on the correlation function as defined in Gaspari and Cohn (1999)

The value of c determines the localisation radius. The curves in Figure 8 are three correlation functions for c = 7, 15, 30.

Fig. 8.

Correlation functions.

In the simulation, we first apply the localisation with the largest radius, c = 30. Following the same approach in Example 1, we divide the covariance matrix into ten blocks. Each block is a strip of rows above the diagonal of the matrix (Figure 2). The matrix upper bound over each block at tf = 10 is computed and then compared to the average value of the EnKF error covariance along diagonals shown in Figure 2 (taking absolute value before averaging). In Figure 9, the horizontal axis in each plot represents the indices of diagonals, where the middle point is the main diagonal. The vertical axis of each plot represents the average value of the elements of error covariance along diagonals. The blue curve is the error covariance of an EnKF. The red curve is the matrix upper bound of error covariance. For problems with high dimensions, both matrices are computationally intractable. In this case, what can be computed is the approximated decay function. It is shown as the green curve in the plots. In Figure 9, Plot(1,1) (the plot located in the first row first column), Plot(1,2), Plot(2,3) and Plot(2,4) show that the average value of error covariance of the EnKF is much larger than the decay function, implying that the localisation radius is too large. Figure 10 shows the state and its EnKF estimation at t = tf, where ${t}_{f}=3.75.$ The estimation missed all peaks located in the middle part of the plot. The relative error is greater than 0.51.

Fig. 9.

The averaged error covariance along diagonals of blocks for localisation c = 30. The horizontal axis represents the indices of diagonals, where the middle point is the main diagonal. The vertical axis represents the average value of the elements of error covariance along diagonals. The blue curve represents the error covariance of an EnKF. The red curve is the matrix upper bound of error covariance. The green curve represents the approximated decay function.

Fig. 10.

The state ${x}_{1}\left({t}_{f}\right),{x}_{2}\left({t}_{f}\right),\dots ,{x}_{n}\left({t}_{f}\right)$ where n = 150. Solid: truth. Dotted: estimated value.

Using the correlation function with c = 15, the radius of localisation is much smaller. The computation shows that the average value of error covariance is below or close to the decay function in eight of the ten blocks. However, there are two blocks where the average value of error covariance is still much larger when it is compared to the decay function. Comparing to the previous case of c = 30, the estimated value of $x\left({t}_{f}\right),$ the final state, follows the peaks of the truth, although the filter overestimates the value at some points. The overall relative error is reduced to 0.47.

If c = 7, the localisation has the smallest radius among the three correlation functions in Figure 8. In Figure 11, all blue curves are below or close to the green line, implying that the radius of localisation is bounded by the decay function. The final state $x\left({t}_{f}\right)$ and its estimation is shown in Figure 12. It is obviously improved relative to the previous cases when the location radius is too large. In fact, the relative estimation error is less than 0.25.

Fig. 11.

The averaged error covariance along diagonals of blocks for localisation c = 7. See the caption of Figure 9 for details.

Fig. 12.

The state ${x}_{1}\left({t}_{f}\right),{x}_{2}\left({t}_{f}\right),\dots ,{x}_{n}\left({t}_{f}\right)$ where n = 150. Solid: truth. Dotted: estimated value.

Remark.

In this example, the decay function provides an indicator of upper bound in the determination of localisation radius. From (9), the radius of localisation should be the radius of GC with a correction due to the term ${\stackrel{̂}{G}}^{C}\left({t}_{1},{t}_{2}\right)$ (for the simplicity in argument we assume that the impact of the initial error covariance is small). This example shows that such correction reduces the radius. Elements of the error covariance matrix resulting from a sound localisation radius are expected to lie under the estimate of the matrix upper bound.

5.3.

### Example 3 - the shallow water equations

The theorems proved in this paper are based on a common assumption: the system is linear. Generalising the theory to nonlinear systems is beyond the scope of this paper. Instead, the following is a case study in which we explore the application of the results proved in previous sections to a nonlinear system. It is an example adopted from Deleanu and Dumitrache (2019) in which a tsunami wave is simulated using the shallow water equations. Illustrated in Figure 13, the water wave travels a horizontal distance of $L=1,296×{10}^{3}$ m. It approaches the shore on a variable seabed depth that has a constant slope $s=40/L.$ The wave propagation is modelled using the shallow water equations

((40a))
$\frac{\partial h}{\partial t}+\frac{\partial }{\partial x}\left(uh\right)=0$
((40b))
$\frac{\partial }{\partial t}\left(uh\right)+\frac{\partial }{\partial x}\left({v}^{2}h+\frac{1}{2}g{h}^{2}\right)=-gh\frac{dB}{dx}.$
where $h=h\left(t,x\right)$ is the flow depth, $u=u\left(t,x\right)$ is the flow velocity, B(x) is the seabed height, g is the gravitational acceleration and $\left(t,x\right)\in \left[0,T\right]×\left[0,L\right].$ In this example, the wave propagation is simulated for the time interval T = 60,000 s. The result is used as the truth in the study of error covariance. A total of m = 80 sensors are placed along the seabed with an equal distance of 16,200 m apart. Each sensor measures the full state ${\left[h,uh\right]}^{T}.$ The value of parameters is summarised in Table 1 (also see Figure 13 for illustration).

Fig. 13.

The variables in the model of a tsunami wave.

The boundary conditions are

$\begin{array}{c}B\left(x\right)=\frac{40x}{L}\\ h\left(t,0\right)=64.5+3 \text{sin} \left(\pi \left(\frac{4t}{86400}-\frac{1}{2}\right)\right),h\left(t,L\right)={H}_{0},\\ u\left(t,0\right)=\sqrt{g}\left(\sqrt{h\left(t,0\right)}-\sqrt{{H}_{0}}\right),u\left(t,L\right)=0\\ h\left(0,x\right)={H}_{0},u\left(0,x\right)=0\end{array}$
Coded in Matlab, the shallow water equations are numerically solved using the first order Lax-Friedrichs algorithm (LeVeque, 1992) over equally spaced grid points
${x}_{0}=0<{x}_{1}<{x}_{2}<\cdots <{x}_{{N}_{x}}=L,{t}_{0}=0<{t}_{1}<{t}_{2}<\cdots <{t}_{{N}_{t}}$
In the Discretisation, $\Delta x=324$ m, ${N}_{x}=4,001,\Delta t=10$ s and ${N}_{t}=6,000.$ The associated tangent linear model and adjoint model are also programmed in Matlab. Shown in Figure 14 is the nominal trajectory around which the error covariance is analysed.

Fig. 14.

Water wave at t = 20,000, 40,000, 60,000 s.

An error covariance in full dimension, 8002 × 8002, is computed using unscented Kalman Filter (UKF) (Julier et al., 2000; Julier and Uhlmann, 2004). The model uncertainty and the observation noise are introduced in the same way as that in (1),

$\begin{array}{c}{z}_{k}=M\left({z}_{k-1}\right)+q{w}_{k-1}\\ {y}_{k}=H\left({x}_{k}\right)+r{v}_{k}\end{array}$
where M(x) represents the Discretised shallow water equations and
$q=\left[\begin{array}{cccccccc}\hfill 0.04& \hfill 0.04& \hfill 0.03& \hfill 0.02& \hfill 0.01& \hfill 0& \hfill \cdots & \hfill 0\\ \hfill 0.04& \hfill 0.04& \hfill 0.04& \hfill 0.03& \hfill 0.02& \hfill 0.01& \hfill \cdots & \hfill 0\\ \hfill 0.03& \hfill 0.04& \hfill 0.04& \hfill 0.04& \hfill 0.03& \hfill 0.02& \hfill \cdots & \hfill 0\\ \hfill 0.02& \hfill 0.03& \hfill 0.04& \hfill 0.04& \hfill 0.04& \hfill 0.03& \hfill \cdots & \hfill 0\\ \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮\end{array}\right],r=\left[\begin{array}{cccccc}\hfill 0.03& \hfill 0& \hfill 0& \hfill 0& \hfill \cdots 0& \hfill \\ \hfill 0& \hfill 0.03& \hfill 0& \hfill 0& \hfill \cdots 0& \hfill \\ \hfill 0& \hfill 0& \hfill 0.03& \hfill 0& \hfill \cdots 0& \hfill \\ \hfill 0& \hfill 0& \hfill 0& \hfill 0.03& \hfill \cdots 0& \hfill \\ \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮& \hfill ⋮\end{array}\right]$
Obviously, q is a banded matrix of bandwidth s = 4 and r is diagonal. Shown in Figure 15 is the error covariance of the UKF. Different from linear systems, the estimation from a UKF is not guaranteed to be optimal. However, UKF has been a widely used nonlinear filter known for its good accuracy and robust stability. In this example, it serves as a reference for comparison. The water wave and its estimation at t = 60,000 s is shown in Figure 16. The relative error of u(t, x) is 0.050 and the relative error of h(t, x) is 0.005. For the component-based computation of GC, the adjoint model is applied in (34)–(35). The length of time window is K. We choose a value of K different from Nt. Its value should be large enough so that the initial error is diminished. On the other hand, we do not want to apply a K that is too large because the adjoint model is a linearisation that introduces additional error in each iteration. In this example K = 150, a time window during which the UKF reduces about 75% of the initial error. Following the same approach in the previous examples, we divide the covariance into blocks as shown in Figure 2. For illustrative purpose, let us focus on the block between the rows $2001\le i\le 2100.$ The average value along diagonals in this block is shown in Figure 17. The figure contains three plots because the error covariance as a matrix has three submatrices, odd row vs odd column (covariance of h), even row vs even column (covariance of uh), and odd row vs even column (covariance between h and uh).

Fig. 15.

UKF error covariance (the portion $1\le i,j\le 500$).

Fig. 16.

UKF estimation at t = 60,000 s. Solid: truth. Dotted: estimated value.

Fig. 17.

The averaged error covariance along diagonals of the block between the rows $2001\le i\le 2100.$ See the caption of Figure 6 for details.

The goal of this example is to explore if the results proved for linear systems are applicable to a nonlinear system such as the shallow water equations. We first check the results in Proposition 2 and Theorem 1. In other words, we want to check if the controllability Gramin GC provides a matrix upper bound; and if it decays at the rate that is claimed in Theorem 1. From Figure 17, the average value of ${G}_{ij}^{C}$ (red) is located on top of the average Pij (blue). It implies that GC is an upper bound of the error covariance. A decay function (green curve) is plotted as an approximation of GC. It is computed based on four diagonals of GC in the block. For this nonlinear example, it shows that the decay curve agrees with GC (red) around the diagonal when the covariance is high. However, different from the linear examples, GC approaches zero slowly when the location is moving away from the diagonal. Nevertheless, the decay curve approaches zero anyway. As a result, the decay curve serves as a better estimate of the error covariance than GC. It is unclear if this is a general phenomenon or just a special case, a topic for further research.

In the next, we verify the results in Proposition 4, more specifically the inequalities in (20). It is a set of upper bounds determined by the observation model. As an example, we focus on the row i = 2001 and i = 2002 in ${P}_{k}^{+}.$ The corresponding state variables, xi, are directly measured by a sensor. In Figure 18, the green line on top is the constant on the right side of the inequality (20b). The blue curve below it is the value of elements in the ith row of ${P}_{k}^{+}$ (only the columns $1850\le j\le 2150$ are shown here). Clearly, the inequality (20b) holds for this nonlinear example. The red mark at j = 2001 in the left plot and j = 2002 in the right plot in Figure 18 is Rii, the right side of the inequality (20a). It is below the blue curve, which implies that Rii is not an upper bound of ${\left({P}_{k}^{+}\right)}_{ii}.$ Therefore, (20a) does not hold for this nonlinear example. The difference is ${\left({P}_{k}^{+}\right)}_{ii}-{R}_{ii}=0.0075$ for i = 2001 and 0.0076 for i = 2002. In fact, this difference is relatively insignificant because the covariance at grid points without a sensor has much larger value. For instance, the row adjacent to i = 2002 in ${P}_{k}^{+}$ is shown in Figure 19 (green curve). Relative to it, the ith row (blue curve) is so small the different between Rii and ${\left({P}_{k}^{+}\right)}_{ii}$ is negligible. In other words, even though the inequality (20a) does not hold, Rii still provides a good approximation of ${\left({P}_{k}^{+}\right)}_{ii}$ with a small relative error. The observation model in this example is linear. We speculate that the reason why the inequality does not hold is because of the nonlinear dynamics of the system. The deep investigation of this behaviour is the subject of an on-going study.

Fig. 18.

The upper bound of error covariance deduced from observation model.

Fig. 19.

Error covariance along two adjacent rows, i = 2002 and i = 2004.

6.

## Conclusions

Several quantitative characteristics are introduced and studied that can be used to outline the shape of error covariance as a 3D graph. The proved quantitative characteristics include matrix upper bounds of error covariance, the decay rate from peak to bottom of an upper bound matrix, and some inequality constraints of error covariance deduced from observation models. The concept of controllability Gramian and its computational methods play an important role in several parts of the study. These unveiled interconnections between error covariance and system models are new discoveries in the literature of Kalman filters. Although the computation of error covariance is generally intractable for high dimensional systems, computational methods developed in this paper can numerically compute the quantitative characteristics with a limited computational load. Some ideas of using the results to improve Kalman filter applications are explored in three examples, in which more questions are raised for future research than that are solved. For instance, the quantitative characteristics are collectively, but not interactively, applied. Specifically, the computational algorithm of the decay function does not use the constraints deduced from the observation model. The constraints are applied to the approximated shape of error covariance after the decay function is computed. In addition, the controllability Gramian of the Kalman-Bucy filter in (9) is a correction term. Based on the observation model, this term reduces the error of the matrix upper bound. As a problem for future research, an integration of these algorithms and constraints may lead us to computational methods of approximating error covariance with improved accuracy.