USING THE MATLAB COMMUNICATIONS TOOLBOX TO LOOK AT CYCLIC CODING Wm. Hugh Blanton East Tennessee State University

Slides:



Advertisements
Similar presentations
Mahdi Barhoush Mohammad Hanaysheh
Advertisements

Cyclic Code.
Error Control Code.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Information and Coding Theory
CHANNEL CODING REED SOLOMON CODES.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Cellular Communications
DIGITAL COMMUNICATION Coding
Error detection/correction FOUR WEEK PROJECT 1 ITEMS TO BE DISCUSSED 1.0 OVERVIEW OF CODING STRENGTH (3MINS) Weight/distance of binary vectors Error detection.
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Chapter 11 Algebraic Coding Theory. Single Error Detection M = (1, 1, …, 1) is the m  1 parity check matrix for single error detection. If c = (0, 1,
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
DIGITAL COMMUNICATION Coding
Error Detection and Correction
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
Hamming Code Rachel Ah Chuen. Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted.
Hamming Code A Hamming code is a linear error-correcting code named after its inventor, Richard Hamming. Hamming codes can detect up to two bit errors,
Lecture 6 Topics Character codes Error Detection and Correction
DIGITAL COMMUNICATION Error - Correction A.J. Han Vinck.
1 S Advanced Digital Communication (4 cr) Cyclic Codes.
Part.7.1 Copyright 2007 Koren & Krishna, Morgan-Kaufman FAULT TOLERANT SYSTEMS Part 7 - Coding.
It is physically impossible for any data recording or transmission medium to be 100% perfect 100% of the time over its entire expected useful life. As.
Information and Coding Theory Linear Block Codes. Basic definitions and some examples. Juris Viksna, 2015.
1 Channel Coding (II) Cyclic Codes and Convolutional Codes.
Exercise in the previous class p: the probability that symbols are delivered correctly C: 1 00 → → → → What is the threshold.
British Computer Society
CODING/DECODING CONCEPTS AND BLOCK CODING. ERROR DETECTION CORRECTION Increase signal power Decrease signal power Reduce Diversity Retransmission Forward.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
Codes Codes are used for the following purposes: - to detect errors - to correct errors after detection Error Control Coding © Erhan A. Ince Types: -Linear.
March 29, 2005Week 11 1 EE521 Analog and Digital Communications James K. Beard, Ph. D. Tuesday, March 29, 2005
COEN 180 Erasure Correcting, Error Detecting, and Error Correcting Codes.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Chapter 3 Digital Transmission Fundamentals Line Coding Error Detection and Correction.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Cyclic Redundancy Check CRC Chapter CYCLIC CODES Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword.
Basic Characteristics of Block Codes
Coding Theory. 2 Communication System Channel encoder Source encoder Modulator Demodulator Channel Voice Image Data CRC encoder Interleaver Deinterleaver.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
DIGITAL COMMUNICATIONS Linear Block Codes
ADVANTAGE of GENERATOR MATRIX:
Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY.
Information Theory Linear Block Codes Jalal Al Roumy.
1 © Unitec New Zealand CRC calculation and Hammings code.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
Error Detection and Correction – Hamming Code
Some Computation Problems in Coding Theory
Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina.
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
Sense making in linear algebra Lee Peng Yee Bangkok
INFORMATION THEORY Pui-chor Wong.
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
Error Control Coding. Purpose To detect and correct error(s) that is introduced during transmission of digital signal.
1 Product Codes An extension of the concept of parity to a large number of words of data 0110… … … … … … …101.
Error Detecting and Error Correcting Codes
ECE 442 COMMUNICATION SYSTEM DESIGN LECTURE 10. LINEAR BLOCK CODES Husheng Li Dept. of EECS The University of Tennessee.
Channel Coding: Part I Presentation II Irvanda Kurniadi V. ( ) Digital Communication 1.
V. Non-Binary Codes: Introduction to Reed Solomon Codes
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
Subject Name: COMPUTER NETWORKS-1
DATA COMMUNICATION AND NETWORKINGS
II. Linear Block Codes.
Information Redundancy Fault Tolerant Computing
DIGITAL COMMUNICATION Coding
Cyclic Code.
II. Linear Block Codes.
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Chapter 10 Error Detection and Correction
Presentation transcript:

USING THE MATLAB COMMUNICATIONS TOOLBOX TO LOOK AT CYCLIC CODING Wm. Hugh Blanton East Tennessee State University

The Theory General Concepts

Channel Coding Designed to improve communications performance by enabling the transmitted signals to better withstand the effects of various channel impairments, such as noise, interference, and fading. Designed to improve communications performance by enabling the transmitted signals to better withstand the effects of various channel impairments, such as noise, interference, and fading.

Hamming Distance The number of bit positions in which two binary words differ. This figure has a minimum distance between code words of 1.

Hamming Distance of r = A code word that differs by a Hamming distance of 2 will detect an erroneous code word

1 1 1 If the minimum distance is 3, the code words are separated by at least three edges. Note that if a single error occurs, the erroneous code word will be closer to one of the correct code words. The error is corrected by assigning the received code word to the nearest (in Hamming distance) valid code word.

The important concepts associated with Hamming distance are: 1.When the Hamming distance is 1, it is impossible to detect an error, much less correct the error. 2.When the Hamming distance is 2, the error can be detected, but not corrected. 3.When the Hamming distance is 3, a single error can be detected and corrected.

More Theory Mathematical Concepts

LINEAR BLOCK CODES Definition Definition –A systematic (n,k) linear block code is a mapping from a k-dimensional message vector to an n-dimensional codeword in such a way that part of the sequence generated coincides with the k message digits.

InformationCode The linear block code that everyone uses is the (7,4) code. k-dimensional information vector, where k = 4. n-dimensional information vector, where n = 7.

Generator Matrix How do you generate a (7,4) code? How do you generate a (7,4) code? –Of course with a Generator Matrix! Note that m = n - k, the difference

A (7,4) code is generated by the matrix A (7,4) code is generated by the matrix

The (7,4) block code is generated using the matrix equation The (7,4) block code is generated using the matrix equation –where 1. u is a [1 × k] vector representing the information word 2. v is a [1 × n] vector representing the code word 3. [G] is a [k × n] generating matrix

For the information word ( ), the code word is computed as follows: For the information word ( ), the code word is computed as follows: Transformation from 4-bit information word to 7-bit code word Note that the additions are modulo-2 additions

The Hamming distance for the (7,4) code is 3. The Hamming distance for the (7,4) code is 3. –Thus, this code can detect double bit errors and correct single bit errors

Parity Check Matrix Another important matrix associated with block codes is the parity check matrix, [H]. Another important matrix associated with block codes is the parity check matrix, [H].

The parity check matrix is formed by starting with the identity matrix and appending the transpose of the nonidentity portion of [G]: The parity check matrix is formed by starting with the identity matrix and appending the transpose of the nonidentity portion of [G]:

For the (7,4) block code, For the (7,4) block code,

The Syndrome The parity check matrix has the property The parity check matrix has the property v[H] T = 0 That is, any errorless, received code word multiplied by the transpose of the parity check matrix, [H], yields a zero vector, or syndrome. That is, any errorless, received code word multiplied by the transpose of the parity check matrix, [H], yields a zero vector, or syndrome. –If the received code word contains an error, the resulting vector will match the corresponding bit that caused the error.

Consider one of the valid code words of the (7,4) block code, v = and the transpose of the (7,4) parity check matrix. Consider one of the valid code words of the (7,4) block code, v = and the transpose of the (7,4) parity check matrix.

Modulo-2 Addition

Syndrome The null vector indicates no error.

Suppose the valid code words, v = gets corrupted to Suppose the valid code words, v = gets corrupted to

Modulo-2 Addition

Syndrome Match syndrome with corresponding code in parity check matrix The second row corresponds to the second bit from left.

Each row in the transposed parity check matrix corresponds to a bit in the code word. Each row in the transposed parity check matrix corresponds to a bit in the code word. –By matching the non-zero syndrome with the contents contained in the rows of the transposed parity matrix, the corresponding corrupted bit can be detected and and subsequently corrected.

The process will convert the erroneous code to the correct code The process will convert the erroneous code to the correct code

Cyclic Codes

CYCLIC CODES The implementation of linear block codes requires circuits capable of performing matrix multiplication and of comparing the result of various binary numbers. The implementation of linear block codes requires circuits capable of performing matrix multiplication and of comparing the result of various binary numbers. –Although integrated circuits have been developed to implement the most common codes, the circuitry can become quite complex for very long blocks of code.

A special case of the block code, the cyclic code can be electronically implemented relatively easily. A special case of the block code, the cyclic code can be electronically implemented relatively easily.

A (7,4) cyclic code generating matrix

Non-systematic—No Identity matrix.

A nonsystematic (7,4) cyclic code generating matrix is made systematic by performing row, column operations until you obtain the I k partition.

MATLAB COMMUNICATIONS TOOLBOX DERIVATION

Although row,column matrix manipulation is a straightforward process for students that have taken a linear algebra course, many engineering technology students are not familiar with the process. Although row,column matrix manipulation is a straightforward process for students that have taken a linear algebra course, many engineering technology students are not familiar with the process.

Although, the discussion of linear block codes is not mathematically complicated, it is mathematically tortuous with many mathematical turns. Although, the discussion of linear block codes is not mathematically complicated, it is mathematically tortuous with many mathematical turns.

Finally, the discussion for the (7,4) cyclic code is relatively benign with a manageable number of calculations. Finally, the discussion for the (7,4) cyclic code is relatively benign with a manageable number of calculations.

For larger codes, the calculations become overwhelming, especially for the engineering technology student. For larger codes, the calculations become overwhelming, especially for the engineering technology student.

In order to In order to –better manage larger codes, –relieve the mathematical stress on engineering technology students, and –focus on the application of block codes rather than the mathematics; the MATLAB Communications Toolbox provides a set of cyclic code functions. the MATLAB Communications Toolbox provides a set of cyclic code functions.

Consider the problem with a (15,7) cyclic code with the following generator polynomial. that corresponds to the code word 1x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x8x8 x7x7

The nonsystematic cyclic code generating matrix, G, is:

And the systematic cyclic code generating matrix is

By using the function cyclpoly, MATLAB yields a set of all generating polynomials By using the function cyclpoly, MATLAB yields a set of all generating polynomials >> p=cyclpoly(15,7,'all') p =

By using the function cyclgen, the nonsystematic generating matrix, genmat, is derived as follows: >> genpoly=[ ]; >>[parmat,genmat]=cyclgen(15,genpoly,'nonsys')

genmat = Columns 1 through 13 Columns 1 through Columns 14 through

which is in matrix form.

Likewise, the systematic generating matrix, genmatsys, can be computed using cyclgen without the conditional parameter (nonsys): >> genpoly=[ ]; >>[parmat,genmat]=cyclgen(15,genpoly)

genmatsys = Columns 1 through Columns 13 through

which is in matrix form.

The (15,7) code produces 32,768 (215) possible code words of which 128 (27) are valid code words. The (15,7) code produces 32,768 (215) possible code words of which 128 (27) are valid code words. –Needless to say, picking the right 128 valid codes out of 32,768 possibilities is a frightening task.

The Communications Toolbox provides an encode function that alleviates much of this mathematical anxiety. The Communications Toolbox provides an encode function that alleviates much of this mathematical anxiety. >> data=(0:127); >> c=de2bi(data,'left-msb'); >> valid_code=encode(c,15,7,'cyclic',genpoly)

valid_code = information code

Conclusion

The MATLAB Communications Toolbox derives the same generating matrices that are derived by mathematical manipulation. The MATLAB Communications Toolbox derives the same generating matrices that are derived by mathematical manipulation. –The underlying result is that the electronic engineering technology student can apply more effort in understanding the theory rather than the mathematics, especially when considering more complex problems.

By reducing the mathematical anxiety, students can concentrate more attentively on the actual nuances of block coding, and the instructor can move from theoretical foundation of cyclic codes to the circuit implementation of cyclic codes. By reducing the mathematical anxiety, students can concentrate more attentively on the actual nuances of block coding, and the instructor can move from theoretical foundation of cyclic codes to the circuit implementation of cyclic codes.