Вы находитесь на странице: 1из 54

FACULTY OF ENGINEERING AND COMPUTING

BACHELOR OF ENGINEERING (HONS) IN ELECTRICAL AND ELECTRONICS ENGINEERING

A311SE COMMUNICATIONS AND NETWORK

Course Work
STUDENT NAME STUDENT ID SUPERVISOR SUBMISSION DATE : : : : M.BADURDEEN SHAKEAL 4750820 Dr. ROHAN MUNASINGHE 2012.10.01

PROJECT/ASSIGNMENT SUBMISSION ACKNOWLEDGEMENT SLIP


4750820 M.Badurdeen Shakeal Name of Student: _________________________________ Student No: _____________________________
Home Address: __________________________________________________________________________

2012.10.01 Date of Submission: _______________________________ Name of Tutor:


Program/ Module: Bachelor / A311SE (Communications & Networks) Individual Assignment: Design based CAD/ Implementation Assignment Received By: _________________________

LE LE YI

Date: ___________________________________

Individual Projects (30%)

Marks Learning Outcome Weightage


45%

1 marker

st

2 marker/ moderator

nd

Final mark

Q1.

Appraise multi-level digital modulation techniques


Principle of operations of multilevel digital modulations Principles of M_QAM modulation technique Parameters for Performance measurement of MQAM modulation Design selection and calculations for M_QAM MATLAB simulation Analysis/ discussion on Results

3% 4% 3% 11% 14% 10%

Q2.

Apply the principles of error correction coding. Principles of FEC coding


Performance coding measurement parameters for FEC

45% 3% 3% 3% 11% 15% 10%

Principles of Hamming coding and decoding


Design selection and Calculations for Hamming coding and decoding MATLAB Simulation Analysis / discussion on Results

Quality and structure of report

10%

Total Marks

100%

1 markers comment _____________________________________________________________________

st

_____________________________________________________________________

_____________________________________________________________________

nd

markers/ moderator comment _____________________________________________________________________

_____________________________________________________________________

_____________________________________________________________________

Plagiarism Check Turnitin check Collusion check

Declaration of Originality
I Badurdeen Shakeal declare that this thesis is my own work and contains no material which has been accepted for a degree or diploma by the University or any other institution, except by way of background information and duly acknowledged in the thesis, and to the best of the my knowledge and belief no material previously published or written by another person except where due acknowledgement is made in the text of the thesis, nor does the thesis contain any material that infringes copyright. List of reference is given at the end of the assignment report using Coventry University Harvard style referencing. This project is submitted in partial fulfilment of the requirements of the award of Bachelor of Engineering (Hons) in Electrical & Electronic Engineering.

Page - i

Acknowledgment
First and foremost, I would like to thank to our Lecture Dr. Rohan Munasinghe of this course work, Mr. Duminda Wijesinghe for the valuable guidance, advice and supervising. He inspired us greatly to work in this course work. His willingness to motivate us contributed tremendously to our course work. I also would like to thank Mr. Sujeewa Perera the librarian cum academic support executive of Auston Institute of Management Ceylon for helping us with library resources. Besides, I would like to thank the management of Auston Institute for providing us with a good environment and facilities to complete this course work. Also, I would like to take this opportunity to thank to the Coventry University for offering this program, computing course work. It gave us an opportunity to learn about the operation of multilevel digital modulation and forward error correction. Finally, an honorable mention goes to our families and friends for their understandings and supports on us in completing this project. Without helps of the particular that mentioned above, we would face many difficulties while doing this.

Page - ii

A311SE Communications and Network

Contents Abstract .................................................................................................................... 4


1.1 1.2 1.3 1.4 Motivation ................................................................................................................................... 4 Problem statement and scope of project ...................................................................................... 5 Methodologies ............................................................................................................................. 5 Result and conclusions ................................................................................................................ 5

Introduction ............................................................................................................. 6
2.1. 2.2. 2.3. Background .................................................................................................................................. 6 Objectives .................................................................................................................................... 6 Scope/limitation of project .......................................................................................................... 6

3. Literature Review ............................................................................................... 7


3.1 Principle of operations of multilevel digital modulations.................................................................. 7 3.2 Principle of operations of M-QAM modulation. ............................................................................... 8 3.3 Parameters for performance measurement of M-QAM modulation ................................................ 11 3.4 Principles for Forward Error Correction (FEC) coding. .................................................................. 14 3.5 Principles for hamming coding and decoding. ................................................................................ 17

4 Design criteria and calculations...................................................................... 22


4.1 Design selection, criteria for M-QAM modulation ......................................................................... 22 4.2 Design calculations for M-QAM modulation .................................................................................. 23 4.3 Design selection / criteria for (n, k) hamming coding and decoding ............................................... 25 4.4 Design calculations for (n, k) hamming coding and decoding ........................................................ 26

5. MATLAB Programming .................................................................................. 30


5.3 5.4 MATLAB program for M-QAM digital modulation ................................................................. 30 MATLAB program for (7, 4) hamming coding and decoding .................................................. 32 MATLAB code for (7.4) Hamming coding ....................................................................... 32 MATLAB simulation code for hard decision decoding .................................................... 32

5.4.1. 5.4.2.

5.4.3. MATLAB simulation code comparison of Bit Error Rate (BER) for coded and uncoded signals. 33 5.5 Detail simulation steps and procedures ..................................................................................... 35 Detail simulation steps of 8-QAM modulation.................................................................. 35

5.5.1.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 1

A311SE Communications and Network

5.5.2. 5.5.3. 5.5.4.

Detail simulation steps of Hamming coding...................................................................... 37 Detail simulation steps of hard decision decoding ............................................................ 40 Detail simulation steps of Bit Error Rate (BER) Comparison. .......................................... 44

6. Critical Analysis /Discussion and comparison on results.............................. 45


6.1 Analysis, discussion and comparison on different simulation results of M_QAM modulation 46

6.2 Analysis, discussion and comparison on different simulation results of Hamming coding and decoding................................................................................................................................................. 46 6.3 Theoretical interpretation and Verification................................................................................ 46

7. Conclusions ........................................................................................................ 47 References .................................................................. Error! Bookmark not defined.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 2

A311SE Communications and Network

List of Figures, Tables and Equations


Figure 1 Diagram of multilevel modulation ................................. Error! Bookmark not defined. Figure 2 Dagram of QAM Modulaion ............................................................................................ 8 Figure 3 Dagram of QAM Demodulaion........................................................................................ 9 Figure 4 Bandwidth efficiency diagram ....................................................................................... 13 Figure 5- FEC System Diagram (A.B.Carlson, 2001) .................................................................. 16 Figure 6- Hamming Distance counting cube ................................................................................ 17 Figure 7 Block diagram for 8-ary QAM modulation.................... Error! Bookmark not defined. Figure 8 Constellation Diagram for selected 8-ary QAM Modulation......................................... 24 Figure 9 Programming code in MATLAB simulation software for 8-QAM Digital Modulation for the output of the signal together with related input binary signal ........................................... 35 Figure 10 Result shown in MATLAB simulation software for 8-QAM Digital Modulation for the output of the signal together with related input binary signal ................................................ 35 Figure 11 Result of MATLAB simulation show the output of the signal together with related input binary signal ........................................................................................................................ 36 Figure 12 Programming code in MATLAB simulation software for (7, 4) hamming coding ..... 37 Figure 13 Result shown in MATLAB simulation software for (7, 4) hamming coding .............. 37 Figure 14 Programming code in MATLAB simulation software for (7, 4) hamming codes hard decision decoding ......................................................................................................................... 40 Figure 15 Result Shown in MATLAB simulation software for (7, 4) Hard Decision decoding. . 40 Figure 16 MATLAB coding in MATLAB simulation software for comparison of Bit Error Rate (BER) for coded and uncoded signals .......................................................................................... 44 Figure 17 Result Show in MATLAB simulation software for comparison of Bit Error Rate (BER) for coded and uncoded signals. ......................................................................................... 44 Figure 18 Result on MATLAB for Selected hamming coding..................................................... 45

List of Tables
Table 1 Bit Allocation Table for 8-ary QAM Modulation ........................................................... 24 Table 2 Codeword table ................................................................................................................ 27 Table 3 Decoding Table (Syndrome) ........................................................................................... 29

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 3

A311SE Communications and Network

Abstract 1.1 Motivation


First of all the actual motivation of accomplishing this course work is to get wide range of knowledge withinside the regarding telecommunication transmission. Over time, the world remains enhancing and advancing around us, there is lots heart and soul and personas wanting to alter points about all of us all in the field of communication. But alternatively tiny success is attained with this scientific stride, that's a similar in all human beings they have a tendency to reside and assist a lesser amount of effort and time and much more efficiently and effectively. This particular course work continues to be emotively dedicated to communication strategies. Because we are inside a fast growing globe, where it really is called an international village for people to stay in the actual reduces costs of that technology. We have to have huge and also intricate communication national facilities is usually to be used where a couple of primary modulation schemes has been used and tested throughout technique environment with regard to appropriate operate. Which may end up being QAM (Quadrature Amplitude Modulation) modulation technique. Currently the communication have come up with numerous facilities and so there are several processes to discover in the diverse kind of modulation techniques. Also on that point currently certainly there exist wise the actual communication will have numerous noise full express and not able to use properly where there will be more errors because of having difficulty and thus that individuals should use computer simulation program such as MATLAB as it is an Advanced programing language additionally numerical processing environment. Its used to change matrix and also plotting regarding features and information. The main aim with this venture is always to clearly realize and theoretically assess each and every problem given under. The initial would be the comprehension of QAM digital modulation techniques as well as the design of the Hamming code and its particular error recognition techniques.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 4

A311SE Communications and Network

1.2 Problem statement and scope of project


In this very initial Question, believe taking amplitudes as well as phase angles regarding provided M value to plot the constellation diagram. Since the course work states utilize MATLAB simulation software to simulate design the actual MQAM digital modulation and possess showing regulated output signal as well as associated input binary sign. Withinside the second question, to begin with must find the Block code and using that discover parity check matrix (H), generator matrix (G) as well as codeword table. then find the syndrom table. Issue informs to utilize difficult decision technique and to replicate the design utilize Matlab software. With this locate overacting hamming code and also decoding.

1.3 Methodologies
The strategy utilized first of all is the calculating just about almost most exact numbers as well as variables and then finally stepping into MATLAB software for implementation as well as running purposes, where the accuracy of mathematical computed data could possibly be tested. Similarly thing about this course work focuses the building of the Hamming code using basic theory after this portion has been completed. Also finally MATLAB software has been used here for implementing this interrogation.

1.4 Result and conclusions


Benefits in this course work would that most mathematical components could be elucidated and graphically represented using MATLAB computing software simulation. The main results of this particular task accomplishment a comprehensive understanding is actually acquired whenever completing this particular course work. When utilizing this MATLAB simulation software program in 1st case we are able to check the accuracy and reliability from the plotting diagram and the determined solutions we all do. Inside second difficulty furthermore we use MATLAB in order to be able for you to help imitate the record and to confirm the accuracy. In any case when using this particular software we could discover the graphical answer and comprehension of the subject nicely as we want to operate in useful every day in the life.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 5

A311SE Communications and Network

Introduction
2.1. Background

Background of this course work is whenever we come to telecom it is not easier compared to we all thought. As it associated with of procedure going through the senders and also devices. Therefore, there should be ways to handle and also correct whenever transmitting signals are usually incorrect so that you can have got perfect as well as quick communication. Thus, Forward error correction [FEC] may be the great way to perform that kind of scenario and also FEC coding were created not merely to detect yet correct errors in the communication to avoid requirement for retransmission. FEC is actually techniques are often charge in wireless transmission, exactly in which retransmission is strategies tend to be highly unproductive as well as error rate might be large. Consequently this really is gaining popularity through other error correction techniques.

2.2. Objectives

In this course work really aim is actually examine the particular calculations and also results which receive utilizing MATLAB encoding. As well as reading good results expression about the techniques utilized in these systems and getting good results knowledge in hard choice method in hamming programming and also decoding. Consequently simulation and comparison of obtained value of coded and uncoded signals.

2.3. Scope/limitation of project

While In the first chapter M value is given by the lecturer. So through the use of M value k value can be determine. Then through which have to prepare the particular binary bit assignment table. From then on need to pull the constellation diagram regarding of QAM modulation. Then Utilize the MATLAB software that can simulate the answer. Despite the fact that QAM effectiveness will be high it has many downsides in fact. A very important factor is always that is much more prone minimizing degree of noise is necessary to move the actual signal to various places. Not only must that hen QAM having amplitude aspects one-linearly be maintained.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 6

A311SE Communications and Network

3. Literature Review 3.1 Principle of operations of multilevel digital modulations.


In order to be able to help first view the functioning of multilevel digital modulation must realize first why digital modulation is used in the field of telecommunication and also researches in entire world. Especially in telecommunication field the entire transmission to be achievable there has to be a possible transmission media in which the transmission is actually generated (sender) and may travel for the meant destination had been throughout communication it is known as the receiver. In individuals transmitting media with inside conversation there is certainly merely a static range of frequencies which can be found with regard to transmission purpose, as this can be obtained we're able to not really perhaps transmit in all frequencies this may be devastating, if your option would be not necessarily identified and the date that we sent wouldn't be suitable for that channel. A prosperous plan was found following considerable research is in which to improve any transmitting signal based on the information which is give feed to as input data, this particular alteration of the signal is named as modulation. This information that is modulated might be received by the receiver and also the information that's in the signal could be retrieved because the original data that has been encoded this is known as demodulation. (Sklar, 2001)

Figure 1 Block Diagram of Multilevel Digital Modulation


COVENTRY UNIVERSITY STUDENT ID: 4750820 Page 7

A311SE Communications and Network

3.2 Principle of operations of M-QAM modulation.


Before viewing of M-QAM (Multiple Quadrature Amplitude Modulation) modulation will realize first the understanding of functioning of the (QAM) Quadrature Amplitude Modulation and demodulation. QAM modulation and demodulation. Quadrature Amplitude Modulation is really a combination of Phase-Shift-Key (PSK) and Amplitude-Shift-Key (ASK) modulation techniques. Additionally QAM can be a form of digital modulation much like Phase-Shift-Key other than digital information is within the amplitude and also phase of the transmitting carrier. It is possible to deliver 2 different signals simultaneously on the same carrier frequency, through the use of two copies of the carrier frequency, one altered through 900 with regards to the additionalIn this modulation each carrier is ASK modulated. (Sklar, 2001)
d1(t) R/2 bps

cos(2fct)
Carrier Oscillator
Binary Input D(t) R bps
2-bit serial to parallel converter

QAM signal Out S(t)

Phase -/2 Shift

+
sin(2fct)

d2(t) R/2 bps

Figure 2 Dagram of QAM Modulaion

The above mentioned figure 2 shows the actual QAM modulation scheme generally. The particular input can be a flow associated with binary numbers coming to a rate of R bps. This kind of supply will be converted into two separate bit streams. Withinside the diagram, top of the stream is actually ASK modulated over a carrier regarding regularity fc only multiplying the bit stream by the carrier. Therefore, a binary "0" is represented by the absence of the carrier wave

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 8

A311SE Communications and Network

and a binary 1 is represented by the presence of the actual carrier wave at a continuous amplitude. This exact identical carrier wave is shifted simply by simply 900 as well as used for ASK associated with the lower binary stream. Both modulated signals are added together and transmitted. The transmitted signal can be expressed as follows:

( )

( )

( )

) ---------Equation 1

If a couple of- level ASK is used, then each of the two streams can be in one of two states and the combined stream could be in one of4 = 2 2 states. That is fundamentally QPSK. If four level ASK is used (i.e. four different amplitude levels), then the combined stream can be in one of 16 = 4 4 states. Systems using 64 and even 256 states have been implemented. The greater the number of states, the higher the data rate that is feasible within a given bandwidth. The higher the number of states, the larger the potential error rate due to noise and attenuation.

d1(t) R/2 bps

Low Pass Filter

y1(t)= d1(t)/2

cos(2fct)
Carrier Oscillator
QAM signal in s(t) R bps

Phase -/2 Shift

sin(2fct)
d2(t) R/2 bps

Low Pass Filter

y2(t)= d2(t)/2

Figure 3 Dagram of QAM Demodulaion

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 9

A311SE Communications and Network

The above figure 2 shows the QAM demodulation scheme in general terms. The input is a stream of QAM signal arriving at a rate of R bps. This stream is converted into two separate bit streams. Both upper and lower part signal go through two separate Low Pass Filters.

Quadrature amplitude modulation is a modulation scheme which has digital and analogue The mathematical description of the new modulated signal

( )

-----------Equation 2

The level parameter for in-phase component and quadrature component are independent of each other for all i. M-ary QAM is a hybrid form of M-ary modulation. M-ary amplitude-shift keying (M-ary ASK) If bi=0 for all i, the modulated signal si(t) of above equation is reduces to

( )

) } --------Equation 3

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 10

A311SE Communications and Network

3.3 Parameters for performance measurement of M-QAM modulation


Average signal to noise ratio (SNR)

Signal-to-noise ratio is understood to be the power ratio between signal and the background noise. The particular ideas regarding signal-noise ratio and energetic range tend to be closely connected. Powerful variety measures the particular proportion between the strongest un-distorted transmission channel on a route and the bare lowest discernable signal. Which usually for most reasons will be the noise level. SNR actions the actual percentage in among an arbitrary signal and noise. SNR is normally taken up indicate the average signal-to-noise ratio, as it is feasible for instantaneous signal-noise ratio proportions will be significantly different. The idea may be recognized as normalizing the particular noise level to a single (0 dB) and calculating how far the transmission. (R.S., 2004)

) ------Equation 4

Exactly in which P is typical power. Both transmission noise power must be assessed at the very similar and equal points in a system, and also inside the exact identical system bandwidth. If the transmission as well as the noises are usually assessed throughout the exact identical impedance, then the SNR can be obtained by establishing the actual square of the amplitude voltage. (Tocci, 2007) All the received power Pr is in the modulating signal Relationship of Eb/N0 and SNR as follow.

( )-------------Equation 5

( )

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 11

A311SE Communications and Network

Bit error probability


For a rectangular constellation, a Gaussian channel, and matched filter reception, the probability of bit error P is expressed by.

------------Equation 6

Where L represents the number of amplitude levels in one dimension. We assume that a sequence of log L (k) bits are assigned to an L-ary symbol using a Gray code.

Noise power spectral density


Eb/N0 is the ratio of signal energy per bit to noise power density per Hertz and it is standard quality to measure for digital communication system performance. Power (W) = Energy/time ( J/s) Eb = STb --------------Equation 7

------------Equation 8

(A.B.Carlson, 2001)

Signal power
The average signal power = A2/2

----------------Equation 9

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 12

A311SE Communications and Network

Bandwidth requirements
Operating points for coherent quadrature amplitude modulation (QAM) is plotted in Figure Of the modulations shown, QAM is clearly the most bandwidth efficient.

Figure 4 Bandwidth efficiency diagram (Sklar, 2001)

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 13

A311SE Communications and Network

3.4 Principles for Forward Error Correction (FEC) coding.


FEC Two main categories of FEC codes are block code and convolutional code Throughout telecommunication, information theory, and code principle, forward error correction (FEC) of channel is a technique used for controlling errors in data transmission over unreliable or noisy communication channels. The particular central idea is the sender scribes their massage in a redundant way approach by utilizing a good error-correcting code (ECC). The actual United States math wizard Rich Overacting developed this field in the nineteen forties as well as invented the very first error-correcting code for Hamming (7, 4) signal in 1950. (Anon., 2009) The redundancy permits the particular receiver in order to be able for you to help identify a restricted quantity of error that may take place around what it's all about, and sometimes to fix these errors without retransmission. FEC gives the receiver the ability to appropriate errors without resorting to the change route so that you can ask for retransmission of knowledge, however at the expense of a fixed, increased forwards channel bandwidth. FEC is therefore applied in circumstances where retransmissions are costly or impossible, for example one-way communication links when broadcasting in order to be able for you to help several shower receiver throughout multicast. FEC details are usually added mass storage devices to allow recuperation associated with corrupted information, and is widely used in modems. FEC digesting in the receiver could be placed on a digital bit stream or perhaps the particular demodulation of your digitally modulated carrier. For the last option, FEC is an integral part of the preliminary analog-to-digital conversion withinside the receiver. The Viterbi decoder tools the soft-decision algorithm to demodulate digital information through an analog signal damaged through noises. Several FEC coders also can produce bit-error rate (BER) signal transmission which may be utilized since comments so that you can refine the particular analog getting electronics. (Anon., 2009) The utmost fragments of errors or of missing bits that may be corrected is determined by the design of the particular FEC code, thus different forward error correcting codes are suitable for diverse ailments.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 14

A311SE Communications and Network

Two main principle type of FEC codes are Block code Convolutional code

Block code
Error-correcting codes are employed to dependably transmit digital information over variable connections and communication channel subject to channel noise. Each time transmitter needs to transfer a possibly very long data stream using a block code, the particular transmitter breaks or cracks the actual stream upwards in to piece of a few fixes size. Every such piece is called message and also the procedure given by the actual block code encodes each massage individually right in to a codeword, also referred to as the block poor obstruct rules. The particular transmitter next transfers just about almost most blocks for the recipient, who is able to subsequently use some decoding mechanism to recover the original communications from the probably damaged received blocks. The particular performance and also success of the total transmitting depends upon the parameters of the channel and the block code. (A.B.Carlson, 2001)

Convolution Code
Convolutional codes are used thoroughly in various applications to have trustworthy data transmission, such as digital electronic video, radio, microwave mobile communication, and also satellite communication. These types of codes in many cases are implemented in concatenation using a hard-decision code, particularly Reed Solomon. Just before turbo codes, this kind of improvements had been probably one of essentially by far the best efficient, returning best towards the Claude Shannon limit. (Sklar, 2001)

Add redundant bits to a massage so that error can be detected and corrected Rate of code is a measure of redundancy = ratio of massage bits to total bits

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 15

A311SE Communications and Network

Maybe effected on fixed length data blocks (block codes) or on a continuous data stream (convolutional codes)

Figure 5- FEC System Diagram (A.B.Carlson, 2001)

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 16

A311SE Communications and Network

3.5 Principles for hamming coding and decoding. Hamming distance


The number of symbol positions in which two code words vary is denoted as a Hamming distance, d. e.g. 1001 and 1000 are separated by Hamming distance 1, while 1001 and 0110 are separated by distance 4. Codes with larger minimum Hamming distance dmin are more powerful. Binary words of the length n carrying only k information bits contain redundancy which, if properly structured can provide. Redundancy for error detection and correction in an (n, k) code. The ratio R is the code rate is k/n. (Tocci, 2007)

Hamming Distance count

Figure 6- Hamming Distance counting cube

3-bit binary words arranged in 3-dimensional space on a cube. Minimum Hamming distance between words is 1. Words 000 and 111 have distance 3 and represent EEC. Code rate is 1/3, single errors can be corrected. Example:

Then hamming distance is = 3

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 17

A311SE Communications and Network

The minimal Hamming distance between any two correct codeword is 3, and received words can be correctly decoded if they are at distance at most one from the codeword that was transmitted by the sender. Hamming Distance = Minimum Weight

Parity Checks

We can add a parity bit to a word to ensure that it has a defined parity 1110 has odd parity (odd number of 1s). A single error will then disturb the parity and thus be detected, this is the basis for error correction coding. By introducing parity bits applied across subsets of the information bit positions it is possible to both detect and correct errors the basis of error correction codes (ECCs). The parity bits are sometimes mixed in with the information bits rather than attached at the end of the code word.

Block Codes
A block code is a code that operates upon fixed-length blocks of information bits. In (n,k) block codes each sequence of k information bits is mapped into a sequence of n(n >k). In order to achieve high error correction and detection capability the code minimum distance and code rate is should be large. Systematic block code is the block code which has the following structure where: (A.B.Carlson, 2001) First k elements are the same as the message bits, c=n-k bits are the check bits

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 18

A311SE Communications and Network

3.6 Performance measurement parameters for FEC coding. Code rate


The Shannons theorem defined the code rate as the ratio of the data bits k to total bits n. Its the measure of how much additional bandwidth is required to carry data at the same data rate as without code

SNR
The actual SNR benefit indicates the number of energy required to obtain a specific BER price. Typically a bigger SNR value results in lower BER. Programming obtain will be dened because the quantity of enhancement as well as level of superior throughout SNR, whenever a particular programming structure is employed. The normal way of discovering code acquire is to plot the actual BER versus SNR for equally numbered and united nations touch pad program, (Tocci, 2007)

SNR calculation Equation

----------Equation 10

( [(

) ])

------------Equation 11

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 19

A311SE Communications and Network

Minimum Distance
The actual minimum distance provides all of us all a security program against noise and also attenuations. This particular mechanism the minimal range in among code phrases can be utilized for problem diagnosis and/or error a static correction. The actual fail-safe system regarding problem diagnosis, and or a static correction capacity for a FEC are determined by just about the minimum distance of the FEC. This might be worked out in two methods can be that we can help to eliminate the number of error corrections and or raise the number of mistake detections or even the other way circular. This can be the hamming distance. The hamming distance will be acquired by the bare lowest length between of two codewords. (R.S., 2004)

Minimum distance calculation equation ( ) ( ) ( ) { }

---------Equation 13

Coding gain
The coding gain defined as reduction in Eb/No(dB) to achieve a specific BER of and error correcting coded system compared to encoded system using the same modulation
---------------Equation 14

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 20

A311SE Communications and Network

Error Detecting Capability


The maximum number of errors t that can be detected satisfies.
--------------Equation 15

Error Correction Capability


The maximum number of guaranteed correctable errors per code word satisfies

Closure property of a code


The closure property describes that the sum of any two codewords in the space must yield a valid codeword in the space.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 21

A311SE Communications and Network

4 Design criteria and calculations


4.1 Design selection, criteria for M-QAM modulation This is an 8-ary QAM
Block Diagram for 8-QAM transmitter
PAM

B Channel

2- to-4 Level Converter

Product Modulator

fb/3 fb/3

Sin wct

Input Data Bit Splitter

fb

Q I C

Reference Oscillator

Linear Summer

Band pass Filter

8-QAM Output

fb/3

+900

A Channel

2- to-4 Level Converter

PAM

Product Modulator

Figure 7 Block Diagram for given 8-ary QAM modulation

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 22

A311SE Communications and Network

4.2 Design calculations for M-QAM modulation

Calculations
Value of M=8, thus this is 8-ary QAM

Calculation of k using given value M

(
( )

) ------------Equation 16

In line with this QAM there are 8 signals to be allocate. Thus here 2 two different amplitudes and 4 different phases has been assigned. Amplitude and phase allocation 1. Amplitude A1 = 1.5V, 2. Amplitude A2 = 3.0V Phase allocation 1. Phase 1 = 00, 2. Phase 1 = 900, 3. Phase 1 = 1800, 4. Phase 1 = 2700

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 23

A311SE Communications and Network

Bit assignment table


Bit Assignment Q 0 0 0 0 1 1 1 1 I 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Output Amplitude (v) 1.5 3 1.5 3 1.5 3 1.5 3 Phase 0 0 90 90 180 180 270 270

Table 1 Bit Allocation Table for 8-ary QAM Modulation

Constellation Diagram this 8-QAM modulation


Y-axis

011

010

101

100 000 001


X-axis

110

111

Figure 8 Constellation Diagram for selected 8-ary QAM Modulation Symbol rate will be 1/3 of bitrate.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 24

A311SE Communications and Network

4.3 Design selection / criteria for (n, k) hamming coding and decoding
Value for m provided is 8

) -----------Equation 17

So value of n

Value of k

Here number of check bit

By the determination from above equations the hamming code (

So here there are 4 data bits has been added with 3 parity bits to build a 7 bit codeword. So there are 16 combination can be used for this 4 bit parity matrix. Those are 000, 001, 010, 011, 100, 101, 110, and 111. Allocated Parity Equations

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 25

A311SE Communications and Network

4.4 Design calculations for (n, k) hamming coding and decoding


Construction of matrix algebra

Parity Check Matrix [ ] [ ] ----------------Equation 18

Generator Matrix

[ ]

][

] -------------Equation 19

Codeword Calculation
For data sequence 0000 [ ][ ] [ ] ------Equation 20

For data sequence 0001 [ ][ ] [ ]

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 26

A311SE Communications and Network

Similarly codeword table is generated by possible codeword Codeword Table No. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 M1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 M2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 M3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 M4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 P1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 P2 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 P3 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 1 Code weigh 0 3 3 4 3 4 4 3 4 4 3 4 3 4 4 7

Table 2 Codeword table

Minimum distance = Minimum code weight =


----------Equation 21

Error detecting capability


---------Equation 22

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 27

A311SE Communications and Network

Error correcting capability


--------Equation 23

Syndrome
Syndrome for e =0000000

Syndrome

] [ ]

[ ] -----------Equation 24

Syndrome for e =1000000

] [ ]

[ ]

Syndrome for e =0100000

] [ ]

[ ]

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 28

A311SE Communications and Network

Similarly decoding table is generated by possible syndromes Decoding Table Error Pattern 0000000 1000000 0100000 0010000 0001000 0000100 0000010 0000001 Syndrome 000 111 110 101 011 100 010 001

Table 3 Decoding Table (Syndrome)

Illustration of decoding Massage is 1111, transmitted codeword is 1111111 and received codeword is 1011111 So e = 1011111 and s = 110 Correction is 1111111 and decoded massage is 1111.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 29

A311SE Communications and Network

5. MATLAB Programming 5.3 MATLAB program for M-QAM digital modulation


MATLAB program for simulate the designed 8-ary QAM digital modulation in the simulation result, output modulated signal together with related input binary signal Input data Stream is 001011010000100101111110
format long; clc clear all M=8; data='001011010000100101111110'; A1=1.5; A2=3; f=2; t=linspace(0,1,900); time=[]; Digital_signal=[]; QAM_signal=[]; N=length(data)/log2(M); phase=[0 0 pi/2 pi/2 pi pi (3*pi)/2 (3*pi)/2]; phase_data=[]; for k=1:3:length(data) phase_data=[phase_data bin2dec(data(k:k+2))+1]; end for kk=1:1:N QAM_signal=[QAM_signal (phase_data(kk)==1)*A1*sin(2*pi*f*t + phase(1))+... (phase_data(kk)==2)*A2*sin(2*pi*f*t + phase(2))+... (phase_data(kk)==3)*A1*sin(2*pi*f*t + phase(3))+... (phase_data(kk)==4)*A2*sin(2*pi*f*t + phase(4))+... (phase_data(kk)==5)*A1*sin(2*pi*f*t + phase(5))+... (phase_data(kk)==6)*A2*sin(2*pi*f*t + phase(6))+... (phase_data(kk)==7)*A1*sin(2*pi*f*t + phase(7))+... (phase_data(kk)==8)*A2*sin(2*pi*f*t + phase(8))]; time=[time t]; t=t+1; end t1=linspace(0,1/3,300); for jj=1:1:length(data) Digital_signal = [Digital_signal (str2num(data(jj))==0)*zeros(1,length(t1))+... (str2num(data(jj))==1)*ones(1,length(t1))]; t1=t1+(1/3); end subplot(2,1,2); plot(time,QAM_signal,'.'); title('8QAM Signal'); xlabel('time'); ylabel('Amplitude'); axis([0 time(end) -8 8]); text(0.3,5.2,'\bf001'); %001 text(1.3,5.2,'\bf011'); %011 text(2.3,5.2,'\bf010'); %010 text(3.3,5.2,'\bf000'); %000 text(4.3,5.2,'\bf100'); %100

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 30

A311SE Communications and Network

text(5.3,5.2,'\bf101'); %101 text(6.3,5.2,'\bf111'); %111 text(7.3,5.2,'\bf110'); %110 grid on; subplot(2,1,1); plot(time,Digital_signal,'LineWidth',3); title('Digital Input Signal'); xlabel('time'); ylabel('Amplitude'); axis([0 time(end) 0 2]); grid on; text(0.3,1.3,'\bf001'); %001 text(1.3,1.3,'\bf011'); %011 text(2.3,1.3,'\bf010'); %010 text(3.3,1.3,'\bf000'); %000 text(4.3,1.3,'\bf100'); %100 text(5.3,1.3,'\bf101'); %101 text(6.3,1.3,'\bf111'); %111 text(7.3,1.3,'\bf110'); %110

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 31

A311SE Communications and Network

5.4 MATLAB program for (7, 4) hamming coding and decoding


5.4.1. MATLAB code for (7.4) Hamming coding
%Simulation for encoding and decoding of a [7,4] Hamming code. The decoder clear n = 7%# of codeword bits per block k = 4%# of message bits per block A = [ 1 1 1;1 1 0;1 0 1;0 1 1 ];%Parity submatrix-Need binary(decimal combination of 7,6,5,3) G = [ eye(k) A ]%Generator matrix H = [ A' eye(n-k) ]%Parity-check matrix % ENCODER% msg = [ 1 1 1 1 ] %Message block vector-change to any 4 bit sequence code = mod(msg*G,2)%Encode message code(2)= ~code(2); recd = code %Received codeword with error

5.4.2. MATLAB simulation code for hard decision decoding


% DECODER% syndrome = mod(recd * H',2) %Find position of the error in codeword (index) find = 0; for ii = 1:n if ~find errvect = zeros(1,n); errvect(ii) = 1; search = mod(errvect * H',2); if search == syndrome find = 1; index = ii; end end end disp(['Position of error in codeword=',num2str(index)]); correctedcode = recd; correctedcode(index) = mod(recd(index)+1,2)%Corrected codeword %Strip off parity bits msg_decoded=correctedcode; msg_decoded=msg_decoded(1:4)

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 32

A311SE Communications and Network

5.4.3. MATLAB simulation code comparison of Bit Error Rate (BER) for coded and uncoded signals.
% Script for computing BER with Hamming (7,4) code and maximal % likelihood hard decision decoding clear N = 10^6 ;% number of bits Eb_N0_dB = [0:1:10]; % multiple Eb/N0 values Ec_N0_dB = Eb_N0_dB - 10*log10(7/4); h = [ 1 1 1 ; 1 1 0; 1 0 1; 0 1 1]; ht = [h ;eye(3)]; g = [eye(4) h]; synRef = [ 5 7 6 3 ]; bitIdx = [ 7 7 4 7 1 3 2].'; for yy = 1:length(Eb_N0_dB) % Transmitter ip = rand(1,N)>0.5; % generating 0,1 with equal probability % Hamming coding (7,4) ipM = reshape(ip,4,N/4).'; ipC = mod(ipM*g,2); cip = reshape(ipC.',1,N/4*7); % Modulation s = 2*cip-1; % BPSK modulation 0 -> -1; 1 -> 0 % Channel - AWGN n = 1/sqrt(2)*[randn(size(cip)) + j*randn(size(cip))]; % white gaussian noise, 0dB variance % Noise addition y = s + 10^(-Ec_N0_dB(yy)/20)*n; % additive white gaussian noise % Receiver cipHard = real(y)>0; % hard decision % Hamming decoder cipHardM = reshape(cipHard,7,N/4).'; syndrome = mod(cipHardM*ht,2); % find the syndrome syndromeDec = sum(syndrome.*kron(ones(N/4,1),[4 2 1]),2); % converting the three bit syndrom to decimal syndromeDec(find(syndromeDec==0)) = 1; % to prevent simulation crash, assigning no error bits to parity bitCorrIdx = bitIdx(syndromeDec); % find the bits to correct bitCorrIdx = bitCorrIdx + [0:N/4-1].'*7; % finding the index in the array cipHard(bitCorrIdx) = ~cipHard(bitCorrIdx); % correcting bits idx = kron(ones(1,N/4),[1:4]) + kron([0:N/4-1]*7,ones(1,4)); % index of data bits ipHat = cipHard(idx); % selecting data bits % counting the errors nErr(yy) = size(find([ip- ipHat]),2);

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 33

A311SE Communications and Network

end

theoryBer = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber uncoded AWGN simBer = nErr/N; close all figure semilogy(Eb_N0_dB,theoryBer,'bd-','LineWidth',2); hold on semilogy(Eb_N0_dB,simBer,'ms-','LineWidth',2); axis([0 10 10^-5 0.5]) grid on legend('theory - uncoded', 'simulation - Hamming 7,4 (hard)'); xlabel('Eb/No, dB'); ylabel('Bit Error Rate'); title('BER for BPSK in AWGN with Hamming (7,4) code');

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 34

A311SE Communications and Network

5.5 Detail simulation steps and procedures 5.5.1. Detail simulation steps of 8-QAM modulation.
Result of M-QAM digital modulation obtained by MATLAB simulations

Figure 9 Programming code in MATLAB simulation software for 8-QAM Digital Modulation for the output of the signal together with related input binary signal

Figure 10 Result shown in MATLAB simulation software for 8-QAM Digital Modulation for the output of the signal together with related input binary signal
COVENTRY UNIVERSITY STUDENT ID: 4750820 Page 35

A311SE Communications and Network

MATLAB simulation result. This figure 11 shows the output amplitude and phase combinations related to the input Signal 001011010000100101111110

Figure 11 Result of MATLAB simulation show the output of the signal together with related input binary signal

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 36

A311SE Communications and Network

5.5.2. Detail simulation steps of Hamming coding


MATLAB simulation of hamming coding

Figure 12 Programming code in MATLAB simulation software for (7, 4) hamming coding

Figure 13 Result shown in MATLAB simulation software for (7, 4) hamming coding

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 37

A311SE Communications and Network

Result Obtain from MATLAB Simulation Software. Hamming Code n=

k=

G=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

1 1 1 0

1 1 0 1

1 0 1 1

H=

1 1 1

1 1 0

1 0 1

0 1 1

1 0 0

0 1 0

0 0 1

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 38

A311SE Communications and Network

msg =

code =

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 39

A311SE Communications and Network

5.5.3. Detail simulation steps of hard decision decoding


MATLAB simulation of hard decision decoding

Figure 14 Programming code in MATLAB simulation software for (7, 4) hamming codes hard decision decoding

Figure 15 Result Shown in MATLAB simulation software for (7, 4) Hard Decision decoding.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 40

A311SE Communications and Network

Result Obtain from MATLAB Simulation Software for hard decision decoding. n=

k=

G=

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

1 1 1 0

1 1 0 1

1 0 1 1

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 41

A311SE Communications and Network

H=

1 1 1

1 1 0

1 0 1

0 1 1

1 0 0

0 1 0

0 0 1

msg =

code =

recd =

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 42

A311SE Communications and Network

syndrome =

Position of error in codeword=2

correctedcode =

msg_decoded =

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 43

A311SE Communications and Network

5.5.4. Detail simulation steps of Bit Error Rate (BER) Comparison.


MATLAB Simulations for comparison of Bit Error Rate (BER) for coded and uncoded signals.

Figure 16 MATLAB coding in MATLAB simulation software for comparison of Bit Error Rate (BER) for coded and uncoded signals

Figure 17 Result Show in MATLAB simulation software for comparison of Bit Error Rate (BER) for coded and uncoded signals.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 44

A311SE Communications and Network

Graph for comparison of Bit Error Rate (BER) for coded and uncoded signals.

Figure 18 Result on MATLAB for Selected codingon results 6. Critical Analysis /Discussion andhamming comparison In above (figure 18) the blue color curve shows the uncoded bit error rate and purple color curve show the bit error rate for selected Hamming code.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 45

A311SE Communications and Network

6.1Analysis, discussion and comparison on different simulation results of M_QAM modulation


As we know that QAM is a combination of ASK and PSK. Here we do with 8-QAM modulation. For this 8-ary we can allocate different combinations like Can be taken + Single amplitude and 8 different phases + Two amplitude and 4 different phases + Four amplitude and 2 different phases + Eight amplitude and single phase According to the allocation of amplitude and phase constellation diagram is varying.

6.2Analysis, discussion and comparison on different simulation results of Hamming coding and decoding
According to the allocation of m value the hamming code is coming deferent. Here we allocate 3 for m value. We can see here that according to the allocation of parity equation the hamming code simulation is coming different and results are obtain also different. As well as consistent with parity equation the parity check matrix and generator matrix is changing. And also the result of MATLAB simulation is changing. Also we can see here when we changing the parity equation the coded BER (Bit Error Rate) also altering habitually.

6.3Theoretical interpretation and Verification


In both situation (QAM and Hamming code) the MATLAB simulation shows equality of actual calculation result. So theoretically both section can be design cad based implementation using MATLAB simulation software.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 46

A311SE Communications and Network

7. Conclusions
We will go over the particular computer simulation results. The actual hamming code is a seo'ed bitwise FEC for that Gaussian channel. Numerous transmission schemes include broke errors exactly in which they will happen really withinside surrounding bits. The actual channel inbuilt dynamics at times is employed to correct short burst problems. The channel interleaves attempts to set aside burst open errors arbitrarily within a obstruct of data where they may be remedied by way of a appropriate haphazard FEC at the shower radios finish, for instance Hamming code rule. In this training we view such a situation. The key portion is that the calculation of BER exactly in which this exhibits people the mistake rate from particular Eb/No. wherever this demonstrates a great uncoded program provides little error rate at commence where Eb/no tend to be small. However, if the data movements away a sizable power must keep up with the problem rate do i think the particular numbered program.

More than I'm able to point out which this QAM modulation is very important since it could be followed in to numerous engineering with the present. As an example, when we all work with a cable system the actual slandered of QAM modulation, its extensive for signal digesting. Here we have examined the actual performance regarding 8-QAM modulation. Here we can easily transmit more data rate actually. To ensure that we could view the QAM passage getting much far greater overall efficiency than PSK and have transitions because when using dull program rule methods this can possess a lot more performances. In this syllabus we understood how the QAM is a combination of PSK and ASK modulations. Anyhow the QAM could be exact identical in order to be able for you to help PSK in the event the electronic digital camera information wasnt possessing 2 service providers. The actual acting signal can be referred to in array form with creator matrix as well as parity check matrix. We need to calculate syndromes with regard to problem examining. In fact, when a legitimate codeword will be grow from the examine array the particular symptoms comes zero. Each time a codeword multiply along together using examine enclosure and also arriving nonzero affliction this means there is a error. All solitary touch mistakes could be remedied and all two-bit mistakes may be recognized.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 47

A311SE Communications and Network

The main advantage of forward error correction coding can it be needs a feed back. Yet its bad for multicast. In any case that's appropriate only for a few programs. This kind of FEC has a proven way tranny and avoid multicast problems. Anyway its computationally pricey as well as over-transmission

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 48

A311SE Communications and Network

References
A.B.Carlson, 2001. Communication System, an Introduction to signals and nise in electrical communication.. 4th ed. s.l.:Mc Graw-Hill. Anon., 2009. Radio-Electronics.Com. [Online] Available at: http://www.radio-electronics.com/info/rf-technology-design/pm-phasemodulation/8qam-16qam-32qam-64qam-128qam-256qam.php [Accessed 25 09 2012]. R.S., D., 2004. In: Digital Transmission Systems. s.l.:s.n. Sklar, B., 2001. Digital Communications, Fundamentals of Applications. 2nd ed. s.l.:Pearson Education. Tocci, 2007. In: 1. Edition, ed. Digital System. s.l.:Prentice Hall of India, p. 80.

COVENTRY UNIVERSITY

STUDENT ID: 4750820

Page 49

Вам также может понравиться