随机马尔科夫链(Stochastic Markov Chain)卡尔曼滤波(Kalman Filter)

随机马尔科夫链(Stochastic Markov Chain):

  • x 0 x_0 x0已知, A , B , c , d , E , F A,B,c,d,E,F A,B,c,d,E,F已知。
  • x t + 1 = A x t + c + ϵ x_{t+1} = Ax_t + c + \epsilon xt+1=Axt+c+ϵ ϵ ∼ N ( 0 , E ) \epsilon \sim \mathcal{N}(0, E) ϵN(0,E)
  • o t + 1 = B x t + d + δ o_{t+1} = Bx_t + d + \delta ot+1=Bxt+d+δ δ ∼ N ( 0 , F ) \delta \sim \mathcal{N}(0, F) δN(0,F)
  • 问题:
    • t t t滤波: p ( x t ∣ o 1 : t ) p(x_t \mid o_{1:t}) p(xto1:t)
    • t t t预测: p ( x t ∣ o 1 : t − 1 ) p(x_t \mid o_{1:t-1}) p(xto1:t1)

卡尔曼滤波(Kalman Filter):

  • t t t滤波归结为 t − 1 t-1 t1预测:
    • p ( x t ∣ o 1 : t ) = p ( o 1 : t − 1 ) p ( o 1 : t ) p ( x t , o t ∣ o 1 : t − 1 ) ∝ p ( x t , o t ∣ o 1 : t − 1 ) \displaystyle p(x_t \mid o_{1:t}) = \frac{p(o_{1:t-1})}{p(o_{1:t})} p(x_t,o_t \mid o_{1:t-1}) \propto p(x_t,o_t \mid o_{1:t-1}) p(xto1:t)=p(o1:t)p(o1:t1)p(xt,oto1:t1)p(xt,oto1:t1)
    • p ( x t , o t ∣ o 1 : t − 1 ) = p ( o t ∣ x t , o 1 : t − 1 ) p ( x t ∣ o 1 : t − 1 ) = p ( o t ∣ x t ) p ( x t ∣ o 1 : t − 1 ) \displaystyle p(x_t,o_t \mid o_{1:t-1}) = p(o_t \mid x_t,o_{1:t-1}) p(x_t \mid o_{1:t-1}) = {\color{blue}{p(o_t \mid x_t)}} p(x_t \mid o_{1:t-1}) p(xt,oto1:t1)=p(otxt,o1:t1)p(xto1:t1)=p(otxt)p(xto1:t1)
  • t − 1 t-1 t1预测归结为 t − 1 t-1 t1滤波:
    • p ( x t ∣ o 1 : t − 1 ) = ∫ p ( x t , x t − 1 ∣ o 1 : t − 1 ) d x t − 1 \displaystyle p(x_t \mid o_{1:t-1}) = \int p(x_t,x_{t-1} \mid o_{1:t-1}) \mathrm{d} x_{t-1} p(xto1:t1)=p(xt,xt1o1:t1)dxt1
    • p ( x t , x t − 1 ∣ o 1 : t − 1 ) = p ( x t ∣ x t − 1 , o 1 : t − 1 ) p ( x t − 1 ∣ o 1 : t − 1 ) = p ( x t ∣ x t − 1 ) p ( x t − 1 ∣ o 1 : t − 1 ) \displaystyle p(x_t,x_{t-1} \mid o_{1:t-1}) = p(x_t \mid x_{t-1},o_{1:t-1}) p(x_{t-1} \mid o_{1:t-1}) = {\color{blue}{p(x_t \mid x_{t-1})}} p(x_{t-1} \mid o_{1:t-1}) p(xt,xt1o1:t1)=p(xtxt1,o1:t1)p(xt1o1:t1)=p(xtxt1)p(xt1o1:t1)

基础知识:

  • 仿射合同: p ( x ) = N ( μ 1 , Σ 1 ) p(x) = \mathcal{N}(\mu_1,\Sigma_1) p(x)=N(μ1,Σ1) y = A x + b y = Ax+b y=Ax+b p ( y ) = N ( A μ 1 + b , A Σ 1 A T ) p(y) = \mathcal{N}(A\mu_1+b,A\Sigma_1A^T) p(y)=N(Aμ1+b,AΣ1AT)
  • 独立可加: p ( x 1 ) = N ( μ 1 , Σ 1 ) p(x_1) = \mathcal{N}(\mu_1,\Sigma_1) p(x1)=N(μ1,Σ1) p ( x 2 ) = N ( μ 2 , Σ 2 ) p(x_2) = \mathcal{N}(\mu_2,\Sigma_2) p(x2)=N(μ2,Σ2) y = x 1 + x 2 y = x_1+x_2 y=x1+x2 p ( y ) = N ( μ 1 + μ 2 , Σ 1 + Σ 2 ) p(y) = \mathcal{N}(\mu_1+\mu_2,\Sigma_1+\Sigma_2) p(y)=N(μ1+μ2,Σ1+Σ2)
  • 边缘正态: p ( [ x 1 x 2 ] ) = N ( [ μ 1 μ 2 ] , [ Σ 11 Σ 12 Σ 21 Σ 22 ] ) p\left( \begin{bmatrix} x_1 \\ x_2 \\ \end{bmatrix} \right) = \mathcal{N}\left( \begin{bmatrix} \mu_1 \\ \mu_2 \\ \end{bmatrix}, \begin{bmatrix} \Sigma_{11} & \Sigma_{12} \\ \Sigma_{21} & \Sigma_{22} \\ \end{bmatrix} \right) p([x1x2])=N([μ1μ2],[Σ11Σ21Σ12Σ22]) p ( x 2 ∣ x 1 ) = N ( μ 2 + Σ 21 Σ 11 − 1 ( x 1 − μ 1 ) , Σ 22 − Σ 21 Σ 11 − 1 Σ 12 ) p(x_2 \mid x_1) = \mathcal{N}(\mu_2 + \Sigma_{21}\Sigma_{11}^{-1}(x_1-\mu_1), \Sigma_{22} - \Sigma_{21}\Sigma_{11}^{-1}\Sigma_{12}) p(x2x1)=N(μ2+Σ21Σ111(x1μ1),Σ22Σ21Σ111Σ12)
  • p ( x ) = N ( μ x , Σ x ) \displaystyle p(x) = \mathcal{N}(\mu_x,\Sigma_x) p(x)=N(μx,Σx) p ( y ∣ x ) = N ( A x + b , Σ y ) p(y \mid x) = \mathcal{N}(Ax+b, \Sigma_y) p(yx)=N(Ax+b,Σy) p ( y ) = N ( A μ x + b , A Σ x A T + Σ y ) p(y) = \mathcal{N}(A\mu_x+b, A\Sigma_xA^{T}+\Sigma_y) p(y)=N(Aμx+b,AΣxAT+Σy)
  • p ( x ) = N ( μ x , Σ x ) \displaystyle p(x) = \mathcal{N}(\mu_x,\Sigma_x) p(x)=N(μx,Σx) p ( y ∣ x ) = N ( A x + b , Σ y ) p(y \mid x) = \mathcal{N}(Ax+b, \Sigma_y) p(yx)=N(Ax+b,Σy) p ( x ∣ y ) = N ( μ x + Σ x A T ( A Σ x A T + Σ y ) − 1 ( y − A x − b ) , Σ x − Σ x A T ( A Σ x A T + Σ y ) − 1 A Σ x T ) p(x \mid y) = \mathcal{N}(\mu_x + \Sigma_xA^T(A\Sigma_xA^T+\Sigma_y)^{-1}(y-Ax-b), \Sigma_x - \Sigma_xA^T(A\Sigma_xA^T+\Sigma_y)^{-1}A\Sigma_x^T) p(xy)=N(μx+ΣxAT(AΣxAT+Σy)1(yAxb),ΣxΣxAT(AΣxAT+Σy)1AΣxT)

具体算法:

  • t − 1 t-1 t1预测:
    • p ( x t ∣ o 1 : t − 1 ) = N ( μ t , Σ t ) \displaystyle p(x_t \mid o_{1:t-1}) = \mathcal{N}(\mu_t,\Sigma_t) p(xto1:t1)=N(μt,Σt)
    • μ t = A μ t − 1 ∗ + c \mu_t = A\mu_{t-1}^*+c μt=Aμt1+c
    • Σ t = A Σ t − 1 ∗ A T + E \Sigma_t = A\Sigma_{t-1}^*A^T+E Σt=AΣt1AT+E
  • t t t滤波:
    • p ( x t ∣ o 1 : t ) = N ( μ t ∗ , Σ t ∗ ) \displaystyle p(x_t \mid o_{1:t}) = \mathcal{N}(\mu_t^*,\Sigma_t^*) p(xto1:t)=N(μt,Σt)
    • K t = Σ t B T ( B Σ t B T + F ) − 1 K_t = \Sigma_tB^T(B\Sigma_tB^T+F)^{-1} Kt=ΣtBT(BΣtBT+F)1
    • μ t ∗ = μ t + K t ( o t − B μ t − d ) \displaystyle \mu_t^* = \mu_t + K_t(o_t - B\mu_t - d) μt=μt+Kt(otBμtd)
    • Σ t ∗ = Σ t − K t B Σ t T \displaystyle \Sigma_t^* = \Sigma_t - K_tB\Sigma_t^T Σt=ΣtKtBΣtT

你可能感兴趣的:(矩阵)