调节固有模型参数

上接测量噪声 \quad 包含噪声的测量仪测量模型
\qquad 建立含噪声的测量模型后,需要选择传感器模型参数,参数包含 z h i t 、 z s h o r t 、 z m a x 、 z r a n d 、 σ h i t z_{hit}、z_{short}、z_{max}、z_{rand}、\sigma_{hit} zhitzshortzmaxzrandσhit λ s h o r t \lambda_{short} λshort,所有的内部参数标记为 Θ \boldsymbol{\Theta} Θ,传感器测量的似然就是 Θ \boldsymbol{\Theta} Θ的函数。
\qquad 从实际数据中获得这些参数,通过考虑参考数据集 Z = { z i } Z=\{z_{i}\} Z={zi}(联合位置 X = { x i } X=\{x_{i}\} X={xi}和地图 m m m)的似然最大化。似然由下式给出
p ( Z ∣ X , m , Θ ) p(Z|X,m,\boldsymbol{\Theta}) p(ZX,m,Θ) \qquad 目标是确定使这个似然最大的固有参数 Θ \boldsymbol{\Theta} Θ。使用数据似然最大化的估计或算法称为极大似然估计或 M L ML ML估计。为了推导极大似然估计,引入辅助变量 c i c_{i} ci,即一致性变量 c i c_{i} ci可能取四个值,对应着产生测量 z i z_{i} zi的四个可能途径。
\qquad 基于 c i c_{i} ci的值,可以将 Z Z Z分解为四个不相交的子集 Z h i t 、 Z s h o r t 、 Z m a x Z_{hit}、Z_{short}、Z_{max} ZhitZshortZmax Z r a n d Z_{rand} Zrand。对于参数 z h i t 、 z s h o r t 、 z m a x 、 z r a n d z_{hit}、z_{short}、z_{max}、z_{rand} zhitzshortzmaxzrand的极大似然估计是简单的归一化系数
( z h i t z s h o r t z m a x z r a n d ) = ∣ Z ∣ − 1 ( ∣ Z h i t ∣ ∣ Z s h o r t ∣ ∣ Z m a x ∣ ∣ Z r a n d ∣ ) \begin{pmatrix} z_{hit}\\ z_{short}\\ z_{max}\\ z_{rand} \end{pmatrix}=|Z|^{-1}\begin{pmatrix} |Z_{hit}|\\ |Z_{short}|\\ |Z_{max}|\\ |Z_{rand}| \end{pmatrix} zhitzshortzmaxzrand=Z1ZhitZshortZmaxZrand \qquad ∣ Z ∗ ∣ |Z_{*}| Z表示所有测量点 z i z_{i} zi在每次测量中的权值(对应四种途径)和。获取固有参数 σ h i t \sigma_{hit} σhit
p ( Z h i t ∣ X , m , Θ ) = ∏ z i ∈ Z h i t p h i t ( z i ∣ x i , m , Θ ) = ∏ z i ∈ Z h i t 1 2 π σ h i t 2 e − 1 2 ( z i − z i ∗ ) 2 σ h i t 2 p(Z_{hit}|X,m,\boldsymbol{\Theta})= \prod_{z_{i}\in Z_{hit}}p_{hit}(z_{i}|x_{i},m,\boldsymbol{\Theta})\\ = \prod_{z_{i}\in Z_{hit}}\frac{1}{\sqrt{2\pi\sigma_{hit}^{2}}}e^{-\frac{1}{2}\frac{(z_{i}-z_{i}^{*})^{2}}{\sigma_{hit}^{2}}} p(ZhitX,m,Θ)=ziZhitphit(zixi,m,Θ)=ziZhit2πσhit2 1e21σhit2(zizi)2 \qquad 取对数(连乘变为连加),求导,由极值的必要条件,对数函数单调递增性质得极大似然估计解:
σ h i t = 1 ∣ Z h i t ∣ ∑ z i ∈ Z h i t ( z i − z i ∗ ) 2 \sigma_{hit}=\sqrt{\frac{1}{|Z_{hit}|}\sum_{z_{i}\in Z_{hit}}(z_{i}-z_{i}^{*})^{2}} σhit=Zhit1ziZhit(zizi)2 \qquad 求解参数 λ s h o r t \lambda_{short} λshort使用相同的方法,求解结果为:
λ s h o r t = ∣ Z s h o r t ∣ ∑ z i ∈ Z s h o r t z i \lambda_{short}=\frac{|Z_{short}|}{\sum_{z_{i}\in Z_{short}}z_{i}} λshort=ziZshortziZshort \qquad 上述推导为假设参数 c i c_{i} ci已知,现在延伸到 c i c_{i} ci未知,使用 E M EM EM算法求解,第一步计算 c i c_{i} ci的期望值,第二步计算该期望值下的固有模型参数。将前文极大似然估计中:
l o g   p ( Z ∣ X , m , Θ ) = ∑ z i ∈ Z l o g   p ( z i ∣ x i , m ) = ∑ z i ∈ Z h i t l o g   p h i t ( z i ∣ x i , m ) + ∑ z i ∈ Z s h o r t l o g   p s h o r t ( z i ∣ x i , m ) + ∑ z i ∈ Z m a x l o g   p m a x ( z i ∣ x i , m ) + ∑ z i ∈ Z r a n d l o g   p r a n d ( z i ∣ x i , m ) log\ p(Z|X,m,\boldsymbol{\Theta})=\sum_{z_{i}\in Z}log\ p(z_{i}|x_{i},m)\\ = \sum_{z_{i}\in Z_{hit}}log\ p_{hit}(z_{i}|x_{i},m) + \sum_{z_{i}\in Z_{short}}log\ p_{short}(z_{i}|x_{i},m) + \sum_{z_{i}\in Z_{max}}log\ p_{max}(z_{i}|x_{i},m) + \sum_{z_{i}\in Z_{rand}}log\ p_{rand}(z_{i}|x_{i},m) log p(ZX,m,Θ)=ziZlog p(zixi,m)=ziZhitlog phit(zixi,m)+ziZshortlog pshort(zixi,m)+ziZmaxlog pmax(zixi,m)+ziZrandlog prand(zixi,m) \qquad 改写为
l o g   p ( Z ∣ X , m , Θ ) = ∑ z i ∈ Z I ( c i = h i t ) l o g   p h i t ( z i ∣ x i , m ) + I ( c i = s h o r t ) l o g   p s h o r t ( z i ∣ x i , m ) + I ( c i = m a x ) l o g   p m a x ( z i ∣ x i , m ) + I ( c i = r a n d ) l o g   p r a n d ( z i ∣ x i , m ) log\ p(Z|X,m,\boldsymbol{\Theta}) = \sum_{z_{i}\in Z}I(c_{i}=hit)log\ p_{hit}(z_{i}|x_{i},m)+I(c_{i}=short)log\ p_{short}(z_{i}|x_{i},m)+I(c_{i}=max)log\ p_{max}(z_{i}|x_{i},m)+I(c_{i}=rand)log\ p_{rand}(z_{i}|x_{i},m) log p(ZX,m,Θ)=ziZI(ci=hit)log phit(zixi,m)+I(ci=short)log pshort(zixi,m)+I(ci=max)log pmax(zixi,m)+I(ci=rand)log prand(zixi,m) \qquad z i 的 取 值 范 围 变 化 ! ! ! \color{#F00}{z_{i}的取值范围变化!!!} zi求解期望值最大得:
E ( l o g   p ( Z ∣ X , m , Θ ) ) = ∑ z i ∈ Z e i , h i t l o g   p h i t ( z i ∣ x i , m ) + e i , s h o r t l o g   p s h o r t ( z i ∣ x i , m ) + e i , s h o r t l o g   p m a x ( z i ∣ x i , m ) + e i , r a n d l o g   p r a n d ( z i ∣ x i , m ) E(log\ p(Z|X,m,\boldsymbol{\Theta}))=\sum_{z_{i}\in Z}e_{i,hit}log\ p_{hit}(z_{i}|x_{i},m)+e_{i,short}log\ p_{short}(z_{i}|x_{i},m)+e_{i,short}log\ p_{max}(z_{i}|x_{i},m)+e_{i,rand}log\ p_{rand}(z_{i}|x_{i},m) E(log p(ZX,m,Θ))=ziZei,hitlog phit(zixi,m)+ei,shortlog pshort(zixi,m)+ei,shortlog pmax(zixi,m)+ei,randlog prand(zixi,m) \qquad 使用 E M EM EM算法实现最大化,固定变量 σ h i t \sigma_{hit} σhit λ s h o r t \lambda_{short} λshort,计算变量 c i c_{i} ci的期望。
( e i , h i t e i , s h o r t e i , m a x e i , r a n d ) = η ( p h i t ( z i ∣ x i , m ) p s h o r t ( z i ∣ x i , m ) p m a x ( z i ∣ x i , m ) p r a n d ( z i ∣ x i , m ) ) \begin{pmatrix} e_{i,hit}\\ e_{i,short}\\ e_{i,max}\\ e_{i,rand} \end{pmatrix}=\eta\begin{pmatrix} p_{hit}(z_{i}|x_{i},m)\\ p_{short}(z_{i}|x_{i},m)\\ p_{max}(z_{i}|x_{i},m)\\ p_{rand}(z_{i}|x_{i},m) \end{pmatrix} ei,hitei,shortei,maxei,rand=ηphit(zixi,m)pshort(zixi,m)pmax(zixi,m)prand(zixi,m)其中 η = [ p h i t ( z i ∣ x i , m ) + p s h o r t ( z i ∣ x i , m ) + p m a x ( z i ∣ x i , m ) + p r a n d ( z i ∣ x i , m ) ] − 1 \eta = [p_{hit}(z_{i}|x_{i},m)+p_{short}(z_{i}|x_{i},m)+p_{max}(z_{i}|x_{i},m)+p_{rand}(z_{i}|x_{i},m)]^{-1} η=[phit(zixi,m)+pshort(zixi,m)+pmax(zixi,m)+prand(zixi,m)]1
( z h i t z s h o r t z m a x z r a n d ) = ∣ Z ∣ − 1 ∑ i ( e i , h i t e i , s h o r t e i , m a x e i , r a n d ) \begin{pmatrix} z_{hit}\\ z_{short}\\ z_{max}\\ z_{rand} \end{pmatrix}= |Z|^{-1}\sum_{i}\begin{pmatrix} e_{i,hit}\\ e_{i,short}\\ e_{i,max}\\ e_{i,rand} \end{pmatrix} zhitzshortzmaxzrand=Z1iei,hitei,shortei,maxei,rand
σ h i t = 1 ∑ z i ∈ Z e i , h i t ∑ z i ∈ Z e i , h i t ( z i − z i ∗ ) 2 λ s h o r t = ∑ z i ∈ Z e i , s h o r t ∑ z i ∈ Z e i , s h o r t z i \sigma_{hit}=\sqrt{\frac{1}{\sum_{z_{i}\in Z}e_{i,hit}}\sum_{z_{i}\in Z}e_{i,hit}(z_{i}-z_{i}^{*})^{2}}\\ \lambda_{short} = \frac{\sum_{z_{i}\in Z}e_{i,short}}{\sum_{z_{i}\in Z}e_{i,short}z_{i}} σhit=ziZei,hit1ziZei,hit(zizi)2 λshort=ziZei,shortziziZei,short 给 每 个 测 量 值 z i 按 照 概 率 值 在 η ( 归 一 化 系 数 ) 中 的 比 例 加 权 \color{#F00}{给每个测量值z_{i}按照概率值在\eta(归一化系数)中的比例加权} ziη()

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值