Difference between revisions of "Aufgaben:Exercise 3.09Z: Viterbi Algorithm again"
(Die Seite wurde neu angelegt: „{{quiz-Header|Buchseite=Kanalcodierung/Decodierung von Faltungscodes }} [[File:|right|]] ===Fragebogen=== <quiz display=simple> {Multiple-Choice Fra…“) |
|||
(34 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | {{quiz-Header|Buchseite= | + | {{quiz-Header|Buchseite=Channel_Coding/Decoding_of_Convolutional_Codes}} |
+ | [[File:P_ID2656__KC_Z_3_8_neu.png|right|frame|Trellis for a rate-1/2 code and memory m=1]] | ||
+ | The diagram shows the trellis of the convolutional code according to [[Aufgaben:Exercise_3.6:_State_Transition_Diagram|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 \underline{y}_1 = (11)$ as follows: |
+ | :$${\it \Gamma}_1(S_0) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} {\it \Gamma}_0(S_0) + d_{\rm H} \big ((00)\hspace{0.05cm},\hspace{0.05cm} (11) \big ) = 2 \hspace{0.05cm},$$ | ||
+ | :$${\it \Gamma}_1(S_1) \hspace{-0.15cm} \ = \ \hspace{-0.15cm} {\it \Gamma}_0(S_0) + d_{\rm H} \big ((11)\hspace{0.05cm},\hspace{0.05cm} (11) \big ) = 0 \hspace{0.05cm}.$$ | ||
+ | * 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. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <u>Hints:</u> This exercise belongs to the chapter [[Channel_Coding/Decoding_of_Convolutional_Codes|"Decoding of Convolutional Codes"]]. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===Questions=== | ||
<quiz display=simple> | <quiz display=simple> | ||
− | { | + | {Calculate the minimum error values for time i=3. |
− | |type=" | + | |type="{}"} |
− | + | Γ3(S0) = { 1 } | |
− | + | Γ3(S1) = { 1 } | |
+ | {Calculate the minimum error values for time i=4. | ||
+ | |type="{}"} | ||
+ | Γ4(S0) = { 2 } | ||
+ | Γ4(S1) = { 1 } | ||
− | { | + | {Calculate the final error value for time i=5. |
|type="{}"} | |type="{}"} | ||
− | $\ | + | ${\it \Gamma}_5(S_0) \ = \ ${ 1 } |
− | |||
+ | {What are the final results of the Viterbi algorithm: | ||
+ | |type="[]"} | ||
+ | + z_=(11,01,00,11,01). | ||
+ | - z_=(11,01,11,01,00). | ||
+ | + v_=(1,0,0,1,0). | ||
+ | - v_=(1,0,1,0,0). | ||
+ | {What decision would have been made without scheduling? | ||
+ | |type="()"} | ||
+ | + The same, | ||
+ | - another. | ||
</quiz> | </quiz> | ||
− | === | + | ===Solution=== |
{{ML-Kopf}} | {{ML-Kopf}} | ||
− | '''1 | + | [[File:P_ID2657__KC_Z_3_8a_v1.png|right|frame|Trellis with branch metrics]] |
− | '''2 | + | [[File:P_ID2658__KC_Z_3_8d.png|right|frame|Path finding]] |
− | ''' | + | |
− | + | '''(1)''' Starting from Γ2(S0)=0, Γ2(S1)=2 we get y_3=(01): | |
− | '''5. | + | :Γ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 "S_0 → S_0" and "S_1 → S_1". | ||
+ | |||
+ | |||
+ | '''(3)''' For $i = 5 ⇒ the "termination" is obtained with \underline{y}_5 = (01)$: | ||
+ | :$${\it \Gamma}_5(S_0) \hspace{-0.15cm} \ = \ \hspace{-0.15cm}{\rm min} \left [2 + d_{\rm H} \big ((00), (01) \big ), \hspace{0.05cm}1 + d_{\rm H} \big ((01), (01) \big ) \right ] {\rm min} \left [ 2+1\hspace{0.05cm},\hspace{0.05cm} 1+0 \right ] \hspace{0.15cm}\underline{= 1}\hspace{0.05cm}.$$ | ||
+ | |||
+ | ⇒ To be eliminated is the subpath "S_0 → S_0". | ||
+ | |||
+ | |||
+ | '''(4)''' The backward search of the continuous path from Γ5(S0) to Γ0(S0) yields | ||
+ | :$$S_0 ← S_1 ← S_0 ← S_0 ← S_1 ← S_0.$$ | ||
+ | |||
+ | In the forward direction, this yields the path "S_0 → S_1 → S_0 → S_0 → S_1 → S_0" and thus the | ||
+ | * the most likely code sequence $\underline{z} = (11, \, 01, \, 00, \, 11, \, 01)$, | ||
+ | |||
+ | * the most likely information sequence $\underline{v} = (1, \, 0, \, 0, \, 1, \, 0)$. | ||
+ | |||
+ | Thus, the <u>proposed solutions 1 and 3</u> 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 "S_0 → S_1 → S_0 → S_1 → S_0" (shown in yellow), | ||
+ | * from "S_0 → S_1 → S_0 → S_0 → S_1" (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 <u>same decision</u> as in subtask '''(4)''' with termination bit. | ||
+ | |||
+ | *However, there are many constellations where only the termination bit enables the correct and safe decision. | ||
+ | {{ML-Fuß}} | ||
− | ^]] | + | [[Category:Channel Coding: Exercises|^3.4 Decoding of Convolutional Codes^]] |
Latest revision as of 15:06, 18 November 2022
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
Solution
(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 "S0→S0" and "S1→S1".
(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 "S0→S0".
(4) The backward search of the continuous path from Γ5(S0) to Γ0(S0) yields
- S0←S1←S0←S0←S1←S0.
In the forward direction, this yields the path "S0→S1→S0→S0→S1→S0" 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 "S0→S1→S0→S1→S0" (shown in yellow),
- from "S0→S1→S0→S0→S1" (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.