P ( x t P(x_t P(xt| x t − 1 ) x_{t-1}) xt−1) |
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} AXt−1,Xt | Any | π \piPi |
Linear Gassian Kalman DM | N ( A X t − 1 + B , Q ) N(AX_{t-1}+B,Q) N(AXt−1+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(xt−1) | 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)−−evaluationargmentθlogP(y1,...,andt∣θ)−−parameterlearningP(x1,...,xt∣y1,...,andt)−statedecodingP(xt∣y1,..,andt)−filtering
Dynamic model of linear Gaussian noise
P ( x t ∣ y 1 , . . . , y t ) P(x_t|y_1,...,y_t) P(xt∣y1,...,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(xt∣Xt−1)=N(AXt−1+B,Q)
X t = A X t − 1 + B + ω X_t = AX_{t-1}+B+\omega Xt=AXt−1+B+ω , ω ∼ N ( 0 , Q ) \omega \sim N(0,Q) oh∼N(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(yt∣xt)=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) in∼N(0,R)
Below is the number of references.
Derivation of filter formula
In the HMM model, when the latent variables are determined, the observations become independent.
- 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(x1∣y1)∼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(x2∣y2)∼N(in2,p2)
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(xt∣y1,...,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(A∣B)与 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(xt∣y1,...,andt)∝P(xt,and1,...,andt)∝P(yt∣xt,and1,...,andt−1)∗P(xt∣y1,...,andt−1)
- 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(yt∣xt,and1,...,andt−1)=P(yt∣xt),而 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,...,andt−1Related.
- Then the prediction is P ( x t ∣ y 1 , . . . , y t − 1 ) P(x_t|y_1,...,y_{t-1} ) P(xt∣y1,...,andt−1), 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} xt−1If 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(xt∣y1,...,andt−1)=∫d(xt−1)P(xt,xt−1∣y1,...,andt)dxt−1∝∫xt−1P(xt∣xt−1)P(xt−1∣y1,...,andt−1)d(xt−1)
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(xt∣y1,...,andt−1)=∫P(xt∣xt−1)P(xt−1∣y1,...,andt−1) - 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(xt∣y1,...,andt)=P(yt∣xt)P(xt∣y1,...,andt−1)
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 xt∣y1,...,andt−1=AE[xt−1]+AΔXt−1+ω = 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 andt∣y1,...yt−1=HAE[Xt−1]+HAΔxt−1+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(xt∣y1,...,andt)=N(AE[xt−1],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(yt∣y1,...,andt−1)=N(HAE[Xt−1],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,andt∣y1,...,andt−1)