210 likes | 404 Views
ECED 4504 Digital Transmission Theory. Jacek Ilow (based on the slides by Matthew Valenti) Reed Solomon Codes Convolutional Codes. Reed Solomon Codes. Reed Solomon codes are a generalization of BCH codes. Nonbinary BCH codes. The symbols are M-ary symbols instead of bits.
E N D
ECED 4504Digital Transmission Theory Jacek Ilow (based on the slides by Matthew Valenti) Reed Solomon Codes Convolutional Codes
Reed Solomon Codes • Reed Solomon codes are a generalization of BCH codes. • Nonbinary BCH codes. • The symbols are M-ary symbols instead of bits. • For m = any positive integer • M = 2m • i.e. each symbol represents m bits • m=8 is common • n = 2m – 1 • k = any value < n • dmin = n - k + 1 • t = (n-k)/2 • RS codes are maximum distance separable • They have the largest possible dmin for any code with the same values of n and k.
Reed Solomon Codes • Example RS code. • Let m = 8 and t = 4 • (n,k) = (255, 247) • M = 28 = 256 • Could use this in conjunction with M-ary modulation. • e.g. 256-FSK or 256-QAM • Or could use this with binary modulation. • Total number of code bits = n*m = 255*8 = 2040 • There will be 255 “symbols” • Each symbol is actually 8 bits. • A symbol error occurs if any one of the 8 bits is incorrect. • When used with binary modulation, RS codes can correct burst errors. • e.g. if there are m*t = 8*4 = 32 bit errors in a row, the RS code may be able to correct the received code word.
Applications of RS Codes • Reed Solomon codes are the most common block codes used for error correction. • Deep space communication systems. • Voyager, Galileo, Cassini • Usually as part of a more complex system involving concatenations of different types of codes (Convolutional and RS). • Compact Disc (CD) • Digital Versatile Disc (DVD) • Cellular Digital Packet Data (CDPD)
Performance Analysis:Modulation Matched to Symbol Size • Consider the (255,247) RS code. • With hard decision decoding: • With 256-FSK modulation:
Performance Analysis: Modulation Not Matched to Symbol Size • With BPSK • p is the prob that an 8-bit block of BPSK symbols in error • (1-p) is prob that all 8-bits are correct:
Convolutional Codes • A convolutional encoder continuously encodes a stream of data. • A stream is an infinite sequence of bits. • The input is passed through a shift register. • The output is a linear combination of the inputs and the contents of the shift register • Similar to the idea of a FIR filter • The output of an FIR filter is the convolution of the input with the impulse response of the filter. • Convolution is over the field of real numbers. • The output of a convolutional encoder is the convolution of the input data with the generator of the encoder. • Convolution is over a finite field (e.g. 0 & 1). • In practice, convolutional codes are often terminated so that the input & output are a finite number of bits.
Convolutional Code Parameters • k is the number of input bits • Typically 1 k 3 • Often k = 1 • We will only consider k = 1 in this class. • n is the number of output bits • Typically 2 n 6 • The memory m of the encoder is the number of past inputs stored in the shift register. • The constraint length K is the total number of k-bit words that each output depends on. • When k = 1, then K = m + 1 • Shorthand notation: • (n,k,K) convolutional code.
D flip flop Example Convolutional Encoder • (2,1,3) convolutional code. D D
Example Encoding • The encoder is initialized to the all-zeros state. • The input data is x = 110100 • What is the output?
Tail bits • Convolutional codes could be thought of as block codes with a semi-infinite number of input bits. • In practice, it is often necessary to limit the number of input bits. • With frame-oriented convolutional codes, the input is limited to L bits. • It is desirable to bring the encoder back to the all-zeros state prior to the next frame. • This is accomplished by feeding m zeros into the encoder. • The m zeros at the end of the frame are called tail bits. • There is a fractional rate loss due to the use of tail bits. • for example: IS-95 uses K=9 rate ½ code with L = 184 data bits per frame. • This is the same as a block code with what rate?
Representations of Convolutional Codes • There are many ways to represent a convolutional code: • Encoder block diagram. • Generator representation. • State diagram. • Trellis diagram.
Generator Representation • Generator vectors can be used as a shorthand way to represent the encoder. • There will be one generator for each of the n output bits. • Each generator will be K-bits long. • The bits in the generator from left to right represent the connections in the encoder circuit. • A ‘1’ represents a link, a ‘0’ represents no link. • From our example: • Generators are often given in octal representation. • Here our generator is (5,7) in octal. • Many books list encoders in octal • see tables 8.2-1 to 8.2-11 in our book
Common Convolutional Codes • Convolutional codes are popular for modern digital communication systems. • Satellite and deep space communications • Odenwalder codes • (2,1,7) code with generators (133,171) • (3,1,7) code with generators (133,145,175) • Mobile communications • IS-95 CDMA: (2,1,9) and (3,1,9) codes • Forward channel (base to mobile): (753,561) • Reverse channel (mobile to base): (557,663,771) • GSM: (2,1,5), generators (31,33) • IS-136 TDMA (USDC): (2,1,6) code. • All of these standards use tail bits for framing.
State Diagram • A convolutional encoder is a finite state machine. • The number of states is 2m • A state diagram can be used to show the relationship between the encoders state, input, and output. • The state diagram will have 2m nodes. • Nodes are connected by branches. • Every node will have 2 branches entering it and 2 branches leaving it. • The branches are labeled with x/c, where x is the input and c is the output.
S1 = 10 1/11 1/10 0/00 S0 = 00 S3 = 11 S3 = 11 1/01 1/00 0/01 S2 = 01 0/10 0/11 Example State Diagram original encoder corresponding state diagram input: 1 1 0 1 0 0
Trellis Diagram • Although a state diagram is a helpful tool to understand the operation of the encoder, it does not show how the states change over time for a particular input sequence. • A trellis is an expansion of the state diagram which explicitly shows the passage of time. • All the possible states are shown for each instant of time. • Time is indicated by a movement to the right. • The input data bits and output code bits are represented by a unique path through the trellis.
Example Trellis 1/01 S3 0/10 1/10 S2 0/01 1/00 0/11 S1 1/11 0/00 S0 i = 0 i = 1 i = 2 i = 3 i = 4 i = 5 i = 6
Decoding Convolutional Codes • A maximum likelihood decoder selects the most probable path through the trellis. • The received sequence is compared against all the paths through the trellis. • The path that is “closest” to the received sequence is chosen. • Hard decision decoding uses Hamming distance. • Soft decision decoding uses squared Euclidian distance. • ML decoding is implemented by the Viterbi Algorithm. • We will discuss this in the next lecture. • See: http://www.alantro.com/viterbi/viterbi.htm • “Viterbi algorithm workshop”
Performance of Convolutional Codes • With block codes, the performance was limited by the minimum Hamming distance between distinct code words. • With convolutional codes, the performance is limited by the minimum distance between distinct paths through the trellis. • Called the minimum free distance. • Defined to be the minimum Hamming distance between all paths that start and end in the all-zeros state. • For our example. dfree = • We will go into more detail in the next lecture.
Summary of Convolutional Codes • Convolutional codes are useful for real-time applications because they can be continuously encoded and decoded. • ML decoding of convolutional codes is implemented by the Viterbi algorithm. • Soft-decision decoding is possible with convolutional codes. • Just as we wanted to maximize the distance between code words for block codes, we will want to maximize the distance between distinct paths for convolutional codes. • Called the free distance