Kalman Smoother with Repeated Measurements I have a problem that I thought should be easy but is turning out to be quite difficult. 
Lets say I have 100 measurements of a time-varying processes at time points $t\in {1, \dots, 100}$ which are denoted $y = (y_1, \dots, y_{100})$. However, I also have 20 repeated measurements of the last time-point such that I will say that $(y_{101}, \dots, y_{120})$ are all taken at time point $t = 100$. 
To summarize, I have 1 measurement from each time point $t \in {1, \dots, 99}$ and I have 21 measurements from time-point $t=100$. 
I believe that the kalman filter can be used for both time-varying and non-time-varying processes. What I would like to do is figure out how to performing filtering and smoothing of this hypothetical time-series using these replicate measurements to improve my state estimation. In particular I am interested in Linear-Gaussian models of the form 
$$y_t = F_t'\Theta_t+v_t$$
$$\Theta_t = G_t\Theta_{t-1}+w_t$$
$$v_t \sim N(0, V)$$
$$w_t \sim N(0, W)$$
My current Approach
My current approach is to simply pretend that I have a time-series with 120 observations $(y_1, \dots, y_{120})$ but that nothing is changing between the last 20 time-points. Specifically I set:


*

*all $G_t$ matrices in  $G_{101}, \dots, G_{120}$ are the identity matrix with dimension equal to the dimension of my parameter space $\Theta_t$. 

*I set $W = \mathbf{0}$ for $t \in \{101, \dots, 120\}$
This seems to work fine for the kalman filter (at least I think it is correct, I would appreciate it if someone confirmed that this makes sense); but it breaks down for my smoothing relations. 
Specifically I am using following the filtering/smoothing notation of the Prado and West book. My smoothing Recursions are as follows:
$$\Theta_T \sim p(\Theta_T|D_T)$$
for $t = T-1, T-2, \dots$
$$B_t = C_tG'_{t+1}R^{-1}_{t+1}$$
$$\Theta_t \sim N(u_t, H_t)$$
where
$$u_t = m_t+B_t(\theta_{t+1}-a_{t+1})$$
$$H_t = C_t-B_tR_{t+1}B_t'$$
Note that $a_{t+1} = G_tm_t$ and $R_{t} = G_tC_{t-1}G_t'+W_t$ are both calculate in the forward filtering recursions (which I have not written down here). 
The issue I am having is that with my approach that I described above, $B_t = 1$ (take $t=120$ and work backwards: $B_{120} = C_t\mathbf{1}R_t^{-1} = C_t(\mathbf{1}C_t^{-1}\mathbf{1}'+\mathbf{0}) = 1$ and I end up getting that $H_t = \mathbf{0}$ (which then throws an error in my code because you can't draw from a normal distribution with zero variance)! 
What I am doing wrong and is there a better way to handle this? (Note that I only want 1 sample from all the "time-points" in $t\in\{100,\dots, 120\}$, I don't need 21 if that helps)
 A: All parameters can be time varying.  This includes the variance of the observation error $v_t$.  If you instead let $y_{100}$ denote the average of what is observations 100 to 120 in your current notation, then the observation error at time $t=100$ has variance $\text{Var}(v_{100})=V_{100}=V/21$ while all other observation errors have variances $V_t=V$.  You then plug this time varying variance into the appropriate places in the forecast, filtering and smoothing recursions.
A: I don't have the Prado & West book handy.  I think, in your notation, the recurrence equations should be:
$$ u_t = m_t + B_t( u_{t+1} - a_{t+1})$$
$$ H_t = C_t + B_t( H_{t+1} - R_{t+1})B_t'$$

Using different notation for the retrospective distribution's mean and variance parameters, if you have


*

*West, M., & Harrison, J. (1997). Bayesian forecasting and dynamic models (2nd ed.). New York: Springer.


see Ch. 4.7 Filtering recurrences, Theorem 4.4 proof, page 115.
Otherwise, see pages 102-103 of 


*

*Bayesian risk management: a guide to model risk and sequential learning in financial markets by Matt Sekerke, John Wiley & Sons, 2015.



Here, use notation $a_t,R_t$ for the (forward) filtering prior distribution parameters; and, $u_t,H_t$ for the (backward) smoothed state estimates.
Store $\{a_t, R_t,m_t, C_t\} \quad\forall~ t=1 \ldots T$ for use below. 
For $t=T$,
$$u_T = m_T \quad\text{and}\quad H_T = C_T\quad.$$
For $t=T-1, ~\ldots,~ 1$
$$u_t = m_t + B_t(u_{t+1} - a_{t+1})\quad\text{and}$$
$$H_t = C_t + B_t(H_{t+1} - R_{t+1}) B_t^{'}\quad.$$
The smoothed state distribution is $\Theta_t  \sim N(u_t,H_t) \quad.$
