TurboEncode: Encode a message with the turbo-code.

Description Usage Arguments Value Author(s) Examples

Description

This functions takes a message and encode it with the turbo-code procedure. The message will be encoded in 2 identical systematic encoder, but before the message will be encoded in the encoder 2 the message will be permutated with an interleaver. To increase the minimal distance between 2 code words the interleaver is needed. The systematic encoder must have 2 exists and it must be an systematic encoder which means that the input is redirected directly to the output. Because of the systematic encoders the original message must be transmitted only once, so this procedure reduces the code rate of the whole encoder. After the 2 encoders the resulting encoded messages are interleaved into one stream and transmitted to the exit. Only one exit of the systematic encoder will be used, so the index of the output can be determined. The punctuation matrix removes all bits where the matrix is zero, so the code rate is increased.

Usage

1
2
3
TurboEncode(message, permutation.vector = NULL, coder.info = NULL,
  parity.index = coder.info$N, punctuation.matrix = NULL,
  visualize = FALSE)

Arguments

message

Message which will be encoded.

permutation.vector

Permutation vector which will be created with TurboGetPermutation.

coder.info

Coder which will be created with ConvGenerateEncoder or ConvGenerateRscEncoder.

parity.index

Index to decide which exit of the coder will be used for the encoding (>1). Default value is always the last exit of the coder.

punctuation.matrix

Punctuation matrix to puncture the output, will be created with TurboGetPunctuationMatrix.

visualize

Flag to decide whether to create a visualization pdf or not.

Value

Encoded message, will be a list if the output was punctured (list with original and punctured).

Author(s)

Witsch Daniel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
input <- c(1,0,1,1,0)

#default coder and permutation vector
message.encoded <- TurboEncode(input)
print(message.encoded)

#custom coder and permutation vector
coder <- ConvGenerateRscEncoder(2, 2, c(5, 7))
perm <- TurboGetPermutation(length(input), coder, "RANDOM")
message.encoded <- TurboEncode(input, perm, coder)
print(message.encoded)

#encoding with punctuation matrix
punct <- TurboGetPunctuationMatrix(c(1,1,0,1,0,1))
message.encoded.punct <- TurboEncode(input, perm, coder, punctuation.matrix = punct)
print(message.encoded.punct$original)
print(message.encoded.punct$punctured)

DaniWi/Channelcoding documentation built on May 6, 2019, 1:23 p.m.