Difference between revisions of "Aufgaben:Exercise 4.3Z: Conversions of L-value and S-value"

From LNTwww
m (Text replacement - "„" to """)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Soft–in Soft–out Decoder}}
+
{{quiz-Header|Buchseite=Channel_Coding/Soft-in_Soft-Out_Decoder}}
  
[[File:P_ID3093__KC_Z_4_3neu_v1.png|right|right|frame|Funktion&nbsp; $y = \tanh {(x)}$&nbsp; <br>in Tabellenform]]
+
[[File:P_ID3093__KC_Z_4_3neu_v1.png|right|right|frame|Function&nbsp; $y = \tanh {(x)}$&nbsp; <br>in tabular form.]]
Wir gehen von einer binären Zufallsgröße&nbsp; $x &#8712; \{+1, \, -1\}$&nbsp; mit folgenden Wahrscheinlichkeiten aus:
+
We assume a binary random variable&nbsp; $x &#8712; \{+1, \, -1\}$&nbsp; with following probabilities:
:$${\rm Pr}(x =+1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} p\hspace{0.05cm},$$
+
:$${\rm Pr}(x =+1) = p\hspace{0.05cm},$$
:$${\rm Pr}(x =-1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} q = 1-p\hspace{0.05cm}.$$
+
:$${\rm Pr}(x =-1) = q = 1-p\hspace{0.05cm}.$$
  
Die "Zuverlässigkeit" des Symbols&nbsp; $x$&nbsp; kann ausgedrückt werden
+
The&nbsp; "reliability"&nbsp; of symbol&nbsp; $x$&nbsp; can be expressed
* durch den&nbsp; $L$&ndash;Wert entsprechend der Definition
+
* by the&nbsp; L&ndash;value&nbsp; $($log likelihood ratio$)$&nbsp; according to the definition
:$$L(x) = {\rm ln} \hspace{0.2cm}  \frac{p}{q} = \frac{p}{1 - p}\hspace{0.05cm}
+
:$$L(x) = {\rm ln} \hspace{0.2cm}  \frac{p}{q} = {\rm ln} \hspace{0.2cm} \frac{p}{1 - p}\hspace{0.05cm}
 
  \hspace{0.05cm},$$
 
  \hspace{0.05cm},$$
* durch den so genannten&nbsp; $S$&ndash;Wert
+
* by the so called&nbsp; "S&ndash;value":
 
:$$S(x) = p- q \hspace{0.05cm}.$$
 
:$$S(x) = p- q \hspace{0.05cm}.$$
  
Den Begriff "$S$&ndash;Wert" haben wir kreiert, um die folgenden Fragen griffiger formulieren zu können. In der Literatur findet man hierfür manchmal die Bezeichung&nbsp; "Soft Bit".
+
We have created the term&nbsp; "S&ndash;value"&nbsp; in order to be able to formulate the following questions more succinctly.&nbsp; In the literature,&nbsp; one sometimes finds the term&nbsp; "soft bit"&nbsp; for this.
  
Wie in Teilaufgabe '''(1)''' gezeigt werden soll, können&nbsp; $L(x)$&nbsp; und&nbsp; $S(x)$&nbsp; ineinander umgerechnet werden.
+
As will be shown in subtask&nbsp; '''(1)''',&nbsp; $L(x)$&nbsp; and&nbsp; $S(x)$&nbsp; can be converted into each other.
  
Anschließend sollen diese Funktionen zur Berechnung der folgenden Größen herangezogen werden, wobei stets von der Codelänge&nbsp; $n = 3$&nbsp; ausgegangen wird:
+
Subsequently,&nbsp; these functions shall be used to calculate the following quantities,&nbsp; always assuming a code length&nbsp; $n = 3$:
* der extrinsische&nbsp; $L$&ndash;Wert für das dritte Symbol &nbsp; &#8658; &nbsp; $L_{\rm E}(x_3)$,
+
* the extrinsic&nbsp; L&ndash;value for the third symbol&nbsp; &#8658; &nbsp; $L_{\rm E}(x_3)$,
* der Aposteriori&ndash;$L$&ndash;Wert für das dritte Symbol &nbsp; &#8658; &nbsp; $L_{\rm APP}(x_3)$.
 
  
 +
* the a-posteriori&nbsp; L&ndash;value for the third symbol &nbsp; &#8658; &nbsp; $L_{\rm APP}(x_3)$.
  
Die Berechnung soll für folgende Codes erfolgen:
 
* den Wiederholungscode&nbsp;  [[Channel_Coding/Beispiele_bin%C3%A4rer_Blockcodes#Wiederholungscodes|$\text{RC (3, 1, 3)}$]]&nbsp; mit der Nebenbedingung&nbsp; $\sign {(x_1)} = \sign {(x_2)} = \sign {(x_3)}$,
 
* den Single Parity&ndash;Code &nbsp; &#8658; &nbsp; [[Channel_Coding/Beispiele_bin%C3%A4rer_Blockcodes#Single_Parity.E2.80.93check_Codes_.281.29|$\text{SPC (3, 2, 2)}$]]&nbsp; mit der Nebenbedingung&nbsp; $x_1 \cdot x_2 \cdot x_3 = +1$.
 
  
 +
The calculation should be done for the following codes:
 +
* the repetition Code&nbsp; [[Channel_Coding/Examples_of_Binary_Block_Codes#Repetition_Codes|$\text{RC (3, 1, 3)}$]]&nbsp; with the constraint&nbsp; $\sign {(x_1)} = \sign {(x_2)} = \sign {(x_3)}$,
  
 +
* the single parity&ndash;check code &nbsp; &#8658; &nbsp; [[Channel_Coding/Examples_of_Binary_Block_Codes#Single_Parity-check_Codes|$\text{SPC (3, 2, 2)}$]]&nbsp; with the constraint&nbsp; $x_1 \cdot x_2 \cdot x_3 = +1$.
  
  
Line 32: Line 32:
  
  
''Hinweise:''
+
 
* Die Aufgabe gehört zum Kapitel&nbsp; [[Channel_Coding/Soft%E2%80%93in_Soft%E2%80%93out_Decoder| Soft&ndash;in Soft&ndash;out Decoder]].
+
 
* Bezug genommen wird insbesondere auf die Seite&nbsp; [[Channel_Coding/Soft–in_Soft–out_Decoder#Zuverl.C3.A4ssigkeitsinformation_.E2.80.93_Log_Likelihood_Ratio| Zuverlässigkeitsinformation &ndash; Log Likelihood Ratio]].
+
Hints:
* Zur Lösung benötigen Sie den&nbsp; <i>Tangens Hyperbolikus</i>&nbsp; entsprechend folgender Definition (diese Funktion ist oben in Tabellenform angegeben):
+
* This exercise belongs to the chapter&nbsp; [[Channel_Coding/Soft-in_Soft-Out_Decoder| "Soft&ndash;in Soft&ndash;out Decoder"]].
 +
 
 +
* Reference is made in particular to the section&nbsp; [[Channel_Coding/Soft-in_Soft-Out_Decoder#Reliability_information_-_Log_Likelihood_Ratio| "Reliability Information &ndash; Log Likelihood Ratio"]].
 +
 
 +
* To solve,&nbsp; you need the&nbsp; "hyperbolic tangent"&nbsp; according to the following definition&nbsp; $($this function is given above in tabular form$)$:
 
:$$y = {\rm tanh}(x) = \frac{{\rm e}^{+x/2} - {\rm e}^{-x/2}}{{\rm e}^{+x/2} + {\rm e}^{-x/2}}  
 
:$$y = {\rm tanh}(x) = \frac{{\rm e}^{+x/2} - {\rm e}^{-x/2}}{{\rm e}^{+x/2} + {\rm e}^{-x/2}}  
 
= \frac{1 - {\rm e}^{-x}}{1 + {\rm e}^{-x}}  
 
= \frac{1 - {\rm e}^{-x}}{1 + {\rm e}^{-x}}  
Line 42: Line 46:
  
  
===Fragebogen===
+
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Welcher Zusammenhang besteht zwischen&nbsp; $S$&ndash;Wert und&nbsp; $L$&ndash;Wert?
+
{What is the relationship between&nbsp; S&ndash;value and&nbsp; L&ndash;value?
 
|type="[]"}
 
|type="[]"}
 
- $S(x) = \tanh {(L(x))}$,
 
- $S(x) = \tanh {(L(x))}$,
Line 50: Line 54:
 
+ $L(x) = 2 \cdot \tanh^{-1}{(S(x))}$.
 
+ $L(x) = 2 \cdot \tanh^{-1}{(S(x))}$.
  
{Betrachtet wird der&nbsp; $\text{RC (3, 1, 3)}$. Für die Apriori&ndash;$L$&ndash;Werte gelte&nbsp; $\underline{L}_{\rm A} = (+2, -1, +3)$. Wie groß ist der extrinsische&nbsp; $L$&ndash;Wert für das Symbol&nbsp; $x_3$?
+
{The&nbsp; $\text{RC (3, 1, 3)}$&nbsp; is considered.&nbsp; For the&nbsp; a-priori&nbsp; L&ndash;values, &nbsp; let be&nbsp; $\underline{L}_{\rm A} = (+2, -1, +3)$.&nbsp; What is the&nbsp; <u> extrinsicL&ndash;value</u>&nbsp; for the symbol&nbsp; $x_3$?
 
|type="{}"}
 
|type="{}"}
 
$L_{\rm E}(x_3) \ = \ ${ 1 3% }
 
$L_{\rm E}(x_3) \ = \ ${ 1 3% }
  
{Wie groß ist in diesem Fall der Aposteriori&ndash;$L$&ndash;Wert für das Symbol&nbsp; $x_3$?
+
{What is the&nbsp; <u>a-posteriori L&ndash;value</u>&nbsp; for the symbol&nbsp; $x_3$?
 
|type="{}"}
 
|type="{}"}
 
$L_{\rm APP}(x_3) \ = \ ${ 4 3% }
 
$L_{\rm APP}(x_3) \ = \ ${ 4 3% }
  
{Wie groß ist der extrinsische $L$&ndash;Wert beim&nbsp; $\text{SPC (3, 2, 2)}$? Es gelte weiterhin&nbsp; $\underline{L}_{\rm A} = (+2, -1, +3)$.
+
{What is the&nbsp; <u>extrinsic L&ndash;value</u>&nbsp;  at&nbsp; $\text{SPC (3, 2, 2)}$?&nbsp; It is still valid: &nbsp; $\underline{L}_{\rm A} = (+2, -1, +3)$.
 
|type="{}"}
 
|type="{}"}
 
$L_{\rm E}(x_3) \ = \ ${ -0.757256--0.713144 }
 
$L_{\rm E}(x_3) \ = \ ${ -0.757256--0.713144 }
  
{Die Apriori&ndash;Wahrscheinlichkeiten seien nun&nbsp; $0.3, \ 0.8$&nbsp; und&nbsp; $0.9$. Wie groß ist der extrinsische&nbsp; $L$&ndash;Wert für den <i>Repetition Code</i>?
+
{The a-priori probabilities are now&nbsp; $0.3, \ 0.8, \ 0.9$.&nbsp; What is the&nbsp; <u>extrinsic&nbsp; L&ndash;value</u>&nbsp; for the&nbsp; <u>repetition code</u>?
 
|type="{}"}
 
|type="{}"}
 
$L_{\rm E}(x_3) \ = \ ${ 0.535 3% }
 
$L_{\rm E}(x_3) \ = \ ${ 0.535 3% }
  
{Welcher extrinsische&nbsp; $L$&ndash;Wert ergibt sich bei gleichen Voraussetzungen wie in &nbsp;'''(5)'''&nbsp; für den <i>Single Parity&ndash;check Code</i>?
+
{What&nbsp; <u>extrinsic L&ndash;value</u>&nbsp; results for the&nbsp; <u>single parity&ndash;check code</u>&nbsp; given the same conditions as in subtask&nbsp; '''(5)'''?
 
|type="{}"}
 
|type="{}"}
 
$L_{\rm E}(x_3) \ = \ ${ 0.49 3% }
 
$L_{\rm E}(x_3) \ = \ ${ 0.49 3% }
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Für die binäre Zufallsgröße $x &#8712; \{+1, -1\}$ mit den Wahrscheinlichkeiten
+
'''(1)'''&nbsp; For the binary random variable&nbsp; $x &#8712; \{+1, -1\}$&nbsp; with probabilities
* $p = {\rm Pr}(x = +1)$, und
+
* $p = {\rm Pr}(x = +1)$,&nbsp; and
 +
 
 
* $p = {\rm Pr}(x=-1) = 1-p$
 
* $p = {\rm Pr}(x=-1) = 1-p$
  
  
gelten folgende Definitionen:
+
the following definitions apply:
:$$L(x) = {\rm ln} \hspace{0.2cm} \frac{p}{q} = \frac{p}{1 - p}\hspace{0.05cm}
+
:$$L(x) = {\rm ln} \hspace{0.2cm} \frac{p}{q} = {\rm ln} \hspace{0.2cm} \frac{p}{1 - p}\hspace{0.05cm}
 
  \hspace{0.3cm} \Rightarrow \hspace{0.3cm}  
 
  \hspace{0.3cm} \Rightarrow \hspace{0.3cm}  
 
-\infty \le L(x) \le +\infty
 
-\infty \le L(x) \le +\infty
Line 88: Line 93:
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
*Ausgehend vom $S$&ndash;Wert erhält man wegen $p + q = 1$:
+
*Based on the S&ndash;value,&nbsp; we get because of&nbsp; $p + q = 1$:
 
:$$S(x) = p- q = \frac{p- q}{p+  q} =  \frac{1- q/p}{1+ q/p}
 
:$$S(x) = p- q = \frac{p- q}{p+  q} =  \frac{1- q/p}{1+ q/p}
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
*Gleichzeitig gilt $q/p = {\rm e}^{-L(x)}$. Daraus folgt:
+
*Simultaneously&nbsp; $q/p = {\rm e}^{-L(x)}$&nbsp; holds.&nbsp; From this follows:
 
:$$S(x) = \frac{1- {\rm e}^{-L(x)}}{1+ {\rm e}^{-L(x)}}
 
:$$S(x) = \frac{1- {\rm e}^{-L(x)}}{1+ {\rm e}^{-L(x)}}
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
 +
[[File:P_ID3097__KC_Z_4_3c_v2.png|right|frame|Relationship between probability,&nbsp; L&ndash;value and S&ndash;value]]
  
*Multipliziert man Zähler und Nenner mit ${\rm e}^{-L(x)/2}$, so erhält man schließlich:
+
*Multiplying the numerator and denominator by&nbsp; ${\rm e}^{-L(x)/2}$,&nbsp; we finally get:
[[File:P_ID3097__KC_Z_4_3c_v2.png|right|frame|Zusammenhang zwischen Wahrscheinlichkeit, $L$–Wert, $S$–Wert]]
 
 
:$$S(x) = \frac{{\rm e}^{+L(x)/2}- {\rm e}^{-L(x)/2}}{{\rm e}^{+L(x)/2}+ {\rm e}^{-L(x)/2}}
 
:$$S(x) = \frac{{\rm e}^{+L(x)/2}- {\rm e}^{-L(x)/2}}{{\rm e}^{+L(x)/2}+ {\rm e}^{-L(x)/2}}
 
= {\rm tanh}\big [L(x)/2. \big]
 
= {\rm tanh}\big [L(x)/2. \big]
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
  
*Die Umkehrfunktion ergibt
+
*The inverse function results in
 
:$$L(x) = 2 \cdot {\rm tanh}^{-1}[S(x)]
 
:$$L(x) = 2 \cdot {\rm tanh}^{-1}[S(x)]
 
  \hspace{0.05cm}.$$
 
  \hspace{0.05cm}.$$
<br clear=all>
+
 
Richtig sind somit die <u>Lösungsvorschläge 2 und 3</u>. Die Tabelle zeigt den $L$&ndash;Wert $S$&ndash;Wert für einige Wahrscheinlichkeiten $p = {\rm Pr}(x=+1)$.
+
*Thus,&nbsp; the&nbsp; <u>proposed solutions 2 and 3</u>&nbsp; are correct.&nbsp; The table shows the&nbsp; L&ndash;value&nbsp; and the&nbsp; S&ndash;value&nbsp; for some probabilities&nbsp; $p = {\rm Pr}(x=+1)$.
  
  
'''(2)'''&nbsp; Der extrinsische $L$&ndash;Wert für das Symbol $x_3$ berücksichtigt nur die Apriori&ndash;$L$&ndash;Werte $L_{\rm A}(x_1)$ und $L_{\rm A}(x_2)$, nicht jedoch $L_{\rm A}(x_3)$.  
+
'''(2)'''&nbsp; The&nbsp; "extrinsic L&ndash;value"&nbsp; for symbol&nbsp; $x_3$&nbsp; considers only the&nbsp; "a-priori L&ndash;values"&nbsp; $L_{\rm A}(x_1)$&nbsp; and&nbsp; $L_{\rm A}(x_2)$,&nbsp; but not&nbsp; $L_{\rm A}(x_3)$.  
*Beim (3, 1) <i>Repetition Code</i> ergibt sich hierfür:
+
*For the&nbsp; $\text{(3, 1)}$&nbsp; repetition code,&nbsp; this results in:  
 
:$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = 2 + (-1)
 
:$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = 2 + (-1)
 
\hspace{0.15cm} \underline{= +1}\hspace{0.05cm}.$$
 
\hspace{0.15cm} \underline{= +1}\hspace{0.05cm}.$$
  
  
'''(3)'''&nbsp; Für den Aposteriori&ndash;$L$&ndash;Wert erhält man somit:
+
'''(3)'''&nbsp; Thus,&nbsp; for the&nbsp; "a-posteriori L&ndash;value",&nbsp; we obtain:
 
:$$L_{\rm APP}(x_3) = L_{\rm A}(x_3) + L_{\rm E}(x_3) = 3 + 1
 
:$$L_{\rm APP}(x_3) = L_{\rm A}(x_3) + L_{\rm E}(x_3) = 3 + 1
 
\hspace{0.15cm} \underline{= +4}\hspace{0.05cm}.$$
 
\hspace{0.15cm} \underline{= +4}\hspace{0.05cm}.$$
  
  
'''(4)'''&nbsp; Beim <i>Single Parity&ndash;check Code</i>  lautet die entsprechende Berechnungsvorschrift:
+
'''(4)'''&nbsp; In the single parity&ndash;check code,&nbsp; the corresponding calculation rule is:
 
:$$L_{\rm E}(x_3) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}
 
:$$L_{\rm E}(x_3) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}
 
  \left [  {\rm tanh}(x_1/2) \cdot {\rm tanh}(x_2/2)  \right ] =  2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}
 
  \left [  {\rm tanh}(x_1/2) \cdot {\rm tanh}(x_2/2)  \right ] =  2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}
Line 129: Line 134:
 
  \left [  -0.3519  \right ] =-2 \cdot 0.3676\hspace{0.15cm} \underline{= -0.7352}\hspace{0.05cm}.$$
 
  \left [  -0.3519  \right ] =-2 \cdot 0.3676\hspace{0.15cm} \underline{= -0.7352}\hspace{0.05cm}.$$
  
Das Ergebnis ${\rm tanh}^{-1} (-0.3519) = 0.3676$ wurde der Tabelle auf der Angabenseite entnommen.
+
*The result&nbsp; ${\rm tanh}^{-1} (-0.3519) = 0.3676$&nbsp; was taken from the table on the information page.
 +
 
  
  
  
'''(5)'''&nbsp; Beim Wiederholungscode der Länge $n = 3$ gilt wie in der Teilaufgabe (3):  
+
'''(5)'''&nbsp; For the repetition code of length&nbsp; $n = 3$,&nbsp; the same holds as in subtask&nbsp; '''(3)''':  
 
:$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = -0.847 +1.382
 
:$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = -0.847 +1.382
 
\hspace{0.15cm} \underline{= +0.535}\hspace{0.05cm}.$$
 
\hspace{0.15cm} \underline{= +0.535}\hspace{0.05cm}.$$
  
Benutzt wurden hierbei die $L$&ndash;Werte entsprechend der Tabelle zur Teilaufgabe (1), zum Beispiel ${\rm Pr}(x_1 = +1) = 0.3$ &nbsp; &rArr; &nbsp; $L_{\rm A}(x_1) = -0.847$.
+
*The L&ndash;values corresponding to the table for subtask&nbsp; '''(1)'''&nbsp; were used here,&nbsp; for example ${\rm Pr}(x_1 = +1) = 0.3$ &nbsp; &rArr; &nbsp; $L_{\rm A}(x_1) = -0.847$.
 +
 
  
  
'''(6)'''&nbsp; Nachdem hier anstelle der Apriori&ndash;$L$&ndash;Werte die Apriori&ndash;Wahrscheinlichkeiten gegeben sind, kommt man gegenüber der Teilaufgabe (4) auf dem Umweg über den extrinsischen $S$&ndash;Wert schneller zum Erfolg.
+
'''(6)'''&nbsp; Since here instead of the&nbsp; "a-priori L-values"&nbsp; the&nbsp; "a-priori probabilities"&nbsp; are given,&nbsp; <br>one comes faster to success in comparison with the subtask&nbsp; '''(4)'''&nbsp; on the detour over the&nbsp; "extrinsic S-value".
  
*Die extrinsische Wahrscheinlichkeit für das dritte Symbol bezeichnen wir hier mit $P_{\rm E}(x_3)$. Für diese gilt:
+
*We denote the extrinsic probability for the third symbol here by&nbsp; $P_{\rm E}(x_3)$.&nbsp; For this holds:
 
:$$P_{\rm E}(x_3 = +1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} P_{\rm A}(x_1 = +1) \cdot P_{\rm A}(x_2 = -1) +  
 
:$$P_{\rm E}(x_3 = +1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} P_{\rm A}(x_1 = +1) \cdot P_{\rm A}(x_2 = -1) +  
 
P_{\rm A}(x_1 = -1) \cdot P_{\rm A}(x_2 = +1) = 0.3 \cdot (1-0.8) + (1-0.3) \cdot 0.8 = 0.62\hspace{0.05cm}.$$
 
P_{\rm A}(x_1 = -1) \cdot P_{\rm A}(x_2 = +1) = 0.3 \cdot (1-0.8) + (1-0.3) \cdot 0.8 = 0.62\hspace{0.05cm}.$$
  
*Daraus ergeben sich für die weiteren Größen:
+
*This results in for the further variables:
 
:$$S_{\rm E}(x_3) = P_{\rm E}(x_3 = +1) - P_{\rm E}(x_3 = - 1) =  0.62 -0.38 = 0.24\hspace{0.05cm},$$
 
:$$S_{\rm E}(x_3) = P_{\rm E}(x_3 = +1) - P_{\rm E}(x_3 = - 1) =  0.62 -0.38 = 0.24\hspace{0.05cm},$$
 
:$$L_{\rm E}(x_3) = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}
 
:$$L_{\rm E}(x_3) = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm}

Latest revision as of 17:25, 23 January 2023

Function  $y = \tanh {(x)}$ 
in tabular form.

We assume a binary random variable  $x ∈ \{+1, \, -1\}$  with following probabilities:

$${\rm Pr}(x =+1) = p\hspace{0.05cm},$$
$${\rm Pr}(x =-1) = q = 1-p\hspace{0.05cm}.$$

The  "reliability"  of symbol  $x$  can be expressed

  • by the  L–value  $($log likelihood ratio$)$  according to the definition
$$L(x) = {\rm ln} \hspace{0.2cm} \frac{p}{q} = {\rm ln} \hspace{0.2cm} \frac{p}{1 - p}\hspace{0.05cm} \hspace{0.05cm},$$
  • by the so called  "S–value":
$$S(x) = p- q \hspace{0.05cm}.$$

We have created the term  "S–value"  in order to be able to formulate the following questions more succinctly.  In the literature,  one sometimes finds the term  "soft bit"  for this.

As will be shown in subtask  (1),  $L(x)$  and  $S(x)$  can be converted into each other.

Subsequently,  these functions shall be used to calculate the following quantities,  always assuming a code length  $n = 3$:

  • the extrinsic  L–value for the third symbol  ⇒   $L_{\rm E}(x_3)$,
  • the a-posteriori  L–value for the third symbol   ⇒   $L_{\rm APP}(x_3)$.


The calculation should be done for the following codes:

  • the repetition Code  $\text{RC (3, 1, 3)}$  with the constraint  $\sign {(x_1)} = \sign {(x_2)} = \sign {(x_3)}$,
  • the single parity–check code   ⇒   $\text{SPC (3, 2, 2)}$  with the constraint  $x_1 \cdot x_2 \cdot x_3 = +1$.




Hints:

  • To solve,  you need the  "hyperbolic tangent"  according to the following definition  $($this function is given above in tabular form$)$:
$$y = {\rm tanh}(x) = \frac{{\rm e}^{+x/2} - {\rm e}^{-x/2}}{{\rm e}^{+x/2} + {\rm e}^{-x/2}} = \frac{1 - {\rm e}^{-x}}{1 + {\rm e}^{-x}} \hspace{0.05cm}.$$


Questions

1

What is the relationship between  S–value and  L–value?

$S(x) = \tanh {(L(x))}$,
$S(x) = \tanh {(L(x)/2)}$,
$L(x) = 2 \cdot \tanh^{-1}{(S(x))}$.

2

The  $\text{RC (3, 1, 3)}$  is considered.  For the  a-priori  L–values,   let be  $\underline{L}_{\rm A} = (+2, -1, +3)$.  What is the  extrinsicL–value  for the symbol  $x_3$?

$L_{\rm E}(x_3) \ = \ $

3

What is the  a-posteriori L–value  for the symbol  $x_3$?

$L_{\rm APP}(x_3) \ = \ $

4

What is the  extrinsic L–value  at  $\text{SPC (3, 2, 2)}$?  It is still valid:   $\underline{L}_{\rm A} = (+2, -1, +3)$.

$L_{\rm E}(x_3) \ = \ $

5

The a-priori probabilities are now  $0.3, \ 0.8, \ 0.9$.  What is the  extrinsic  L–value  for the  repetition code?

$L_{\rm E}(x_3) \ = \ $

6

What  extrinsic L–value  results for the  single parity–check code  given the same conditions as in subtask  (5)?

$L_{\rm E}(x_3) \ = \ $


Solution

(1)  For the binary random variable  $x ∈ \{+1, -1\}$  with probabilities

  • $p = {\rm Pr}(x = +1)$,  and
  • $p = {\rm Pr}(x=-1) = 1-p$


the following definitions apply:

$$L(x) = {\rm ln} \hspace{0.2cm} \frac{p}{q} = {\rm ln} \hspace{0.2cm} \frac{p}{1 - p}\hspace{0.05cm} \hspace{0.3cm} \Rightarrow \hspace{0.3cm} -\infty \le L(x) \le +\infty \hspace{0.05cm},$$
$$S(x) = p- q = 2 \cdot p - 1\hspace{0.05cm} \hspace{0.3cm} \Rightarrow \hspace{0.3cm} -1 \le S(x) \le +1 \hspace{0.05cm}.$$
  • Based on the S–value,  we get because of  $p + q = 1$:
$$S(x) = p- q = \frac{p- q}{p+ q} = \frac{1- q/p}{1+ q/p} \hspace{0.05cm}.$$
  • Simultaneously  $q/p = {\rm e}^{-L(x)}$  holds.  From this follows:
$$S(x) = \frac{1- {\rm e}^{-L(x)}}{1+ {\rm e}^{-L(x)}} \hspace{0.05cm}.$$
Relationship between probability,  L–value and S–value
  • Multiplying the numerator and denominator by  ${\rm e}^{-L(x)/2}$,  we finally get:
$$S(x) = \frac{{\rm e}^{+L(x)/2}- {\rm e}^{-L(x)/2}}{{\rm e}^{+L(x)/2}+ {\rm e}^{-L(x)/2}} = {\rm tanh}\big [L(x)/2. \big] \hspace{0.05cm}.$$
  • The inverse function results in
$$L(x) = 2 \cdot {\rm tanh}^{-1}[S(x)] \hspace{0.05cm}.$$
  • Thus,  the  proposed solutions 2 and 3  are correct.  The table shows the  L–value  and the  S–value  for some probabilities  $p = {\rm Pr}(x=+1)$.


(2)  The  "extrinsic L–value"  for symbol  $x_3$  considers only the  "a-priori L–values"  $L_{\rm A}(x_1)$  and  $L_{\rm A}(x_2)$,  but not  $L_{\rm A}(x_3)$.

  • For the  $\text{(3, 1)}$  repetition code,  this results in:
$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = 2 + (-1) \hspace{0.15cm} \underline{= +1}\hspace{0.05cm}.$$


(3)  Thus,  for the  "a-posteriori L–value",  we obtain:

$$L_{\rm APP}(x_3) = L_{\rm A}(x_3) + L_{\rm E}(x_3) = 3 + 1 \hspace{0.15cm} \underline{= +4}\hspace{0.05cm}.$$


(4)  In the single parity–check code,  the corresponding calculation rule is:

$$L_{\rm E}(x_3) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} \left [ {\rm tanh}(x_1/2) \cdot {\rm tanh}(x_2/2) \right ] = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} \left [ {\rm tanh}(+1) \cdot {\rm tanh}(-0.5) \right ] = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} \left [ 0.7616 \cdot (-0.4621) \right ] $$
$$\Rightarrow \hspace{0.3cm}L_{\rm E}(x_3) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} \left [ -0.3519 \right ] =-2 \cdot 0.3676\hspace{0.15cm} \underline{= -0.7352}\hspace{0.05cm}.$$
  • The result  ${\rm tanh}^{-1} (-0.3519) = 0.3676$  was taken from the table on the information page.



(5)  For the repetition code of length  $n = 3$,  the same holds as in subtask  (3):

$$L_{\rm E}(x_3) = L_{\rm A}(x_1) + L_{\rm A}(x_2) = -0.847 +1.382 \hspace{0.15cm} \underline{= +0.535}\hspace{0.05cm}.$$
  • The L–values corresponding to the table for subtask  (1)  were used here,  for example ${\rm Pr}(x_1 = +1) = 0.3$   ⇒   $L_{\rm A}(x_1) = -0.847$.


(6)  Since here instead of the  "a-priori L-values"  the  "a-priori probabilities"  are given, 
one comes faster to success in comparison with the subtask  (4)  on the detour over the  "extrinsic S-value".

  • We denote the extrinsic probability for the third symbol here by  $P_{\rm E}(x_3)$.  For this holds:
$$P_{\rm E}(x_3 = +1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} P_{\rm A}(x_1 = +1) \cdot P_{\rm A}(x_2 = -1) + P_{\rm A}(x_1 = -1) \cdot P_{\rm A}(x_2 = +1) = 0.3 \cdot (1-0.8) + (1-0.3) \cdot 0.8 = 0.62\hspace{0.05cm}.$$
  • This results in for the further variables:
$$S_{\rm E}(x_3) = P_{\rm E}(x_3 = +1) - P_{\rm E}(x_3 = - 1) = 0.62 -0.38 = 0.24\hspace{0.05cm},$$
$$L_{\rm E}(x_3) = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} \left [ S_{\rm E}(x_3) \right ] = 2 \cdot {\rm tanh}^{-1} \hspace{0.05cm} (0.24) = 2 \cdot 0.245 \hspace{0.15cm} \underline{= +0.49}\hspace{0.05cm}$$