# Non-minimal state-space polynomial form of the Kalman filter for a general noise model

E. D. Wilson, Quentin Clairon, C. J. Taylor

► To cite this version:

E. D. Wilson, Quentin Clairon, C. J. Taylor. Non-minimal state-space polynomial form of the Kalman filter for a general noise model. Electronics Letters, 2018, 54 (4), pp.204-206. 10.1049/el.2017.3577. hal-03165492

HAL Id: hal-03165492

https://hal.science/hal-03165492

Submitted on 10 Mar 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Non-minimal state-space polynomial form of
the Kalman filter for a general noise model

E.D. Wilson, Q. Clairon and C.J. Taylor

The optimal refined instrumental variable method for the estimation of the Box–Jenkins (BJ) model is modified so that it functions as an optimal filter and state-estimation algorithm. In contrast to the pre-viously developed minimal and non-minimal state-space (NMSS) forms for an Auto-Regressive Moving Average with eXogenous variables (ARMAX) model, the new algorithm requires the introduc-tion of a novel extended NMSS form. This facilitates representation of the more general noise component of the BJ model. The approach can be used for adaptive filtering and state variable feedback control.

**Introduction:** The interesting links between state and parameter estimation have been commented on ever since the publication of Kalman's seminal work [1–3]. Young [4], for example shows how the state-space Kalman filter representation of a discrete-time system can be converted, in the asymptotic case, into the transfer function form. The refined instrumental variable (RIV) method of recursive parameter estimation is used to estimate the coefficients of this model [5] and hence, following some manipulation, generate the optimal filtered output ŷ_k and states ẋ_k. Among several important improvements in recent years, the latest RIV methods (e.g. [6], [2] pp. 200–212, [7] pp 218–226) facilitate the estimation of the following Box–Jenkins (BJ) model, expressed here in single-input u_k, single-output y_k form for brevity

$$
y_k = \frac{B(z^{-1})}{A(z^{-1})} u_k + \frac{D(z^{-1})}{C(z^{-1})} e_k \quad (1)
$$

where $e_k = \mathcal{N}(0, \sigma^2)$, $A(z^{-1}) = 1 + a_1 z^{-1} + \dots + a_n z^{-n}$, $B(z^{-1}) = b_1 z^{-1} + \dots + b_m z^{-m}$, $C(z^{-1}) = 1 + c_1 z^{-1} + \dots + c_p z^{-p}$ and $D(z^{-1}) = 1 + d_1 z^{-1} + \dots + d_q z^{-q}$, in which $z^{-1}$ is the backward shift operator, i.e. $z^{-1} y_k = y_{k-1}$. Although the associated 'RIVBJ' algorithm is relatively computationally expensive, for some estimation problems it proves essential (see references above for examples).

However, the minimal canonical state space form utilised to implement the Kalman filter in [4], always yields an Auto-Regressive Moving Average eXogenous variables (ARMAX) model, i.e. similar to (1) but constrained by C(z⁻¹) = A(z⁻¹). Furthermore, while Taylor et al. [7], and other prior work cited within, use a non-minimal state-space (NMSS) model for generalised digital control, including linear quadratic Gaussian (LQG) design with a Kalman filter, it is similarly limited to the ARMAX model form. Hence, this Letter develops a novel extended stochastic NMSS representation for the more general system in (1). This result completes the link between the latest RIVBJ estimation algorithm and adaptive optimal filtering and can be conveniently exploited for practical control system design.

**Background:** Consider the following stochastic state-space model:

$$
\mathbf{x}_k = \mathbf{F}\mathbf{x}_{k-1} + \mathbf{g}\mathbf{u}_{k-1} + \mathbf{w}_k, \quad y_k = \mathbf{h}\mathbf{x}_k + \boldsymbol{\epsilon}_k \quad (2)
$$

where $w_k = \mathcal{N}(0, N)$ and $\epsilon_k = \mathcal{N}(0, \sigma^2)$ represent state disturbances and measurement noise respectively, and $N$ is a positive semi-definite covariance matrix. The Kalman filter representation is

$$
\hat{\mathbf{x}}_k = \mathbf{F}\hat{\mathbf{x}}_{k-1} + \mathbf{g}\mathbf{u}_{k-1} + \mathbf{L}_k e_{k-1}, \quad y_k = \mathbf{h}\hat{\mathbf{x}}_k + e_k \quad (3)
$$

where $e_k$ are the innovations, with $e_k = \mathcal{N}(0, \sigma^2)$. Introducing $z^{-1}$ to (3)
and assuming $L_k$ converges to $L$, yields

$$
y_k = qg z^{-1} u_k + (qLz^{-1} + 1)e_k \quad \text{where} \quad q = h(I - Fz^{-1})^{-1} \quad (4)
$$

The non-minimal state vector most typically associated with (2) is

$$
\mathbf{x}_k = [y_k \cdots y_{k-n+1} \quad u_{k-1} \cdots u_{k-m+1}]' \quad (5)
$$

for which {$\mathbf{F}, \mathbf{g}$} are fully defined in many earlier articles [7]. In this
case, (4) is equivalent to an ARMAX model [7, 8]. A similar result is
stated by Young [4] for a minimal observable canonical form.

**Proposition:** To express the 'full' BJ model (1) in stochastic state-space form, the NMSS state vector is extended as follows:

$$
\mathbf{x}_k = [ y_k \ y_{k-1} \ \cdots \ y_{k-(N+1)} \ u_{k-1} \ u_{k-2} \ \cdots \ u_{k-M+1} ]^T \quad (6)
$$

where $\mathcal{N} = n + p$ and $\mathcal{M} = m + p$. Evaluating $A(z^{-1})C(z^{-1}) = 1 + \alpha_1 z^{-1} + \dots + a_N z^{-N}$ and $B(z^{-1})C(z^{-1}) = \beta_1 z^{-1} + \dots + \beta_M z^{-M}$, the state matrices in (2) are

$$
F = \begin{bmatrix}
-\alpha_1 & -\alpha_2 & \cdots & -\alpha_{\mathcal{N}-1} & -\alpha_{\mathcal{N}} & \beta_2 & \beta_3 & \cdots & \beta_{\mathcal{M}-1} & \beta_{\mathcal{M}} \\
1 & 0 & \cdots & 0 & 0 & 0 & 0 & \cdots & 0 & 0 \\
0 & 1 & \cdots & 0 & 0 & 0 & 0 & \cdots & 0 & 0 \\
\vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \ddots & \ddots & \ddots & \vdots \\
0 & 0 & \cdots & 1 & 0 & 0 & 0 & \cdots & 0 & 0 \\
0 & 0 & \cdots & 0 & 0 & 0 & 0 & \cdots & 0 & 0 \\
0 & 0 & \cdots & 0 & 0 & 1 & 0 & \cdots & 0 & 0 \\
\vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \ddots & \ddots & \ddots & \vdots \\
0 & 0 & \cdots & 0 & 0 & 0 & 0 & \cdots & 1 & 0
\end{bmatrix}
\tag{7}
$$

$$
\mathbf{g} = [ \beta_1 \ 0 \ \dots \ 0 \ 0 \ 1 \ 0 \dots \ 0 \ 0 ]' \quad (8)
$$

$$
\mathbf{h} = [1 \ 0 \ \dots \ 0 \ 0 \ 0 \ 0 \ \dots \ 0 \ 0] \quad (9)
$$

The equivalence between the polynomial representation (1) and the
state-space model based on (6) is demonstrated in the following.

**Demonstration:** Defining $\mathcal{R} = \mathcal{N} + \mathcal{M} - 1$, and substituting (7) and (9) into $\mathbf{q}$ in (4), yields $\mathbf{q} = [1 \ q_1 \ \cdots \ q_{\mathcal{R}}]$, where

$$
q_j = \frac{1}{1 + \sum_{i=1}^{\mathcal{N}} \alpha_i z^{-i}} \begin{cases} 1 & \text{if } j = 1 \\ - \sum_{i=j}^{\mathcal{N}} \alpha_i z^{-(i-j+1)} & \text{if } 2 \le j \le \mathcal{N} \\ \sum_{i=j-\mathcal{N}+1}^{\mathcal{M}} \beta_i z^{-(i-j+\mathcal{N})} & \text{if } \mathcal{N}+1 \le j \le \mathcal{R} \end{cases}
$$

Resolving the output equation in (4) yields

$$
\mathbf{qg} \mathbf{z}^{-1} = \frac{\beta_1 \mathbf{z}^{-1} + \dots + \beta_{\mathcal{M}} \mathbf{z}^{-\mathcal{M}}}{1 + \alpha_1 \mathbf{z}^{-1} + \dots + \alpha_{\mathcal{N}} \mathbf{z}^{-\mathcal{N}}} = \frac{\mathbf{B}(\mathbf{z}^{-1}) \mathbf{C}(\mathbf{z}^{-1})}{\mathbf{A}(\mathbf{z}^{-1}) \mathbf{C}(\mathbf{z}^{-1})} = \frac{\mathbf{B}(\mathbf{z}^{-1})}{\mathbf{A}(\mathbf{z}^{-1})} \quad (10)
$$

and

$$
\begin{align*}
\mathbf{q}\mathbf{L}\mathbf{z}^{-1} + 1 &= \frac{(l_1 - l_2 \sum_{i=2}^{\mathcal{N}} \alpha_i z^{-(i-1)} \cdots - l_n \alpha_{\mathcal{N}} z^{-1}) \mathbf{z}^{-1} + 1 + \sum_{i=1}^{\mathcal{N}} \alpha_i \mathbf{z}^{-i}}{1 + \sum_{i=1}^{\mathcal{N}} \alpha_i \mathbf{z}^{-i}} \\
&= \frac{1 + f_1 \mathbf{z}^{-1} + \dots + f_{\mathcal{N}} \mathbf{z}^{-\mathcal{N}}}{1 + \alpha_1 \mathbf{z}^{-1} + \dots + \alpha_{\mathcal{N}} \mathbf{z}^{-\mathcal{N}}} = \frac{\mathbf{F}(\mathbf{z}^{-1})}{\mathbf{A}(\mathbf{z}^{-1}) \mathbf{C}(\mathbf{z}^{-1})}
\end{align*}
$$

with $F(z^{-1})$ an appropriately defined polynomial and

$$
f_j = \begin{cases} l_1 + \alpha_1 & \text{if } j = 1 \\ \alpha_j - \sum_{i=j}^{N} l_{i-(j-2)} \alpha_i & \text{otherwise} \end{cases}
$$

Since past values of the control input are known exactly, the Kalman gain vector associated with (3) is defined $\mathbf{L} = [l_1 \ l_2 \ \cdots \ l_N \ 0 \ \cdots \ 0]'$. Here, $l_1 \cdots l_N$ are conventionally determined by specifying $\{\sigma^2, \mathcal{N}\}$ in some manner and exploiting the matrix Riccati equations [3, 7]. In this Letter, however, the model structure can alternatively be selected by the modeller or identified from data (see below) in order to define the noise transfer function, and the gains follow directly from this. For example, specifying $F(z^{-1}) = A(z^{-1})$ yields an auto-regressive noise model type, i.e. $\mathbf{qLz}^{-1} + 1 = 1/C(z^{-1})$, while $F(z^{-1}) = A(z^{-1})D(z^{-1})$ yields $\mathbf{qLz}^{-1} + 1 = D(z^{-1})/C(z^{-1})$. In the latter case, (4) is equivalent to the BJ model (1).

**Estimated output:** Using the innovations $e_k = y_k - \mathbf{h}\hat{\mathbf{x}}_k$ from (3) and the BJ model (1), the optimal estimate of the output $\hat{y}_k = \mathbf{h}\hat{\mathbf{x}}_k$ is

$$
\hat{y}_k = \frac{D(z^{-1}) - C(z^{-1})}{D(z^{-1})} y_k + \frac{B(z^{-1})C(z^{-1})}{A(z^{-1})D(z^{-1})} u_k \quad (11)
$$

The RIV algorithm [2] can be used to identify the order and estimate the
parameters of the polynomials A(z⁻¹), B(z⁻¹), C(z⁻¹) and D(z⁻¹) either
off-line (en block solution) or adaptively (recursive mode), with ŷₖ sub-
sequently determined using (11) and, for example used for state variable
feedback control. Alternatively, in the RIV algorithm, the measured
input $u_k$ and output $y_k$ signals are filtered by adaptive prefilters and the outputs of these filters (denoted $u_k^*$ and $y_k^*$) can be used to estimate $\hat{y}_k$ directly. The adaptive RIV prefilters used for the BJ model (1) have the form $C(z^{-1})/(A(z^{-1})D(z^{-1}))$ (see [2, 7] and the references therein), hence $\hat{y}_k = B(z^{-1})u_k^* - A(z^{-1})y_k^* + y_k$.

**Example:** The system model in this example is based on (1) with $n = m = p = q = 2$. Using the demonstration above, this system is equivalently described by (6)–(9), with $L = [l_1 \ l_2 \ l_3 \ l_4 \ 0 \ 0 \ 0]$ and

$$ 
\begin{aligned}
l_1 &= d_1 - c_1, & l_2 &= \frac{1}{c_2}(c_2 - d_2) \\
l_3 &= \frac{1}{\alpha_4}(\alpha_3 - l_2\alpha_3 - d_1a_2 - d_2a_1) \\
l_4 &= \frac{1}{\alpha_4}(\alpha_2 - l_2\alpha_2 - l_3\alpha_3 - a_1d_1 - d_2 - a_2)
\end{aligned}
$$

The optimal estimate of the output can be determined using the polynomial or state-space forms shown in Fig. 1, or within the RIV algorithm by means of the prefilters.

<figure><img src="image_2.png" /><figcaption>Fig. 1 State estimation based on</figcaption></figure>

a Polynomial B-J transfer function model

b State-space Kalman filter representation

**Control design:** The extended state-space model (6)–(9) is not fully controllable. This result is transparent from the deterministic component of (4), i.e. $y_k = qgz^{-1}u_k$, for which (10) highlights pole-zero cancellations. More formally, the state vector has length $n+m+2p$, while the maximum rank of the associated controllability matrix is $n+m+p$. However, this observation does not limit the application of state variable feedback control, since a conventional controllable NMSS form, based on (5), can still be utilised for state variable feedback design [7]. Exploiting the separation theorem as usual, the resulting control law is applied to the estimated state, i.e. $u_k = -k\hat{x}_k$, where $k$ is the control gain vector. Here, an integral-of-error state, based on the estimated $\hat{y}_k$ or measured $y_k$ output, or sometimes an ad-hoc hybrid of

these [8], is usually included to ensure Type 1 servomechanism performance. Although such extensions are beyond the scope of this Letter, the authors are presently investigating their utility in the context of the new NMSS form.

**Conclusions:** A novel stochastic NMSS form that enables representation of a general BJ transfer function model was presented. This Letter points out that the approach can be used for both adaptive optimal filtering and state variable feedback control. The new result immediately facilitates representation of a more general noise model for NMSS design than hitherto, and hence facilitates further research into the RIV parameter estimation, LQG optimal control and adaptive filtering in this context. For brevity, this Letter was limited to the single-input, single-output case but multi-input models are also possible.

**Acknowledgment:** This work was supported by the UK Engineering and Physical Sciences Research Council (EPSRC) grant EP/M015637/1.

This is an open access article published by the IET under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/)

Submitted: 19 September 2017 E-first: 11 January 2018

doi: 10.1049/el.2017.3577

One or more of the Figures in this Letter are available in colour online.

E.D. Wilson and C.J. Taylor (Engineering Department, Lancaster University, Lancaster, LA1 4YQ, United Kingdom)

E-mail: e.d.wilson1@lancaster.ac.uk

Q. Clairon (School of Mathematics and Statistics, University of Newcastle, Newcastle upon Tyne, NE1 7RU, United Kingdom)

References

1 Kalman, R.E.: ‘A new approach to linear filtering and prediction problems’, *J. Basic Eng.*, 1960, **82**, (1), pp. 45–45

2 Young, P.C.: ‘Recursive estimation and time series analysis: an introduction for the student and practitioner’ (Springer, Berlin, Germany, 2011)

3 Aström, K.J., and Wittenmark, B.: ‘Computer-controlled systems: theory and design’ (Prentice-Hall, Upper Saddle River, NJ, USA, 1997)

4 Young, P.C.: ‘Self-adaptive Kalman filter’, *Electron. Lett.*, 1979, **15**, pp. 358–360

5 Young, P.C.: ‘Refined instrumental variable methods of recursive time-series analysis’, *Int. J. Control*, 1979, **29**, pp. 1–30

6 Young, P.C.: ‘The refined instrumental variable method: unified estimation of discrete and continuous-time transfer function models’, *J. Eur. Syst. Autom.*, 2008, **42**, pp. 149–179

7 Taylor, C.J., Young, P.C., and Chotai, A.: ‘True digital control: statistical modelling and non-minimal state space design’ (John Wiley & Sons, Chichester, UK, 2013)

8 Dixon, R.: ‘Design and application of proportional-integral-plus (PIP) control systems’. PhD Thesis, University of Lancaster, 1996