两个高斯分布乘积的理论推导

3 篇文章 16 订阅

Kalman滤波主要分为两大步骤：
1.系统状态转移估计，2.系统测量矫正；

f ( x ) = 1 2 π δ e − ( x − u ) 2 2 δ 2 (1) f(x) = \frac{1}{\sqrt{2\pi}\delta}{e^{-\frac{(x-u)^2}{2\delta^2}}} \tag{1}

N 1 N_1 的概率分布函数为 f 1 ( x ) f_1(x) , N 2 N_2 的概率分布函数为 f 2 ( x ) f_2(x) , 则：
f 1 ( x ) f 2 ( x ) = 1 2 π δ 1 e − ( x − u 1 ) 2 2 δ 1 2 ⋅ 1 2 π δ 2 e − ( x − u 2 ) 2 2 δ 2 2 = 1 2 π δ 1 δ 2 e − ( ( x − u 1 ) 2 2 δ 1 2 + ( x − u 2 ) 2 2 δ 2 2 ) (2) \begin{aligned} f_1(x)f_2(x) &=\frac{1}{\sqrt{2\pi}\delta_1}{e^{-\frac{(x-u_1)^2}{2\delta_1^2}}}\cdot\frac{1}{\sqrt{2\pi}\delta_2}{e^{-\frac{(x-u_2)^2}{2\delta_2^2}}}\\\\ &=\frac{1}{2\pi \delta_1\delta_2}{e^{-\bigg(\frac{(x-u_1)^2}{2\delta_1^2}+\frac{(x-u_2)^2}{2\delta_2^2}\bigg)}} \end{aligned} \tag{2}

β = ( x − u 1 ) 2 2 δ 1 2 + ( x − u 2 ) 2 2 δ 2 2 = ( δ 1 2 + δ 2 2 ) x 2 − 2 ( u 2 δ 1 2 + u 1 δ 2 2 ) x + ( u 1 2 δ 2 2 + u 2 2 δ 1 2 ) 2 δ 1 2 δ 2 2 = x 2 − 2 u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 x + u 1 2 δ 2 2 + u 2 2 δ 1 2 δ 1 2 + δ 2 2 2 δ 1 2 δ 2 2 δ 1 2 + δ 2 2 构造新的正态分布 = ( x − u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ) 2 + u 1 2 δ 2 2 + u 2 2 δ 1 2 δ 1 2 + δ 2 2 − ( u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ) 2 2 δ 1 2 δ 2 2 δ 1 2 + δ 2 2 = ( x − u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ) 2 2 δ 1 2 δ 2 2 δ 1 2 + δ 2 2 ⏟ γ + u 1 2 δ 2 2 + u 2 2 δ 1 2 δ 1 2 + δ 2 2 − ( u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ) 2 2 δ 1 2 δ 2 2 δ 1 2 + δ 2 2 ⏟ λ (3) \begin{aligned} \beta &=\frac{(x-u_1)^2}{2\delta_1^2}+\frac{(x-u_2)^2}{2\delta_2^2}\\\\ &=\frac{(\delta_1^2+\delta_2^2)x^2-2(u_2\delta_1^2+u_1\delta_2^2)x+(u_1^2\delta_2^2+u_2^2\delta_1^2)}{2\delta_1^2\delta_2^2}\\\\ &=\frac{x^2-2\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}x+\frac{u_1^2\delta_2^2+u_2^2\delta_1^2}{\delta_1^2+\delta_2^2}}{\frac{2\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}}\\\\ \text{构造新的正态分布}&=\frac{\bigg(x-\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}\bigg)^2+\frac{u_1^2\delta_2^2+u_2^2\delta_1^2}{\delta_1^2+\delta_2^2}-\bigg(\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}\bigg)^2}{\frac{2\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}}\\\\ &=\underbrace{\frac{\bigg(x-\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}\bigg)^2}{\frac{2\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}}}_{\gamma}+\underbrace{\frac{\frac{u_1^2\delta_2^2+u_2^2\delta_1^2}{\delta_1^2+\delta_2^2}-\bigg(\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}\bigg)^2}{\frac{2\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}}}_{\lambda} \end{aligned} \tag{3}
λ \lambda 如上所示，则 β = γ + λ \beta=\gamma+\lambda ,其中 γ \gamma 为一个 N ∼ ( u , δ 2 ) N∼(u, \delta^2) 的正态分布， λ \lambda 为一个常数值。继续简化 λ \lambda ，如下：
λ = u 1 2 δ 2 2 + u 2 2 δ 1 2 δ 1 2 + δ 2 2 − ( u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ) 2 2 δ 1 2 δ 2 2 δ 1 2 + δ 2 2 = ( u 1 2 δ 2 2 + u 2 2 δ 1 2 ) ( δ 1 2 + δ 2 2 ) − ( u 2 δ 1 2 + u 1 δ 2 2 ) 2 2 δ 1 2 δ 2 2 ( δ 1 2 + δ 2 2 ) = ( u 1 2 δ 2 2 δ 1 2 + u 2 2 δ 1 4 + u 2 2 δ 2 2 δ 1 2 + u 1 2 δ 2 4 ) − ( u 2 2 δ 1 4 + 2 u 1 u 2 δ 1 2 δ 2 2 + u 1 2 δ 2 4 ) 2 δ 1 2 δ 2 2 ( δ 1 2 + δ 2 2 ) = δ 1 2 δ 2 2 ( u 1 2 + u 2 2 − 2 u 1 u 2 ) 2 δ 1 2 δ 2 2 ( δ 1 2 + δ 2 2 ) = ( u 1 − u 2 ) 2 2 ( δ 1 2 + δ 2 2 ) (4) \begin{aligned} \lambda &=\frac{\frac{u_1^2\delta_2^2+u_2^2\delta_1^2}{\delta_1^2+\delta_2^2}-\bigg(\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2}\bigg)^2}{\frac{2\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}}\\\\ &=\frac{(u_1^2\delta_2^2+u_2^2\delta_1^2)(\delta_1^2+\delta_2^2)-(u_2\delta_1^2+u_1\delta_2^2)^2}{2\delta_1^2\delta_2^2(\delta_1^2+\delta_2^2)}\\\\ &=\frac{(u_1^2\delta_2^2\delta_1^2+u_2^2\delta_1^4+u_2^2\delta_2^2\delta_1^2+u_1^2\delta_2^4)-(u_2^2\delta_1^4+2u_1u_2\delta_1^2\delta_2^2+u_1^2\delta_2^4)}{2\delta_1^2\delta_2^2(\delta_1^2+\delta_2^2)}\\\\ &=\frac{\delta_1^2\delta_2^2(u_1^2+u_2^2-2u_1u_2)}{2\delta_1^2\delta_2^2(\delta_1^2+\delta_2^2)}\\\\ &=\frac{(u_1-u_2)^2}{2(\delta_1^2+\delta_2^2)} \end{aligned} \tag{4}

f 1 ( x ) f 2 ( x ) = 1 2 π δ 1 δ 2 e − β = 1 2 π δ 1 δ 2 e − ( γ + λ ) = 1 2 π δ 1 δ 2 e − γ ⋅ e − λ = 1 2 π δ 1 δ 2 e − ( x − u ) 2 2 δ 2 ⋅ e − ( u 1 − u 2 ) 2 2 ( δ 1 2 + δ 2 2 ) (5) \begin{aligned} f_1(x)f_2(x) &=\frac{1}{2\pi \delta_1\delta_2}{e^{-\beta}}=\frac{1}{2\pi \delta_1\delta_2}{e^{-(\gamma+\lambda)}}\\\\ &=\frac{1}{2\pi \delta_1\delta_2}{e^{-\gamma}\cdot e^{-\lambda}}\\\\ &=\frac{1}{2\pi \delta_1\delta_2}{e^{-\frac{(x-u)^2}{2\delta^2}}}\cdot e^{-\frac{(u_1-u_2)^2}{2(\delta_1^2+\delta_2^2)}} \end{aligned} \tag{5}

u = u 2 δ 1 2 + u 1 δ 2 2 δ 1 2 + δ 2 2 ,        δ 2 = δ 1 2 δ 2 2 δ 1 2 + δ 2 2 (6) u=\frac{u_2\delta_1^2+u_1\delta_2^2}{\delta_1^2+\delta_2^2},\ \ \ \ \ \ \delta^2=\frac{\delta_1^2\delta_2^2}{\delta_1^2+\delta_2^2}\tag{6}

f 1 ( x ) f 2 ( x ) = S g ⋅ 1 2 π δ e − ( x − u ) 2 2 δ 2 (7) \begin{aligned} f_1(x)f_2(x) &=S_g\cdot\frac{1}{\sqrt{2\pi} \delta}{e^{-\frac{(x-u)^2}{2\delta^2}}} \end{aligned} \tag{7}
S g = 1 2 π ( δ 1 2 + δ 2 2 ) e − ( u 1 − u 2 ) 2 2 ( δ 1 2 + δ 2 2 ) (8) S_g=\frac{1}{\sqrt{2\pi(\delta_1^2+\delta_2^2)}}e^{-\frac{(u_1-u_2)^2}{2(\delta_1^2+\delta_2^2)}}\tag{8}

• ① 当 S g < 1 S_g<1 时，概率分布被压缩
• ② 当 S g > 1 S_g>1 时，概率分布被放大

S g = 1 2 π ( δ 1 2 + δ 2 2 ) e − ( u 1 − u 2 ) 2 2 ( δ 1 2 + δ 2 2 ) = p ( x ) q ( x ) (9) S_g=\frac{1}{\sqrt{2\pi(\delta_1^2+\delta_2^2)}}e^{-\frac{(u_1-u_2)^2}{2(\delta_1^2+\delta_2^2)}}=\frac{p(x)}{q(x)}\tag{9}

p ( x ) = e x p ( − ( u 1 − u 2 ) 2 2 ( δ 1 2 + δ 2 2 ) ) ,     q ( x ) = 2 π ( δ 1 2 + δ 2 2 ) (10) p(x)=exp\bigg(-\frac{(u_1-u_2)^2}{2(\delta_1^2+\delta_2^2)}\bigg),\ \ \ q(x)=\sqrt{2\pi(\delta_1^2+\delta_2^2)}\tag{10}

p ( x ) = e x p ( − N 2 x ) ,     q ( x ) = 2 π x (11) p(x)=exp\bigg(-\frac{N}{2x}\bigg),\ \ \ q(x)=\sqrt{2\pi x}\tag{11}

• N > 0.06 N>0.06 时，不可能出现情况②
• 0 < N < 0.06 0<N<0.06 时，且 a < x < b a<x<b （其中 a ， b a，b 为两交点， a > 0 , b < 1 2 π a>0,b<\frac{1}{2\pi} ），出现情况②
我们手动仿真了一些情况，如下

• 预测和测量相差很远时 S g S_g 就变小，融合分布概率分散，真实位置概率变小
• 预测和测量相差很近时，且方差很小时，融合分布概率更集中，真实位置概率变大

如此我们可以设置一个阈值来判断当前融合的有效性
• 127
点赞
• 348
收藏
觉得还不错? 一键收藏
• 36
评论
10-09
07-12
01-31 1149
11-27 773
03-18 38万+
04-22 1万+
03-31 2万+
11-23 3557
04-20 4483
12-04
11-13
11-23
04-02 1660
04-11 185

“相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、付费专栏及课程。