Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Difference between revisions of "Aufgaben:Exercise 3.09Z: Viterbi Algorithm again"

From LNTwww
m (Text replacement - "Category:Aufgaben zu Kanalcodierung" to "Category:Channel Coding: Exercises")
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Kanalcodierung/Decodierung von Faltungscodes}}
+
{{quiz-Header|Buchseite=Channel_Coding/Decoding_of_Convolutional_Codes}}
  
[[File:P_ID2656__KC_Z_3_8_neu.png|right|frame|Trellis für einen Rate–1/2–Code, Gedächtnis  m=1]]
+
[[File:P_ID2656__KC_Z_3_8_neu.png|right|frame|Trellis for a rate-1/2 code and memory  m=1]]
Die Grafik zeigt das Trellis des Faltungscodes gemäß  [[Aufgaben:Aufgabe_3.6:_Zustandsübergangsdiagramm| Aufgabe 3.6]], gekennzeichnet durch folgende Größen:
+
The diagram shows the trellis of the convolutional code according to  [[Aufgaben:Exercise_3.6:_State_Transition_Diagram|$\text{Exercise 3.6}$]],  characterized by the following quantities:
* Rate 1/2   ⇒   k=1, n=2,
+
* Rate 1/2  ⇒   k=1, n=2,
* Gedächtnis  m=1,
 
* Übertragungsfunktionsmatrix  G(D)=(1, 1+D),
 
* Länge der Informationssequenz:  L=4,
 
* Sequenzlänge inklusive Terminierung:  L=L+m=5.
 
  
 +
* memory  m=1,
  
Anhand dieser Darstellung soll die Viterbi–Decodierung schrittweise nachvollzogen werde, wobei von der folgenden Empfangssequenz auszugehen ist:   $\underline{y} = (11, \, 01, \, 01, \, 11, \, 01)$.
+
* transfer function matrix  $\mathbf{G}(D) = (1, \ 1 + D)$,
  
In das Trellis eingezeichnet sind:
+
* length of the information sequence:  L=4,
* Der Initialwert  Γ0(S0)  für den Viterbi–Algorithmus, der stets zu  0  gewählt wird.
+
 
* Die beiden Fehlergrößen für den ersten Decodierschritt  (i=1)  erhält man mit  y_1=(11)  wie folgt:
+
* sequence length including termination:  L=L+m=5.
 +
 
 +
 
 +
On the basis of this representation,  the Viterbi decoding is to be understood step-by-step,  starting from the following received sequence:  
 +
:y_=(11,01,01,11,01).
 +
 
 +
Into the trellis are drawn:
 +
* The initial value  Γ0(S0)  for the Viterbi algorithm,  which is always chosen to  0.
 +
 
 +
* The two error values for the first decoding step  (i=1)  are obtained with  y_1=(11)  as follows:
 
:Γ1(S0) = Γ0(S0)+dH((00),(11))=2,
 
:Γ1(S0) = Γ0(S0)+dH((00),(11))=2,
 
:Γ1(S1) = Γ0(S0)+dH((11),(11))=0.
 
:Γ1(S1) = Γ0(S0)+dH((11),(11))=0.
  
* Die Fehlergrößen zum Schritt  i=2   ⇒   y_2=(01)  ergeben sich durch folgende Vergleiche:
+
* The error values for step  i=2   ⇒   y_2=(01)  are obtained by the following comparisons:
 
:Γ2(S0) = min[Γ1(S0)+dH((00),(01)),Γ1(S1)+dH((01),(01))]
 
:Γ2(S0) = min[Γ1(S0)+dH((00),(01)),Γ1(S1)+dH((01),(01))]
 
:Γ2(S0) = min[2+1,0+0]=0,
 
:Γ2(S0) = min[2+1,0+0]=0,
Line 25: Line 31:
  
  
In gleicher Weise sollen Sie
+
In the same way you are
* die Fehlergrößen zu den Zeitpunkten  i=3, i=4  und  i=5  (Terminierung) berechnen, und
+
* to compute the error values at time points  i=3, i=4  and  i=5  $(termination)$,  and
* die jeweils ungünstigeren Wege zu einem Knoten  Γi(Sμ)  eliminieren. In der Grafik ist dies für  i=2  durch punktierte Linien angedeutet.
+
 
+
* to eliminate the less favorable paths to a node  Γi(Sμ)  in each case;  in the graph this is indicated by dotted lines for  i=2 .
  
Anschließend ist der durchgehende Pfad von  Γ0(S0)  bis  Γ5(S0)  zu finden, wobei die Rückwärtsrichtung zu empfehlen ist.
 
  
Verfolgt man den gefundenen Pfad in Vorwärtsrichtung, so erkennt man
+
⇒   Then the continuous path from  ${\it \Gamma}_0(S_0)$  to  ${\it \Gamma}_5(S_0)$  is to be found,  where the backward direction is recommended.   
* die wahrscheinlichste Codesequenz  z_  (im Idealfall gleich  $\underline{x})$  an den Beschriftungen,
 
* die wahscheinlichste Informationssequenz  $\underline{v}$  (im Idealfall gleich  u_)  an den Farben.
 
  
 +
⇒   If one follows the found path in forward direction,  one recognizes:
 +
* the most likely decoded sequence  z_  (ideally equal  x_)  by the labels,
  
 +
* the most probable information sequence  v_  (ideally equal  u_)  at the colors.
  
  
Line 43: Line 49:
  
  
''Hinweis:''
+
<u>Hints:</u>&nbsp; This exercise belongs to the chapter&nbsp; [[Channel_Coding/Decoding_of_Convolutional_Codes|"Decoding of Convolutional Codes"]].
* Die Aufgabe gehört zum Kapitel&nbsp; [[Channel_Coding/Decodierung_von_Faltungscodes| Decodierung von Faltungscodes]].
 
 
   
 
   
  
Line 50: Line 55:
  
  
===Fragebogen===
+
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Berechnen Sie die minimalen Fehlergrößen für den Zeitpunkt&nbsp; i=3.
+
{Calculate the minimum error values for time&nbsp; i=3.
 
|type="{}"}
 
|type="{}"}
 
Γ3(S0) = { 1 }
 
Γ3(S0) = { 1 }
 
Γ3(S1) = { 1 }
 
Γ3(S1) = { 1 }
  
{Berechnen Sie die minimalen Fehlergrößen für den Zeitpunkt&nbsp; i=4.
+
{Calculate the minimum error values for time&nbsp; i=4.
 
|type="{}"}
 
|type="{}"}
 
Γ4(S0) = { 2 }
 
Γ4(S0) = { 2 }
 
Γ4(S1) = { 1 }
 
Γ4(S1) = { 1 }
  
{Berechnen Sie die minimale Fehlergröße für den Zeitpunkt&nbsp; i=5&nbsp; (Ende).
+
{Calculate the final error value for time&nbsp; i=5.
 
|type="{}"}
 
|type="{}"}
 
Γ5(S0) = { 1 }  
 
Γ5(S0) = { 1 }  
  
{Welche endgültigen Ergebnisse liefert der Viterbi&ndash;Algorithmus:
+
{What are the final results of the Viterbi algorithm:
 
|type="[]"}
 
|type="[]"}
 
+ z_=(11,01,00,11,01).
 
+ z_=(11,01,00,11,01).
Line 73: Line 78:
 
- v_=(1,0,1,0,0).
 
- v_=(1,0,1,0,0).
  
{Welche Entscheidung wäre ohne Terminierung getroffen worden?
+
{What decision would have been made without scheduling?
 
|type="()"}
 
|type="()"}
+ Die gleiche,
+
+ The same,
- eine andere.
+
- another.
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; [[File:P_ID2657__KC_Z_3_8a_v1.png|right|frame|Trellis mit Fehlergrößen]] Ausgehend von&nbsp; Γ2(S0)=0, Γ2(S1)=2 erhält man mit y_3=(01):
+
[[File:P_ID2657__KC_Z_3_8a_v1.png|right|frame|Trellis with branch metrics]]
 +
[[File:P_ID2658__KC_Z_3_8d.png|right|frame|Path finding]]  
 +
 
 +
'''(1)'''&nbsp;  Starting from&nbsp; ${\it \Gamma}_2(S_0) = 0, \ \ {\it \Gamma}_2(S_1) = 2$&nbsp; we get&nbsp; y_3=(01):
 
:Γ3(S0) = min[0+dH((00),(01)),2+dH((01),(01))]=min[0+1,2+0]=1_,
 
:Γ3(S0) = min[0+dH((00),(01)),2+dH((01),(01))]=min[0+1,2+0]=1_,
 
:Γ3(S1) = min[0+dH((11),(01)),2+dH((10),(01))]min[0+1,2+2]=1_.
 
:Γ3(S1) = min[0+dH((11),(01)),2+dH((10),(01))]min[0+1,2+2]=1_.
  
Eliminiert werden also die beiden Teilpfade, die zum Zeitpunkt i=2 (also beim dritten Decodierschritt) vom Zustand S1 ausgehen &nbsp; &#8658; &nbsp; Punktierung in der Grafik.
+
&#8658; &nbsp; Eliminated are the two (dotted)&nbsp;  subpaths that start from state&nbsp; S1&nbsp; at time&nbsp; i=2&nbsp; (i.e.,&nbsp; at the third decoding step).
  
  
'''(2)'''&nbsp; Analog zur Teilaufgabe (1) erhält man mit&nbsp; y4=(11):
+
'''(2)'''&nbsp; Analogous to subtask&nbsp; '''(1)''',&nbsp; we obtain with&nbsp; y4=(11):
 
:Γ4(S0) = min[1+dH((00),(11)),1+dH((01),(11))]=min[1+2,1+1]=2_,
 
:Γ4(S0) = min[1+dH((00),(11)),1+dH((01),(11))]=min[1+2,1+1]=2_,
 
:Γ4(S1) = min[1+dH((11),(11)),1+dH((10),(11))]=min[1+0,1+1]=1_
 
:Γ4(S1) = min[1+dH((11),(11)),1+dH((10),(11))]=min[1+0,1+1]=1_
  
&#8658; &nbsp; Eliminierung  im vierten Decodierschritt der beiden Teilpfade S_0 &#8594; S_0 und S_1 &#8594; S_1.
+
&#8658; &nbsp; Elimination in the fourth decoding step of the two subpaths&nbsp; "S_0 &#8594; S_0"&nbsp; and&nbsp; "S_1 &#8594; S_1".
  
  
[[File:P_ID2658__KC_Z_3_8d.png|right|frame|Pfadsuche]]
+
'''(3)'''&nbsp; For&nbsp;  i=5 &nbsp; &#8658; &nbsp; the&nbsp; "termination"&nbsp; is obtained with&nbsp; y_5=(01):
'''(3)'''&nbsp; Für i=5 &nbsp; &#8658; &nbsp; &bdquo;Terminierung&rdquo; erhält man mit&nbsp; y_5=(01):
 
 
:Γ5(S0) = min[2+dH((00),(01)),1+dH((01),(01))]min[2+1,1+0]=1_.
 
:Γ5(S0) = min[2+dH((00),(01)),1+dH((01),(01))]min[2+1,1+0]=1_.
  
Zu eliminieren ist hier der Teilpfad S_0 &#8594; S_0.
+
&#8658; &nbsp; To be eliminated is the subpath&nbsp;  "S_0 &#8594; S_0".
  
  
'''(4)'''&nbsp; Die Rückwärtssuche des durchgehenden Pfades von Γ5(S0) nach Γ0(S0) liefert
+
'''(4)'''&nbsp; The backward search of the continuous path&nbsp;  from Γ5(S0)&nbsp;  to&nbsp;  Γ0(S0)&nbsp;  yields
 
:S_0 &#8592; S_1 &#8592; S_0 &#8592; S_0 &#8592; S_1 &#8592; S_0.  
 
:S_0 &#8592; S_1 &#8592; S_0 &#8592; S_0 &#8592; S_1 &#8592; S_0.  
  
In Vorwärtsrichtung ergibt dies den Pfad S_0 &#8594; S_1 &#8594; S_0 &#8594; S_0 &#8594; S_1 &#8594; S_0 und die damit die
+
In the forward direction,&nbsp;  this yields the path&nbsp;  "S_0 &#8594; S_1 &#8594; S_0 &#8594; S_0 &#8594; S_1 &#8594; S_0" and thus the
* die wahrscheinlichste Codesequenz z_=(11,01,00,11,01),
+
* the most likely code sequence&nbsp;  z_=(11,01,00,11,01),
* die wahrscheinlichste Informationssequenz v_=(1,0,0,1,0).
+
 
 +
* the most likely information&nbsp;  sequence v_=(1,0,0,1,0).
 +
 
  
 +
Thus,&nbsp;  the&nbsp;  <u>proposed solutions 1 and 3</u>&nbsp;  are correct:
 +
*Comparison with the received vector&nbsp;  y_=(11,01,01,11,01)&nbsp;  shows that the sixth bit was falsified during transmission.
  
Richtig sind also die <u>Lösungsvorschläge 1 und 3</u>:
 
*Ein Vergleich mit dem vorgegebenen Empfangsvektor y_=(11,01,01,11,01) zeigt, dass bei der Übertragung das sechste Bit verfälscht wurde.
 
  
 +
'''(5)'''&nbsp; Without termination &#8658; final decision at&nbsp; i=4,&nbsp; there would have been two continuous paths:
 +
* from&nbsp; "S_0 &#8594; S_1 &#8594; S_0 &#8594; S_1 &#8594; S_0"&nbsp; (shown in yellow),
  
'''(5)'''&nbsp; Ohne Terminierung &#8658; endgültige Entscheidung bei i=4 hätte es zwei durchgehende Pfade gegeben:
+
* from&nbsp; "$S_0 &#8594; S_1 &#8594; S_0 &#8594; S_0 &#8594; S_1$"&nbsp; $(theultimatelycorrectpath)$.
* von $S_0 &#8594; S_1 &#8594; S_0 &#8594; S_1 &#8594; S_0$ (gelb eingezeichnet),
 
* von $S_0 &#8594; S_1 &#8594; S_0 &#8594; S_0 &#8594; S_1$ (den letztendlich richtigen Pfad).
 
  
  
Die Zwangsentscheidung zum Zeitpunkt i=4 hätte hier wegen Γ4(S1)<Γ4(S0) zum zweiten Pfad und damit zum Ergebnis v_=(1,0,0,1) geführt.  
+
The constraint decision at time&nbsp; i=4&nbsp; would have led here to the second path and thus to the result&nbsp; v_=(1,0,0,1)&nbsp; because of&nbsp; Γ4(S1)<Γ4(S0).
*Im betrachteten Beispiel also zur <u>gleichen Entscheidung</u> wie in der Teilaufgabe (4) mit Terminierungsbit.  
+
*Es gibt aber viele Konstellationen, bei denen erst das Terminierungsbit die richtige und sichere Entscheidung ermöglicht.
+
*In the considered example,&nbsp; therefore,&nbsp; to the&nbsp; <u>same decision</u>&nbsp; as in subtask&nbsp; '''(4)'''&nbsp; with termination bit.
 +
 +
*However,&nbsp; there are many constellations where only the termination bit enables the correct and safe decision.
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Channel Coding: Exercises|^3.4 Decodierung von Faltungscodes^]]
+
[[Category:Channel Coding: Exercises|^3.4 Decoding of Convolutional Codes^]]

Latest revision as of 15:06, 18 November 2022

Trellis for a rate-1/2 code and memory  m=1

The diagram shows the trellis of the convolutional code according to  Exercise 3.6,  characterized by the following quantities:

  • Rate 1/2  ⇒   k=1, n=2,
  • memory  m=1,
  • transfer function matrix  G(D)=(1, 1+D),
  • length of the information sequence:  L=4,
  • sequence length including termination:  L=L+m=5.


On the basis of this representation,  the Viterbi decoding is to be understood step-by-step,  starting from the following received sequence:  

y_=(11,01,01,11,01).

Into the trellis are drawn:

  • The initial value  Γ0(S0)  for the Viterbi algorithm,  which is always chosen to  0.
  • The two error values for the first decoding step  (i=1)  are obtained with  y_1=(11)  as follows:
Γ1(S0) = Γ0(S0)+dH((00),(11))=2,
Γ1(S1) = Γ0(S0)+dH((11),(11))=0.
  • The error values for step  i=2   ⇒   y_2=(01)  are obtained by the following comparisons:
Γ2(S0) = min[Γ1(S0)+dH((00),(01)),Γ1(S1)+dH((01),(01))]
Γ2(S0) = min[2+1,0+0]=0,
Γ2(S1) = min[Γ1(S0)+dH((11),(01)),Γ1(S1)+dH((10),(01))]
Γ2(S1) = min[2+1,0+2]=2.


In the same way you are

  • to compute the error values at time points  i=3, i=4  and  i=5  (termination),  and
  • to eliminate the less favorable paths to a node  Γi(Sμ)  in each case;  in the graph this is indicated by dotted lines for  i=2 .


⇒   Then the continuous path from  Γ0(S0)  to  Γ5(S0)  is to be found,  where the backward direction is recommended. 

⇒   If one follows the found path in forward direction,  one recognizes:

  • the most likely decoded sequence  z_  (ideally equal  x_)  by the labels,
  • the most probable information sequence  v_  (ideally equal  u_)  at the colors.




Hints:  This exercise belongs to the chapter  "Decoding of Convolutional Codes".



Questions

1

Calculate the minimum error values for time  i=3.

Γ3(S0) = 

Γ3(S1) = 

2

Calculate the minimum error values for time  i=4.

Γ4(S0) = 

Γ4(S1) = 

3

Calculate the final error value for time  i=5.

Γ5(S0) = 

4

What are the final results of the Viterbi algorithm:

z_=(11,01,00,11,01).
z_=(11,01,11,01,00).
v_=(1,0,0,1,0).
v_=(1,0,1,0,0).

5

What decision would have been made without scheduling?

The same,
another.


Solution

Trellis with branch metrics
Path finding

(1)  Starting from  Γ2(S0)=0,  Γ2(S1)=2  we get  y_3=(01):

Γ3(S0) = min[0+dH((00),(01)),2+dH((01),(01))]=min[0+1,2+0]=1_,
Γ3(S1) = min[0+dH((11),(01)),2+dH((10),(01))]min[0+1,2+2]=1_.

⇒   Eliminated are the two (dotted)  subpaths that start from state  S1  at time  i=2  (i.e.,  at the third decoding step).


(2)  Analogous to subtask  (1),  we obtain with  y4=(11):

Γ4(S0) = min[1+dH((00),(11)),1+dH((01),(11))]=min[1+2,1+1]=2_,
Γ4(S1) = min[1+dH((11),(11)),1+dH((10),(11))]=min[1+0,1+1]=1_

⇒   Elimination in the fourth decoding step of the two subpaths  "S0S0"  and  "S1S1".


(3)  For  i=5   ⇒   the  "termination"  is obtained with  y_5=(01):

Γ5(S0) = min[2+dH((00),(01)),1+dH((01),(01))]min[2+1,1+0]=1_.

⇒   To be eliminated is the subpath  "S0S0".


(4)  The backward search of the continuous path  from Γ5(S0)  to  Γ0(S0)  yields

S0S1S0S0S1S0.

In the forward direction,  this yields the path  "S0S1S0S0S1S0" and thus the

  • the most likely code sequence  z_=(11,01,00,11,01),
  • the most likely information  sequence v_=(1,0,0,1,0).


Thus,  the  proposed solutions 1 and 3  are correct:

  • Comparison with the received vector  y_=(11,01,01,11,01)  shows that the sixth bit was falsified during transmission.


(5)  Without termination ⇒ final decision at  i=4,  there would have been two continuous paths:

  • from  "S0S1S0S1S0(shown in yellow),
  • from  "S0S1S0S0S1(the ultimately correct path).


The constraint decision at time  i=4  would have led here to the second path and thus to the result  v_=(1,0,0,1)  because of  Γ4(S1)<Γ4(S0).

  • In the considered example,  therefore,  to the  same decision  as in subtask  (4)  with termination bit.
  • However,  there are many constellations where only the termination bit enables the correct and safe decision.