Xu Yida Machine Learning: Kalman Filter Kalman Filter Notes (1)

Insert image description here

P ( x t P(x_t P(xt| x t − 1 ) x_{t-1}) xt1) P ( y t P(y_t P(yt| x t ) x_t) xt) P ( x 1 ) P(x_1) P(x1)
Discrete State DM A X t − 1 , X t A_{X_{t-1},X_t} AXt1,Xt Any π \piPi
Linear Gassian Kalman DM N ( A X t − 1 + B , Q ) N(AX_{t-1}+B,Q) N(AXt1+B,Q) N ( H X t + C , R ) N(HX_t+C,R) N(HXt+C,R) N ( μ 0 , ϵ 0 ) N(\mu_0,\epsilon_0)N(μ0,ϵ0)
No-Linear NoGaussian DM f ( x t − 1 ) f(x_{t-1}) f(xt1) g ( y t ) g(y_t) g(yt) f ( x 1 ) f(x_1) f(x1)

{ P ( y 1 , . . . , y t ) − − e v a l u a t i o n a r g m e n t θ log ⁡ P ( y 1 , . . . , y t ∣ θ ) − − p a r a m e t e r l e a r n i n g P ( x 1 , . . . , x t ∣ y 1 , . . . , y t ) − s t a t e d e c o d i n g P ( x t ∣ y 1 , . . , y t ) − f i l t e r i n g \left\{ \begin{aligned} P(y_1,...,y_t)--evaluation\\ argment \theta \log{P(y1,...,y_t|\theta)}--parameter learning \\ P(x_1,...,x_t|y_1,...,y_t)-state decoding \\ P(x_t | y_1,..,y_t)-filtering \end{aligned} \right. P(y1,...,andt)evaluationargmenlogP(y1,...,andtθ)parameterlearningP(x1,...,xty1,...,andt)statedecodingP(xty1,..,andt)filtering
Insert image description here

Dynamic model of linear Gaussian noise

Insert image description here

P ( x t ∣ y 1 , . . . , y t ) P(x_t|y_1,...,y_t) P(xty1,...,andt)
Suppose the transition probability is P ( x t ∣ X t − 1 ) = N ( A X t − 1 + B , Q ) P (x_t|X_{t-1})= N(AX_{t-1}+B,Q) P(xtXt1)=N(AXt1+B,Q)
X t = A X t − 1 + B + ω X_t = AX_{t-1}+B+\omega Xt=AXt1+B+ω , ω ∼ N ( 0 , Q ) \omega \sim N(0,Q) ohN(0,Q)

measurement probility
P ( y t ∣ x t ) = N ( H X t + C , R ) P(y_t|x_t) = N(HX_t+C,R) P(ytxt)=N(HXt+C,R)
y t = H X t + C + v y_t = HX_t+C+v andt=HXt+C+v
v ∼ N ( 0 , R ) v \sim N(0,R) inN(0,R)
Below is the number of references.
Insert image description here
Insert image description here

Insert image description here
Insert image description here

Derivation of filter formula

Insert image description here
Insert image description here
In the HMM model, when the latent variables are determined, the observations become independent.
Insert image description here

  • Kalman filter, when t = 1, we know P ( x 1 ∣ y 1 ) ∼ N ( u ^ 1 , σ ^ 1 ) P(x_1 |y_1) \sim N(\hat u_1,\hat \sigma_1) P(x1y1)N(in^1,p^1)
  • t = 2 times, P ( x 2 ∣ y 2 ) ∼ N ( u ‾ 2 , σ ‾ 2 ) P(x_2|y_2) \sim N(\ overline u_2,\overline\sigma_2) P(x2y2)N(in2,p2)
    Insert image description here

personal understanding

  • Kalman filter can be understood as a type of filter. The mathematical expression is to use observation quantities y 1 , y 2 , y 3 . . . , y t y_1,y_2, y_3...,y_t and1,and2,and3...,andtTo obtain the estimate at time t x t x_t xt, the mathematical formula is
    P ( x t ∣ y 1 , . . . , y t ) P(x_t|y_1,...,y_t) P(xty1,...,andt)正比与 P ( x t , y 1 , . . . , y t ) P(x_t,y_1,...,y_t) P(xt,and1,...,andt) can be understood as a precondition y 1 , . . . , y t y_1,...,y_t and1,...,andtOccurs under the conditions of occurrence x t x_t xtThe probability of is directly proportional to the probability of two types of events occurring simultaneously. It can be simply understood as P ( A ∣ B ) P(A|B) P(AB) P ( A , B ) P(A,B) P(A,B)positive ratio.
  • 那么得出 P ( x t ∣ y 1 , . . . , y t ) ∝ P ( x t , y 1 , . . . , y t ) ∝ P ( y t ∣ x t , y 1 , . . . , y t − 1 ) ∗ P ( x t ∣ y 1 , . . . , y t − 1 ) P(x_t|y_1,...,y_t) \propto P(x_t,y_1,.. .,y_t) \propto P(y_t|x_t,y_1,...,y_{t-1}) * P(x_t|y_1,...,y_{t-1}) P(xty1,...,andt)P(xt,and1,...,andt)P(ytxt,and1,...,andt1)P(xty1,...,andt1)
  • HMM can know, P ( y t ) P(y_t) P(yt)The probability of occurrence is only followed by x t x_t xt相关,因此 P ( y t ∣ x t , y 1 , . . . , y t − 1 ) = P ( y t ∣ x t ) P(y_t|x_t,y_1,. ..,y_t-1) = P(y_t|x_t) P(ytxt,and1,...,andt1)=P(ytxt),而 x t x_t xtThe estimator of is obtained from the last observation, x t x_t xt and 1 , . . . , y t − 1 y_1,...,y_{t-1} and1,...,andt1Related.
  • Then the prediction is P ( x t ∣ y 1 , . . . , y t − 1 ) P(x_t|y_1,...,y_{t-1} ) P(xty1,...,andt1), the observation value at the previous moment t-1 estimates the state at the next moment t.
  • x t x_t xtView normal amount, general x t − 1 x_{t-1} xt1If is regarded as a variable, then the derivation formula of the prediction formula is: P ( x t ∣ y 1 , . . . , y t − 1 ) = ∫ d ( x t − 1 ) P ( x t , x t − 1 ∣ y 1 , . . . , y t ) d x t − 1 ∝ ∫ x t − 1 P ( x t ∣ x t − 1 ) P ( x t − 1 ∣ y 1 , . . . , y t − 1 ) d ( x t − 1 ) P(x_t|y_1,...,y_{t-1})=\int_{d(x_{t-1})}{P(x_t,x_{t-1}| y_1,...,y_t)dx_{t-1}} \propto \int_{x_{t-1}}P(x_t|x_{t-1})P(x_{t-1}|y_1,. ..,y_{t-1})d(x_{t-1}) P(xty1,...,andt1)=d(xt1)P(xt,xt1y1,...,andt)dxt1xt1P(xtxt1)P(xt1y1,...,andt1)d(xt1)
    Insert image description here

Summarize

  • Prediction: If you don’t know the observation at the current moment, use the previous moment to observe and predict the state at the current moment
    P ( x t ∣ y 1 , . . . , y t − 1 ) = ∫ P ( x t ∣ x t − 1 ) P ( x t − 1 ∣ y 1 , . . . , y t − 1 ) P(x_t|y_1,...,y_{t-1 })= \int P(x_t|x_{t-1})P(x_{t-1}|y_1,...,y_{t-1}) P(xty1,...,andt1)=P(xtxt1)P(xt1y1,...,andt1)
  • Update: Already know the observation at the current moment, use the current observation to update the current state
    P ( x t ∣ y 1 , . . . , y t ) = P ( y t ∣ x t ) P ( x t ∣ y 1 , . . . , y t − 1 ) P(x_t|y_1,...,y_t)=P(y_t|x_t)P(x_t|y_1 ,...,y_{t-1}) P(xty1,...,andt)=P(ytxt)P(xty1,...,andt1)
    Insert image description here

Insert image description here
Insert image description here

in conclusion

  • x t ∣ y 1 , . . . , y t − 1 = A E [ x t − 1 ] + A Δ X t − 1 + ω x_t|y_1,...,y_{t-1}=AE[x_{t-1}]+A\Delta X_{t-1}+\omega xty1,...,andt1=AE[xt1]+AΔXt1+ω = E [ x t ] + Δ x t =E[x_t]+\Delta x_t =E[xt]+Δxt
  • y t ∣ y 1 , . . . y t − 1 = H A E [ X t − 1 ] + H A Δ x t − 1 + H ω + v = E [ y t ] + Δ y t y_t|y_1,...y_{t-1} = HAE[X_{t-1}]+HA \Delta x_{t-1}+H\omega + v = E[y_t] + \Delta y_t andty1,...yt1=HAE[Xt1]+HAΔxt1+Hω+in=E[yt]+Δyt
  • P ( x t ∣ y 1 , . . . , y t ) = N ( A E [ x t − 1 ] , E [ ( Δ x ) ( Δ x ) T ] ) P(x_t|y_1,...,y_t) = N(AE[x_{t-1}],E[(\Delta x)(\Delta x)^T]) P(xty1,...,andt)=N(AE[xt1],E[(Δx)(Δx)T])
  • P ( y t ∣ y 1 , . . . , y t − 1 ) = N ( H A E [ X t − 1 ] , E [ ( Δ y ) ( Δ y ) T ] ) P(y_t|y1,...,y_ {t-1}) = N(IS[X_{t-1}],E[(\Delta y)(\Delta y)^T])P(yty1,...,andt1)=N(HAE[Xt1],E[(Δy)(Δy)T])
    An infinite set
    P ( x t , y t ∣ y 1 , . . . , y t − 1 ) P(x_t,y_t|y_1,...,y_{t-1}) P(xt,andty1,...,andt1)
    Insert image description here

Dynamic model of nonlinear non-Gaussian noise

Guess you like

Origin blog.csdn.net/CCCrunner/article/details/132838882