Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 22
Implementation of Viterbi
Algorithm/Convolutional Coding
k ( X k 1 ,..., X k p )
Xk Xkp
Sk f ( k , k 1 )
Xk Sk
h( X k , X k 1 ,..., X k p ) f ( k , k 1 )
p
Yk Sk Nk Sk h A
i 1
i k i
0
Ak h0 1 h1 0.5 h2 0. 25
1
1 1
Sk Ak Ak 1 Ak 2
2 4
k ( Ak , Ak 1 )
k 1 ( Ak 1 , Ak )
S k f ( k , k 1 )
(0,0) (1,1.75)
00 11
(1,1) (0,0.75)
(0,0.25) (1,1.5)
(1,1.25)
01 10
(0,0.5)
( Ak , Sk )
(0,1) (0,1)
(1,0) (1,0)
1/1.75
(1,1) (1,1)
ESIEE, Slide 12 Copyright © 2003 Texas Instruments. All rights reserved.
Example: Detection of a Sequence of Symbols
Each path in the trellis corresponds to
an input sequence Ak.
From the sequence of observations Yk,
the receiver must choose among all the
possible paths of the trellis, the path that
best corresponds to the Yk for a given
criterion.
To choose a path in the trellis, is
equivalent to choose a sequence of states
k, or of Ak or of Sk.
We suppose that the criterion is a
quadratic distance.
ESIEE, Slide 13 Copyright © 2003 Texas Instruments. All rights reserved.
Example: Detection of a Sequence of Symbols
Choose the sequence that minimizes the total distance:
K
2
min Yk Sk
k 0
k-1 k
k=0 k=1
0.04 0.04
0.64
0.64
Y1=0.2
1.28
0.2 0.7
0.68 1.34
0.14
0.04
0.925
1.34 0.3425
0.0025
0.49
0.8025 1.3425
0.09
0.2025
0.3025 0.4425
0.14
1.6 1.2
ESIEE, Slide 24 Copyright © 2003 Texas Instruments. All rights reserved.
Application of Viterbi Algorithm to the
Example of Sequence Detection
Traceback
2.265
0.3425
1.3425
0.4425
Best path in yellow
ESIEE, Slide 25 Copyright © 2003 Texas Instruments. All rights reserved.
Convolutional Coding (GSM Example)
G0
+
input bit output bit
Stream b z-1 z-1 z-1 z-1 Stream:
2 output bits
for 1 input bit
+
G1
b3 b2 b1 0 0 b3 b2 b1
State 2J State J
b3 b2 b1 1 1 b3 b2 b1
2J = b 3 b2 b1 0 J = 0 b 3 b2 b1
2J+1 = b 3 b2 b1 1 J+8 = 1 b 3 b2 b1
n 0
d( j) SD G ( j) 2SD n G n ( j)
1
2 2
n n
n 0
1
dist_loc( j) SDn G n ( j)
n 0
1 1
n and
SD
n 0
2
n ( j)
G 2
n 0
dist_loc(j)=SD0G0(j)+SD1G1(j)
4 possible values (21/R) :
d = SD0 + SD1
d’ = SD0 - SD1
-d
- d’
Use of symmetry
Only 2 distances are calculated
Paths leading to the same state are complementary
Maximize distance instead of minimize because of
the minus sign.
G 0( D) 1 D 3 D 4
G1( D) 1 D D 3 D 4
-d
-d
2J+1
J+8
d
Soft decision values: SD0, SD1
ESIEE, Slide 34 Copyright © 2003 Texas Instruments. All rights reserved.
Implementation on C54x
To implement the Viterbi algorithm on
C54x we need:
Compare store and Select Unit
One Accumulator
Specific instructions
DADST
Double-Precision Load With T Add or
Dual 16-Bit Load With T Add/Subtract)
DSADT
Long-Word Load With T Add or
Dual 16-Bit Load With T Subtract/Add)
CMPS (Compare Select Store)
Dual 16-bit
T ALU operations
T register input
ALU as dual
AH AL BH BL 16-bit operand
32 16-bit transition
C16=1 ALU shift register
(TRN)
MSB/LSB One cycle store
WRITE Max and Shift
SELECT decision
CSS UNIT
COMP
16 =MUX
TRN
TC EB [15:0]
THEN : ELSE :
(src(31-16)) Smem (src(15-0)) Smem
0 TC 1 TC
(TRN << 1 ) + 0 TRN (TRN << 1 ) + 1 TRN
AR5 0
Metrics Old states
2*J & 2*J+1
15
AR4 16
Metrics J
AR3 24 New states
Metrics J + 8
31
Relative location