In [1], the author shows an efficient way of implementing the forward and backward filter using matrices. One can also implement this using filtfilt
command in MATLAB. However, I am interested in implementing this using matrices.
Background
Any digital filter can be represented in its state-space format as follows: \begin{align} x(t+1) &= F x(t) + G u(t) \notag \\ y(t) &= H x(t) + D u(t) \notag \end{align}
This filter can be expressed as \begin{align} \mathcal{Y} = \mathcal{H} U + \mathcal{O}x_0 \end{align} where $\mathcal{Y} = [y_0, y_1,\ldots,y_{N-1}]^T$ is the vector of outputs, $U = [u_0,u_1,\ldots,u_{N-1}]^T$ is the vector of inputs, $x_0$ is the initial state, \begin{align} \mathcal{H} = \begin{bmatrix} D & 0 & \ldots & 0 \\ HG & D & 0 & \vdots \\ \vdots & & \ddots & \\ HF^{N-2}G & \ldots & HG & D \end{bmatrix}, \end{align} and \begin{align} \mathcal{O} = \begin{bmatrix} H \\ HF \\ \vdots \\ HF^{N-1} \end{bmatrix}. \end{align}
Problem Statement
In forward-backward filtering proposed in [1], the author mentions that the forward and backward filters are different (generally speaking). However, if we look at the implementation of the forward-backward filter derivation, the same filter is used, i.e., only the time-reversal of the input and outputs are performed but the filter transfer function does not change. What should be an efficient representation of the state-space filter while applying the forward filter and backward filter, i.e., determine $(F_f, G_f, H_f, D_f)$ and $(F_b, G_b, H_b, D_b)$.
Reference
[1] F. Gustafsson, "Determining the initial states in forward-backward filtering," in IEEE Transactions on Signal Processing, vol. 44, no. 4, pp. 988-992, Apr 1996. http://www.diva-portal.org/smash/get/diva2:315708/FULLTEXT02