# Doubt in state space representation

$y$ is scalar observations and so C will be a 1x2 matrix.

I want to represent the following model as a state space representation so as to estimate the hidden states from the noisy observations $y$ using Kalman filter.

The state space model :

x(t+1) = Ax(t) + w(t)

y(t) = Cx(t) + v(t)

w(t) = N(0,Q)

v(t) = N(0,R)


$w(t)$ is a pseudo-random binary signal that excites/ drives ; and $v(t) = N(0,\sigma^2_v)$ is the measurement noise.

1. The model is an FIR (MA) filter

$$x(t) = h_1 \epsilon(t-1) + h_2 \epsilon(t-2) + \epsilon(t)$$ $$y(t) = x(t) + v(t)$$ $$y(t) = h^T \epsilon(t) + v(t)$$

(In vector form)

where $\epsilon(t) = w(t)$.

1. The other model is an IIR (AR) filter $$x(t) = ax(t-1) + bx(t-2)+ w(t)$$

The state space representation:

$$x(t+1) = a^Tx(t) + w(t)$$

$$y(t) = h^Tx(t) + v(t)$$

How do I represent these as state space so as to apply Kalman Filter?

There are several ways to represent time series models. This is how I proceeded, but unsure because the output of the log-likelihood is a matrix of 2 by 2 with off diagonal elements being infinity and the diagonal elements are same positive values. So, the dimension and the value of log-likelihood is incorrect, I should get negative instead of positive values.

1. FIR :

Re-writing the above model as:

$$x(t+1) = h_1 \epsilon(t) + h_2 \epsilon(t-1) + \epsilon(t+1)$$ $$y(t) = Cx(t)+v(t)$$

State Space :

$\left[ \begin{array}{c} x(t+1) \\ x(t)\\ x(t-1) \end{array} \right]$ = $\left[ \begin{array}{ccc} 1 & h_1 & h_2 \\ 0 & 1 & h_1 \\ 0 & 0 & 1\end{array} \right]$ $\times$ $\left[ \begin{array}{c} e(t+1)\\ e(t) \\ e(t-1)\end{array} \right]$

$y(t)$ = $\left[ \begin{array}{c} 1 \hskip 5 pt 0 \hskip 5 pt 0\end{array} \right]$ $\times$ $\left[ \begin{array}{c} e(t+1)\\ e(t) \\ e(t-1)\end{array} \right]$ + $v(t)$

1. IIR (AR model)

$\left[ \begin{array}{c} x(t+1) \\ x(t) \end{array} \right]$ = $\left[ \begin{array}{cc} a & b \\ 1 & 0 \end{array} \right]$ $\times$ $\left[ \begin{array}{c} x(t)\\ x(t-1)\end{array} \right]$ + $\left[ \begin{array}{c} 1\\ 0\end{array} \right]$ $\times$ $\left[ \begin{array}{c} w(t+1)\\ w(t)\end{array} \right]$

$y(t)$ = $\left[ \begin{array}{cc} 1 \hskip 5 pt 0\end{array} \right]$ $\times$ $\left[ \begin{array}{c} x(t)\\ x(t-1)\end{array} \right]$ + $v(t)$

• no one is worth for downvoting Mar 16 '15 at 18:05

## 1 Answer

Your FIR state space representation seems to be doing too much.

The way I would write it is to have the process noise is $\epsilon(t)$ as your input, and your state as two time-delayed copies of it:

$$x(t+1) = \left[ \begin{array}{c} \epsilon(t+1)\\ \epsilon(t) \\ \epsilon(t-1) \end{array} \right] = \left[ \begin{array}{ccc} 0 & 0 & 0\\ 1 & 0 & 0\\ 0 & 1 & 0 \end{array} \right] x(t) + \left[\begin{array}{c} 1\\ 0\\ 0 \end{array} \right] \epsilon(t + 1)$$

then your output equation is just: $$y(t) = \left[ \begin{array}{ccc} 1 & h_1 & h_2 \end{array} \right] x(t) + v(t)$$

Your IIR representation is too confused for me to make head or tail out of. Can you clarify that you have the right information there?

Other questions:

• Thank you for your answer. The IIR has a typo, I meant $u(t)$ and not $w(t)$ where $u(t)$ and $\epsilon(t)$ are both PRBS. A nonlinear signal is quantized using the mean of the nonlinear signal. The sequence of 0/1 is then represented using a mapping equation which converts the 0/1 to real numbers. This becomes the excitation input that drives both the models. I need to estimate the transition matrix for this input as well. I have a question regarding the MA model: if number of lags =2 (as in the Question) then why the state space is becoming three dimensional and not 2 dimensional?
– SKM
Mar 16 '15 at 21:28
• i won't edit it, Peter, but your state-space representation is actually a discrete-time representation, but appears (by use of "$(\cdot)$" and "$t$") to be continuous time. Mar 17 '15 at 18:57
• @robertbristow-johnson: While it's possible to have an FIR continuous-time system, I believe the OP is actually asking about a discrete-time FIR system. I think you're mistaken.
– Peter K.
Mar 18 '15 at 2:13
• @SKM: Good question regarding lags vs order. The state space representation that I've chosen is degenerate, so can probably be simplified to a two-state version. I've left it as it is, though, because the tapped delay line representation is (I think) clearer.
– Peter K.
Mar 18 '15 at 2:43
• @PeterK.: YOu are correct in mentioning that I am asking for discrete system (Will add that tag), but the answer is not clear to me. On expanding by multiplying, I am not getting the $h$ coefficients in the state representation. Also, $x(t)$ on RHS of the first equation (State Eq) $x(t)$ is a scalar but how do I model that? $x(t)$ is present as the output and not in the input of the main process representation.
– SKM
Mar 18 '15 at 18:35