Forward step (k=1,...,L) Classical Kalman smoother $$\widetilde {\mathbf {z}}_{k}=\mathbf {y}_{k}-\mathbf {H}_{k}\widehat {\mathbf {x}}_{k|k-1}$$ $$\mathbf {K}_{k}=\mathbf {P}^{\mathbf {x}}_{k|k-1}\mathbf {H}^{T}_{k}\left (\mathbf {H}_{k}\mathbf {P}^{\mathbf {x}}_{k|k-1}\mathbf {H}_{k}^{T}+\mathbf {R}\right)^{-1}$$ $$\widehat {\mathbf {x}}_{k|k} =\widehat {\mathbf {x}}_{k|k-1} +\mathbf {K}_{k}\widetilde {\mathbf {z}}_{k}$$ $$\widehat {\mathbf {x}}_{k+1|k}=\mathbf {\Phi }_{k}\widehat {\mathbf {x}}_{k|k-1}+\mathbf {\Phi }_{k}\mathbf {K}_{k}\widetilde {\mathbf {z}}_{k}$$ $$\mathbf {P}^{\mathbf {x}}_{k|k} =(\mathbf {I}-\mathbf {K}_{k}\mathbf {H}_{k})\mathbf {P}_{k|k-1}^{\mathbf {x}}$$ $$\mathbf {P}^{\mathbf {x}}_{k+1|k}=\mathbf {\Phi }_{k}\left (\mathbf {I}-\mathbf {K}_{k}\mathbf {H}_{k}\right)\mathbf {P}^{\mathbf {x}}_{k|k-1}\mathbf {\Phi }^{T}_{k} +\mathbf {\Gamma }_{k}\mathbf {Q}\mathbf {\Gamma }^{T}_{k}$$ Optimal Bayesian Kalman smoother $$\widetilde {\mathbf {z}}^{\boldsymbol {\theta }}_{k}=\mathbf {y}^{\boldsymbol {\theta }}_{k}-\mathbf {H}_{k}\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k|k-1}$$ $$\mathbf {K}^{\Theta }_{k}=\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k|k-1}\right ]\mathbf {H}^{T}_{k}\mathrm {E}_{\boldsymbol {\theta }^{\ast }}^{-1}\left [\mathbf {H}_{k}\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k|k-1}\mathbf {H}_{k}^{T}+\mathbf {R}^{\theta _{2}}\right ]$$ $$\widehat {\mathbf {x}}_{k|k}^{\boldsymbol {\theta }}=\widehat {\mathbf {x}}_{k|k-1}^{\boldsymbol {\theta }} +\mathbf {K}_{k}^{\Theta }\widetilde {\mathbf {z}}^{\boldsymbol {\theta }}_{k}$$ $$\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k+1|k} =\mathbf {\Phi }_{k}\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k|k-1}+\mathbf {\Phi }_{k}\mathbf {K}^{\Theta }_{k}\widetilde {\mathbf {z}}^{\boldsymbol {\theta }}_{k}$$ $$\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}_{k|k}^{\mathbf {x},\boldsymbol {\theta }}\right ] =(\mathbf {I}-\mathbf {K}_{k}^{\Theta }\mathbf {H}_{k})\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}_{k|k-1}^{\mathbf {x},\boldsymbol {\theta }}\right ]$$ $$\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k+1|k}\right ] =\mathbf {\Phi }_{k}\left (\mathbf {I}-\!\mathbf {K}^{\Theta }_{k}\mathbf {H}_{k}\right)\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k|k-1}\right ] \mathbf {\Phi }^{T}_{k}$$ $$\qquad \qquad \qquad +\mathbf {\Gamma }_{k}\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {Q}^{\theta _{1}}\right ]\mathbf {\Gamma }^{T}_{k}$$ Backward step (k=L−1,L−2,...,0) Classical Kalman smoother $$\mathbf {A}_{k}=\mathbf {P}_{k|k}^{\mathbf {x}}\mathbf {\Phi }_{k}^{T}\left (\mathbf {P}_{k+1|k}^{\mathbf {x}}\right)^{-1}$$ $$\widehat {\mathbf {x}}_{k|L}=\widehat {\mathbf {x}}_{k|k}+\mathbf {A}_{k}\left (\widehat {\mathbf {x}}_{k+1|L}-\widehat {\mathbf {x}}_{k+1|k}\right)$$ $$\mathbf {P}_{k|L}^{\mathbf {x}}=\mathbf {P}_{k|k}^{\mathbf {x}}+\mathbf {A}_{k}\left (\mathbf {P}_{k+1|L}^{\mathbf {x}}-\mathbf {P}_{k+1|k}^{\mathbf {x}}\right)\mathbf {A}^{T}_{k}$$ Optimal Bayesian Kalman smoother $$\mathbf {A}^{\Theta }_{k}=\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}_{k|k}^{\mathbf {x},\boldsymbol {\theta }}\right ]\mathbf {\Phi }^{T}_{k}\mathrm {E}_{\boldsymbol {\theta }^{\ast }}^{-1}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k+1|k}\right ]$$ $$\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k|L}=\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k|k}+\mathbf {A}^{\Theta }_{k}\left (\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k+1|L}-\widehat {\mathbf {x}}^{\boldsymbol {\theta }}_{k+1|k}\right)$$ \begin {aligned} \mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}_{k|L}^{\mathbf {x},\boldsymbol {\theta }}\right ]&=\mathrm {E}_{\boldsymbol {\theta }^{\ast }} \left [\mathbf {P}_{k|k}^{\mathbf {x},\boldsymbol {\theta }}\right ]+\mathbf {A}^{\Theta }_{k}\left (\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k+1|k}\right ]\right.\\ &\quad -\left.\mathrm {E}_{\boldsymbol {\theta }^{\ast }}\left [\mathbf {P}^{\mathbf {x},\boldsymbol {\theta }}_{k+1|L}\right ]\right)\left (\mathbf {A}^{\Theta }_{k}\right)^{T} \end {aligned}