Open Access
This article is

- freely available
- re-usable

*Processes*
**2019**,
*7*(7),
451;
https://doi.org/10.3390/pr7070451

Article

Discrete-Time Kalman Filter Design for Linear Infinite-Dimensional Systems

Department of Chemical and Materials Engineering, University of Alberta, Edmonton, AB T6G 1H9, Canada

^{*}

Author to whom correspondence should be addressed.

Received: 31 May 2019 / Accepted: 12 July 2019 / Published: 15 July 2019

## Abstract

**:**

As the optimal linear filter and estimator, the Kalman filter has been extensively utilized for state estimation and prediction in the realm of lumped parameter systems. However, the dynamics of complex industrial systems often vary in both spatial and temporal domains, which take the forms of partial differential equations (PDEs) and/or delay equations. State estimation for these systems is quite challenging due to the mathematical complexity. This work addresses discrete-time Kalman filter design and realization for linear distributed parameter systems. In particular, the structural- and energy-preserving Crank–Nicolson framework is applied for model time discretization without spatial approximation or model order reduction. In order to ensure the time instance consistency in Kalman filter design, a new discrete model configuration is derived. To verify the feasibility of the proposed design, two widely-used PDEs models are considered, i.e., a pipeline hydraulic model and a 1D boundary damped wave equation.

Keywords:

discretization; Kalman filter design; infinite-dimensional system; boundary control; water hammer equation; wave equation## 1. Introduction

State-of-the-art advancements in the realm of industrial process operations require good understanding of complex phenomena and systems. As a representative method, first principle modelling has been extensively utilized for process description, control, and operation due to its capability of being mathematically provable and physically explainable compared to data-driven methods. Among this category, lumped parameter system (or finite-dimensional systems) modelling has been widely applied to temporal dynamics modelling described by ordinary differential equations (ODEs). However, many complex industrial processes often vary along both temporal and spatial domains. For instance, material and flow processing, transporting, and reacting usually take the forms of integral and partial different equations (PDEs), which have states dependent on both time and space, leading to the realm of distributed parameter systems (DPSs) or infinite-dimensional systems [1,2,3]. Given that DPS is capable of taking both temporal and spatial variables into account, it has been widely utilized in the mathematical modelling and description of various processes and applications, including chemical [2,4], mechanical [5,6], biotechnological [7,8,9], and biomedical [10,11,12,13] engineering. More applications of distributed parameter systems can be found in [14,15,16]. Compared to lumped parameter systems, dealing with distributed parameter systems is not straightforward due to the mathematical modelling complexity induced by PDEs and/or delay equations, which pose further challenges for the ensuing estimator, controller, and regulator design.

State information is usually required for a state feedback controller and/or regulator design, whilst full state information is not often available either due to physical constraints of sensor installation or the prohibitive expense of implementing spatially-distributed sensors, if possible to be built. Hence, state estimation for distributed parameter systems attracts a lot of attention from academia and industry. Following the pioneering work by Kalman [17,18] on the Kalman filter design and Luenberger [19,20,21] on the Luenberger observer design for finite-dimensional systems in the 1960s, extensive work has been done on state estimation for distributed parameter systems. In particular, Dochain and his co-workers developed extended Luenberger (ELO), extended Kalman (EKO), asymptotic, and interval observers for chemical, biochemical, and biotechnological systems [22,23,24]. Recently, an interesting review on observer application in chemical process systems was presented by Ali, Dochain and co-workers, where six classes of recent observers with different features were summarized, and some of them can be extended into the realm of infinite-dimensional systems [25]. Christofides and his co-workers made extensive contributions on the control and estimation of distributed parameter systems with applications to chemical processes, especially in predictive and robust control for transport-reaction processes [26,27,28,29,30]. Zeitz and his co-workers proposed the observability canonical form and extended Luenberger observer for nonlinear distributed parameter systems, which were further applied to state and parameter estimation of adsorption processes and chemical reactors [31,32,33,34,35]. Moreover, interesting work on distributed parameter observer designs for layering granulation, crystallization, and reaction-diffusion processes can be found in [36,37,38]. Additionally, another important contribution arises in the backstepping approach with its wide application to control, state, and parameter estimation of infinite-dimensional systems, where Krstic and his co-workers reported constructive studies on stabilization, adaptive control, and estimation of flow, and engine and beam systems [39,40,41,42,43].

Most of the existing work on state estimation of distributed parameter systems falls into two methods: early lumping and late lumping [2,44,45,46]. As for early lumping, one can firstly simplify distributed parameter systems into lumped parameter systems by utilizing spatial approximation or model order reduction. Then, traditional state estimation and/or control methods from finite-dimensional system theory can be exploited for the resulting early lumped systems. The widely-utilized early lumping methods are reported as: modal analysis (Galerkin’s method) [47,48], finite difference [49], proper orthogonal decomposition (POD) [50,51], finite element method (FEM) [52], FEM Galerkin cubic b-splines method [53], etc. In contrast, late lumping means that one conducts observer, filter, and/or controller design steps on the original infinite-dimensional space and applies spatial approximation later for simulation purposes, where the backstepping method [54,55], the adjoint-based approach [56], and the Crank–Nicolson method [57] are widely used. Compared to the late lumping method, early lumping is easier to realize and implement in practice, since a series of ordinary differential equations can be obtained as an approximation of the original partial differential equation systems, and there are numerous well-developed control methods for finite-dimensional systems already available. However, the early lumping method may suffer from the resulting high dimensionality problem and the lack of physical interpretation induced by the model reduction or spatial approximation. Hence, a late lumping approach is of significant interest in our work. Based on the Crank–Nicolson method, the authors previously extended these two classical observer designs (Luenberger observer and Kalman filter) to the field of state estimation for transport-reaction systems [57] (scalar distributed parameter systems) in a late lumping way. In this paper, we adopt the discrete-time infinite-dimensional Kalman filter design and apply it to more complex and realistic processes with boundary control actuation and point observation, including a pipeline transient model (water hammer equations) and damped wave equations.

The pipeline system is one of the most efficient, reliable, and utilized infrastructures to transport water/gas/oil between separate reservoirs [58]. The current interest of society, industry, state agencies, and academia in monitoring, operation, and management aspects of pipeline systems motivates a vast research effort related to pipeline systems. In particular, one important operating mode of pipeline systems is associated with valve closure in pipeline downstreams, which frequently happens during the normal operating procedures of liquid pipeline transport. The effect associated with this dynamical change in the pressure, velocity, and/or density is referred to as the so-called water hammer phenomenon [59], which has been frequently blamed for the devastating effect on the valves, structural integrity, and safety of pipeline systems, as shown in Figure 1. In addition, the importance of water hammer dynamics is associated with the recent findings that negative pressure propagation of the transients can result in contamination of portable water systems, which implies that demand for better understanding, efficient monitoring, and regulation of this phenomenon is urgent [60,61,62]. In particular, the hydraulic transients are critical design factors in a large number of fluid flow systems spanning from automotive fuel injection processes to large-scale water supply, transmission, and distribution systems [63]. Along with the pipeline developments, the mechanically-regulated fluid control devices, including many types of pumps and valves, in synergy with sophisticated electronic digital sensors and embedded digital controls, contribute to the complex process behaviour. To better monitor the potential water hammer phenomena and ensure the pipeline integrity, this manuscript addresses the state estimation problem of the stochastic water hammer equations via a discrete Kalman filter. More specifically, there are various versions of water hammer equations; for simplicity, the basic version with the form of linear bi-directional coupled hyperbolic PDEs is discussed in detail.

As for the wave equation, it has been extensively exploited in mathematical modelling of mechanical and/or light waves. The nature of the wave equation is given by a second-order-in-time linear hyperbolic PDE. Among existing contributions of the wave equation, an adaptive boundary control strategy was proposed for unstable wave equation with a backstepping method in [64]. Guo and his co-workers investigated output feedback stabilization and disturbance rejection control of the 1D anti-stable wave equation with [65,66]. In [67], a derivative-free nonlinear Kalman filter was designed for state estimation and fault diagnosis in distributed parameter systems. However, an early lumping method was utilized in the study with spatial order reduction, leading to a spatial approximation design. In our work, the novelty arises in a discrete-time infinite-dimensional Kalman filter design for the wave equation without any spatial approximation or order reduction.

Motivated by the superiority of condition monitoring with digital devices to account for the discrete nature of monitoring realization, we develop discrete DPS models of first-order coupled hyperbolic PDEs and second-order hyperbolic PDEs, which account for the infinite-dimensional nature of the pipeline hydraulic process and the wave equation. In particular, we deploy the Cayley–Tustin discretization framework so as to transfer the continuous PDEs into their discrete counterparts by avoiding model reduction and/or approximation. In this way, the discretized model preserves its structural properties (such as: stability, controllability, and observability); see [68,69]. Along the line of time discretization schemes for distributed parameter systems, we derive an appropriate discrete setting that is consistent with the standard finite-dimensional state-space setting associated with the well-known Kalman filter design. Finally, the extension of finite-dimensional Kalman filter design is provided in a closed form of a discrete infinite-dimensional distributed parameter system describing the water hammer and wave dynamics and accounts for naturally present noise in both output measurements and PDE states. The setting provides an obvious advantage since all discrete operators are ultimately bounded and there are no technical difficulties associated with the state space setting and filter realizations.

The rest of the manuscript is structured as follows: In the Mathematical Preliminaries Section, a general infinite-dimensional system framework is described and discretized with the aid of the Cayley–Tustin time discretization approach. After that, the standard, discrete-time two-step Kalman filter is realized for infinite-dimensional systems in Section 3, followed by two realistic process examples in Section 4 and Section 5. In Section 4, the water hammer equation is introduced, and linearization, boundary transformations, and time discretization with explicit representation of the resolvent operators of discrete water hammer equations are elaborated, followed by an associated numerical study. In Section 5, the wave system is described, discretized, and simulated with filter implementation. Finally, some conclusions are drawn in Section 6.

## 2. Mathematical Preliminaries

In this section, a general linear infinite-dimensional system structure is considered. Based on that, the well-known Cayley–Tustin method is utilized for model time discretization without spatial approximation or spatial order reduction. For the sake of time instance consistency associated with the model description utilized in classical Kalman filter design $\left({x}_{k}\right)\mapsto \left({y}_{k}\right)$, a new Cayley–Tustin time discretization framework is derived and applied to the output equation, resulting in novel expressions of ${\mathcal{C}}_{d}$ and ${\mathcal{D}}_{d}$ operators.

#### 2.1. Model Description

Let us consider a linear infinite-dimensional system given by the following general form:
where $\zeta \in [0,l]$ and $t\in [0,\infty )$ represent spatial and temporal coordinates, and the state $x(\xb7,t)\in \mathcal{X}$, with $\mathcal{X}={L}^{2}([0,l];\mathbb{R})$ defined as a separable Hilbert space. The input is $u\left(t\right)\in {L}_{loc}^{2}([0,\infty ),U)$ and the output $y\left(t\right)\in {L}_{loc}^{2}([0,\infty ),Y)$, with U and Y given as real Hilbert spaces. In this paper, let us assume that $\mathcal{A}$ is closed, leading to the domain $\mathcal{D}\left(\mathcal{A}\right)$, also being a Hilbert space equipped with the graph norm ${\parallel x\parallel}_{\mathcal{D}\left(\mathcal{A}\right)}^{2}:={\parallel x\parallel}_{\mathcal{X}}^{2}+{\parallel \mathcal{A}x\parallel}_{\mathcal{X}}^{2}$, and the corresponding resolvent set $\rho \left(\mathcal{A}\right)$ is not empty, with the norm given by ${\parallel x\parallel}_{\mathcal{D}\left(\mathcal{A}\right)}={\parallel (\alpha -\mathcal{A})x\parallel}_{\mathcal{X}}$ with an arbitrary constant $\alpha \in \rho \left(\mathcal{A}\right)$. One can denote ${\mathcal{X}}_{1}:=\mathcal{D}\left(\mathcal{A}\right)$ and apply the norm ${\parallel (\alpha -\mathcal{A})x\parallel}_{\mathcal{X}}$, which implies ${(\alpha -\mathcal{A})}^{-1}$ projecting $\mathcal{X}$ isometrically to ${\mathcal{X}}_{1}$ and results in the space ${\mathcal{X}}_{-1}$ as the completion of $\mathcal{X}$ with respect to the norm ${\parallel x\parallel}_{{\mathcal{X}}_{-1}}={\parallel {(\alpha -\mathcal{A})}^{-1}x\parallel}_{\mathcal{X}}$. Denoting a block operator node $\mathcal{S}:=\left[\begin{array}{c}\mathcal{A}\&\mathcal{B}\\ \mathcal{C}\&\mathcal{D}\end{array}\right]$ as a function $\mathcal{X}\times U\to \mathcal{X}\times Y$, we can define the operator node on $(\mathcal{X},U,Y)$ as below: (1) $\mathcal{A}$ is a densely-defined and closed operator on $\mathcal{X}$ with the resolvent set $\rho \left(\mathcal{A}\right)\ne \{\varnothing \}$; (2) $\mathcal{B}\in \mathcal{L}(U,{\mathcal{X}}_{-1})$; (3) $\mathcal{D}\left(\mathcal{S}\right)=\left\{\left[\begin{array}{c}x\\ u\end{array}\right]\in \mathcal{X}\times U:{\mathcal{A}}_{\mathsf{\Lambda}}x+\mathcal{B}u\in \mathcal{X}\right\}$, where ${\mathcal{A}}_{\mathsf{\Lambda}}$ is the extension of $\mathcal{A}$ and $\mathcal{D}\left(\mathcal{S}\right)$ is equipped with the graph norm $\parallel \left[\begin{array}{c}x\\ u\end{array}\right]{\parallel}_{\mathcal{D}\left(S\right)}^{2}:=\parallel {\mathcal{A}}_{\mathsf{\Lambda}}{x+\mathcal{B}u\parallel}_{\mathcal{X}}^{2}+{\parallel x\parallel}_{\mathcal{X}}^{2}+{\parallel u\parallel}_{U}^{2}$; (4) $\mathcal{C}\&\mathcal{D}\in \mathcal{L}\left(\mathcal{D}\right(\mathcal{S}),Y)$; see [57,70,71]. The mapping $\mathcal{S}:u(\xb7)\mapsto y(\xb7)$ is to project input to output, and the transfer function $\mathcal{G}\left(s\right)=\mathcal{C}{(sI-\mathcal{A})}^{-1}\mathcal{B}+\mathcal{D}$ is obtained by applying the Laplace transform. In addition, operators $\mathcal{B}$ and $\mathcal{C}$ stand for input and output operators, which can be spatially distributed or applied at the boundaries. In this manuscript, we denote ${\mathcal{A}}^{*}$ as the adjoint operator of $\mathcal{A}$ where $\langle \mathcal{A}\varphi ,\psi \rangle =\langle \varphi ,{\mathcal{A}}^{*}\psi \rangle $ with $\varphi \in \mathcal{D}\left(\mathcal{A}\right)$ and $\psi \in \mathcal{D}\left({\mathcal{A}}^{*}\right)$. For the considered water hammer and wave systems, there is no feedthrough operator, i.e., $\mathcal{D}=0$.

$$\begin{array}{ccc}\hfill \dot{x}(\zeta ,t)& =& \mathcal{A}x(\zeta ,t)+\mathcal{B}u\left(t\right),\phantom{\rule{1.em}{0ex}}x\left(0\right)={x}_{0}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill y\left(t\right)& =& \mathcal{C}x(\zeta ,t)+\mathcal{D}u\left(t\right)\hfill \end{array}$$

#### 2.2. Model Discretization

Continuous-time distributed parameter systems can be taken as good representations of complex industrial processes, while it is more practical and preferable for designers to come up with discrete-time models for observer, controller, and regulator design when it comes to actual implementation in digital devices.

Along this line of late lumping, this work utilizes the Crank–Nicolson time discretization framework for late lumping of DPSs, which can ensure a symmetric and symplectic numerical integration of linear systems without spatial approximation or model reduction [69,72,73,74].

Let us revisit the considered linear continuous-time infinite-dimensional system (1) and (2). By using the Crank–Nicolson discretization framework for a time discretization interval $\Delta t$, we discretize the process (1) and (2) as follows:
where the discrete- and continuous-time input signals are linked by: $\frac{u(k\Delta t)}{\sqrt{\Delta t}}=\frac{1}{\Delta t}{\int}_{(k-1)\Delta t}^{k\Delta t}u\left(t\right)dt$, similar to output approximation. This discretization framework preserves input-to-output mapping in the continuous time setting [69,73]. After simple manipulation, the associated discrete time system is described as below:
where the corresponding discrete-time spatial operators are denoted as:
and its transfer function is given as ${G}_{d}\left(z\right)={\mathcal{C}}_{d}z{(I-z{\mathcal{A}}_{d})}^{-1}{\mathcal{B}}_{d}+{\mathcal{D}}_{d}$ with ${z}^{-1}\in \rho \left({\mathcal{A}}_{d}\right)$. In addition, we denote the resolvent operator of $\mathcal{A}$ as $\mathcal{R}(s,\mathcal{A})(\xb7):={(sI-\mathcal{A})}^{-1}(\xb7)$ with $s\in \rho \left(\mathcal{A}\right)$ and the identity operator I, and $\mathcal{R}$ is a mapping from the initial state to the state solution in the Laplace domain, i.e., $x(\zeta ,s)=\mathcal{R}(\zeta ,s){x}_{0}$. Based on that, the discrete operators can be further expressed as:
where $\mathcal{G}\left(\delta \right)=\mathcal{C}{(\delta I-\mathcal{A})}^{-1}\mathcal{B}=\mathcal{C}\mathcal{R}(\zeta ,\delta )\mathcal{B}$ is a transfer function of the associated continuous system (1)–(2) with s evaluated at $\delta $, where $\delta =2/\Delta t$, and $\Delta t$ is the time discretization interval. Moreover, one can evaluate $s=\delta $ in the resolvent operator to get the specific expressions for ${\mathcal{A}}_{d}$, ${\mathcal{B}}_{d}$, ${\mathcal{C}}_{d}$, and ${\mathcal{D}}_{d}$ in Equation (8). During the Cayley–Tustin discretization, it is apparent that the resulting discrete operators preserve the spatial characteristics, and the discretized state ${x}_{k}$ and ${x}_{k-1}$ are spatial functions, which implies that the integration setting is applied in the time domain without spatial approximation and/or model reduction.

$$\begin{array}{ccc}\hfill \frac{x(k\Delta t)-x\left(\right(k-1)\Delta t)}{\Delta t}& \approx & \mathcal{A}\frac{x(k\Delta t)+x\left(\right(k-1)\Delta t)}{2}+\mathcal{B}u(k\Delta t),\phantom{\rule{1.em}{0ex}}x\left(0\right)={x}_{0}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill y(k\Delta t)& \approx & \mathcal{C}\frac{x(k\Delta t)+x\left(\right(k-1)\Delta t)}{2},\phantom{\rule{1.em}{0ex}}k\ge 1\hfill \end{array}$$

$$\begin{array}{ccc}\hfill x(k\Delta t)& =& {\mathcal{A}}_{d}x((k-1)\Delta t)+{\mathcal{B}}_{d}u(k\Delta t),\phantom{\rule{1.em}{0ex}}x\left(0\right)={x}_{0}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill y(k\Delta t)& =& {\mathcal{C}}_{d}x((k-1)\Delta t)+{\mathcal{D}}_{d}u(k\Delta t),\phantom{\rule{1.em}{0ex}}k\ge 1\hfill \end{array}$$

$$\begin{array}{c}{\mathcal{S}}_{d}:=\left[\begin{array}{cc}{\mathcal{A}}_{d}& {\mathcal{B}}_{d}\\ {\mathcal{C}}_{d}& {\mathcal{D}}_{d}\end{array}\right]=\left[\begin{array}{cc}{(\delta -\mathcal{A})}^{-1}(\delta +\mathcal{A})& \sqrt{2\delta}{(\delta -{\mathcal{A}}_{\mathsf{\Lambda}})}^{-1}\mathcal{B}\\ \sqrt{2\delta}\mathcal{C}{(\delta -\mathcal{A})}^{-1}& \mathcal{G}\left(\delta \right)\end{array}\right]\hfill \end{array}$$

$$\begin{array}{c}\hfill {\mathcal{S}}_{d}:=\left[\begin{array}{cc}{\mathcal{A}}_{d}& {\mathcal{B}}_{d}\\ {\mathcal{C}}_{d}& {\mathcal{D}}_{d}\end{array}\right]=\left[\begin{array}{cc}-I+2\delta \mathcal{R}(\delta ,\mathcal{A})& \sqrt{2}\delta \mathcal{R}(\delta ,{\mathcal{A}}_{\mathsf{\Lambda}})\mathcal{B}\\ \sqrt{2}\delta \mathcal{C}\mathcal{R}(\delta ,\mathcal{A})& \mathcal{G}\left(\delta \right)\end{array}\right]\end{array}$$

**Remark**

**1.**

For the sake of consistency in time instances, a new discretization structure is derived by manipulating the original state and output Equations (3) and (4) as below:
$$\begin{array}{ccc}\hfill x(k\Delta t)& =& {\mathcal{A}}_{d}x((k-1)\Delta t)+{\mathcal{B}}_{d}u(k\Delta t),\phantom{\rule{1.em}{0ex}}x\left(0\right)={x}_{0}\hfill \end{array}$$
with the associated discrete operators given as:
where ${\overline{\mathcal{C}}}_{d}$ and ${\overline{\mathcal{D}}}_{d}$ can be determined by evaluating $s=-\delta $ in the resolvent and transfer function. With Remark 1, one can map the current-step state $x(k\Delta t)$ into the current-step output $y(k\Delta t)$, which is suitable for the standard Kalman filter model structure. For the sake of simplicity, we denote $x(k\Delta t)$, $x\left(\right(k-1)\Delta t)$ as ${x}_{k}$ and ${x}_{k-1}$, similar for $u(k\Delta t)$ and $y(k\Delta t)$ in the ensuing sections.

$$\begin{array}{ccc}\hfill y(k\Delta t)& =& {\overline{\mathcal{C}}}_{d}x(k\Delta t)+{\overline{\mathcal{D}}}_{d}u(k\Delta t),\phantom{\rule{1.em}{0ex}}k\ge 1\hfill \end{array}$$

$$\begin{array}{c}\hfill \left[\begin{array}{cc}{\mathcal{A}}_{d}& {\mathcal{B}}_{d}\\ {\overline{\mathcal{C}}}_{d}& {\overline{\mathcal{D}}}_{d}\end{array}\right]=\left[\begin{array}{cc}-I+2\delta \mathcal{R}(\delta ,\mathcal{A})& \sqrt{2}\delta \mathcal{R}(\delta ,{\mathcal{A}}_{\mathsf{\Lambda}})B\\ -\sqrt{2}\delta \mathcal{C}\mathcal{R}(-\delta ,\mathcal{A})& \mathcal{G}(-\delta )\end{array}\right]\end{array}$$

#### 2.3. Stochastic Discrete Model

In this section, the discrete-time infinite-dimensional system is extended to a stochastic framework by adding the measurement and state noises in an affine manner. To ensure the time step consistency, we introduce process noise ${w}_{k}$ and output measurement noise ${v}_{k}$ to the novel discrete model (9) and (10) as follows:
with the same notations given in Equation (11). In particular, the process noise and output noise are given as independent Gaussian noises, i.e., ${w}_{k}\sim \mathcal{N}(0,{Q}_{k})$, ${v}_{k}\sim \mathcal{N}(0,{R}_{k})$, $E[{w}_{k}{w}_{j}^{T}]={Q}_{k}{\delta}_{k,j}$, $E[{v}_{k}{v}_{j}^{T}]={R}_{k}{\delta}_{k,j}$, $E[{v}_{k}{w}_{j}^{T}]=0$, where ${\delta}_{k,j}$ is the Dirac delta function, i.e., ${\delta}_{k,j}=1,\mathrm{if}\phantom{\rule{4.pt}{0ex}}k=j$ and ${\delta}_{k,j}=0$ otherwise. The process and output noises are added in the affine manner to the discrete-time model since it is more convenient to form a stochastic discrete-time infinite-dimensional model setting compared to the case of adding continuous-time noise signal and then applying discretization. In addition, we define a spatial function $\mathsf{\Phi}\left(\zeta \right)$ for the description of the state noise distribution in the spatial domain. For simplicity, we take $\mathsf{\Phi}\left(\zeta \right)=I\left(\zeta \right)$, where I denotes an identity function.

$$\begin{array}{cc}\hfill & {x}_{k}={\mathcal{A}}_{d}{x}_{k-1}+{\mathcal{B}}_{d}{u}_{k}+\Phi \left(\zeta \right){w}_{k-1},\phantom{\rule{1.em}{0ex}}x\left(0\right)={x}_{0}\hfill \end{array}$$

$$\begin{array}{c}{y}_{k}={\overline{\mathcal{C}}}_{d}{x}_{k}+{\overline{\mathcal{D}}}_{d}{u}_{k}+{v}_{k},\phantom{\rule{1.em}{0ex}}k\ge 1\hfill \end{array}$$

## 3. Discrete-Time Kalman Filter Design

In this section, a discrete-time two-step infinite-dimensional Kalman filter is constructed for state estimation of the stochastic discrete model (12) and (13), including a prediction step and a updating step, also referred as a priori estimation and a posteriori estimation [75]. In order to proceed to the design of the two-step Kalman filter, we denote that for a priori estimation, one has measurement up to $k-1$ steps, i.e., ${\widehat{x}}_{k}^{-}=E\left({x}_{k}\right|{y}_{1},\text{}{y}_{2},\text{}\dots ,\text{}{y}_{k-1})$, ${\widehat{P}}_{k}^{-}=E\left({P}_{k}\right|{y}_{1},\text{}{y}_{2},\text{}\dots ,\text{}{y}_{k-1})$; in a posteriori estimation, one has measurement up to k steps, i.e., ${\widehat{x}}_{k}^{+}=E\left({x}_{k}\right|{y}_{1},\text{}{y}_{2},\text{}\dots ,\text{}{y}_{k})$, ${\widehat{P}}_{k}^{+}=E\left({P}_{k}\right|{y}_{1},\text{}{y}_{2},\text{}\dots ,\text{}{y}_{k})$. In addition, we assume that all input information $\left\{{u}_{k}\right\}$ is available at any given time instant. As the first step, we estimate the initial condition of state ${\widehat{x}}_{0}^{+}$ and covariance ${P}_{0}^{+}$ as follows:
where the estimated initial state ${\widehat{x}}_{0}^{+}$ is independent of process and output noises. Based on the output measurement up to time step $k-1$, the prediction step is given as below:
With the output measurement ${y}_{k}$ accumulated to time step k, applying the recursive least squares estimation leads to the updating step as follows [75]:
This basic framework (14)–(20) extends a standard discrete-time finite-dimensional Kalman filter design algorithm [75]. Notably, some novelties arise in the following aspects. Compared to the scalar matrix (A, B, C, D) for finite-dimensional systems, this design introduces spatial operators (${\mathcal{A}}_{d}$, ${\mathcal{B}}_{d}$, ${\overline{\mathcal{C}}}_{d}$, ${\overline{\mathcal{D}}}_{d}$) induced by Cayley–Tustin time discretization. In addition, the covariance ${P}_{k}^{-}$ or ${P}_{k}^{+}$ is two-dimensional and self-adjoint with spatial characteristics, and the evolution given by Equations (16)–(18) preserves its self-adjoint and semi-positive definiteness because of the positive definiteness of ${Q}_{k}$ and ${R}_{k}$. Similarly, Kalman filter gain ${K}_{k}$ is endowed with spatial characteristics compared to its counterpart in lumped parameter system cases. Moreover, the treatment in the input time instance is also different. The current input ${u}_{k}$ (instead of ${u}_{k-1}$ in the standard Kalman filter design) is mapped to the formulation of the prior estimated state ${\widehat{x}}_{k}^{-}$ induced by state evolution dynamics given by Equation (17).

$$\begin{array}{cc}\hfill & {\widehat{x}}_{0}^{+}=E\left({x}_{0}\right)={\widehat{x}}_{0}\hfill \end{array}$$

$$\begin{array}{c}{P}_{0}^{+}=E\left[({x}_{0}-{\widehat{x}}_{0}^{+}){({x}_{0}-{\widehat{x}}_{0}^{+})}^{*}\right]={Q}_{0}\hfill \end{array}$$

$$\begin{array}{cc}\hfill {P}_{k}^{-}& ={\mathcal{A}}_{d}{P}_{k-1}^{+}{\mathcal{A}}_{d}^{*}+{Q}_{k-1}\hfill \\ & ={\mathcal{A}}_{d}{\left[{\mathcal{A}}_{d}{P}_{k-1}^{+}\right]}^{*}+{Q}_{k-1}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill {\widehat{x}}_{k}^{-}& =& {\mathcal{A}}_{d}{\widehat{x}}_{k-1}^{+}+{\mathcal{B}}_{d}{u}_{k}\hfill \end{array}$$

$$\begin{array}{cc}{K}_{k}\hfill & ={P}_{k}^{-}{\overline{\mathcal{C}}}_{d}^{*}{({\overline{\mathcal{C}}}_{d}{P}_{k}^{-}{\overline{\mathcal{C}}}_{d}^{*}+{R}_{k})}^{-1}\hfill \\ & ={\left({\overline{\mathcal{C}}}_{d}{P}_{k}^{-}\right)}^{*}{[{\overline{\mathcal{C}}}_{d}{\left({\overline{\mathcal{C}}}_{d}{P}_{k}^{-}\right)}^{*}+{R}_{k}]}^{-1}\hfill \end{array}$$

$$\begin{array}{cc}{P}_{k}^{+}\hfill & =(I-{K}_{k}{\overline{\mathcal{C}}}_{d}){P}_{k}^{-}{(I-{K}_{k}{\overline{\mathcal{C}}}_{d})}^{*}+{K}_{k}{R}_{k}{K}_{k}^{*}\hfill \\ & =I{P}_{k}^{-}{I}^{*}-{K}_{k}{\overline{\mathcal{C}}}_{d}{P}_{k}^{-}{I}^{*}-I{P}_{k}^{-}{\overline{\mathcal{C}}}_{d}^{*}{K}_{k}^{*}+{K}_{k}{\overline{\mathcal{C}}}_{d}{P}_{k}^{-}{\overline{\mathcal{C}}}_{d}^{*}{K}_{k}^{*}+{K}_{k}{R}_{k}{K}_{k}^{*}\hfill \\ & =I{P}_{k}^{-}{I}^{*}-{K}_{k}{\overline{\mathcal{C}}}_{d}{P}_{k}^{-}{I}^{*}-I{\left({\overline{\mathcal{C}}}_{d}{P}_{k}^{-}\right)}^{*}{K}_{k}^{*}+{K}_{k}{\overline{\mathcal{C}}}_{d}{\left({\overline{\mathcal{C}}}_{d}{P}_{k}^{-}\right)}^{*}{K}_{k}^{*}+{K}_{k}{R}_{k}{K}_{k}^{*}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill {\widehat{x}}_{k}^{+}& =& {\widehat{x}}_{k}^{-}+{K}_{k}({y}_{k}-{\overline{\mathcal{C}}}_{d}{\widehat{x}}_{k}^{-}-{\overline{\mathcal{D}}}_{d}{u}_{k})\hfill \end{array}$$

## 4. Single-Phase Pipeline Hydraulic Model

In this section, the so-called water hammer PDEs are used for pipeline hydraulic modelling in the continuous-time setting. In order to discretize the water hammer model, the Crank–Nicolson framework is utilized for time discretization without spatial approximation or spatial model order reduction. To determine the associated discrete operators, the resolvent operator is solved in a closed analytical form. Based on that, a discrete water hammer system is obtained in the discrete-time setting, and it is augmented with the measurement and state noise signals, which is amenable for discrete Kalman filter design [76].

#### 4.1. Model Description

In this section, a one-dimensional liquid flow is considered, and the flow is assumed to be viscous, locally compressible, and isothermal, which implies that the energy loss due to the friction effects and pressure changes can be neglected. In addition, the pipe is assumed to be a buried straight pipe without any elbow. By applying continuity balance law, momentum balance law, and the speed of sound of liquid flow, the following water hammer system is formulated [77]:
with associated boundary conditions given as follows:
where $v(\zeta ,t)$, $p(\zeta ,t)$, and $\rho (\zeta ,t)$ represent mass flow velocity, pressure, and liquid density, respectively. t and $\zeta $ are time and the spatial coordinate along the pipeline. $u\left(t\right)$ stands for the boundary control action on mass flow velocity at the upstream end. The multiplication term $gsin\alpha $ represents the $\zeta $-component of the gravity acceleration g; a stands for the velocity of sound in the liquid flow; $\lambda $ is a dimensionless friction coefficient given by the Colebrook equation (25) for turbulent flow (with a Reynolds number larger than 2320) and Equation (26) for laminar flow (with a Reynolds number smaller than 2320) [59,78].
where D represents the pipe inner diameter, $\frac{{k}_{R}}{D}$ is defined as the relative pipe roughness, and Re stands for the Reynolds number. The system of Equations (21)–(23) is often referred as the water hammer equations [77]. In the following sections, the numerical value of $\lambda $ is adopted from [77], and it is illustrated in Table 1 with other pipeline parameters, as well.

$$\begin{array}{cc}\hfill & \rho \frac{dv}{d\zeta}+\frac{d\rho}{dt}=0\end{array}$$

$$\begin{array}{c}\frac{dv}{dt}+\frac{1}{\rho}\frac{dp}{d\zeta}+g\mathrm{sin}\alpha +\frac{\lambda v\left|v\right|}{2D}=0\end{array}$$

$$\begin{array}{c}{a}^{2}=\frac{dp}{d\rho}\end{array}$$

$$\begin{array}{c}\hfill v(0,t)={v}_{0}+u\left(t\right),p({L}_{d},t)={p}_{0},\rho ({L}_{d},t)={\rho}_{0}\end{array}$$

$$\begin{array}{cc}\hfill & \frac{1}{\sqrt{\lambda}}=-2lo{g}_{10}\left(\frac{2.51}{Re\sqrt{\lambda}}+0.27\frac{{k}_{R}}{D}\right)\end{array}$$

$$\begin{array}{c}\lambda =\frac{64}{\mathrm{Re}}\end{array}$$

Plugging full derivatives of $\frac{d\mathsf{\Theta}}{dt}=\frac{\partial \mathsf{\Theta}}{\partial t}+v\frac{\partial \mathsf{\Theta}}{\partial \zeta}$ (where $\mathsf{\Theta}:=v$, p, or $\rho $) into the original distributed water hammer system described as Equations (21)–(23), one can easily obtain the following nonlinear infinite-dimensional pipeline system:

$$\begin{array}{cc}\hfill & \frac{\partial \rho}{\partial t}+v\frac{\partial \rho}{\partial \zeta}+\rho \frac{\partial v}{\partial \zeta}=0\end{array}$$

$$\begin{array}{c}\rho \frac{\partial v}{\partial t}+\rho v\frac{\partial v}{\partial \zeta}+\frac{\partial p}{\partial \zeta}+\rho g\mathrm{sin}\alpha +\rho \frac{\lambda v\left|v\right|}{2D}=0\end{array}$$

$$\begin{array}{c}\frac{\partial p}{\partial t}+v\frac{\partial p}{\partial \zeta}+{a}^{2}\rho \frac{\partial v}{\partial \zeta}=0\end{array}$$

#### 4.2. Model Linearization

In this section, a positive mass flow velocity v is firstly considered. In order to linearize the given nonlinear system of Equations (27)–(29), the steady state profiles are determined by forcing all temporal derivatives equal to zero in Equations (27)–(29) as follows:
By using the pipeline parameters in Table 1 and assuming the incoming liquid flow with boundary conditions of ${v}_{0}=2.05$ m/s, ${p}_{0}=1.68\times {10}^{6}$ Pa, and ${\rho}_{0}=680$ kg/m${}^{3}$, one can determine the steady states profiles as illustrated in Figure 2.

$$\begin{array}{cc}\hfill & {v}_{ss}\frac{\partial {\rho}_{ss}}{\partial \zeta}+{\rho}_{ss}\frac{\partial {v}_{ss}}{\partial \zeta}=0\end{array}$$

$$\begin{array}{c}{\rho}_{ss}{v}_{ss}\frac{\partial {v}_{ss}}{\partial \zeta}+\frac{\partial {p}_{ss}}{\partial \zeta}+{\rho}_{ss}g\mathrm{sin}\alpha +{\rho}_{ss}\frac{\lambda {v}_{ss}\left|{v}_{ss}\right|}{2D}=0\end{array}$$

$$\begin{array}{c}{v}_{ss}\frac{\partial {p}_{ss}}{\partial \zeta}+{a}^{2}{\rho}_{ss}\frac{\partial {v}_{ss}}{\partial \zeta}=0\end{array}$$

Then, a linearized water hammer system is obtained by applying the change of variables as $\overline{\mathsf{\Theta}}(\zeta ,t)=\mathsf{\Theta}(\zeta ,t)-{\mathsf{\Theta}}_{ss}(\zeta ,t)$ (where $\mathsf{\Theta}:=v$, p, or $\rho $) and the proceeding Taylor series expansion as follows:
with associated boundary conditions described as:
In the above derivation, a two-state system (pressure and velocity) is obtained by consideration of $\overline{p}=\overline{\rho}{a}^{2}$. For simplicity, a matrix form is further obtained as follows:
where all notations are defined as follows:

$$\begin{array}{cc}\hfill & \frac{\partial \overline{p}}{\partial t}+{v}_{ss}\frac{\partial \overline{p}}{\partial \zeta}+\overline{v}\frac{\partial {p}_{ss}}{\partial \zeta}+{a}^{2}{\rho}_{ss}\frac{\partial \overline{v}}{\partial \zeta}+\overline{p}\frac{\partial {v}_{ss}}{\partial \zeta}=0\end{array}$$

$$\begin{array}{c}\frac{\partial \overline{v}}{\partial t}+\left(\frac{\overline{p}{v}_{ss}}{{a}^{2}{\rho}_{ss}}+\overline{v}\right)\frac{\partial {v}_{ss}}{\partial \zeta}+{v}_{ss}\frac{\partial \overline{v}}{\partial \zeta}+\frac{1}{{\rho}_{ss}}\frac{\partial \overline{p}}{\partial \zeta}+\left(\frac{g\mathrm{sin}\alpha}{{a}^{2}{\rho}_{ss}}+\frac{\lambda {v}_{ss}^{2}}{2D{a}^{2}{\rho}_{ss}}\right)\overline{p}+\frac{\lambda \overline{v}{v}_{ss}}{D}=0\end{array}$$

$$\begin{array}{c}\hfill \overline{v}(0,t)=u\left(t\right),\overline{p}({L}_{d},t)=0,\overline{\rho}({L}_{d},t)=0\end{array}$$

$$\begin{array}{cc}\hfill & \frac{\partial}{\partial t}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]+\left[\begin{array}{cc}L& N\\ G& L\end{array}\right]\frac{\partial}{\partial \zeta}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]+\left[\begin{array}{cc}T& R\\ Q& F\end{array}\right]\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]=0\end{array}$$

$$\begin{array}{c}L={v}_{ss},\phantom{\rule{1.em}{0ex}}R=\frac{\partial {p}_{ss}}{\partial \zeta},\phantom{\rule{1.em}{0ex}}N={a}^{2}{\rho}_{ss},\phantom{\rule{1.em}{0ex}}T=\frac{\partial {v}_{ss}}{\partial \zeta},\phantom{\rule{1.em}{0ex}}G=\frac{1}{{\rho}_{ss}}\hfill \\ Q=\frac{{v}_{ss}}{{a}^{2}{\rho}_{ss}}\frac{\partial {v}_{ss}}{\partial \zeta}+\frac{g\mathrm{sin}\alpha}{{a}^{2}{\rho}_{ss}}+\frac{\lambda {v}_{ss}^{2}}{2D{a}^{2}{\rho}_{ss}},\phantom{\rule{1.em}{0ex}}F=\frac{\partial {v}_{ss}}{\partial \zeta}+\frac{\lambda {v}_{ss}}{D}\hfill \end{array}$$

As shown in Figure 2, the spatial derivative of steady velocity $\frac{\partial {v}_{ss}}{\partial \zeta}$ is close to zero (spatial variation across the space is small enough), so T can be treated as zero. Compared to the large numerical value of $N={a}^{2}{\rho}_{ss}$, the other terms L and R can be approximately neglected as zero. Along this line, a simplified matrix form is yielded and an output operator $\mathcal{C}$ is formulated to complete the infinite-dimensional water hammer system representation:
with $\mathcal{D}\left(\mathcal{A}\right)=\{x={\left[{\varphi}_{1}\left(\zeta \right),{\varphi}_{2}\left(\zeta \right)\right]}^{\prime}\in {L}_{2}(0,{L}_{d}),{\varphi}_{1}\left({L}_{d}\right)=0,{\varphi}_{2}\left(0\right)=u\left(t\right),$${\varphi}_{1}\left(\zeta \right)$, and ${\varphi}_{2}\left(\zeta \right)$ being absolutely continuous (abs. con.)}, and continuous-time spatial operators are defined as:
where $\delta \left(\zeta \right)$ and $\delta (\zeta -{L}_{d})$ are Dirac delta functions, while the corresponding notations are simplified as below:

$$\begin{array}{cc}\hfill & \frac{\partial}{\partial t}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]=\mathcal{A}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]\end{array}$$

$$\begin{array}{c}y\left(t\right)=\mathcal{C}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]\end{array}$$

$$\begin{array}{cc}\hfill & \mathcal{A}:=-\left[\begin{array}{cc}0& N\frac{\partial}{\partial \zeta}\\ Q+G\frac{\partial}{\partial \zeta}& F\end{array}\right]\end{array}$$

$$\begin{array}{c}\mathcal{C}:=\left[\begin{array}{cc}{\int}_{0}^{{L}_{d}}\delta \left(\zeta \right)(\xb7)d\zeta & 0\\ 0& {\int}_{0}^{{L}_{d}}\delta (\zeta -{L}_{d})(\xb7)d\zeta \end{array}\right]\end{array}$$

$$\begin{array}{c}N={a}^{2}{\rho}_{ss},G=\frac{1}{{\rho}_{ss}}\hfill \end{array}$$

$$\begin{array}{c}Q=\frac{g\mathrm{sin}\alpha}{{a}^{2}{\rho}_{ss}}+\frac{\lambda {v}_{ss}^{2}}{2D{a}^{2}{\rho}_{ss}},F=\frac{\lambda {v}_{ss}}{D}\hfill \end{array}$$

**Remark**

**2.**

As for negative velocity in Equations (27)–(29), the same linearization steps (30)–(36) can be replicated, and the linear water hammer model structure is identical to Equations (37) and (39) with the same notations of N and G given in Equation (41), but different expressions of Q and F, described as follows:

$$\begin{array}{c}\hfill Q=\frac{g\mathrm{sin}\alpha}{{a}^{2}{\rho}_{ss}}-\frac{\lambda {v}_{ss}^{2}}{2D{a}^{2}{\rho}_{ss}},F=-\frac{\lambda {v}_{ss}}{D}\end{array}$$

Up to now, a linearized infinite-dimensional continuous-time water hammer system with boundary control has been derived. To ensure the modelling consistency with the stochastic discrete model (12) and (13), the boundary control water hammer system is converted into an abstract in-domain control model in the next section.

#### 4.3. In-Domain Control Problem

In order to realize Kalman filter design, an in-domain control model is obtained from the boundary control model (37)–(40). In order to construct the spatial distribution function $\mathcal{B}$ that achieves the boundary to in-domain model transformation, the following theorem is utilized [3].

**Theorem**

**1.**

A boundary control PDE system ($\dot{z}=\overline{\mathcal{L}}z$ with boundary input operator $\overline{\mathcal{G}}z=u$) can be converted to an in-domain control PDE system ($\dot{z}=\overline{\mathcal{A}}z+\overline{\mathcal{B}}u$ with boundary condition $\overline{\mathcal{G}}z=0$) by solving the following inner product operator equation:
where $z\in X$, $u\in U$, $Z={\mathcal{H}}^{1}(0,\infty )$, $\overline{\mathcal{L}}\in L(Z,X)$, $\overline{\mathcal{G}}\in L(Z,U)$, $Z\subset X$, with X, Z and U are the state space, solution space and input space. Additionally, $z\in \mathcal{D}\left(\overline{\mathcal{L}}\right)$, $\psi \in \mathcal{D}\left({\overline{\mathcal{A}}}^{*}\right)$, ${X}_{1}=\mathrm{Ker}\phantom{\rule{0.277778em}{0ex}}\overline{\mathcal{G}}={\mathcal{H}}_{0}^{1}(0,\infty )$, and $\overline{\mathcal{A}}=\overline{\mathcal{L}}{|}_{{X}_{1}}$, where X, Z and ${X}_{1}$ are infinite-dimensional Hilbert spaces, (see pp. 317–322, in [3]).

$$\begin{array}{c}\u2329\overline{\mathcal{L}}z,\psi \u232a=\u2329z,{\overline{\mathcal{A}}}^{*}\psi \u232a+\u2329\overline{\mathcal{G}}z,{\overline{\mathcal{B}}}^{*}\psi \u232a\hfill \end{array}$$

By using the above Theorem 1, one can convert the boundary control model (37)–(40) into the in-domain control model as follows:
$$\begin{array}{c}y\left(t\right)=\mathcal{C}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]\end{array}$$
where:
$$\begin{array}{c}\mathcal{C}:=\left[\begin{array}{cc}{\int}_{0}^{{L}_{d}}\delta \left(\zeta \right)(\xb7)d\zeta & 0\\ 0& {\int}_{0}^{{L}_{d}}\delta (\zeta -{L}_{d})(\xb7)d\zeta \end{array}\right]\end{array}$$
with $\mathcal{D}\left({\mathcal{A}}_{1}\right)=\{x={\left[{\varphi}_{1}\left(\zeta \right),{\varphi}_{2}\left(\zeta \right)\right]}^{\prime}\in {L}_{2}(0,{L}_{d}),{\varphi}_{1}\left({L}_{d}\right)$$=0,{\varphi}_{2}\left(0\right)=0$, ${\varphi}_{1}\left(\zeta \right)$, and ${\varphi}_{2}\left(\zeta \right)$ being abs. con.} and $\delta \left(\zeta \right)$ defined as a Dirac delta function.

$$\begin{array}{cc}\hfill & \frac{\partial}{\partial t}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]={\mathcal{A}}_{1}\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]+\mathcal{B}u\left(t\right)\end{array}$$

$$\begin{array}{cc}\hfill & {\mathcal{A}}_{1}:=-\left[\begin{array}{cc}0& N\frac{\partial}{\partial \zeta}\\ Q+G\frac{\partial}{\partial \zeta}& F\end{array}\right],\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\mathcal{B}=\left[\begin{array}{c}N\delta \left(\zeta \right)\\ -\sqrt{NG}\delta \left(\zeta \right)\end{array}\right]\end{array}$$

**Proof.**

For the sake of simplicity, the following change of variables are applied:
Then, substituting Equation (49) into Equation (37) yields the following:
with state evolution operator $\overline{\mathcal{L}}$ described as:
where $\Delta =\frac{\sqrt{\frac{N}{G}}Q-F}{2}$, $\mathsf{\Pi}=\frac{\sqrt{\frac{N}{G}}Q+F}{2}$ and the corresponding domain given as $\mathcal{D}\left(\overline{\mathcal{L}}\right)=\{x={\left[{\varphi}_{1}\left(\zeta \right),{\varphi}_{2}\left(\zeta \right)\right]}^{\prime}\in {L}_{2}(0,{L}_{d}),{\varphi}_{1}\left({L}_{d}\right)+{\varphi}_{2}\left({L}_{d}\right)=0,-{\varphi}_{1}\left(0\right)+{\varphi}_{2}\left(0\right)=\sqrt{\frac{N}{G}}u\left(t\right),$, ${\varphi}_{1}\left(\zeta \right)$, and ${\varphi}_{2}\left(\zeta \right)$ being abs. con.$\}.$

$$\begin{array}{c}\left[\begin{array}{c}\overline{x}(\zeta ,t)\\ \overline{y}(\zeta ,t)\end{array}\right]=\left[\begin{array}{cc}\frac{1}{2}& -\frac{1}{2}\sqrt{\frac{N}{G}}\\ \frac{1}{2}& \frac{1}{2}\sqrt{\frac{N}{G}}\end{array}\right]\left[\begin{array}{c}\overline{p}(\zeta ,t)\\ \overline{v}(\zeta ,t)\end{array}\right]\hfill \end{array}$$

$$\begin{array}{c}\frac{\partial}{\partial t}\left[\begin{array}{c}\overline{x}(\zeta ,t)\\ \overline{y}(\zeta ,t)\end{array}\right]=\overline{\mathcal{L}}\left[\begin{array}{c}\overline{x}(\zeta ,t)\\ \overline{y}(\zeta ,t)\end{array}\right]\hfill \end{array}$$

$$\begin{array}{c}\hfill \overline{\mathcal{L}}=\left[\begin{array}{cc}\sqrt{NG}\frac{\partial}{\partial \zeta}+\Delta & \mathsf{\Pi}\\ -\Delta & -\sqrt{NG}\frac{\partial}{\partial \zeta}-\mathsf{\Pi}\end{array}\right]\end{array}$$

Then, to convert the boundary control model into the associated in-domain control counterpart with respect to new states ${[\overline{x}(\zeta ,t),\overline{y}(\zeta ,t)]}^{\prime}$, we consider the following system:

$$\begin{array}{c}\frac{\partial}{\partial t}\left[\begin{array}{c}\overline{x}(\zeta ,t)\\ \overline{y}(\zeta ,t)\end{array}\right]=\overline{\mathcal{A}}\left[\begin{array}{c}\overline{x}(\zeta ,t)\\ \overline{y}(\zeta ,t)\end{array}\right]+\overline{\mathcal{B}}u\left(t\right)\hfill \end{array}$$

It is apparent that $\overline{\mathcal{A}}$ has the same expression as $\overline{\mathcal{L}}$, but with a different domain defined as $\mathcal{D}\left(\overline{\mathcal{A}}\right)=\{x={\left[{\varphi}_{1}\left(\zeta \right),{\varphi}_{2}\left(\zeta \right)\right]}^{\prime}\in {L}_{2}(0,{L}_{d}),{\varphi}_{1}\left({L}_{d}\right)+{\varphi}_{2}\left({L}_{d}\right)=0,{\varphi}_{1}\left(0\right)-{\varphi}_{2}\left(0\right)=0,$, ${\varphi}_{1}\left(\zeta \right)$, and ${\varphi}_{2}\left(\zeta \right)$ being abs. con.$\}.$

By solving the inner product equation $\langle \mathcal{A}{\varphi}_{1},{\varphi}_{2}\rangle =\langle {\varphi}_{1},{\mathcal{A}}^{*}{\varphi}_{2}\rangle $, one can readily get:
with the associated domain defined as $\mathcal{D}\left({\overline{\mathcal{A}}}^{*}\right)=\{x={\left[{\varphi}_{1}\left(\zeta \right),{\varphi}_{2}\left(\zeta \right)\right]}^{\prime}\in {L}_{2}(0,{L}_{d}),{\varphi}_{1}\left({L}_{d}\right)+{\varphi}_{2}\left({L}_{d}\right)=0,{\varphi}_{1}\left(0\right)-{\varphi}_{2}\left(0\right)=0.$. ${\varphi}_{1}\left(\zeta \right)$ and ${\varphi}_{2}\left(\zeta \right)$ are abs. con.$\}.$

$$\begin{array}{c}\hfill {\overline{\mathcal{A}}}^{*}=\left[\begin{array}{cc}-\sqrt{NG}\frac{\partial}{\partial \zeta}+\Delta & -\Delta \\ \mathsf{\Pi}& \sqrt{NG}\frac{\partial}{\partial \zeta}-\mathsf{\Pi}\end{array}\right]\end{array}$$

Along this line, one can utilize Theorem 1 to yield the following expression:
where the boundary control operator is defined as: $\overline{\mathcal{G}}=[-{\int}_{0}^{{L}_{d}}\delta \left(\zeta \right)(\xb7)d\zeta ,{\int}_{0}^{{L}_{d}}\delta \left(\zeta \right)(\xb7)d\zeta ]$, ${[{z}_{1},{z}_{2}]}^{\prime}\in \mathcal{D}\left(\overline{\mathcal{L}}\right)$, and ${[{\psi}_{1},{\psi}_{2}]}^{\prime}\in \mathcal{D}\left({\overline{\mathcal{A}}}^{*}\right)$. Through simple manipulation, one can solve for $\overline{\mathcal{B}}$ as: $\overline{\mathcal{B}}={[N\delta \left(\zeta \right),0]}^{T}$. □

$$\begin{array}{c}\begin{array}{c}\u2329\overline{\mathcal{L}}\left[\begin{array}{c}{z}_{1}\\ {z}_{2}\end{array}\right],\left[\begin{array}{c}{\psi}_{1}\\ {\psi}_{2}\end{array}\right]\u232a=\u2329\left[\begin{array}{c}{z}_{1}\\ {z}_{2}\end{array}\right],{\overline{\mathcal{A}}}^{*}\left[\begin{array}{c}{\psi}_{1}\\ {\psi}_{2}\end{array}\right]\u232a+\u2329\overline{\mathcal{G}}\left[\begin{array}{c}{z}_{1}\\ {z}_{2}\end{array}\right],{\overline{\mathcal{B}}}^{*}\left[\begin{array}{c}{\psi}_{1}\\ {\psi}_{2}\end{array}\right]\u232a\hfill \end{array}\hfill \end{array}$$

Finally, one can attain the control action operator $\mathcal{B}$ corresponding to the original states ${[\overline{v}(\zeta ,t),\overline{p}(\zeta ,t)]}^{\prime}$ by using inverse linear transformation in Equation (49) as follows:
Up to now, a standard linearized continuous-time infinite-dimensional water hammer system (45)–(48) with in-domain control has been obtained.

$$\begin{array}{c}\hfill \mathcal{B}=\left[\begin{array}{c}N\delta \left(\zeta \right)\\ -\sqrt{NG}\delta \left(\zeta \right)\end{array}\right]\end{array}$$

#### 4.4. Model Discretization

In order to realize a corresponding discrete-time pipeline system in the form of Equations (9) and (10) with the notations given in Equation (11), the resolvent operator needs to be determined beforehand for the considered infinite-dimensional pipeline system representation, as an important link to connect continuous- and discrete-time models. Since the resolvent operator is only related to the ${\mathcal{A}}_{1}$ operator in Equation (45), one can directly apply Laplace transformation to Equation (45) without consideration of the input injection operator $\mathcal{B}$ as follows:
where:
Furthermore, one can define ${e}^{M\zeta}$ in the following form:
It is simple to solve for ${e}^{M\zeta}$ in the following analytic expression:
where $\vartheta $ and $\varrho $ are denoted as follows:
Finally, the distributed parameter pipeline system can be manipulated in the following compact form:
By substituting boundary conditions $\overline{p}({L}_{d},s)=0$ and $\overline{v}(0,s)=0$, one can solve for the expression of $\overline{p}(0,s)$ such that the resolvent operators are generated as follows:
where:
with all notations given by Equations (59) and (60). Up to now, a linear infinite-dimensional discrete-time water hammer system has been derived. In the same manner as Equations (12) and (13), the corresponding stochastic linear infinite-dimensional discrete-time water hammer system can be yielded.

$$\begin{array}{cc}\hfill & \left[\begin{array}{c}\overline{p}(\zeta ,s)\\ \overline{v}(\zeta ,s)\end{array}\right]={e}^{M\zeta}\left[\begin{array}{c}\overline{p}(0,s)\\ \overline{v}(0,s)\end{array}\right]+{\int}_{0}^{\zeta}{e}^{M(\zeta -\eta )}{{A}_{0}}^{-1}\left[\begin{array}{c}\overline{p}(\eta ,0)\\ \overline{v}(\eta ,0)\end{array}\right]d\eta \end{array}$$

$$\begin{array}{cc}\hfill & {A}_{0}=\left[\begin{array}{cc}0& N\\ G& 0\end{array}\right],\phantom{\rule{0.277778em}{0ex}}{B}_{0}=\left[\begin{array}{cc}s& 0\\ Q& F+s\end{array}\right],\phantom{\rule{0.277778em}{0ex}}M=-{{A}_{0}}^{-1}{B}_{0}\end{array}$$

$$\begin{array}{c}{e}^{M\zeta}=\left[\begin{array}{cc}{M}_{11}(\zeta ,s)& {M}_{12}(\zeta ,s)\\ {M}_{21}(\zeta ,s)& {M}_{22}(\zeta ,s)\end{array}\right]\end{array}$$

$$\begin{array}{c}\left\{\begin{array}{c}{M}_{11}(\zeta ,s)=[cosh\left(\vartheta \zeta \right)-\frac{\varrho}{\vartheta}sinh\left(\vartheta \zeta \right)]{e}^{-\varrho \zeta}\hfill \\ {M}_{12}(\zeta ,s)=-\frac{2(F+s)}{2\vartheta G}sinh\left(\vartheta \zeta \right){e}^{-\varrho \zeta}\hfill \\ {M}_{21}(\zeta ,s)=-\frac{s}{\vartheta N}sinh\left(\vartheta \zeta \right){e}^{-\varrho \zeta}\hfill \\ {M}_{22}(\zeta ,s)=[cosh\left(\vartheta \zeta \right)+\frac{\varrho}{\vartheta}sinh\left(\vartheta \zeta \right)]{e}^{-\varrho \zeta}\hfill \end{array}\right.\hfill \end{array}$$

$$\begin{array}{c}\hfill \left\{\begin{array}{c}\vartheta =\frac{\sqrt{N(N{Q}^{2}+4G{s}^{2}+4FGs)}}{2NG}\hfill \\ \varrho =\frac{Q}{2G}\hfill \end{array}\right.\end{array}$$

$$\begin{array}{c}\left[\begin{array}{c}\overline{p}(\zeta ,s)\\ \overline{v}(\zeta ,s)\end{array}\right]=\left[\begin{array}{cc}{M}_{11}(\zeta ,s)& {M}_{12}(\zeta ,s)\\ {M}_{21}(\zeta ,s)& {M}_{22}(\zeta ,s)\end{array}\right]\left[\begin{array}{c}\overline{p}(0,s)\\ \overline{v}(0,s)\end{array}\right]+\hfill \\ {\int}_{0}^{\zeta}\left[\begin{array}{cc}{M}_{11}(\zeta -\eta ,s)& {M}_{12}(\zeta -\eta ,s)\\ {M}_{21}(\zeta -\eta ,s)& {M}_{22}(\zeta -\eta ,s)\end{array}\right]{A}_{0}^{-1}\left[\begin{array}{c}\overline{p}(\eta ,0)\\ \overline{v}(\eta ,0)\end{array}\right]d\eta \hfill \end{array}$$

$$\begin{array}{c}\left[\begin{array}{c}\overline{p}(\zeta ,s)\\ \overline{v}(\zeta ,s)\end{array}\right]=\left[\begin{array}{cc}{\mathcal{R}}_{11}(s,M)& {\mathcal{R}}_{12}(s,M)\\ {\mathcal{R}}_{21}(s,M)& {\mathcal{R}}_{22}(s,M)\end{array}\right]\left[\begin{array}{c}\overline{p}(\eta ,0)\\ \overline{v}(\eta ,0)\end{array}\right]\hfill \end{array}$$

$$\begin{array}{c}\left\{\begin{array}{c}{\mathcal{R}}_{11}(s,M)(\xb7)=-\frac{{M}_{11}(\zeta ,s)}{{M}_{11}({L}_{d},s)N}{\int}_{0}^{{L}_{d}}{M}_{12}({L}_{d}-\eta ,s)(\xb7)d\eta +\frac{1}{N}{\int}_{0}^{\zeta}{M}_{12}(\zeta -\eta ,s)(\xb7)d\eta \hfill \\ {\mathcal{R}}_{12}(s,M)(\xb7)=-\frac{{M}_{11}(\zeta ,s)}{{M}_{11}({L}_{d},s)G}{\int}_{0}^{{L}_{d}}{M}_{11}({L}_{d}-\eta ,s)(\xb7)d\eta +\frac{1}{G}{\int}_{0}^{\zeta}{M}_{11}(\zeta -\eta ,s)(\xb7)d\eta \hfill \\ {\mathcal{R}}_{21}(s,M)(\xb7)=-\frac{{M}_{21}(\zeta ,s)}{{M}_{11}({L}_{d},s)N}{\int}_{0}^{{L}_{d}}{M}_{12}({L}_{d}-\eta ,s)(\xb7)d\eta +\frac{1}{N}{\int}_{0}^{\zeta}{M}_{22}(\zeta -\eta ,s)(\xb7)d\eta \hfill \\ {\mathcal{R}}_{22}(s,M)(\xb7)=-\frac{{M}_{21}(\zeta ,s)}{{M}_{11}({L}_{d},s)G}{\int}_{0}^{{L}_{d}}{M}_{11}({L}_{d}-\eta ,s)(\xb7)d\eta +\frac{1}{G}{\int}_{0}^{\zeta}{M}_{21}(\zeta -\eta ,s)(\xb7)d\eta \hfill \end{array}\right.\hfill \end{array}$$

#### 4.5. Simulation Results of the Water Hammer Equation

In this section, the developed discrete-time Kalman filter design procedures (14)–(20) are applied to the resulting stochastic linear infinite-dimensional discrete-time water hammer system. In addition, the temporal and spatial intervals are 8 s and 500 m. As for the plant and measurement noises, we take ${w}_{k}\sim \mathcal{N}(0,{Q}_{k})$, ${v}_{k}\sim \mathcal{N}(0,{R}_{k})$, $E\left[{w}_{k}{w}_{j}^{T}\right]={Q}_{k}{\delta}_{k,j}$, $E\left[{v}_{k}{v}_{j}^{T}\right]={R}_{k}{\delta}_{k,j}$, $E\left[{v}_{k}{w}_{j}^{T}\right]=0$, with ${R}_{k}=0.01$ and ${Q}_{k}=0.001$. In particular, the initial conditions and the control action are given as follows:
Based on that, the stochastic model dynamic and the associated filtering performance are simulated, as shown in Figure 3, Figure 4, Figure 5, Figure 6 and Figure 7. The transient velocity and pressure are considered here, and it is apparent that the profiles roughly follow the periodic wave trend, induced by the input action, but they are quite noisy in Figure 4. After applying the developed discrete Kalman filter, one can easily see that the noise has been filtered out, and the original dynamic evolution is revealed, which verifies the effectiveness of the proposed discrete Kalman filter, as shown in Figure 3 and Figure 5. As shown in Figure 6, the estimation errors are relatively small compared to the real state magnitudes. From the output filtering perspective in Figure 7, one can readily observe that the noisy pressure and velocity at boundary ends are quite noisy, as shown in the blue dashed lines, and the proposed Kalman filter can smooth out the noisy output profiles and make the filtered output converge to real output profiles, as shown in red dashed lines and green solid lines. In addition, the overall simulation time is 160 s. In this manuscript, the simulations are carried out based on MATLAB R2017a on a MacBook Pro 2017 (processor: 3.1 GHz, IntelCore i5’ memory: 8 GB 2133 MHz LPDDR3; operation system: Mac OS Sierra 10.12.06).

$$\begin{array}{cc}\hfill & {\overline{p}}_{0}\left(\zeta \right)=-0.1\frac{d{p}_{ss}}{d\zeta}({L}_{d}-\zeta ),{\overline{v}}_{0}\left(\zeta \right)=10\frac{d{v}_{ss}}{d\zeta}\zeta \end{array}$$

$$\begin{array}{c}u\left(t\right)=0.0021\mathrm{sin}\left(0.0021\pi t\right)+0.0021\end{array}$$

To account for the potential model mismatch, we consider the effect of process noises on output filtering performance. More specifically, we simulate ${Q}_{k}=[0.0005:0.0005:0.005]$ under the same measurement noise with a fixed covariance ${R}_{k}=0.01$. To quantity the estimation accuracy, we calculate the root-mean-squared-error (RMSE) based on the real (noise-free) outputs. To account for the randomness of the generated noises, we simulate ten times and calculate the average value of RMSE. As shown in Figure 8, we can observe that the estimation RMSE increases with the process noise ${Q}_{k}$ increase. A proper selection of ${Q}_{k}$ is in the range of [0.0005,0.0015] where the RMSE of pressure and velocity is relatively small.

## 5. Wave System

#### 5.1. Model Description

In this section, we consider a damped wave equation varying within a 1D spatial domain z with a unit length, boundary control, and observation as follows:
where $\kappa $, $\rho $, and T represent the model parameter, mass density, and Young’s modulus. For the sake of simplicity, we assume these parameters are constants.

$$\begin{array}{cc}\hfill & \frac{{\partial}^{2}}{\partial {t}^{2}}w\left(z,t\right)=\frac{1}{\rho \left(z\right)}\frac{\partial}{\partial z}\left(T\left(z\right)\frac{\partial}{\partial z}w\left(z,t\right)\right)\hfill \end{array}$$

$$\begin{array}{c}T\left(z\right)\frac{\partial}{\partial z}w\left(1,t\right)+\kappa \frac{\partial}{\partial t}w\left(1,t\right)=0\hfill \end{array}$$

$$\begin{array}{c}u\left(t\right)=T\left(z\right)\frac{\partial}{\partial z}w\left(0,t\right)\hfill \end{array}$$

$$\begin{array}{c}y\left(t\right)=\frac{\partial}{\partial t}w\left(0,t\right)\hfill \end{array}$$

To obtain a state-space model, an extended state is introduced as follows:
where $x\in X={L}_{2}([0,1];{\mathbb{R}}^{2})$, and the updated plant is described as the following boundary control model:
with the model evolution operators defined as below:
where $\mathcal{D}\left(\mathcal{L}\right):=\{x={[{x}_{1},\phantom{\rule{0.277778em}{0ex}}{x}_{2}]}^{T}\in X:\phantom{\rule{0.277778em}{0ex}}Hx\in {X}^{1}([0,1];{\mathbb{R}}^{2}),\frac{\kappa}{\rho}{x}_{1}\left(1\right)+T{x}_{2}\left(1\right)=0,\phantom{\rule{0.277778em}{0ex}}{x}_{2}\left(0\right)=u\},$ and $\delta \left(z\right)$ is the Dirac delta function applied at $z=0$. The eigenvalues are given by ${\lambda}_{k}=\frac{1}{2}\sqrt{\frac{T}{\rho}}log\left(\frac{\sqrt{\rho T}-\kappa}{\sqrt{\rho T}+\kappa}\right)+\sqrt{\frac{T}{\rho}}k\pi i$ for $k\in \mathbb{Z}$, and we further assume $\kappa <\sqrt{\rho T}$ to adopt a stable wave system for the ensuing model analysis and Kalman filter design; see [79].

$$\begin{array}{c}\hfill x\left(z,t\right)=\left[\begin{array}{c}{x}_{1}\left(z,t\right)\\ {x}_{2}\left(z,t\right)\end{array}\right]=\left[\begin{array}{c}\rho \frac{\partial w\left(z,t\right)}{\partial t}\\ \frac{\partial w\left(z,t\right)}{\partial z}\end{array}\right]\end{array}$$

$$\begin{array}{cc}\hfill & \frac{\partial}{\partial t}x(z,t)=\mathcal{L}x(z,t)\hfill \end{array}$$

$$\begin{array}{c}Gx(z,t)=u\left(t\right)\hfill \end{array}$$

$$\begin{array}{cc}\hfill & \mathcal{L}(\xb7):=\left[\begin{array}{cc}0& T\\ \frac{1}{\rho}& 0\end{array}\right]\frac{\partial}{\partial z}\left(\xb7\right)\hfill \end{array}$$

$$\begin{array}{c}G(\xb7):=\left[\begin{array}{cc}0& T\delta \left(z\right)\end{array}\right](\xb7)\hfill \end{array}$$

Let us revisit Theorem 1 and generate the following abstract in-domain state space model:
where:
where $\mathcal{D}\left(\mathcal{A}\right):=\{x={[{x}_{1},\phantom{\rule{0.277778em}{0ex}}{x}_{2}]}^{T}\in X:\phantom{\rule{0.277778em}{0ex}}Hx\in {X}^{1}([0,1];{\mathbb{R}}^{2}),\frac{\kappa}{\rho}{x}_{1}\left(1\right)+T{x}_{2}\left(1\right)=0,\phantom{\rule{0.277778em}{0ex}}{x}_{2}\left(0\right)=0\}$. In addition, the feedthrough operator from the input to the output $\mathcal{D}$ is zero.

$$\begin{array}{cc}\hfill & \frac{\partial}{\partial t}x(z,t)=\mathcal{A}x(z,t)+\mathcal{B}u\left(t\right)\hfill \end{array}$$

$$\begin{array}{c}y\left(t\right)=\mathcal{C}x(z,t)\hfill \end{array}$$

$$\begin{array}{cc}\hfill & \mathcal{A}(\xb7):=\left[\begin{array}{cc}0& T\\ \frac{1}{\rho}& 0\end{array}\right]\frac{\partial}{\partial z}\left(\xb7\right)\hfill \end{array}$$

$$\begin{array}{c}\mathcal{B}(\xb7):=\left[\begin{array}{cc}-\delta \left(z\right)& 0\end{array}\right](\xb7)\hfill \end{array}$$

$$\begin{array}{c}\mathcal{C}(\xb7):=\left[\frac{1}{\rho}{\int}_{0}^{1}\delta \left(z\right)(\xb7)dz\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\right]\hfill \end{array}$$

**Proof.**

It is apparent to show that $\mathcal{A}$ has the same expression as $\mathcal{L}$, but a different domain as: $\mathcal{D}\left(\mathcal{A}\right):=\{x={[{x}_{1},\phantom{\rule{0.277778em}{0ex}}{x}_{2}]}^{T}\in X:\phantom{\rule{0.277778em}{0ex}}Hx\in {X}^{1}([0,1];{\mathbb{R}}^{2}),\frac{\kappa}{\rho}{x}_{1}\left(1\right)+T{x}_{2}\left(1\right)=0,\phantom{\rule{0.277778em}{0ex}}T{x}_{2}\left(0\right)=0\}$. Based on $\langle \mathcal{A}\varphi ,\psi \rangle =\langle \varphi ,{\mathcal{A}}^{*}\psi \rangle $, one can readily obtain:
with the associated domain as: $\mathcal{D}\left({\mathcal{A}}^{*}\right):=\{\psi ={[{\psi}_{1},\phantom{\rule{0.277778em}{0ex}}{\psi}_{2}]}^{T}\in X:\phantom{\rule{0.277778em}{0ex}}H\psi \in {X}^{1}([0,1];{\mathbb{R}}^{2}),\kappa {\psi}_{1}\left(1\right)-{\psi}_{2}\left(1\right)=0,\phantom{\rule{0.277778em}{0ex}}{\psi}_{2}\left(0\right)=0\}$. By using the inner product formula (44), one can eventually solve for $\mathcal{B}(\xb7):={\left[\begin{array}{cc}-\delta \left(z\right)& 0\end{array}\right]}^{T}(\xb7)$. □

$$\begin{array}{c}\hfill {\mathcal{A}}^{*}(\xb7):=\left[\begin{array}{cc}0& -\frac{1}{\rho}\\ -T& 0\end{array}\right]\frac{\partial}{\partial z}\left(\xb7\right)\end{array}$$

#### 5.2. Model Discretization

As a key of the realization of discrete operators by using the Cayley–Tustin discretization method, we apply the Laplace transform to the plant (74) as follows:
After simple manipulation, this leads to:
where:
Then, we have the following solution by simple integration:
where:
Using the boundary conditions of the model (74) and (75) given by $\mathcal{D}\left(\mathcal{A}\right)$, we can solve for ${x}_{2}(0,s)=0$ and:
Plugging the above Equation (84) into Equation (83) leads to:
Then, the resolvent operator is given as below:
Finally, one can substitute Equation (87) into Equations (9)–(11) to generate the discrete wave equation system with associated discrete-time operators.

$$\begin{array}{c}\hfill sx(z,s)-x(z,0)=\left[\begin{array}{cc}0& T\\ \frac{1}{\rho}& 0\end{array}\right]\frac{\partial}{\partial z}x(z,s)\end{array}$$

$$\begin{array}{c}\hfill \frac{\partial}{\partial z}x(z,s)=\left[\begin{array}{cc}0& \rho s\\ \frac{s}{T}& 0\end{array}\right]x(z,s)-\left[\begin{array}{cc}0& \rho \\ \frac{1}{T}& 0\end{array}\right]x(z,0)={A}_{0}x(z,s)-{B}_{0}x(z,0)\end{array}$$

$$\begin{array}{c}\hfill {A}_{0}=\left[\begin{array}{cc}0& \rho s\\ \frac{s}{T}& 0\end{array}\right],\phantom{\rule{0.277778em}{0ex}}{B}_{0}=\left[\begin{array}{cc}0& \rho \\ \frac{1}{T}& 0\end{array}\right]\end{array}$$

$$\begin{array}{c}\hfill x(z,s)={e}^{{A}_{0}z}x(0,s)-{\int}_{0}^{z}{e}^{{A}_{0}(z-\eta )}{B}_{0}x(z,0)d\eta \end{array}$$

$$\begin{array}{c}\hfill {e}^{{A}_{0}z}=\left[\begin{array}{cc}\mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}sz\right)& \sqrt{\rho T}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}sz\right)\\ \frac{1}{\sqrt{\rho T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}sz\right)& \mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}sz\right)\end{array}\right]\end{array}$$

$$\begin{array}{cc}{x}_{1}(z,s)\hfill & =\frac{\rho}{\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}sz\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}sz\right)}{\int}_{0}^{1}[{\textstyle \frac{\kappa}{\sqrt{\rho T}}}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)]{x}_{1}(\eta ,0)\\ & +[\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)]{x}_{2}(\eta ,0)d\eta \end{array}$$

$$\begin{array}{c}x(z,s)=\frac{\rho}{\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}sz\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}sz\right)}\left[\begin{array}{c}\mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}sz\right)\\ \frac{1}{\sqrt{\rho T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}sz\right)\end{array}\right]\times \hfill \\ {\left[\begin{array}{c}{\int}_{0}^{1}[\frac{\kappa}{\sqrt{\rho T}}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)](\xb7)d\eta \\ {\int}_{0}^{1}[\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)](\xb7)d\eta \end{array}\right]}^{T}x(\eta ,0)d\eta \hfill \\ -{\int}_{0}^{z}\left[\begin{array}{cc}\sqrt{\frac{\rho}{T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)& \rho \mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)\\ \frac{1}{\sqrt{T}}\mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)& \sqrt{\frac{\rho}{T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)\end{array}\right]x(\eta ,0)d\eta \hfill \end{array}$$

$$\begin{array}{c}R(z,s)(\u2022)=\frac{\rho}{\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}sz\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}sz\right)}\left[\begin{array}{c}\mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}sz\right)\\ \frac{1}{\sqrt{\rho T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}sz\right)\end{array}\right]\times \hfill \\ {\left[\begin{array}{c}{\int}_{0}^{1}[\frac{\kappa}{\sqrt{\rho T}}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)](\xb7)d\eta \\ {\int}_{0}^{1}[\sqrt{\rho T}sinh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)+\kappa cosh\left(\sqrt{\frac{\rho}{T}}s(1-\eta )\right)](\xb7)d\eta \end{array}\right]}^{T}(\u2022)d\eta \hfill \\ -{\int}_{0}^{z}\left[\begin{array}{cc}\sqrt{\frac{\rho}{T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)& \rho \mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)\\ \frac{1}{\sqrt{T}}\mathrm{cosh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)& \sqrt{\frac{\rho}{T}}\mathrm{sinh}\left(\sqrt{\frac{\rho}{T}}s(z-\eta )\right)\end{array}\right](\u2022)d\eta \hfill \end{array}$$

#### 5.3. Simulation Results for the Wave Equation

In this section, we proceed with the discrete Kalman filter design for the resulting discretized wave equation system. More specifically, we take the numerical parameters as: $\rho =0.01$, $T=255$, $\kappa =0.85$. In addition, the temporal and spatial intervals are 1 s and 0.02 m. As for the plant and measurement noises, we adopt ${w}_{k}\sim \mathcal{N}(0,{Q}_{k})$, ${v}_{k}\sim \mathcal{N}(0,{R}_{k})$, $E\left[{w}_{k}{w}_{j}^{T}\right]={Q}_{k}{\delta}_{k,j}$, $E\left[{v}_{k}{v}_{j}^{T}\right]={R}_{k}{\delta}_{k,j}$, $E\left[{v}_{k}{w}_{j}^{T}\right]=0$, with ${R}_{k}=100$ and ${Q}_{k}=0.1$. Here, a relatively large value of R is set because of the amplified output induced by the small numerical value of $\rho $. The initial conditions and input signal are described as below:
To elaborate the performance of the developed Kalman filter of the waver system, we present three simulation scenarios here, including: noise-free system, stochastic system, and filtered case. After 40 s of simulation, we emulate the noise-free state evolution, as shown in Figure 9. It is apparent that the two states ${x}_{1}(z,t)=\rho \frac{\partial w(z,t)}{\partial t}$ and ${x}_{2}(z,t)=\frac{\partial w(z,t)}{\partial z}$ follow sinusoidal wave propagation naturally. In the stochastic state profiles, the actual states are masked by noise, as in Figure 10. By using the discrete-time Kalman filter design, the noise has been filtered out from the stochastic system, leading to original state periodic propagation profiles, which can be seen in Figure 11. The effectiveness of the proposed Kalman filter can also be verified through the small state estimation errors in Figure 12 and output filtering performance in Figure 13 as well. As shown in Figure 13, we can readily see that the output is perfectly smoothed and reconstructed with the existence of process and measurement noises.

$$\begin{array}{cc}\hfill & {x}_{0}\left(z\right)=\left[\begin{array}{c}0.1\mathrm{cos}(\mathrm{z}\pi )\\ 0.1\mathrm{sin}(0.5\mathrm{z}\pi )\end{array}\right]\hfill \end{array}$$

$$\begin{array}{c}u\left(t\right)=150\mathrm{sin}\left(0.1532\pi t\right)\hfill \end{array}$$

To consider the potential model mismatch, we simulate ${Q}_{k}=[0.05:0.05:0.5]$ under the same measurement noise with a fixed covariance ${R}_{k}=100$ and utilize RMSE to evaluate the estimation accuracy. As shown in Figure 14, it is apparent that with the process noise ${Q}_{k}$ increase, the RMSE of estimated output goes up rapidly, where each RMSE value is given based on the averaging of ten simulations. In this case, the estimation RMSE is small enough in the range of ${Q}_{k}=[0.05:0.05:0.5]$, which can be applied in real-world applications.

## 6. Conclusions

In this work, we developed the discrete-time infinite-dimensional Kalman filter design for state estimation of linear distributed parameter systems with boundary controls and point observations. Using the Crank–Nicolson framework, a novel discrete-time distributed parameter system structure was derived and realized without spatial approximation or model order reduction. Based on that, a two-step infinite-dimensional discrete-time Kalman filter was developed with consideration of the spatial distribution of the process noise. To elaborate the filtering performance, two practical models with boundary control action applied were considered in this work, including a linear coupled hyperbolic PDE pipeline system (as a spectral system) and a 1D boundary damped wave model (as a non-spectral system). To account for the effect of process noise on estimation accuracy, we calculated the RMSE of estimated outputs under various simulation scenarios with different process noises and found that under the same measurement noise, with the process noise increase, the estimation RMSE went up. In the future, we will consider the constraint and stability issue and further extend the proposed design into nonlinear DPS models and applications.

## Author Contributions

Conceptualization, J.X. and S.D.; Formal Analysis, J.X.; Methodology, J.X. and S.D.; Software, J.X.; Supervision, S.D.; Validation, J.X.; Visualization, J.X.; Writing, Original Draft, J.X.; Writing, Review and Editing, J.X. and S.D.

## Funding

This research received no external funding.

## Acknowledgments

We thank the anonymous reviewers for their constructive comments.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Curtain, R.F.; Zwart, H. An Introduction to Infinite-Dimensional Linear Systems Theory; Springer-Verlag: New York, NY, USA, 1995. [Google Scholar]
- Ray, W.H. Advanced Process Control; McGraw-Hill: New York, NY, USA, 1981. [Google Scholar]
- Tucsnak, M.; Weiss, G. Observation and Control for Operator Semigroups; Springer Science & Business Media: Basel, Switzerland, 2009. [Google Scholar]
- Yu, T.K.; Seinfeld, J.H. Observability and optimal measurement location in linear distributed parameter systems. Int. J. Control
**1973**, 18, 785–799. [Google Scholar] [CrossRef] - Temam, R. Infinite-Dimensional Dynamical Systems in Mechanics and Physics; Springer Science & Business Media: New York, NY, USA, 2012; Volume 68. [Google Scholar]
- Wu, R.B.; Tarn, T.J.; Li, C.W. Smooth controllability of infinite-dimensional quantum-mechanical systems. Phys. Rev. A
**2006**, 73, 012719. [Google Scholar] [CrossRef] - Bastin, G.; Dochain, D. On-Line Estimation and Adaptive Control of Bioreactors; Elsevier Science Pub. B. V.: Amsterdam, The Netherlands, 1990. [Google Scholar]
- Dochain, D.; Babary, J.P.; Tali-Manaar, M.N. Modeling and Adaptive Control of Nonlinear Distributed Parameter Bioreactors via Orthogonal Collocation. Automatica
**1992**, 68, 873–883. [Google Scholar] [CrossRef] - Renard, P.; Dochain, D.; Bastin, G.; Naveau, H.; Nyns, E.J. Adaptive Control of Anaerobic Digestion Processes: A Pilot-scale Application. Biotechnol. Bioeng.
**1988**, 31, 287–294. [Google Scholar] [CrossRef] [PubMed] - Werner, J. Distributed-Parameter-Control of Human Body-Temperature. IFAC Proc. Vol.
**1975**, 8, 328–334. [Google Scholar] [CrossRef] - Nagaiah, C.; Kunisch, K.; Plank, G. Numerical solution for optimal control of the reaction-diffusion equations in cardiac electrophysiology. Comput. Optim. Appl.
**2011**, 49, 149–178. [Google Scholar] [CrossRef] - Chakrabarty, S.P.; Hanson, F.B. Optimal control of drug delivery to brain tumors for a distributed parameters model. In Proceedings of the American Control Conference, Portland, OR, USA, 8–10 June 2005; pp. 973–978. [Google Scholar]
- Schenk, O.; Manguoglu, M.; Sameh, A.; Christen, M.; Sathe, M. Parallel scalable PDE-constrained optimization: Antenna identification in hyperthermia cancer treatment planning. Comput. Sci.-Res. Dev.
**2009**, 23, 177–183. [Google Scholar] [CrossRef] - Ray, W.H. Some recent applications of distributed parameter systems theory: A survey. Automatica
**1978**, 14, 281–287. [Google Scholar] [CrossRef] - Luo, Z.H.; Guo, B.Z.; Morgül, Ö. Stability and Stabilization of Infinite Dimensional Systems with Applications; Springer Science & Business Media: London, UK, 2012. [Google Scholar]
- Tzafestas, S.G. Distributed Parameter Control Systems: Theory and Application; Elsevier: Amsterdam, The Netherlands, 2013; Volume 6. [Google Scholar]
- Kalman, R.E. A New Approach to Linear Filtering and Prediction Problems. Trans. ASME J. Basic Eng.
**1960**, 82, 35–45. [Google Scholar] [CrossRef] - Welch, G.; Bishop, G. An Introduction to the Kalman Filter; University of North Carolina at Chapel Hill: Chapel Hill, NC, USA, 1995. [Google Scholar]
- Luenberger, D.G. Observing the state of a linear system. IEEE Trans. Mil. Electron.
**1964**, 8, 74–80. [Google Scholar] [CrossRef] - Luenberger, D. Observers for multivariable systems. IEEE Trans. Autom. Control
**1966**, 11, 190–197. [Google Scholar] [CrossRef] - Luenberger, D. An introduction to observers. IEEE Trans. Autom. Control
**1971**, 16, 596–602. [Google Scholar] [CrossRef] - Dochain, D. State and parameter estimation in chemical and biochemical processes: A tutorial. J. Process Control
**2003**, 13, 801–818. [Google Scholar] [CrossRef] - Dochain, D. State estimation in chemical and biochemical processes with uncertain kinetics. Ind. Eng. Chem. Res.
**2002**, 41, 4777. [Google Scholar] - Bastin, G. On-Line Estimation and Adaptive Control of Bioreactors; Elsevier: Amsterdam, The Netherlands, 2013; Volume 1. [Google Scholar]
- Ali, J.M.; Hoang, N.H.; Hussain, M.A.; Dochain, D. Review and classification of recent observers applied in chemical process systems. Comput. Chem. Eng.
**2015**, 76, 27–41. [Google Scholar] - Christofides, P.D. Control of nonlinear distributed process systems: Recent developments and challenges. AIChE J.
**2001**, 47, 514–518. [Google Scholar] [CrossRef] - Dubljevic, S.; Mhaskar, P.; El-Farra, N.H.; Christofides, P.D. Predictive control of transport-reaction processes. Comput. Chem. Eng.
**2005**, 29, 2335–2345. [Google Scholar] [CrossRef] - Christofides, P.D. Nonlinear and Robust Control of PDE Systems: Methods and Applications to Transport-Reaction Processes; Springer Science & Business Media: New York, NY, USA, 2012. [Google Scholar]
- Christofides, P.D.; Scattolini, R.; de la Pena, D.M.; Liu, J. Distributed model predictive control: A tutorial review and future research directions. Comput. Chem. Eng.
**2013**, 51, 21–41. [Google Scholar] [CrossRef] - Lao, L.; Ellis, M.; Christofides, P.D. Economic model predictive control of parabolic PDE systems: Addressing state estimation and computational efficiency. J. Process Control
**2014**, 24, 448–462. [Google Scholar] [CrossRef] - Zeitz, M. Observability canonical (phase-variable) form for non-linear time-variable systems. Int. J. Syst. Sci.
**1984**, 15, 949–958. [Google Scholar] [CrossRef] - Zeitz, M. The extended Luenberger observer for nonlinear systems. Syst. Control Lett.
**1987**, 9, 149–156. [Google Scholar] [CrossRef] - Mangold, M.; Lauschke, G.; Schaffner, J.; Zeitz, M.; Gilles, E.D. State and parameter estimation for adsorption columns by nonlinear distributed parameter state observers. J. Process Control
**1994**, 4, 163–172. [Google Scholar] [CrossRef] - Zeitz, M. Nonlinear observers for chemical reactors. In Fortschrittberichte der VDI-Zeitschriften; VDI-Verlag: Duesseldorf, Germany, 1977. [Google Scholar]
- Bitzer, M.; Zeitz, M. Design of a nonlinear distributed parameter observer for a pressure swing adsorption plant. J. Process Control
**2002**, 12, 533–543. [Google Scholar] [CrossRef] - Bück, A.; Peglow, M.; Tsotsas, E.; Mangold, M.; Kienle, A. Model-based measurement of particle size distributions in layering granulation processes. AIChE J.
**2011**, 57, 929–941. [Google Scholar] [CrossRef] - Bakir, T.; Othman, S.; Fevotte, G.; Hammouri, H. Non linear observer for the reconstruction of crystal size distributions in polymorphic crystallization processes. IFAC Proc. Vol.
**2006**, 39, 667–672. [Google Scholar] [CrossRef] - Pourkargar, D.B.; Armaou, A. Dynamic shaping of transport–reaction processes with a combined sliding mode controller and Luenberger-type dynamic observer design. Chem. Eng. Sci.
**2015**, 138, 673–684. [Google Scholar] [CrossRef] - Krstic, M.; Kanellakopoulos, I.; Petar, V. Nonlinear Adaptive Control Design; Wiley: New York, NY, USA, 1995. [Google Scholar]
- Di Meglio, F.; Vazquez, R.; Krstic, M. Stabilization of a system of n + 1 coupled first-order hyperbolic linear PDEs with a single boundary input. IEEE Trans. Autom. Control
**2013**, 58, 3097–3111. [Google Scholar] [CrossRef] - Krstic, M.; Fontaine, D.; Kokotovic, P.V.; Paduano, J.D. Useful nonlinearities and global stabilization of bifurcations in a model of jet engine surge and stall. IEEE Trans. Autom. Control
**1998**, 43, 1739–1745. [Google Scholar] [CrossRef] - Aamo, O.M.; Krstic, M. Flow Control by Feedback: Stabilization and Mixing; Springer Science & Business Media: London, UK, 2013. [Google Scholar]
- Smyshlyaev, A.; Guo, B.Z.; Krstic, M. Arbitrary decay rate for Euler-Bernoulli beam by backstepping boundary feedback. IEEE Trans. Autom. Control
**2009**, 54, 1134–1140. [Google Scholar] [CrossRef] - Meditch, J. On state estimation for distributed parameter systems. J. Frankl. Inst.
**1970**, 290, 49–59. [Google Scholar] [CrossRef] - VandeWouwer, A.; Zeitz, M. State Estimation in Distributed Parameter Systems. In Encyclopedia of Life Support Systems (EOLSS): Control Systems, Robotics and Automation; EOLSS Publishers: London, UK, 2003. [Google Scholar]
- Hidayat, Z.; Babuska, R.; De Schutter, B.; Nunez, A. Observers for linear distributed-parameter systems: A survey. In Proceedings of the 2011 IEEE International Symposium on Robotic and Sensors Environments (ROSE), Montreal, QC, Canada, 17–18 September 2011; pp. 166–171. [Google Scholar]
- Yang, Y.; Dubljevic, S. Linear matrix inequalities (LMIs) observer and controller design synthesis for parabolic PDE. Eur. J. Control
**2014**, 20, 227–236. [Google Scholar] [CrossRef] - Xu, X.; Huang, B.; Dubljevic, S. Optimal continuous-time state estimation for linear finite and infinite-dimensional chemical process systems with state constraints. J. Process Control
**2015**, 35, 127–142. [Google Scholar] [CrossRef] - Kreuzinger, T.; Bitzer, M.; Marquardt, W. State estimation of a stratified storage tank. Control Eng. Pract.
**2008**, 16, 308–320. [Google Scholar] [CrossRef] - John, T.; Guay, M.; Hariharan, N.; Naranayan, S. POD-based observer for estimation in Navier–Stokes flow. Comput. Chem. Eng.
**2010**, 34, 965–975. [Google Scholar] [CrossRef] - Lehmann, O.; Luchtenburg, M.; Noack, B.R.; King, R.; Morzynski, M.; Tadmor, G. Wake stabilization using POD Galerkin models with interpolated modes. In Proceedings of the 44th IEEE Conference on Decision and Control, Seville, Spain, 15 December 2005; pp. 500–505. [Google Scholar]
- Van Waterschoot, T.; Leus, G. Distributed estimation of static fields in wireless sensor networks using the finite element method. In Proceedings of the 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Kyoto, Japan, 25–30 March 2012; pp. 2853–2856. [Google Scholar]
- Mechhoud, S.; Witrant, E.; Dugard, L.; Moreau, D. Estimation of heat source term and thermal diffusion in tokamak plasmas using a Kalman filtering method in the early lumping approach. IEEE Trans. Control Syst. Technol.
**2014**, 23, 449–463. [Google Scholar] [CrossRef] - Smyshlyaev, A.; Krstic, M. Backstepping observers for a class of parabolic PDEs. Syst. Control Lett.
**2005**, 54, 613–625. [Google Scholar] [CrossRef] - Jadachowski, L.; Meurer, T.; Kugi, A. Backstepping observers for linear PDEs on higher-dimensional spatial domains. Automatica
**2015**, 51, 85–97. [Google Scholar] [CrossRef] - Nguyen, V.T.; Georges, D.; Besançon, G. State and parameter estimation in 1-D hyperbolic PDEs based on an adjoint method. Automatica
**2016**, 67, 185–191. [Google Scholar] [CrossRef] - Xie, J.; Xu, Q.; Ni, D.; Dubljevic, S. Observer and filter design for linear transport-reaction systems. Eur. J. Control
**2019**. [Google Scholar] [CrossRef] - Puust, R.; Kapelan, Z.; Savic, D.; Koppel, T. A review of methods for leakage management in pipe networks. Urban Water J.
**2010**, 7, 25–45. [Google Scholar] [CrossRef] - Streeter, V.L.; Wylie, E.B.; Bedford, K.W. Fluid Mechanics. WCB; McGraw-Hill: New York, NY, USA, 1998. [Google Scholar]
- Ferrante, M.; Brunone, B.; Meniconi, S. Wavelets for the analysis of transient pressure signals for leak detection. J. Hydraul. Eng.
**2007**, 133, 1274–1282. [Google Scholar] [CrossRef] - Wang, S.; Carroll, J.J. Leak detection for gas and liquid pipelines by transient modelling. In Proceedings of the International Oil & Gas Conference and Exhibition in China, Beijing, China, 5–7 December 2006; pp. 1–9. [Google Scholar]
- Colombo, A.F.; Lee, P.; Karney, B.W. A selective literature review of transient-based leak detection methods. J. Hydro-Environ. Res.
**2009**, 2, 212–227. [Google Scholar] [CrossRef] - Vítkovskỳ, J.P.; Simpson, A.R.; Lambert, M.F. Leak detection and calibration using transients and genetic algorithms. J. Water Resour. Plan. Manag.
**2000**, 126, 262–265. [Google Scholar] [CrossRef] - Krstic, M. Adaptive control of an anti-stable wave PDE. In Proceedings of the 2009 American Control Conference, St. Louis, MO, USA, 10–12 June 2009; pp. 1505–1510. [Google Scholar]
- Zhou, H.C.; Guo, B.Z.; Wu, Z.H. Output feedback stabilisation for a cascaded wave PDE-ODE system subject to boundary control matched disturbance. Int. J. Control
**2016**, 89, 2396–2405. [Google Scholar] [CrossRef] - Feng, H.; Guo, B.Z. A new active disturbance rejection control to output feedback stabilization for a one-dimensional anti-stable wave equation with disturbance. IEEE Trans. Autom. Control
**2016**, 62, 3774–3787. [Google Scholar] [CrossRef] - Rigatos, G.G. A Kalman Filtering approach of improved precision for fault diagnosis in distributed parameter systems. arXiv
**2013**, arXiv:1310.3358. [Google Scholar] - Hairer, E.; Lubich, C.; Wanner, G. Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations; Springer Series in Computational Mathematics; Springer: Berlin, Germany, 2002; Volume 31. [Google Scholar]
- Havu, V.; Malinen, J. The Cayley transform as a time discretization scheme. Numer. Funct. Anal. Optim.
**2007**, 28, 825–851. [Google Scholar] [CrossRef] - Staffans, O. Well-Posed Linear Systems; Cambridge University Press: Cambridge, UK, 2005; Volume 103. [Google Scholar]
- Malinen, J.; Staffans, O.; Weiss, G. When is a linear system conservative? Q. Appl. Math.
**2006**, 64, 61–91. [Google Scholar] [CrossRef] - Xu, Q.; Dubljevic, S. Linear model predictive control for transport-reaction processes. AIChE J.
**2017**, 63, 2644–2659. [Google Scholar] [CrossRef] - Havu, V.; Malinen, J. Laplace and Cayley transforms—An approximation point of view. In Proceedings of the 44th IEEE Conference on Decision and Control, 2005 and 2005 European Control Conference, CDC-ECC’05, Seville, Spain, 15 December 2005; pp. 5971–5976. [Google Scholar]
- Malinen, J. Tustin’s method for final state approximation of conservative dynamical systems. IFAC Proc. Vol.
**2011**, 44, 4564–4569. [Google Scholar] [CrossRef] - Simon, D. Optimal State Estimation: Kalman, H
_{∞}, and Nonlinear Approaches; John Wiley & Sons: Hoboken, NJ, USA, 2006. [Google Scholar] - Xie, J.; Xu, X.; Dubljevic, S. Long range pipeline leak detection and localization using discrete observer and support vector machine. AIChE J.
**2019**, 65, e16532. [Google Scholar] [CrossRef] - Blažič, S.; Matko, D.; Geiger, G. Simple model of a multi-batch driven pipeline. Math. Comput. Simul.
**2004**, 64, 617–630. [Google Scholar] [CrossRef] - Colebrook, C.F.; Blench, T.; Chatley, H.; Essex, E.; Finniecome, J.; Lacey, G.; Williamson, J.; Macdonald, G. Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws. J. Inst. Civ. Eng.
**1939**, 12, 393–422. [Google Scholar] [CrossRef] - Dubljevic, S.; Humaloja, J.P. Model Predictive Control for Regular Linear Systems. arXiv
**2018**, arXiv:1808.10021. [Google Scholar]

**Figure 1.**Effects of water hammer dynamics. (Cited from: https://en.wikipedia.org/wiki/Water_hammer).

Term | Notation | Numerical Value |
---|---|---|

Pipeline Length | ${L}_{d}$ | 10,000 m |

Speed of Sound | a | 1059 m/s |

Friction Coefficient | $\lambda $ | 0.0158 |

Gravity Acceleration | g | $9.81$ m/s |

Pipe Diameter | D | $0.2065$ m |

Inclination Angle | $\alpha $ | −0.00256 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).