+ All Categories
Home > Documents > Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional...

Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional...

Date post: 31-Mar-2018
Category:
Upload: phungtruc
View: 222 times
Download: 3 times
Share this document with a friend
21
L35- 1 Convolutional Codes Overview – Parameters – Encoding Impulse Response/Generator Sequences State Diagram Trellis Diagram – Decoding Viterbi Algorithm
Transcript
Page 1: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 1

Convolutional Codes• Overview

– Parameters

– Encoding

– Impulse Response/Generator Sequences

– State Diagram

– Trellis Diagram

– Decoding

• Viterbi Algorithm

Page 2: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 2

Convolutional Codes• Convert any length message to a single ‘codeword’

• Encoder has memory and has n outputs that at any time depend on kinputs and m previous input blocks

• Typically described by 3 parameters:– n= no. of bits produced at encoder output at each time unit

– k= no. of bits input to encoder at each time unit

– And one of:• m = memory of encoder

= no. of prev. input blocks used to generate each output

(or)• K = constraint length

= max. no. of bits in a single output stream that can be affected by anyinput bit

= 1+ maxi mi

Page 3: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 3

Encoding• Linear conv. encoders can be implemented with feed-forward shift

registers:

• Example:

• Encoders can be viewed as FIR digital filters or finite state machines

Rate ½, m=3 convolutional code(2,1,3) code

Page 4: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 4

0* 1 1 0 1 0 0 0

1

0

1

000

0

0

1

1

Input: 10110Encoding Example

Page 5: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 5

0* 1 1 0 1 0 0

0

0

0

000

1

0

0 1

1 1

Input: 10110

Page 6: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 6

0* 1 1 0 1 0

1

0

1

100

0

0

0 0 1

1 1 1

Input: 10110

Page 7: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 7

0* 1 1 0 1

1

0

1

001

1

1

0 0 0 1

1 1 1 1

Input: 10110

Page 8: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 8

0* 1 1 0

0

0

0

100

1

0

1 0 0 0 1

1 1 1 1 1

Input: 10110

Page 9: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 9

0* 1 1

0

0

0

101

0

1

0 1 0 0 0 1

1 1 1 1 1 1

Input: 10110

Page 10: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 10

0 0* 1

0

0

0

001

0

1

1 0 1 0 0 0 1

1 1 1 1 1 1 1

Input: 10110

Page 11: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 11

0 0 0*

0

0

0

000

0

0

0 1 0 1 0 0 0 1

0 1 1 1 1 1 1 1

Input: 10110Output: 11, 01, 01, 01, 11, 01, 11, 00

Page 12: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 12

Impulse Response/Generator Seq.• Conv. Encoders may be defined by their impulse response (also known

as generator sequences)

• The impulse response for the ith input of a conv. code can be determined by applying a 1 and m 0’s to the ith input and m+1 0’s to the other inputs

• For the example (2,1,3) code, the impulse responses are:

g(0) = (1 0 1 1)g(1) = (1 1 0 1)

Page 13: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 13

Impulse Response/Generator Seq.• These sequences also specify the connections from the shift registers to

the outputs:g(0) = (1 0 1 1)g(1) = (1 1 0 1)

• A 1 means connection, 0 means no connection

1 1 1

1 1 1

0

0

Page 14: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 14

Impulse Response/Generator Seq.• The generator sequences are often specified in octal form

• The binary representation is left-shifted so that the most significant bit (MSB) of the binary representation is also the MSB of the first digit

• Example:g(0) = (1 0 1, 1) = 54g(1) = (1 1 0, 1) = 64

Page 15: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 15

State Diagram• The encoder can be viewed as a finite state machine, for which we can

draw a state diagram with transition labels X/Y– X = input bits

– Y = output bits

Page 16: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 1

Trellis Diagram• A trellis diagramis a state diagram that has been expanded to show the

passage of time:

Page 17: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 17

Trellis Diagram• Every possible codeword is represented by a single unique path

through the trellis

• Every codeword starts and stops in S0, the all-zeros state

Page 18: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 18

Decoding• Several algorithms exist to decode convolutional codes: trellis

decoders, sequential (Fano) decoders, stack decoders, etc.• Only one algorithm is optimal in terms of minimizing the probability

of error – the Viterbi algorithm• The Viterbi algorithm is a maximum likelihood (ML) decoder

– ML decoders maximize p( r | y’ )=p( received word | estimate of code word )

– For uniform distribution, it also maximizes p( estimate of code word | received word)

• For memoryless channel,

• This is called the likelihood function of y’

∏ ∏−+

=

=

=

1

0

1

0

)(')( )|()'|(mL

i

n

j

ji

ji yrpyrp

Page 19: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 19

Decoding:Viterbi Algorithm• Usually, the log-likelihood function is used

to simplify implementation

• The log-probabilities, *, known as bit metrics, are usually converted into small integers

• The ML algorithm chooses y’ that maximizes p( r | y’ )

( )∑ ∑−+

=

=

=

1

0

1

0*

)(')( |log)'|(logmL

i

n

j

ji

ji yrpyrp

44 344 21

Page 20: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 20

Decoding: Viterbi Algorithm• The Viterbi algorithm finds the ML codeword by using the code

trellis:

Viterbi Algorithm (Wicker, p. 296-7)• Let the node corresponding to state Sj at time t be denoted by Sj,t

• Each node in the trellis is assigned a metric value V( Sj,t )

• The metric values are computed by

1. Let V( S0,0 ) =0 and t = 1

2. At time t, compute the partial path metrics for all paths entering each node.

3. Set V( Sk,t ) equal to the best partial path metric entering the node corresponding to state Sk at time t. Ties can be broken by flipping a coin. Nonsurviving branches are deleted from the trellis.

4. If t<L+m, increment t and return to step 2.

Page 21: Convolutional Codes - UF Wireless Information …€¦ ·  · 2001-04-11L35 - 2 Convolutional Codes • Convert any length message to a single ‘codeword’ • Encoder has memory

L35- 21

Conv. Codes in Wireless Communications

• Why are convolutional codes often used in wireless communicationsystems?– Block codes typically have algebraic decoders.

• These decoders operate on hard decisions (0’s and 1’s, or equivalents)

– Convolutional decoders can use soft-decision decoding.• Decoder inputs are continuous-valued (or quantized values); for instance, the

correlator output for BPSK

• Soft-decision decoding gives a 2-3 dB gain over hard decision decoding (2.2 dB for coherent communication)


Recommended