Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coding No. 1  Seattle Pacific University Digital Coding Kevin Bolding Electrical Engineering Seattle Pacific University.

Similar presentations


Presentation on theme: "Coding No. 1  Seattle Pacific University Digital Coding Kevin Bolding Electrical Engineering Seattle Pacific University."— Presentation transcript:

1 Coding No. 1  Seattle Pacific University Digital Coding Kevin Bolding Electrical Engineering Seattle Pacific University

2 Coding No. 2  Seattle Pacific University Digital Transmission of Analog Data Sampling Quantizing Coding Modulation Transmission Convert to discrete samples (time domain) Convert to discrete levels (amplitude) Re-map to a different logical code (may expand) Map to a physical code at desired frequency band Amplify and transmit Analog signal Digital data

3 Coding No. 3  Seattle Pacific University Coding Sampling Quantizing Coding Modulation Transmission Coding is the transformation of the digital signal into a different form Usually to a more rugged form that can tolerate errors, reducing the BER Usually involves expansion of the signal Higher bit rate – may require more bandwidth

4 Coding No. 4  Seattle Pacific University Code Space PCM produces an efficient code All possible codes used Examples: 256 codes use 8 bits; 4096 codes use 12 bits Sampling Quantizing Coding Modulation Transmission Efficient codes don’t tolerate errors If an error causes one bit to change, it produces a new codeword New codeword is valid because all possible codewords are valid VVVVVV VVVVVV VVVVVV VVVVVV VVVVVV

5 Coding No. 5  Seattle Pacific University Code Space – Even/Odd Parity Sampling Quantizing Coding Modulation Transmission Expanding the code space introduces redundancy Some codewords are invalid (inefficient) Errors may change valid codewords to invalid codewords VVV VVV VVV VVV VVV Add up all the bits in a codeword – is the total even or odd? Generate an extra bit that forces the total to be even Doubles the size of the code space All codewords with odd parity are invalid 010100110101111101010110 If a single bit is flipped, parity is changed from even to odd 111101010110110101010110 The receiver can re-check parity and find invalid codewords

6 Coding No. 6  Seattle Pacific University Block Coding Bits are grouped into fixed-size blocks Could be 8, 16, 24, etc. bits A computation is performed on the bits on the block to create the codeword Sampling Quantizing Coding Modulation Transmission Most block codes produce extra bits that are appended to the original block to form the codeword Parity is an example – one block + one parity bit More complex block codes can detect more than one error and/or correct errors

7 Coding No. 7  Seattle Pacific University Block Error Correction Sampling Quantizing Coding Modulation Transmission Further expand the code space so that each valid bit is further from its neighbors Each codeword now has a group of unique “one bit-flip” neighbors Codewords in this group can be mapped back to the original codeword V V V V Hamming codes are a class of codes that provide multi-bit error detection/correction Formulaic way of adding redundant bits to provide any level of detection/correction desired Upside/Downside – Each block is independent Lots of errors in one block may exceed the correction ability Even if neighboring blocks have no errors

8 Coding No. 8  Seattle Pacific University Performance of Hamming codes a. Baseline: Binary PSK b. (7,4) Hamming coding, hard decisions c. (7,4) Hamming coding, soft decisions d. Mariner '69 deep space probe, (32,6) bi-orthogonal coding e. Voyager probes, NASA deep space standard (ref 6) f. Theoretical Shannon limit on coding performance.

9 Coding No. 9  Seattle Pacific University Convolutional Coding Treat an entire (near-infinite) stream of bits as a continuous coding input Create an output bitstream that includes the original information, but transforms it into a form that has redundant information built into structure Recovery of the message can use a large portion of the received bitstream to correct errors Rather than appending “parity” bits, convolutional codes increase the number of bits that are output Requires an increase in bit rate to keep up For example, an encoder might substitute two encoded bits for each input bit Output data stream is at twice the bit rate

10 Coding No. 10  Seattle Pacific University A Simple Convolutional Encoder DQDQ Input stream A BC X Y 1 0 Output stream Input clock (1x) Output clock (2x) A,B,C are the three most recent bits (A oldest, C newest) X and Y are the outputs For each new input bit, both X and Y are produced Output rate double the input rate CBAXY 00000 00111 01010 01101 10011 10100 11001 11110

11 Coding No. 11  Seattle Pacific University States DQDQ A BC The two bit shift register holds two bits… Four states (BA) Input to the FSM is C The state transition table can be drawn in a linear form For each set, left side is starting state, right side is ending state Arcs for inputs 0 or 1 BA C

12 Coding No. 12  Seattle Pacific University Outputs The outputs depend on the state (AB) and the input (C) Add them to the arcs in the diagram DQDQ ABC X Y 1 0 CBAXY 00000 00111 01010 01101 10011 10100 11001 11110 BA C XY Upper arc: input C=0, Lower arc: Input C=1 For start state BA=00 For start state BA=01 For start state BA=10 For start state BA=11 BA XY 00 01 10 11 00 01 10 11 00 11 BA XY 00 01 10 11 00 01 10 11 00 BA XY 00 01 10 11 00 01 10 11 10 01 BA XY 00 01 10 11 00 01 10 11 01 10

13 Coding No. 13  Seattle Pacific University Encoding Concatenate “trellis” state diagrams for the transitions and outputs for each input bit Upper arc: input C=0, Lower arc: Input C=1 For start state BA=00 For start state BA=01 For start state BA=10 For start state BA=11 Input: 100111011 1 In: Out: 11 0 10 0 11 1 1 01 1 10 0 01 1 00 1 01 0 0 11 See http://www.ee.unb.ca/cgi-bin/tervo/viterbi.pl?binary=100111011 for more exampleshttp://www.ee.unb.ca/cgi-bin/tervo/viterbi.pl?binary=100111011 ENCODING DIAGRAM

14 Coding No. 14  Seattle Pacific University Encoding/Decoding Diagrams Upper arc: input C=0, Lower arc: Input C=1 For start state BA=00 For start state BA=01 For start state BA=10 For start state BA=11 ENCODING DIAGRAM DECODING DIAGRAM

15 Coding No. 15  Seattle Pacific University Decoding Generate diagram corresponding to possible transitions that create XY codes Code (XY): 11 10 11 01 10 01 00 01 1 In: 0011101100 11 Find “best” path 0 1 DECODING DIAGRAM

16 Coding No. 16  Seattle Pacific University Decoding with Errors What if an error occurs to the coded message? (Third symbol has a bit flip) 1 Input (from code 1): 0011101100 Find “best” path Rcvd Code (XY): 11 10 11 01 10 01 00 01 11 BA 00 01 10 11 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 0 1 Candidate Code 1: 11 10 11 01 10 01 00 01 11 Candidate Code 2: 11 01 00 01 10 01 00 01 11 1 bit difference 6 bit difference All Possible Paths BA 00 01 10 11 00 01 10 11 DECODING DIAGRAM

17 Coding No. 17  Seattle Pacific University Decoding with Errors What about multiple errors? 1 Input (from code 2): 0011101100 Candidate Code 2: 11 10 11 01 10 10 00 01 11 Candidate Code 1: 11 01 01 01 11 00 11 01 11 2 bit difference 6 bit difference Rcvd Code (XY): 11 10 11 00 01 00 01 11 BA 00 01 10 11 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 0 1 All Possible Paths BA 00 01 10 11 00 01 10 11 Candidate Code 3: 11 10 11 10 10 00 10 00 01 11 3 bit difference DECODING DIAGRAM

18 Coding No. 18  Seattle Pacific University Viterbi Decoding Algorithm The goal of the decoder is to find a path through the trellis with the best match Best match = fewest bit flips from received data Viterbi algorithm is an efficient method to find the best match See http://www.ee.unb.ca/tervo/ee4253/convolution3.htm for detailshttp://www.ee.unb.ca/tervo/ee4253/convolution3.htm

19 Coding No. 19  Seattle Pacific University Performance http://home.netcom.com/~chip.f/viterbi/simrslts.html

20 Coding No. 20  Seattle Pacific University Soft Decoding 2. Using channel quality information from the demodulator The demodulator sees the unquantitized analog signal and may have additional helpful info Soft decoding refers to two different techniques for improving coding performance 1. Using neighboring bits to improve the reliability of the decoding decision The trellis-decoding method for convolutional coding is an example

21 Coding No. 21  Seattle Pacific University Using Channel Quality Info BA 00 01 10 11 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 BA 00 01 10 11 0 1 Channel Quality Poor quality input - erase If the channel quality is below a threshold when receiving a symbol, erase the symbol Erasing removes the erroneous symbol from consideration, so more weight can be given to the correct symbols

22 Coding No. 22  Seattle Pacific University Obtaining signal quality info The demodulator receives imperfect data, but quantitizes it based on the best possibility The error can be measured and reported I Q In standard QPSK, the angle of the received waveform determines the binary value Ideally, each received symbol overlies a blue dot In reality, the received signals are more spread out Define a threshold that decides when to throw out far-off data points


Download ppt "Coding No. 1  Seattle Pacific University Digital Coding Kevin Bolding Electrical Engineering Seattle Pacific University."

Similar presentations


Ads by Google