极化码BP译码笔记
长度为2的极化码因子图分解
Pr ( u 1 , u 2 , x 1 , x 2 , y 1 , y 2 ) I { x 1 = u 1 ⊕ u 2 } I { x 2 = u 2 } = Pr ( x 1 , x 2 , y 1 , y 2 ∣ u 1 , u 2 ) Pr ( u 1 ) Pr ( u 2 ) I { x 1 = u 1 ⊕ u 2 } I { x 2 = u 2 } = Pr ( u 1 ⊕ u 2 , u 2 , y 1 , y 2 ∣ u 1 , u 2 ) Pr ( u 1 ) Pr ( u 2 ) I { x 1 = u 1 ⊕ u 2 } I { x 2 = u 2 } = Pr ( y 1 , y 2 ∣ u 1 , u 2 ) Pr ( u 1 ) Pr ( u 2 ) I { x 1 = u 1 ⊕ u 2 } I { x 2 = u 2 } = Pr ( y 1 ∣ x 1 ) Pr ( y 2 ∣ x 2 ) Pr ( u 1 ) Pr ( u 2 ) I { x 1 = u 1 ⊕ u 2 } I { x 2 = u 2 } \begin{aligned} &\operatorname{Pr}\left(u_{1}, u_{2}, x_{1}, x_{2}, y_{1}, y_{2}\right) \mathbb{I}\left\{x_{1}=u_{1} \oplus u_{2}\right\} \mathbb{I}\left\{x_{2}=u_{2}\right\} \\ &=\operatorname{Pr}\left(x_{1}, x_{2}, y_{1}, y_{2} \mid u_{1}, u_{2}\right) \operatorname{Pr}\left(u_{1}\right) \operatorname{Pr}\left(u_{2}\right) \mathbb{I}\left\{x_{1}=u_{1} \oplus u_{2}\right\} \mathbb{I}\left\{x_{2}=u_{2}\right\} \\ &=\operatorname{Pr}\left(u_{1} \oplus u_{2}, u_{2}, y_{1}, y_{2} \mid u_{1}, u_{2}\right) \operatorname{Pr}\left(u_{1}\right) \operatorname{Pr}\left(u_{2}\right) \mathbb{I}\left\{x_{1}=u_{1} \oplus u_{2}\right\} \mathbb{I}\left\{x_{2}=u_{2}\right\} \\ &=\operatorname{Pr}\left(y_{1}, y_{2} \mid u_{1}, u_{2}\right) \operatorname{Pr}\left(u_{1}\right) \operatorname{Pr}\left(u_{2}\right) \mathbb{I}\left\{x_{1}=u_{1} \oplus u_{2}\right\} \mathbb{I}\left\{x_{2}=u_{2}\right\} \\ &=\operatorname{Pr}\left(y_{1} \mid x_{1}\right) \operatorname{Pr}\left(y_{2} \mid x_{2}\right) \operatorname{Pr}\left(u_{1}\right) \operatorname{Pr}\left(u_{2}\right) \mathbb{I}\left\{x_{1}=u_{1} \oplus u_{2}\right\} \mathbb{I}\left\{x_{2}=u_{2}\right\} \end{aligned} Pr(u1,u2,x1,x2,y1,y2)I{x1=u1⊕u2}I{x2=u2}=Pr(x1,x2,y1,y2∣u1,u2)Pr(u1)Pr(u2)I{x1=u1⊕u2}I{x2=u2}=Pr(u1⊕u2,u2,y1,y2∣u1,u2)Pr(u1)Pr(u2)I{x1=u1⊕u2}I{x2=u2}=Pr(y1,y2∣u1,u2)Pr(u1)Pr(u2)I{x1=u1⊕u2}I{x2=u2}=Pr(y1∣x1)Pr(y2∣x2)Pr(u1)Pr(u2)I{x1=u1⊕u2}I{x2=u2}
极化码的译码流程图
- 初始化:初始化两个矩阵存储, L N × n + 1 L_{N\times n+1} LN×n+1和 R N × n + 1 R_{N\times n+1} RN×n+1,矩阵内全部初始化为0。
- 将接收到的LLR作为因子图的最右侧的输入数据,填入L的第n+1列。
- 运算规则:
flood
{
L
i
,
j
(
t
+
1
)
=
f
(
L
i
+
1
,
j
(
t
)
,
L
i
+
1
,
j
+
N
i
(
t
)
R
i
,
j
+
N
i
(
t
)
)
L
i
,
j
+
N
i
(
t
+
1
)
=
L
i
+
1
,
j
+
N
i
(
t
)
f
(
L
i
+
1
,
j
(
t
)
R
i
,
j
(
t
)
)
R
i
,
j
(
t
+
1
)
=
f
(
R
i
,
j
(
t
)
,
L
i
+
1
,
j
+
N
i
(
t
)
R
i
+
1
,
j
+
N
i
(
t
)
)
R
i
+
1
,
j
+
N
i
(
t
+
1
)
=
L
i
,
j
+
N
i
(
t
)
f
(
R
i
,
j
(
t
)
L
i
+
1
,
j
(
t
)
)
\left\{\begin{array}{c} L_{i, j}^{(t+1)}={f}\left(L_{i+1, j}^{(t)}, L_{i+1, j+N_{i}}^{(t)} R_{i, j+N_{i}}^{(t)}\right) \\ L_{i, j+N_{i}}^{(t+1)}=L_{i+1, j+N_{i}}^{(t)} {f}\left(L_{i+1, j}^{(t)} R_{i, j}^{(t)}\right) \\ R_{i, j}^{(t+1)}={f}\left(R_{i, j}^{(t)}, L_{i+1, j+N_{i}}^{(t)} R_{i+1, j+N_{i}}^{(t)}\right) \\ R_{i+1, j+N_{i}}^{(t+1)}=L_{i, j+N_{i}}^{(t)} {f}\left(R_{i, j}^{(t)} L_{i+1, j}^{(t)}\right) \end{array}\right.
⎩⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎧Li,j(t+1)=f(Li+1,j(t),Li+1,j+Ni(t)Ri,j+Ni(t))Li,j+Ni(t+1)=Li+1,j+Ni(t)f(Li+1,j(t)Ri,j(t))Ri,j(t+1)=f(Ri,j(t),Li+1,j+Ni(t)Ri+1,j+Ni(t))Ri+1,j+Ni(t+1)=Li,j+Ni(t)f(Ri,j(t)Li+1,j(t))
其中${f}(x,y)=\frac{(1+xy)}{(x+y)} $
LLR log域
L γ i , j , j = f ( R γ i j + 2 j − 1 , j + L γ i j + 2 j − 1 , j + 1 , L γ i , j , j + 1 ) . L γ i , j + 2 j − 1 , j = f ( R γ i j , j , L γ i j , j + 1 ) + L γ i j + 2 j − 1 , j + 1 R γ i , j , j + 1 = f ( R γ i j + 2 j − 1 , j + L γ i j + 2 j − 1 , j + 1 , R γ i , j , j ) . R γ i , j + 2 j − 1 , j + 1 = f ( R γ i j , j , L γ i j , j + 1 ) + R γ i j + 2 j − 1 , j \begin{aligned} L_{\gamma_{i, j}, j} &=f\left(R_{\gamma_{i j}+2^{j-1}, j}+L_{\gamma_{i j}+2^{j-1}, j+1}, L_{\gamma_{i, j}, j+1}\right ).\\ L_{\gamma_{i, j}+2^{j-1}, j} &=f\left(R_{\gamma_{i j}, j}, L_{\gamma_{i j}, j+1}\right)+L_{\gamma_{i j}+2^{j-1}, j+1} \\ R_{\gamma_{i, j}, j+1} &=f\left(R_{\gamma_{i j}+2^{j-1}, j}+L_{\gamma_{i j}+2^{j-1}, j+1}, R_{\gamma_{i, j}, j}\right ).\\ R_{\gamma_{i, j}+2^{j-1}, j+1} &=f\left(R_{\gamma_{i j}, j}, L_{\gamma_{i j}, j+1}\right)+R_{\gamma_{i j}+2^{j-1}, j} \end{aligned} Lγi,j,jLγi,j+2j−1,jRγi,j,j+1Rγi,j+2j−1,j+1=f(Rγij+2j−1,j+Lγij+2j−1,j+1,Lγi,j,j+1).=f(Rγij,j,Lγij,j+1)+Lγij+2j−1,j+1=f(Rγij+2j−1,j+Lγij+2j−1,j+1,Rγi,j,j).=f(Rγij,j,Lγij,j+1)+Rγij+2j−1,j
其中
f
(
x
,
y
)
=
ln
(
1
+
e
x
+
y
)
(
e
x
+
e
y
)
{f} (x,y)=\ln \frac{(1+e^{x+y})}{(e^{x}+e^{y})}
f(x,y)=ln(ex+ey)(1+ex+y)
或者根据最小和算法
f
(
x
,
y
)
=
sign
(
x
)
sign
(
y
)
min
{
∣
x
∣
,
∣
y
∣
}
f(x, y)=\operatorname{sign}(x) \operatorname{sign}(y) \min \{|x|,|y|\}
f(x,y)=sign(x)sign(y)min{∣x∣,∣y∣}
下面证明最小和定理
考虑两个独立二元随机变量
a
1
a_1
a1和
a
2
a_2
a2,其概率为
P
r
(
a
l
=
b
)
=
p
b
(
l
)
,
b
∈
{
0
,
1
}
Pr\left( a_{l}=b\right) =p^{\left( l\right) }_{b},b\in \left\{ 0,1\right\}
Pr(al=b)=pb(l),b∈{0,1},其似然比为
L
l
=
L
(
a
l
)
=
log
(
p
0
(
l
)
p
1
(
l
)
)
L_{l}=L\left( a_{l}\right) =\log \left( \frac{p^{\left( l\right) }_{0}}{p^{\left( l\right) }_{1}} \right)
Ll=L(al)=log(p1(l)p0(l))。模2和
A
2
=
a
1
⊕
a
2
A_{2}=a_{1}\oplus a_{2}
A2=a1⊕a2的LLR定义为
L
(
A
2
)
=
log
(
Pr
(
A
2
=
0
)
Pr
(
A
2
=
1
)
)
L\left(A_{2}\right)=\log \left(\frac{\operatorname{Pr}\left(A_{2}=0\right)}{\operatorname{Pr}\left(A_{2}=1\right)}\right)
L(A2)=log(Pr(A2=1)Pr(A2=0))
它可计算如下:
L
(
A
2
)
=
log
(
1
+
e
L
1
+
L
2
e
L
1
+
e
L
2
)
L\left(A_{2}\right)=\log \left(\frac{1+\mathrm{e}^{L_{1}+L_{2}}}{\mathrm{e}^{L_{1}}+\mathrm{e}^{L_{2}}}\right)
L(A2)=log(eL1+eL21+eL1+L2)
L ( A 2 ) = log ( Pr ( a 1 ⊕ a 2 = 0 ) Pr ( a 1 ⊕ a 2 = 1 ) ) = log ( p 0 ( 1 ) p 0 ( 2 ) + p 1 ( 1 ) p 1 ( 2 ) p 0 ( 1 ) p 1 ( 2 ) + p 1 ( 1 ) p 0 ( 2 ) ) = log ( 1 + p 0 ( 1 ) p 1 ( 1 ) p 0 ( 2 ) p 1 ( 2 ) p 0 ( 1 ) p 1 ( 1 ) + p 0 ( 2 ) p 1 ( 2 ) ) = log ( 1 + e L 1 + L 2 e L 1 + e L 2 ) \begin{aligned} L\left(A_{2}\right) &=\log \left(\frac{\operatorname{Pr}\left(a_{1} \oplus a_{2}=0\right)}{\operatorname{Pr}\left(a_{1} \oplus a_{2}=1\right)}\right) \\ &=\log \left(\frac{p_{0}^{(1)} p_{0}^{(2)}+p_{1}^{(1)} p_{1}^{(2)}}{p_{0}^{(1)} p_{1}^{(2)}+p_{1}^{(1)} p_{0}^{(2)}}\right) \\ &=\log \left(\frac{1+\frac{p_{0}^{(1)}}{p_{1}^{(1)}} \frac{p_{0}^{(2)}}{p_{1}^{(2)}}}{\frac{p_{0}^{(1)}}{p_{1}^{(1)}}+\frac{p_{0}^{(2)}}{p_{1}^{(2)}}}\right) \\ &=\log \left(\frac{1+\mathrm{e}^{L_{1}+L_{2}}}{\mathrm{e}^{L_{1}}+\mathrm{e}^{L_{2}}}\right) \end{aligned} L(A2)=log(Pr(a1⊕a2=1)Pr(a1⊕a2=0))=log(p0(1)p1(2)+p1(1)p0(2)p0(1)p0(2)+p1(1)p1(2))=log⎝⎜⎛p1(1)p0(1)+p1(2)p0(2)1+p1(1)p0(1)p1(2)p0(2)⎠⎟⎞=log(eL1+eL21+eL1+L2)
使用记号 L 1 ⊞ L 2 L_{1}\boxplus L_{2} L1⊞L2来表示
L 1 ⊞ L 2 = log ( 1 + e L 1 + L 2 e L 1 + e L 2 ) L_{1}\boxplus L_{2}=\log \left( \frac{1+\mathrm{e}^{L_{1}+L_{2}} }{\mathrm{e}^{L_{1}} +\mathrm{e}^{L_{2}} } \right) L1⊞L2=log(eL1+eL21+eL1+L2)
定理:对任意一对实数 x , y x,y x,y,定义
max ∗ ( x , y ) ≜ log ( e x + e y ) \max ^{*}(x, y) \triangleq \log \left(\mathrm{e}^{x}+\mathrm{e}^{y}\right) max∗(x,y)≜log(ex+ey)
上式可变换成
max ∗ ( x , y ) = max ( x , y ) + log ( 1 + e − ∣ x − y ∣ ) \max ^{*}(x, y)=\max (x, y)+\log \left(1+\mathrm{e}^{-|x-y|}\right) max∗(x,y)=max(x,y)+log(1+e−∣x−y∣)
那么,可以写成
L 1 田 L 2 = max ∗ ( 0 , L 1 + L 2 ) − max ∗ ( L 1 , L 2 ) L_{1} \text { 田 } L_{2}=\max ^{*}\left(0, L_{1}+L_{2}\right)-\max ^{*}\left(L_{1}, L_{2}\right) L1 田 L2=max∗(0,L1+L2)−max∗(L1,L2)
因此
L
1
田
L
2
=
max
(
0
,
L
1
+
L
2
)
−
max
(
L
1
,
L
2
)
+
s
(
L
1
,
L
2
)
L_{1} \text { 田 } L_{2}=\max \left(0, L_{1}+L_{2}\right)-\max \left(L_{1}, L_{2}\right)+s\left(L_{1}, L_{2}\right)
L1 田 L2=max(0,L1+L2)−max(L1,L2)+s(L1,L2)
其中
s
(
x
,
y
)
s(x,y)
s(x,y)被称为修正项,其计算如下:
s
(
x
,
y
)
=
log
(
1
+
e
−
∣
x
+
y
∣
)
−
log
(
1
+
e
−
∣
x
−
y
∣
)
s(x, y)=\log \left(1+\mathrm{e}^{-|x+y|}\right)-\log \left(1+\mathrm{e}^{-|x-y|}\right)
s(x,y)=log(1+e−∣x+y∣)−log(1+e−∣x−y∣)可以推知,
max
(
0
,
L
1
+
L
2
)
−
max
(
L
1
,
L
2
)
=
sign
(
L
1
)
sign
(
L
2
)
min
(
∣
L
1
∣
,
∣
L
2
∣
)
\max \left(0, L_{1}+L_{2}\right)-\max \left(L_{1}, L_{2}\right)=\operatorname{sign}\left(L_{1}\right) \operatorname{sign}\left(L_{2}\right) \min \left(\left|L_{1}\right|,\left|L_{2}\right|\right)
max(0,L1+L2)−max(L1,L2)=sign(L1)sign(L2)min(∣L1∣,∣L2∣)
因此
L
1
田
L
2
=
sign
(
L
1
)
sign
(
L
2
)
min
(
∣
L
1
∣
,
∣
L
2
∣
)
+
s
(
L
1
,
L
2
)
=
sign
(
L
1
)
sign
(
L
2
)
[
min
(
∣
L
1
∣
,
∣
L
2
∣
)
+
s
(
∣
L
1
∣
,
∣
L
2
∣
)
]
≜
sign
(
L
1
)
sign
(
L
2
)
min
∗
(
∣
L
1
∣
,
∣
L
2
∣
)
\begin{aligned} L_{1} \text { 田 } L_{2} &=\operatorname{sign}\left(L_{1}\right) \operatorname{sign}\left(L_{2}\right) \min \left(\left|L_{1}\right|,\left|L_{2}\right|\right)+s\left(L_{1}, L_{2}\right) \\ &=\operatorname{sign}\left(L_{1}\right) \operatorname{sign}\left(L_{2}\right)\left[\min \left(\left|L_{1}\right|,\left|L_{2}\right|\right)+s\left(\left|L_{1}\right|,\left|L_{2}\right|\right)\right] \\ & \triangleq \operatorname{sign}\left(L_{1}\right) \operatorname{sign}\left(L_{2}\right) \min ^{*}\left(\left|L_{1}\right|,\left|L_{2}\right|\right) \end{aligned}
L1 田 L2=sign(L1)sign(L2)min(∣L1∣,∣L2∣)+s(L1,L2)=sign(L1)sign(L2)[min(∣L1∣,∣L2∣)+s(∣L1∣,∣L2∣)]≜sign(L1)sign(L2)min∗(∣L1∣,∣L2∣)
其中
m
i
n
∗
(
⋅
,
⋅
)
min^{\ast }\left( \cdot ,\cdot \right)
min∗(⋅,⋅)由它的上一行的表达式说定义。从
m
i
n
∗
min^{\ast }
min∗的定义可知,
L
1
田
L
2
≃
sign
(
L
1
)
sign
(
L
2
)
min
(
∣
L
1
∣
,
∣
L
2
∣
)
L_{1} \text { 田 } L_{2} \simeq \operatorname{sign}\left(L_{1}\right) \operatorname{sign}\left(L_{2}\right) \min \left(\left|L_{1}\right|,\left|L_{2}\right|\right)
L1 田 L2≃sign(L1)sign(L2)min(∣L1∣,∣L2∣)
- 向左运算
首先启动第n列的“Z”模块,我们只向左计算两个L中的数据,不向右计算R中的数值,第n列的所有“Z”模块运算完成,即代表我们给L矩阵的第n列填上了数据。然后以此类推,将L矩阵填满数据,我们完成了向左传播,看作“半次迭代”。
5. 向右运算
启动第1列的“Z”模块,我们现在只向右计算两个R中的数据,以此类推,完成向右传播,看作“边吃迭代”。
6. 4,5的两个“半次迭代”合起来称为一次迭代。程序不断重复4、5操作直至达到预先设定的最大迭代次数为之。判决公式为:
u
^
i
=
{
0
,
L
i
,
1
+
R
i
,
1
≥
0
1
,
L
i
,
1
+
R
i
,
1
<
0
\hat{u}_{i}=\left\{\begin{array}{l} 0, L_{i, 1}+R_{i, 1} \geq 0 \\ 1, L_{i, 1}+R_{i, 1}<0 \end{array}\right.
u^i={0,Li,1+Ri,1≥01,Li,1+Ri,1<0
SCAN 软抵消算法
该方法的时序与SC译码算法的时序尤为相似。估计值当作传递的信息从最右端 y 1 N y^{N}_{1} y1N传输到最右端 u 1 N u^{N}_{1} u1N,然后在做0-1判决作为传输的信息从 u 1 N u^{N}_{1} u1N传输到 y 1 N y^{N}_{1} y1N。不同之处:还需将信息从 u 1 N u^{N}_{1} u1N传输到 y 1 N y^{N}_{1} y1N。