0 Up votes0 Down votes

233 views92 pagesOct 11, 2011

© Attribution Non-Commercial (BY-NC)

PDF, TXT or read online from Scribd

Attribution Non-Commercial (BY-NC)

233 views

Attribution Non-Commercial (BY-NC)

- IT Final Upto 4th Year Syllabus 12.07.13
- Modern Digital and Analog Communication Systems 3rd Edition
- Huawei Microwave RTN 980 Product Overview
- Comsys Uniten
- DC Digital Communication PART7
- 1 Frenzel 3rd Ed
- bidirectional incoherent 16QAM transmission over Hybrid WDM-TDM passive optical network
- Achievable Rates for Transmission of Discrete Constellations
- PERFORMANCE ANALYSIS OF DIFFERENTIAL PHASE MODULATION. FOR HF COMMUNICATION
- wireless
- Old Exams TM1
- PART 1 Microwave Communication Principle 20080219 A
- Digit_Modulat
- Waspmote Lora 868mhz 915mhz Sx1272 Networking Guide
- Domain Name System(DNS)
- Vision & Mission of Ece Dept
- Chapter01 Comm
- 2.lecture2
- 01352869
- pulse amplitude modulation

You are on page 1of 92

Demodulator

(64-QAM)

for

Cable Modem

EE297

MSEE Project

San Jose State

University

DEPT OF ELECTRICAL ENGINEERING

for Dr. Jack Kurzweil

by Rajat Sewal

Fall 1998

2

Table of Contents

Chapter 1 QAM Demodulator_____________________________________________ 6

Section 1.1 INTRODUCTION DIGITAL COMMUNICATION SYSTEM ____________ 6

Chapter 2 DISCUSSION OF INFORMATION THEORY________________________ 9

Section 2.1 LOGARITHMIC MEASURE OF INFORMATION______________________ 9

Section 2.2 SOURCE ENCODING ____________________________________________ 13

Section 2.3 CHANNEL ENCODING __________________________________________ 18

Chapter 3 ERROR CORRECTION ________________________________________ 21

Section 3.1 Block Codes ____________________________________________________ 21

Section 3.2 Convolutional Codes______________________________________________ 22

Section 3.3 Block Codes in Detail _____________________________________________ 23

Chapter 4 DATA MODULATION & DEMODULATION_______________________ 26

Section 4.1 Discrete Data Transmission ________________________________________ 26

Section 4.2 Introduction to Linear Modulation Methods____________________________ 27

Section 4.3 QAM Schematic _________________________________________________ 34

Section 4.4 Probability of Error in QAM ______________________________________ 36

Chapter 5 Cable Modem Introduction _____________________________________ 39

Section 5.1 Definition of Cable Modem ________________________________________ 39

Section 5.2 Structure of Cable systems _________________________________________ 39

Section 5.3 Cable Specifications ______________________________________________ 45

Section 5.4 Baud, Bit-rate, Modem Speed_______________________________________ 50

Section 5.5 Digital TV Standards______________________________________________ 51

Section 5.6 Overview of transport subsystem ____________________________________ 52

Section 5.7 MPEG-TS Transport Stream________________________________________ 54

Section 5.8 Set-Top Boxes ___________________________________________________ 55

Glossary of terms __________________________________________________________ 57

Chapter 6 Modem Design _______________________________________________ 59

Section 6.1 Basic Modulator _________________________________________________ 59

Section 6.2 Modem Specification _____________________________________________ 63

Section 6.3 IEEE802.14 Specification__________________________________________ 66

Chapter 7 Matlab Simulation ____________________________________________ 67

Section 7.1 Communication Tool Box__________________________________________ 67

Section 7.2 Matlab Code ____________________________________________________ 68

Section 7.3 Discussion of Matlab Code _________________________________________ 73

3

Section 7.4 Discussion of Simulation Results ____________________________________ 80

Section 7.5 Summary of Simulation Results_____________________________________ 90

Chapter 8 Set-top Box ASIC Design _______________________________________ 91

4

List of Figures

FIGURE 1.1 DIGITAL COMMUNICATION SYSTEM MODEL _______________________________________ 6

FIGURE 2.1 ENTROPY OF SOURCE _______________________________________________________ 12

FIGURE 2.2 DIGITAL COMMUNICATION SYSTEM ____________________________________________ 13

FIGURE 2.3 PCM ____________________________________________________________________ 15

FIGURE 2.4 DPCM ENCODER _________________________________________________________ 16

FIGURE 2.5 DELTA MODULATION________________________________________________________ 17

FIGURE 2.6 SIMPLE CHANNEL CODING____________________________________________________ 18

FIGURE 3.1 SYSTEMATIC BLOCK ENCODER ________________________________________________ 21

FIGURE 3.2 ANATOMY OF A CODEWORD __________________________________________________ 21

FIGURE 3.3 CLASS OF CHANNEL CODES ___________________________________________________ 22

FIGURE 4.1 VECTOR MODEL OF COMMUNICATION SYSTEM_________________________________ 26

FIGURE 4.2 PAM SIGNAL, FSK, & PSK __________________________________________________ 28

FIGURE 4.3 PAM CONSTELLATION_______________________________________________________ 29

FIGURE 4.4 BASE BAND PAM __________________________________________________________ 30

FIGURE 4.5 PASS BAND PAM __________________________________________________________ 31

FIGURE 4.6 PSK ____________________________________________________________________ 31

FIGURE 4.7 QPSK WAVEFORM________________________________________________________ 31

FIGURE 4.8 QAM CONSTELLATIONS _____________________________________________________ 33

FIGURE 4.9 MODULATED WAVEFORMS__________________________________________________ 33

FIGURE 4.10 RECTANGULAR QAM_______________________________________________________ 34

FIGURE 4.11 QAM MODULATOR ________________________________________________________ 34

FIGURE 4.12 QAM DEMODULATOR_______________________________________________________ 35

FIGURE 4.13 64-QAM BIT ASSIGNMENT__________________________________________________ 36

FIGURE 4.14 P

M

VS SNR FOR QAM & PSK________________________________________________ 38

FIGURE 4.15 NOISY SIGNAL CONSTELLATION ______________________________________________ 38

FIGURE 5.1 CABLE NETWORK___________________________________________________________ 40

FIGURE 5.2 HYBRID FIBER/COAX NETWORK ________________________________________________ 41

FIGURE 5.3 HFC NETWORK ____________________________________________________________ 42

FIGURE 5.4 COAXIAL CABLE____________________________________________________________ 43

FIGURE 5.5 FCC FREQUENCY ALLOCATION ________________________________________________ 43

FIGURE 5.6 DROP CABLE FREQUENCY RESPONSE ___________________________________________ 44

FIGURE 5.7 TRUNK CABLE FREQUENCY RESPONSE __________________________________________ 44

FIGURE 5.8 TRUNK COAX CONSTRUCTION _________________________________________________ 45

FIGURE 5.9 FCC FREQUENCY DETAIL ____________________________________________________ 49

FIGURE 5.10 TRANSPORT PACKET FORMAT ______________________________________________ 53

FIGURE 5.11 TRANSMITTER-RECEIVER FOR DIGITAL TELEVISION _______________________________ 53

FIGURE 5.12 MPEG-2 FRAME __________________________________________________________ 54

FIGURE 5.13 DIGITAL VIDEO STANDARDS _________________________________________________ 56

FIGURE 6.1 BASIC MODULATOR _________________________________________________________ 59

FIGURE 6.2 LOW PASS FILTER __________________________________________________________ 60

FIGURE 6.3 RAISED COSINE PULSE 13 . 0 ____________________________________________ 61

FIGURE 6.4 RAISED COSINE PULSE 0 (IDEAL LOW PASS) _________________________________ 62

FIGURE 6.5 RAISED COSINE PULSE 5 . 0 ______________________________________________ 62

FIGURE 6.6 FULL RAISED COSINE PULSE 1 __________________________________________ 62

FIGURE 6.7 QAM ARCHITECTURE _____________________________________________________ 63

FIGURE 6.8 NATIONAL SEMICONDUCTOR-QAM SCHEMATIC ________________________________ 65

FIGURE 6.9 TYPE C PHY ______________________________________________________________ 66

FIGURE 7.1 QAM -MATLAB SYSTEM ___________________________________________________ 72

FIGURE 7.2 NO ERROR CORRECTION _____________________________________________________ 80

FIGURE 7.3 ERROR CORRECTION N=7____________________________________________________ 81

FIGURE 7.4 ERROR CORRECTION N=15___________________________________________________ 82

FIGURE 7.5 ERROR CORRECTION N=31___________________________________________________ 83

5

FIGURE 7.6 MAPPED DATA____________________________________________________________ 85

FIGURE 7.7 XMIT FILTERED DATA ______________________________________________________ 86

FIGURE 7.8 RF DATA _________________________________________________________________ 87

FIGURE 7.9 FFT OF RCVR FILTER OUTPUT ________________________________________________ 88

FIGURE 7.10 QASK CONSTELLATION_____________________________________________________ 89

6

Chapter 1 QAM Demodulator

Section 1.1 INTRODUCTION DIGITAL COMMUNICATION

SYSTEM

A Demodulator for a Quadrature Amplitude Modulated signal with 64 symbol

constellations for Cable Modem is designed. Before getting into the specific

design aspects of a QAM demodulator we need to define terms and go over

some basic concepts in Digital Communications.

A general communication system is shown in Figure 1.1. Each block is defined

below.

Figure 1.1 Digital Communication System Model

The following is a very brief synopsis of the above model and a more detailed

discussion is to be found later on in Chapter 2,Chapter 3, and Chapter 4.

1. Data Source: Set of Symbols generated by a person or system to be

sent over a transmission medium to a user.

Examples

Speech/Audio

Image/Video

Telemetry

Computer Data

2. Source Encoder: Messages from users are highly redundant. So we

perform compression of redundancy in a systematic manner and that is called

source encoding. Since we are looking to represent the source output with as

few binary digits as possible this is also called compression.

7

Examples

CELP coding for speech/audio signals

JPEG coding for still images

Lempel-Ziv universal lossless coding for test compression, also called

LZ compression

3. Channel Encoder: any coding for improved transmission over a physical

medium. There are two classes of Channel encoders (a) Block Codes (b)

Convolutional codes. See Figure 3.3. The main difference between Block codes

and Convolutional codes is the existence of memory in Convolutional codes.

Examples

Block Codes: BCH

Trellis codes: Convolutional & Coset

In many cases the two (Source Encoder & Channel Encoder) are combined into

one function called "Vector Encoder. Refer to Figure 4.1 for another

perspective of a Discrete Data Transmission system with vector representation.

4. Digital Modulator: This is one of many modulation schemes possible.

Here binary data is mapped into symbols and modulated with a carrier. The

modulator accepts a discrete time information sequence at its input and puts out

a set of corresponding waveforms.

PSK

QPSK

QAM

5. Channel: This is any physical medium over which the Transmitted signal

must pass to get to the Receiver.

Examples

Air/Deep space Radio Frequency

Telephone twisted pair (POTS - Plain Old Telephone System)

Ethernet

Fiber-optic Link (using a pulsed laser light)

CD Rom

Magnetic Disk

6. Distortion & Noise: When analog signals are digitized and compressed

there is always a cost associated with the process. In digitization of band-limited

signals, we employ Nyquist Theorem to guarantee exact reconstruction.

However, any other source compression is realized at a cost of varying degree of

imperfect representation. This is called distortion and it is NOT recoverable. In

addition, signals in the communication link are faced with a number of ills. They

are loosely called noise.

8

The presence of noise on a signal changes its shape and characteristics and it

limits the ability of the intended receiver to make correct symbol decisions, and

thereby affects the rate of reliable communication.

Examples:

Additive Gaussian White Noise

Device noise

Atmospheric noise in the microwave channels

Intersymbol interference in data communication systems

Interspeaker interference in voice communications

Near-end and Far-end crosstalk

Echoes in Link and chamber

Friendly and unfriendly jammers, etc.

7. Digital Demodulator: This operation is the exact mirror operation of the

modulator. Here the carrier is removed from the signal stream and the in-phase

and quadrature components (in the case of QAM) separated into two paths.

8. Channel Decoder: Perform inverse operations of Channel Coder

9. Source Decoder: Perform inverse operations of Source Coder. The two

functions Channel Decoder and Source Decoder are often lumped as Vector

Detector as shown in Figure 4.1.

10. User: The final destination of the message. At this point the message is

in its original format but may not be identical. This is referred to as the

recovered message m .

Return to Table of Contents TOC

9

Chapter 2 DISCUSSION OF INFORMATION THEORY

Rare events carry more information than common events

Information is directly linked with probability, more so than we realize at first. If I

told you that the sun was shining brightly in San Francisco there would not be as

much information conveyed as if I told you that there was a magnitude 7 earth

quake in San Francisco this morning and there was great destruction to lives

and property. Now thats information! The nature of information defined

scientifically is explored next.

It was a great scientist named Claude Shannon in 1948 who based on

probabilistic models presented two papers that gave birth to Information Theory.

He discussed the basic problem of reliable transmission of information in

statistical terms. He adopted a logarithmic measure for the information content

of a source and established basic limits on the maximum rate that digital

information can be transmitted reliably over a noisy communication channel. It is

worthwhile to appreciate that Shannons work on DIGITAL communication was

done at a time when communication was primarily analog and there was little

demand for systems that used digital communication because of the large

complexity and hence cost of digital hardware required to achieve the high

efficiency and the high reliability predicted by Shannons theory.

Section 2.1 LOGARITHMIC MEASURE OF INFORMATION

Say we have two discrete random variables X and Y which can take on values

from

X {x

1

,x

2

,x

3

,,x

n

} and Y {y

1

,y

2

,y

3

,,y

m

}

We can have two situations either X depends on Y or X is independent of Y. Of

course when I say X depends on Y, I mean it may depend on Y to a small

degree or a large degree and that relation is defined loosely right now as Mutual

Information. We shall see how this works. Some knowledge of probability will

be assumed otherwise this discussion will go north exponentially. Given a

discrete random variable is exactly like giving a dice (actually die) and predicting

the outcome of an event (what number shows up) when a trial is conducted.

There are only six possible outcomes so this is a discrete random event. If we

had another die and began to throw it and started to predict its outcome based

on the outcome of the first die we are trying to relate the two events. It is this

sort of thing we are doing with the random variables X and Y. It is very

important to realize that if the occurrence of the first event x

2

tells us something

about the event y

3

then we have some knowledge or information about Y from X.

But when the events x

2

and y

3

are so tightly related such as in the following

example then no information is conveyed. Say we have a blue card with the

letters A, B, and C written on the face, and a yellow card with letters D, E, and F

10

on it. Now we draw a card (face-up) and given that we pull the yellow card, what

is the probability that it also shows the letter E? Well this is of course

P(E/yellow) = 1 . So if I told you that I pulled a yellow card (given) and I have also

pulled the letter E, I have told you nothing.

We know this so well that it seems absurd to even discuss it! So THERE IS NO

INFORMATION given when the outcome is certain (probability = 1). Similarly

there is no information when P=0. This is like saying you know what?

Astronauts are going to land on the surface of the Sun"; we know that it is

impossible to do this. Again non-sense, or no information. When do we have

information? When there is some probability of event y

3

occurring when x

3

has

occurred.

We can start putting this is mathematical terms. When X and Y are statistically

independent, the occurrence of Y = y

j

provides no information about the

occurrence of the event X = x

i

. On the other hand, when X and Y are fully

dependent such that the occurrence of Y = y

j

determines the occurrence of X=

x

i

the information content is simply that provided by the event X = x

i

. A suitable

measure that satisfies these conditions is the logarithm of the ratio of the

conditional probability. Here is a basic review of probability:

) ( ) ( i i x P x X P is read probability of the random variable X taking on the value xi

) / ( ) / ( j i j i y x P y Y x X P is read conditional probability of X taking on the value xi

given that Y has occurred and is yi.

Now for the definition of mutual information. The information content provided by

the occurrence of the event Y = y

j

about the event X = x

i

is defined as

) (

) / (

log ) ; (

i

j i

j i

x P

y x P

y x I eqn 2.1

) ; ( j i y x I is called the mutual information between x

i

and y

j

. The units of ) ; ( j i y x I

are determined by the base of the logarithm which is usually selected as 2 but

can be the natural base e . When the base of the logarithm is 2 the units of

) ; ( j i y x I are bits and when the base is e then the units of ) ; ( j i y x I are called nats

(natural units). Note: when working with log

2

() it is easier to calculate the log to

base 10, written log() then divide by the log of 2 to base 10:

A

B

C

D

E

F

11

0.301

) log(

) 2 ( log

) ( log

) ( log

10

10

2

a a

a

When the random variables X and Y are statistically independent

) ( ) / ( ) / ( i j i j i x P y Y x X P y x P because the probability of X is not affected by

what happens to Y. So equation 2.1 becomes,

0 ) 1 log(

) (

) (

log ) ; (

i

i

j i

x P

x P

y x I , the mutual information is zero.

However when the occurrence of Y = y

j

uniquely determines the occurrence of X

= x

i

ie fully-dependent, the conditional probability in the numerator of eq 2.1 is 1

and so

) ( log )

) (

1

log(

) (

) / (

log ) ; ( i

i i

j i

j i x P

x P x P

y x P

y x I Which is just the information of the

event X = x

i

and for this reason is called the self information of the event X = x

i

and is denoted as

) ( log ) ( i i x P x I

What is even more important than the self-information is the average self

information of the source ) ( X H . This is defined as

n

i

i i x I x P X H

1

) ( ) ( ) (

but ) ( log ) ( i i x P x I so that

n

i

i i x P x P X H

1

) ( log ) ( ) ( eqn 2.2

where X represents the alphabet of possible output letters from a source and

) ( X H represents the average self-information per source letter and is also

called the entropy of the source.

In the special case when letters from the source are equally probable

n

x P i

1

) (

for all i eqn 2.2 becomes

n

i

n

n n

X H

1

log

1

log

1

) (

When a general problem is considered where a source emits a sequence of

statistically independent letters, where each output letter is either 0 with

probability q, or is 1 with probability (1-q). The entropy of such a source is

calculated using eqn 2.2.

2

1 1

) 1 log( ) 1 ( log ) ( log ) ( ) ( log ) ( ) (

i

i i

n

i

i i q q q q x P x P x P x P X H

Note: log in above eqn is in base 2. To plot the graph we use log to base 10, so use the following eqn:

12

301 . 0

) 1 log(

) 1 (

301 . 0

log

) (

q

q

q

q q H

Note from the graph in Figure 2.1 that the maximum value of the entropy occurs

at

2

1

q where 1 ) (

2

1

H . Thus the entropy of a discrete source is a

maximum when the output letters are equally probable.

Figure 2.1 Entropy of Source

Also note that when X is the output of a discrete source, the entropy ) ( X H of

the source represents the average amount information emitted by the

source.

H q ( )

q

0 0.2 0.4 0.6 0.8 1

0.2

0.4

0.6

0.8

1

Probability

E

n

t

r

o

p

y

i

n

b

i

t

s

/

l

e

t

t

e

r

13

Section 2.2 SOURCE ENCODING

Please refer to Figure 2.2 for this discussion. Having discussed the measure for

information. We now examine the process of encoding the output of a source

called source encoding. Why we do source encoding or sometimes called simply

source coding is to remove redundancy in the input data. There is more

fundamental reasoning behind source coding when considering analog sources.

This is important to discuss now.

Figure 2.2 Digital Communication System

SOURCE CODING IN ANALOG SOURCES

In contrast to a discrete time source whose output is a discrete random variable

X , a continuous time source (analog source) has an output ) (t X that is

characterized by a stochastic process. In the encoding of such a signal the first

step involves in sampling the source periodically. This converts the continuous

time source into an equivalent discrete time source. If the source output is

bandlimited and the sampling is performed at Nyquist rate or higher we get no

loss of information. However, the amplitudes of the samples are continuous

random variables and so each sample cannot be represented by a finite

sequence of binary digits. So each sample is quantized in amplitude to a finite

number of levels. The analog source is therefore reduced to a discrete-time

source having a finite number of levels or finite alphabet. Thus the quantization

process introduces some distortion depending on the method used. Since an

exact representation of an analog output requires an infinite number of bits

quantization results in data compression. Data compression is achieved at the

cost of some distortion. The objective of source coding is to minimize the source

bit rate while keeping the distortion tolerable.

Source

Source Encoder

(analog to digital)

Channel

Encoder

Digital

Modulator

Channel

Distortion

&

Noise

User

Source

Decoder

Channel

Decoder

Digital

DeModulator

14

When each sample is quantized separately the process is called scalar

quantization. When a block of samples is quantized jointly as a single vector the

process is called vector quantization or block quantization.

When source coding is performed on a block of outputs the efficiency of the

encoding method improves as the block size is increased.

A measure of the efficiency of a source encoding method can be obtained by

comparing the average number of binary digits per output letter from the source

to the entropy ) ( X H .

It is always more efficient to encode blocks of symbols instead of encoding each

symbol separately. By making the block size sufficiently large the average

number of binary digits per output letter can be made arbitrarily close to the

entropy of the source.

When the source is memoryless (ie each symbol is independent of the previous

one) the encoding is done separately and the system is called a discrete

memoryless system (DMS).

There are several source coding techniques used for analog sources and

they are listed below.

PCM Pulse Code Modulation

DPCM Differential Pulse Code Modulation

DM Delta Modulation

LPC Linear Predictive Coding is a very different method of

encoding

PCM Pulse Code Modulation

In PCM each sample of the analog signal is quantized to one of

R

2 amplitude

levels where R is the number of binary digits used to represent each sample.

If R = 3 and we use a uniform quantizer then we get an input/output relationship

as shown in Figure 2.3.

15

Figure 2.3 PCM

The unit delta should be replaced with in Figure 2.3 and then the step size of

the quantizer is defined as

R

2 . So for our example 125 . 0 2

3

This leads to a mean square quantization error of 0013 . 0

12

2

12

2 2

R

E

Measured in db the mean square quantization error is:

db db R E

R

8 . 28 8 . 10 6

12

2

log 10

12

log 10

2 2

What this tells us is that for one added bit in the quantizer we reduce the error by

6db. So for a 7 bit quantizer error = -52.8 db

Many signals such as speech waveforms have the characteristic that small signal

amplitudes occur more frequently than large amplitudes. For such signals we

use non-linear (non-uniform) quantizers that have more closely spaced levels for

small amplitudes and widely spaced levels at large signal amplitudes.

Telephone central office uses PCM codes with non-uniform quantizers (A-Law,

Law).

DPCM Pulse Code Modulation

In sources that show significant correlation from one sample to the next a better

approach that leads to smaller bit rates is to code the differences between

samples instead of coding each sample independently. DPCM exploits the

redundancy in the samples to achieve a lower bit rate for the source output.

16

DPCM also achieves higher dynamic range and improved resolution as the

encoder looks at tiny variations (resolution) and can follow large signals

(dynamic range). Practical DPCM systems use an algorithm for predicting the

current sample based on the weighted linear combination of the previous p

samples, see eqn 2.3

p

i

i n i n x a x

1

eqn 2.3

where n x is the weighted linear combination of the past p samples and i a are

the predictor coefficients. The prediction algorithm used is Levinson and

Durbins.

Figure 2.4 DPCM ENCODER

The input to the predictor is denoted as n x

~

which is the signal sample n x modified

by the quantization process.

Also,

p

i

i n i n x a x

1

~

~

and n n n x x e

~

. Each value of the quantized prediction

error n e

~

is encoded into a sequence of binary digits and transmitted over the

channel to the destination. At the destination the same predictor that was used

in the transmitter is synthesized and its output n x

~

is added to n e

~

to yield n x

~

.

Sampler Quantizer

Predictor

x(t)

e(n)

_

+

n e

~

n x

~

n x

~

value predicted _

n x

~

n x

17

DM DELTA Modulation

Delta modulation can be viewed as a special case of DPCM in which a two level

(1-bit) quantizer is used in conjunction with a fixed first order predictor

z

1

.

Figure 2.5 Delta Modulation

In effect the DM encoder approximates a waveform ) (t x by a linear staircase

function. In order for the approximation to be relatively good the waveform

) (t x must change slowly relative to the sampling rate. This requirement implies

that the sampling rate must be several (at least 5 ) times the Nyquist rate.

Linear Predictive Coding LPC

This is a completely different approach to the problem of source encoding from

what we have seen so far ie waveform encoding. Instead of transmitting the

samples of the source waveform to the receiver, the parameters of a linear

system are transmitted along with the proper excitation signal.

To do this the source is modeled as a linear system (filter) which when excited

by an appropriate input results in the observed output.

SOURCE CODING IN DIGITAL SOURCES

There has been some confusion regarding source coding for digital sources and

what we shall see later called Channel Encoding. Discrete time sources whose

output is a discrete random variable have to be encoded in a different way and

for a different purpose than analog sources. The purpose here is not to bring a

signal into the digital domain (obviously since it is already digital) rather to

combat the effects of noisy channels. To put it neatly, the term source coding

when applied to analog sources implies some scheme to quantize the signal and

when the source is digital the source coder and channel coder are used

Sampler Quantizer

Unit Delay

z

1

x(t)

e(n)

_

+

1

~

n e

n x

~

n x

~

value predicted _

n x

~

n x

18

synonymously. So in the case of digital signals we can go directly to the channel

encoding methods. The Communication model in Figure 2.2 emphasizes the

analog to digital nature of source coding.

Channel Encoding is discussed in the next section and in more detail under Error

Correction.

Section 2.3 CHANNEL ENCODING

In order to overcome noise and interference and to increase the reliability of the

data through the channel it is necessary to introduce some redundancy to the

data stream in a controlled manner. The redundancy introduced at the

transmitter aids the receiver in decoding the desired information bearing

sequence. One can conceive of a transmission model that employs no Channel

coding at all but practical systems do use some sort of channel coding or error

correction. Systems that use channel coding are said to employ coded

waveform signaling. One way to reduce the bit error rate ( e P ) is to add more

orthogonal signals (by introducing more symbols M ) but this increases the

bandwidth required proportional to M . Coding results in a lower probability of

error at the price of increasing the bandwidth and the complexity of the system.

However, the increase in bandwidth required to transmit a coded waveform is not

as much as would be needed if we simply increased M the number of symbols,

to lower e P . Higher bandwidth increases the noise introduced in the channel and

if we simply increased M we would increase noise proportionally. With coding

the gain in lower e P comes at a lower cost of noise than with increasing M . So

coding is a more bandwidth efficient way to improve the bit-error rate.

A SIMPLE EXAMPLE OF CHANNEL CODING

Here is a simple example to illustrate how redundancy can be introduced. We

can repeat the binary digit m times where m is say 3. So the possible source

coder outputs are as shown in Figure 2.6 below.

0 000

1 111

Figure 2.6 Simple Channel Coding

A more sophisticated method is to take k bits (message) at a time and mapping

this sequence to another n bit sequence called a code word see Figure 3.1,

Encoder

001

010

100

011

101

110

19

where k n > . The amount of redundancy introduced by this is measured by the

ratio k / n and is called the code rate c R .

The process of channel coding produces modulator input symbols that are

interrelated in either a block by block or sliding-window fashion, introducing a

memory (in the case of sliding-window) and redundancy into the signaling

process.

There are two major classes of codes 1. Block Codes and 2. Convolutional or

Trellis Codes. Some textbooks classify them as 1. Block Codes and 2. Sliding

Block codes but I prefer the former identification. Please refer to Figure 3.3 for

clarification and a quick synopsis of this. Under block codes we have Fixed-

length codes (Linear Codes) and Variable length codes (Non-linear codes).

Fixed length codes will be discussed in more detail but first let me get the Non-

linear codes out of the way.

VARIABLE LENGTH CODES (NON-LINEAR BLOCK CODES)

When the source symbols are not equally probable an efficient encoding method

is to use variable-length code words. An example of such encoding is the Morse

code from the 1800s. In the Morse code the letters that occur more frequently

are assigned short code words and those that occur less frequently are assigned

long code words. So in short, the probabilities of occurrence of the source letters

are used in assigning the code words. This type of encoding is called entropy

coding. A modern day example of this coding is the Huffman code (1952).

There is an underlying concern with Variable Length coding that the received

sequence must be uniquely and instantaneously decodable. There is too much

detail to go into here and we must move on to fixed length coding.

FIXED LENGTH CODES (LINEAR BLOCK CODES)

Say we have M possible symbols that we would like to transmit using binary

digits. Since there are M possible symbols the number of binary digits per

symbol required for unique encoding when M is a power of 2 is k given as:

M k 2 log where M

k

2

and when M is not a power of 2 it is 1 log 2 + M k

Fixed length codes is the subject of Chapter 3 and this is discussed in more

detail there.

HAMMING DISTANCE

The number of bit positions by which two codewords for a particular code are

different is called the Hamming distance

H

d .

Example: Given two code words c

1

= 101001 and c

2

= 101110, what is their

Hamming distance?

20

1 0 1 0 0 1

1 0 1 1 1 0

same same same Different different different

3 bit positions are different so

H

d = 3

MINIMUM HAMMING DISTANCE

The minimum number of bit positions in a set in which any two codewords for a

particular code are different is called the Minimum Hamming distance min

H

d .

Return to Table of Contents TOC

21

Chapter 3 ERROR CORRECTION

Data is source coded in order to enable the receiver to perform error correction

and the general classification of codes is shown in Figure 3.3. In this project I

shall discuss only Linear and Cyclic codes while the Convolutional codes will

only be mentioned in passing.

Section 3.1 Block Codes

Block channel encoders are implemented by combinatorial circuits. An inverse

circuit is used in the decoder. Each codeword results from a unique message.

An (n,k) block encoder over the field with N elements, transforms each

information block u into the codeword v by a static time invariant digital system

G(u). Refer to Figure 3.1. A key point in block codes (as opposed to

convolutional codes) is that each codeword is formed independently from other

codewords.

Figure 3.1 Systematic Block Encoder

In a block code the input information sequence u is divided into blocks of length

k and each block is mapped into coded vectors v of length n. This mapping is

independent from previous blocks (there exists no memory from one block to

another).

If a code is transmitted without being altered (ie parity bits are tacked on) it is

called systematic encoding shown in Figure 3.2. This simple coder appends

parity check digits so that the message appears unaltered in the codeword

occupying the last k bits. The job of the encoder is to choose the n-k digits

called parity check digits. The decoder simply picks the last k digits to recover

the message. Most block codes are systematic.

Figure 3.2 Anatomy of a Codeword

k message bits n code bits

22

Section 3.2 Convolutional Codes

Convolutional channel encoders are encoders with memory. Convolutional

codes differ from block codes in that there are no independent codewords. The

encoding process can be envisioned as a sliding window M symbols wide, which

moves over the sequence of information symbols in steps of K symbols. M is

called the constraint length of the code and K is usually equal to 1. With each

step of the sliding window, the encoding process generates N symbols based on

the M symbols visible in the window. The code rate is always n k / . Most

Convolutional codes are nonsystematic.

Figure 3.3 Class of Channel Codes

There are two methods of decoding (a) algebraic and (b) probabilistic. The

method by which convolutional codes are decoded is probabilistic and most often

done using the Viterbi Algorithm. The decoding of block codes is done using

algebraic methods based on a special branch of linear algerbra called Galois

BCH, Reed Solomon,

Cyclic Hamming,

Cyclic Golay

Hamming codes,

Hadamard codes,

Golay codes

23

(pronounced "Galua") finite fields. The general form of a Galois Field is GF(p

M

)

where there are p

M

elements, and p is a prime number. Galois Field is needed

only for non-binary codes (in fact the binary codes are a special case of GF with

M=2).

Section 3.3 Block Codes in Detail

In general block codes break the data stream up into bit k blocks and

) ( k n check bits are added to these blocks. This is referred to as a ) , ( k n bock

code. An encoder outputs a unique n-bit code for each of the

k

2 possible input

bit k blocks . For example, a (15,11) code has 15 bit codewords, 4 bits of

which (15-11) are parity bits and the remaining 11 bits are data.

If we know the Hamming distance of a code, min

H

d then the number of errors

that can be corrected is 2 / ) 1 ( min

H

d t and the number of errors that can be

detected is min

H

d .

The idea of coding should be envisioned as creating an n dimensional

hypercube in n dimensional space with

n

2 vertices. We then choose

k

M 2 of

these vertices as codewords. Note:

n k

2 2 < since n k < . A linear block code is a

k -dimensional linear subspace of the n -dimensional space. The vertices of the

codewords should be chosen to be as far apart as possible to minimize the error

probability. This is done by making the minimum Hamming distance min

H

d as

large as possible.

The goal is to choose parity bits to correct as many errors as possible getting as

close to the theoretical limit of 2 / ) 1 ( min

H

d t while keeping the communication

efficiency as high as possible (dont use too much bandwidth). It is true that

adding more parity bits will enable the system to correct more errors but this

requires more bandwidth (adding more noise) and the complexity of the

hardware needed to decode longer codes increases enormously. Examples of

Block codes are Hamming codes, Hadamard codes, and Golay codes.

Hamming Codes: A good example of Block codes with the special property

given below are the Hamming codes.

Block length 1 2

m

n

Number of message bits 1 2 m k

m

Hamming distance min

H

d = 3

For some integer 3 m

24

Some valid Hamming codes are:

N 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767

K 4 11 26 57 120 247 502 1013 2036 4083 8178 16369 32752

M 3 4 5 6 7 8 9 10 11 12 13 14 15

Consider the example of a (7,4) Hamming code. Since ) 4 , 7 ( ) , ( k n the last

condition of 2 m is satisfied 1 2 7

m

n so 3 m

4 1 2 m k

m

Code rate 7 / 4 / n k Rc

Example of (7,4) Hamming Code Correcting an error

Here is a listing of Code words for a (n,k) = (7,4) Hamming code.

Message Word Code Word

0000 0000000

0001 1010001

0010 1110010

0011 0100011

0100 0110100

0101 1100101

0110 1000110

0111 0010111

1000 1101000

1001 0111001

1010 0011010

1011 1001011

1100 1011100

1101 0001101

1110 0101110

1111 1111111

Table 3.1 Code Words for (7,4)

Syndrome Error Pattern Error in bit

position

000 0000000 No errors

100 1000000 1

010 0100000 2

001 0010000 3

110 0001000 4

011 0000100 5

111 0000010 6

101 0000001 7

Table 3.2 Decoding Table

25

Now say we transmit a [1110010] and receive r [1100010] instead. We

realize by inspection that bit 3 is wrong. The error correction circuit needs to do

this via the algorithm as follows.

The syndrome vector s is calculated from

T

rH s

In the syndrome table Table 3.2 above the matrix

H

T

Is known and so [ ] ] 001 [

101

111

011

110

001

010

100

1100010

]

]

]

]

]

]

]

]

]

]

]

,

,

,

,

,

,

,

,

,

,

s , so we look for the error pattern for the

syndrome [001] in Table 3.2 and it is [0010000] which tells us that bit 3 is in

error. To correct the error we add the received vector to the error pattern and

get the corrected vector.

Received vector: 1100010

Error Pattern: 0010000

Corrected vector 1110010 (which is the same as the

original transmitted vector).

Since we can correct only 2 / ) 1 ( min

H

d t errors, for Hamming codes min

H

d = 3

so 1 2 / ) 1 3 ( 2 / ) 1 ( min

H

d we can only correct 1 bit error.

26

Chapter 4 DATA MODULATION & DEMODULATION

Section 4.1 Discrete Data Transmission

A Discrete data transmission system involves transmission of one of a finite set

of messages over a communication channel. The message source generates

messages m

i

which are binary bits, and wants to communicate with the message

sink at the receiver. Refer to Figure 4.1. The source must select which of the

allowed messages in a finite set that the transmitter sends over the

communication channel. The receiver must determine the message sent

(estimate m ) and provide it to the message sink.

Figure 4.1 Vector Model of Communication System

Encoding is the process of converting the messages from their raw form as bits

into vectors of real numbers that represent the messages. A vector encoder

converts each message m

i

into a symbol x

i

, which is a real vector (in signal

space).

Message

Source

Vector

Encoder

Modulator

Channel

Message

Sink

Vector

Detector

DeModulator

m

i

m

x

i

(t)

xi

Symbol

y(t)

y

Transmitter

Receiver

27

Modulation is a procedure for converting the encoder output vectors into analog

waveforms for transmission over a physical channel. The modulator converts

the symbol vector x that represents the selected message into a continuous time

(analog) waveform that the transmitter outputs into the channel. There is a set of

possible M signal waveforms x

i

(t) that is in direct one-to-one correspondence

with the set of M messages. In general the conversion of a discrete data

signal into a continuous time analog signal is called digital modulation.

The Demodulator converts continuous time channel output signals back into a

channel output vector y, from which the detector estimates x and thus also the

message sent. This estimate from the detector is m .

In the transmission of digital information over a communication channel, the

modulator is the interface device that maps the digital information into analog

waveforms that match the characteristics of the channel. The mapping is

performed by taking blocks of M k 2 log binary digits at a time from the

information sequence } { n a and selecting one of M waveforms for transmission

over the channel.

When the mapping from the digital sequence } { n a to waveforms is performed

under the constraint that a waveform transmitted in any time interval depends on

one or more previously transmitted waveforms the modulator is said to have

memory otherwise if the mapping is symbol by symbol then it is called memory-

less.

Section 4.2 Introduction to Linear Modulation Methods

In analog modulation the information bearing signal is impressed onto a carrier

frequency by modulating either the carrier amplitude (amplitude modulation

AM) or the carrier phase (Phase modulation PM), or the carrier frequency

(frequency modulation FM).

In digital modulation the modulator maps the sequence of binary digits into a

corresponding set of discrete amplitudes (PAM), or a set of discrete phases

(PSK), or a set of discrete frequencies (FSK). See Figure 4.2 for an example of a

binary PAM message signal, its FSK version and then its PSK signal.

The output of the carrier modulator is a passband signal that can be represented

as follows:

} ) ( Re{ ) (

2 t f j c

e t v t s

eqn 4.1

Where c f is the carrier frequency and ) (t v is the baseband information-bearing

signal. The term passband and bandpass are used interchangeably but I prefer

the consistency in using passband for carrier modulated and baseband for

signals that include 0 hz.

28

The signal waveform ) (t v depends on the method by which the binary information

sequence is mapped into either the set of discrete amplitudes or discrete phases

or discrete frequencies.

Figure 4.2 PAM Signal, FSK, & PSK

29

PAM

If the modulator maps the binary information sequence into discrete amplitudes

then the method is called digital pulse amplitude modulation (PAM) or amplitude

shift keying (ASK).

The signal waveform is then,

} ) ( Re{ ) (

2 t f j

m m

c

e t u A t s

Where } ,..., 2 , 1 , { M m Am are the M possible signal amplitudes corresponding to

the

k

M 2 possible k bit blocks or symbols. ) (t u is a real valued signal pulse

whose shape constitutes a signal design problem when there is a band limited

channel.

Suppose the bit rate is R bits/sec then the symbol rate is k R/ . The symbol rate

is the rate at which changes occur in the amplitude of the carrier to reflect the

transmission of new information. The signal space diagram of PAM is shown in

Figure 4.3 for M =2, 4 and 8. Note that this is a one-dimensional modulation

scheme.

Figure 4.3 PAM Constellation

30

Digital PAM can also be used for transmission over a channel that does not

require carrier modulation. In this case the signal waveform is simply

) ( ) ( t u A t A m m M m ,..., 2 , 1 eqn 4.3

Since there is no carrier this is called a baseband signal. Figure 4.4 illustrates

the concept graphically and shows a baseband PAM and the carrier modulated

version of the same signal as a passband PAM signal is shown in Figure 4.5

The PAM carrier modulated signal (eqn 4.2) } ) ( Re{ ) (

2 t f j

m m

c

e t u A t s

is a double

sideband (DSB) signal and requires twice the channel bandwidth of the

equivalent lowpass signal for transmission. There is a single sideband (SSB)

PAM that is given by

} )] ( ) ( [ Re{ ) (

2 t f j

m m

c

e t u j t u A t s

M m ,..., 2 , 1

And uses half the bandwidth of the DSB version. ) ( t u denotes the Hilbert

transform of ) (t u .

Figure 4.4 Base Band PAM

31

Figure 4.5 Pass Band PAM

PSK

When you modulate the phase of a carrier the modulation scheme is known as

Phase Shift Key (PSK) and this was shown in Figure 4.2 for M=2. Because the

range of the carrier phase is 2 0 , the phase of each of the M symbols is

M k k / 2 where 1 ,..., 1 , 0 M k . This is shown in Figure 4.6 for M 2, 4, and

8. When 4 M the phase difference works out to 90 and this is called QPSK.

PSK is a 2 dimensional modulation scheme.

Figure 4.6 PSK

Figure 4.7 QPSK Waveform

32

The QPSK waveform is shown in Figure 4.7 where T is the symbol period.

Abrupt changes in phase may seem like mathematical absurdities but these

phase changes are actually continuos but very rapid. They are always shown as

abrupt in textbooks.

QAM

QAM modulates the phase and the amplitude of the carrier. The bandwidth

efficiency of PAM/SSB can also be obtained by simultaneously impressing two

separate k bit symbols from the sequence } { n a on two quadrature carriers

t fc 2 cos and t fc 2 sin . The resulting modulation technique is called quadrature

PAM or QAM (quadrature amplitude modulation). The signal waveforms are

} ) ( ) Re{( ) (

2 t f j

ms mc m

c

e t u jA A t s

+

t f t u A t f t u A c ms c mc 2 sin ) ( 2 cos ) ( M m ,..., 2 , 1 eqn 4.4

where mc A is the signal amplitude modulated by the cosine carrier and ms A is the

signal amplitude modulated by the sine carrier. To see why eqn 4.4 is a phase

and amplitude modulation scheme we can re-write eqn 4.4 as

) 2 cos( ) ( } ) ( Re{ ) (

2

m c m

t f j j

m m t f t u V e t u e V t s

c m

+ eqn 4.5

where

2 2

ms mc A A Vm + and

mc

ms

m

A

A

1

tan

From eqn 4.5 it is apparent that QAM signal waveforms are a form of combined

amplitude and phase modulation. QAM is a 2 dimensional modulation scheme.

Figure 4.8 shows various QAM constellations and how many bits are needed to

modulate the data. In Figure 4.10 several different signal space diagrams for

QAM are shown for M = 4, 8, 16, 32 and 64. The phase angle m for each

constellation (M) can be calculated from

M

m

m

) 1 (

2

where M is the total number of signal points in two dimensional space. So in the

case of 64 QAM, 6 bits are used to map into the 64 possible symbols. In other

words, 1 symbol takes 6 bits to represent. Furthermore, 2 of these six bits are

used to decode the quadrant (1

st

, 2

nd

, 3

rd

, 4

th

). As shown in Figure 4.13 the first

two bits (bits 5,4) in the six bit symbol are used to decode the quadrant and the

next four bits (bits 3,2,1,0) are used to find which symbol within that quadrant

was transmitted.

33

Constellations

Figure 4.8 QAM Constellations

Figure 4.9 Modulated Waveforms

QPSK (=4-QAM)

1 symbol 2

bits

2

16-QAM

1 symbol 4

bits

4

256-QAM

1 symbol 8

bits

8

6

64-QAM

1 symbol 6

bits

6

6

34

Figure 4.10 Rectangular QAM

Section 4.3 QAM Schematic

The schematic of a QAM modulator is shown in Figure 4.11 and the

Demodulator is shown in Figure 4.12.

Figure 4.11 Qam Modulator

35

Figure 4.12 Qam Demodulator

36

Figure 4.13 64-QAM Bit Assignment

Section 4.4 Probability of Error in QAM

Noise in the channel causes the received signal to be distorted and can lead to

erroneous decoding in the demodulator. The signal constellation in a noisy QAM

system is depicted in Figure 4.15. The calculation of probability of a symbol

error is based on a PAM system which extends easily into the rectangular

constellation based on quadrature carriers. If the constellation is not

rectangular you cannot use the following equations. For rectangular

constellations in which

k

M 2 where k is even the QAM signal constellation is

equivalent to two PAM signals on quadrature carriers each having

2 /

2

k

M

signal points.

The starting point of this discussion is the probability of error in a PAM system

given by

) (

1

3

)

1

1 ( 2

o

av

N

E

M

Q

M

P M

eqn 4.7

and the above is related to the probability of correct decision in a M-ary QAM,

c P as follows:

37

2

) 1 ( M P Pc eqn 4.8

where M P is the probability of a symbol error in ary M PAM with

2

1

the

average power in each quadrature signal of the equivalent QAM system. Since

the probability of making a wrong decision is 1 probability of making the correct

decision,

2

) 1 ( 1 1 M P Pc PM eqn 4.9

Substituting eqn 4.7 into eqn 4.9

2

] [ ) (

1

3

)

1

1 ( 2 1 1

o

av

M

N

E

M

Q

M

P

eqn 4.10

where

M P probability of symbol error in QAM M-ary

M # of symbols

o

av

N

E

SNR, signal energy/noise energy

) ( Q erf function which can be calculated using a table or solved in

MathCad using Q(x) = 1 pnorm(x,0,1).

This is the exact form of the probability of error in a QAM system.

Now eqn 4.10 is exact for even k but if odd k in

k

M 2 we have no

equivalent ary M PAM system. So for odd k we calculate an upper bound on

M P .

2

)] ( [

1

3

2 1 1

o

av

M

N

E

M

Q P

1

1 (

M

, this has

the effect of overestimating M P so it is okay to do so,

)] ( 4 ) ( [

1

3

1

3

4 1 1

2

o

av

o

av

M

N

E

M

Q

N

E

M

Q P

+

) ( 4 ) (

1

3

1

3

4

2

o

av

o

av

M

N

E

M

Q

N

E

M

Q P

Further simplification ) ( ) ( 4 ) (

1

3

4

1

3

1

3

4

2

o

av

o

av

o

av

N

E

M

Q

N

E

M

Q

N

E

M

Q

gives

) (

1

3

4

o

av

M

N

E

M

Q P

38

Figure 4.14 P

M

vs SNR for QAM & PSK

Figure 4.15 Noisy Signal Constellation

The probability of error for various modulation schemes is shown in Figure 4.14

Return to Table of Contents TOC

39

Chapter 5 Cable Modem Introduction

Section 5.1 Definition of Cable Modem

Cable Modem

A cable modem is a high-speed device for digital transmission of bits over a

coaxial cable. A simple-minded view is as a modulator (at the transmitting end)

and a demodulator (at the receiving end). Actual implementation involves many

other blocks and will be covered in detail later.

A cable modem as the term applies today is a very high-speed modem for

Internet access over a cable CATV present in a lot of homes in the USA today.

Contrasted with the kind of modem we are used to talking about in the context of

telephone line modems which are very slow indeed, called POTS modem for

Plain Old Telephone Modem. The term Cable modem has since the initial

writing of this project changed its meaning and it was intended to refer to a high-

speed video modem. Perhaps I should have chosen the title "Video Modem

design". However in this project the term Cable modem refers to modems

used in digital cable-TV set-top boxes whose FEC (Forward Error Correction)

is compliant with the IEEE802.14 (not released yet). Other standards that may

apply are the European DVB-C standards (Digital Video broadcasting) and the

DAVIC standard (Digital Audio-Visual Council) which is also a European

standard. Due to the availability of the IEEE802.14 in draft form this design

concerns mostly with this standard. It is hoped that this standard will be adopted

and companies can begin competing in the video modem arena.

Section 5.2 Structure of Cable systems

The basic structure of a cable system is a simple one (see Figure 5.1).

There are five major parts to a cable system:

1.the headend,

2.the trunk cable,

3.the distribution (or feeder) cable in the neighborhood,

4.the drop cable to the home and in-house wiring, and

5.the set-top box equipment (consumer electronics).

The head end is the source in a central facility that broadcasts signals onto the

cable network. The head end gathers signals from various sources such as

satellite dishes and high-gain antenna.

40

Figure 5.1 Cable Network

The trunk network is made of a larger coax and in fact today an optical fiber is

used for this. This combination is called a hybrid fiber coax (HFC) shown in

Figure 5.2 and in a broader context of networks in Figure 5.3. When a coax is

used in the trunk the signal needs to be amplified every two thousand feet

because of loss (especially at high frequencies). This trunk amplifier in the case

of an analog signal adds noise. Optical transmission of digital data (fiber) can go

much longer before requiring re-amplification. This simplifies the trunk

architecture and reduces the noise that is introduced. For the same length of

coax cable and fiber, coax can have 500 times more attenuation than the fiber.

The distribution network is coax and is bridged off the trunk. The distribution

network is the neighborhood network and amplifiers here are called line

extenders. The subscriber drop line is taken from the distribution network by

tapping the line and is no more than 150-200ft. This tap is at the curb usually

inside an underground service box. Here is the surprising part. Where does the

power for the amplifiers come from? Answer: from the cable itself! A 60V, 60Hz

ac current is sent over the trunk cable (of course this is not possible if the trunk is

fiber) and is taken to the trunk amplifiers. Power is not carried beyond the

distribution networks into the subscriber drop. At times the power is taken from a

telephone pole transformer and fed into the cable midway and this is why cable

41

service may be interrupted during a power failure in a certain neighborhood even

when the Cable Company has emergency generators.

Figure 5.2 Hybrid fiber/coax network

42

Figure 5.3 HFC Network

43

CATV stands for Community antenna television. It was first built in 1948 by Ed

Parson of Astoria, Oregon. It consists of a copper-clad steel center conductor

inside an insulating foam dielectric material surrounded by a braided wire and/or

metal foil. Finally a plastic sheath protects the contents from damage, see Figure

5.4 and Figure 5.8. The characteristic impedance of this cable is 75. Cable

does have a high loss and it depends on the frequency of interest. The logarithm

of the attenuation of cable (db) varies with the square root of the frequency. So

the attenuation at 216Mhz (channel 13) is twice that of 54Mhz (channel 2) since

the frequency is four times as great. If channel 2 is attenuated 10db in 1000ft

then channel 13 will be attenuated 20db (see Figure 5.5). For the frequency

response of a drop cable see Figure 5.6 and for that of a trunk cable see Figure

5.7. It can be seen that the trunk cable has a higher performance than the drop

cable. The graphs show the attenuation for a 100ft-length cable over various

frequencies.

Figure 5.4 Coaxial Cable

Figure 5.5 FCC Frequency Allocation

44

Figure 5.6 Drop Cable Frequency Response

Figure 5.7 Trunk Cable Frequency Response

1 10 100 1 10

3

0.1

1

10

Drop Cable

Frequency (Mhz)

A

t

t

e

n

u

a

t

i

o

n

(

d

b

/

1

0

0

f

t

)

1 10 100 1 10

3

0.1

1

10

Trunk Cable

Frequency (Mhz)

A

t

t

e

n

u

a

t

i

o

n

(

d

b

/

1

0

0

f

t

)

45

Section 5.3 Cable Specifications

TRUNK CABLE SPECIFICATIONS courtesy of CommScope

.

Figure 5.8 Trunk Coax Construction

46

47

DROP CABLE SPECIFICATIONS

Cable type Characteristic Impedance Used In

RG-58/U 53.5 Ethernet (but not

recommended due to

improper shielding)

RG-58A/U or RG-

58C/U

50 10 Base2 CSMA/CD (Thin

wire Ethernet)

RG-59/U 75 CATV (cable TV)

RG-62/U 93 IBM 3270 terminals,

ARCnet

RG stands for radio guide as the cable guides radio frequency signals. The /U

means general utility.

48

49

Figure 5.9 FCC Frequency Detail

50

Section 5.4 Baud, Bit-rate, Modem Speed

The units can be confusing to a new comer so here is a quick summary. Data

rate refers to the rate at which bits are transmitted over the physical medium.

The unit of data rate or bit rate is bits/sec. Modulation rate refers to the rate at

which the symbols are transmitted over the physical medium. The unit of

modulation rate (also called signaling rate) is baud or symbols/sec.

A symbol is a unique state of the communication channel, distinguishable by the

receiver from all other possible states. For example, it may be one of two voltage

levels on a wire for a direct digital connection or it might be the phase or

frequency of a carrier or a unique combination of phase and amplitude (QAM).

The term "baud" was originally a unit of telegraph signaling speed, set at one

Morse code dot per second. Or, more generally, the reciprocal of the duration of

the shortest signaling element. It was proposed at the International Telegraph

Conference of 1927, and named after J.M.E. Baudot (1845-1903), the French

engineer who constructed the first successful teleprinter.

Comparison of speed of transferring a 10-Megabyte file over different modems:

MODEM SPEED / TYPE

TRANSFER TIME

9.6-Kbps Telephone Modem 2.3 hours

14.4-Kbps Telephone Modem 1.5 hours

28.8-Kbps Telephone Modem 46 minutes

56-Kbps Telephone Modem 24 minutes

128-Kbps ISDN Modem 10 minutes

1.54-Mbps T-1 Connection 52 seconds

4-Mbps Cable Modem 20 seconds

10-Mbps Cable Modem 8 seconds

30-Mbps Cable Modem 2.7 seconds

POTS modems are modems used for modulating digital data inside a computer

onto an analog phone line. The symbol rate (called Baud or loosely Baud rate) is

about 3000 Baud. The relationship between Baud and bits-per-sec depends on

the number of bits used to make up a symbol.

In 64 QAM which is one of the modulation schemes in the downstream Digital

Video DVB-C standard and IEEE802.14, it takes 6 bits to make up a symbol. So

the relationship between bits per sec (bps) and Baud (symbols/sec) is

Baud bits

bps

Baud

/ 6

For 64 QAM

Example: If we are using a 64 QAM modulation scheme and we have 27 Mbps

then it translates into MBaud

Baud bits

Mbps

5 . 4

/ 6

27

, or 4.5x10

6

Baud

51

A Digital TV channel bandwidth is 6Mhz (based on the current analog NTSC

allocation). This 6Mhz bandwidth can accommodate 36 Mbps under the adopted ATSC

standard for digital TV. Audiovisual signals with standard resolution can be compressed

using MPEG-2 to sustainable rates of around 6 Mbps, so around 4 digital TV channels

can be safely supported in a single channel without congestion. This is great news for the

FCC as they can sell more channels in the same space.

Section 5.5 Digital TV Standards

HDTV

Current TV sets display 480 lines of information with the 240 odd-numbered lines

being scanned from top to bottom first and then the 240 even-numbered lines

are scanned next. This gives the present TV its flicker and is called the

interlaced format. Each set of odd and then even lines is scanned 30 times a

sec. The aspect ratio of today's TV sets is 4:3. Computer monitors on the other

hand use 480 lines and display all 480 lines from top to bottom without

interlacing. This is called progressive format. This is why computer monitor

pictures appear sharper. Also, the minimum frames per sec are 60fps or up to

85fps in some high-end monitors. High definition TV changes all that. HDTV

uses 1080 interlaced lines or 720 progressively scanned lines on a 16:9 aspect

ratio screen. HDTV will contain seven times more information than what today's

format allows.

The FCC has allocated the 6 Mhz band into several channels and "lent" each

station an additional channel so that they may transmit both NTSC and digital

signals until the year 2006 at which time they must "return" the analog channel

bandwidth to FCC. Most stations in the Bay area are going to transmit some

digital channel by Nov 1999.

SDTV

This is HDTV in a standard resolution comparable to the existing standard but of

course digital i.e. 480 lines progressive scanning. SDTV stands for Standard

Definition Television.

MPEG-2

Compression standard for moving images conceived by the Motion Pictures

Expert Group, an international group of industry experts set up to standardize

compressed moving pictures and audio. This removes redundancy in the

digitized picture matrix by using Discrete Cosine transforms. The analog

bandwidth from a HDTV camera consists of something like 30Mhz each of red,

blue, and green colors. Thats nearly 100Mhz of analog signal and would require

more than a gigabit (10

9

bits) per second of straight digital transmission if no

compression was used. With compression these bit rates can be in the 27x10

6

bits/s range.

A little history is in order. In 1988 the process of creating a universal audio and

video compression standard was started by the Motion Pictures Expert Group. In

52

1990 the MPEG-1 standard was derived. This standard is already being used in

the VideoCD and CD-I products. The MPEG-2 is a more advanced standard

supporting higher picture resolutions for HDTV and DVD (Digital Video Disk).

Other competing standards are Indeo, Quicktime and Cinepack. To ensure the

support of many different equipment and chip vendors, the standard does not

define a standard encoder or decoder, but only the coded bit-stream. The MPEG

standard also has a major drawback. Because of the many available bit-rates,

frame-rates and resolutions in the MPEG standard, the MPEG hardware vendors

choose to support only a few of those different bit-rates, frame-rates and

resolutions necessary for specific applications. These different solutions are not

interoperable, so in order to create one standard for many different applications,

many different standards are created with one common name: MPEG.

Modulation Methods

Two main competitors are Quadrature amplitude modulation (QAM) and Vestigial

sideband (VSB) modulation. A 16-VSB system tested by ATTC (Advanced

Television Test Center) delivered 38.5 Mbps. Cable companies are deploying

64-QAM (with 27 Mbps) because it maps one 27 Mhz satellite transponder

capacity in one 6 Mhz channel (allocated by FCC). Everyone must work within

the 6 Mhz bandwidth allocated.

Section 5.6 Overview of transport subsystem

There are several transport methods. One way is to use the ATM network and is

supported in the IEEE802.14. The MPEG-2 compressed signal rides on a mass

transit-like system already developed for ATM networks. This is called the

Packet Transport. It is illustrated in Figure 5.10. The organization of a digital

television transmitter-receiver pair and the location of the transport subsystem in

the overall system is shown in Figure 5.11. The transport resides between the

application (e.g., audio or video) encoding/decoding function and the

transmission subsystem. At its lowest layer, the encoder transport subsystem is

responsible for formatting the encoded bits and multiplexing the different

components of the program for transmission. At the receiver, it is responsible for

recovering the bit streams for the individual application decoders and for the

corresponding error signaling.

The data transport mechanism is based on the use of fixed-length packets that

are identified by headers. Each header identifies a particular application bit

stream (also called an elementary bit stream), which forms the payload of the

packet. Applications supported include video, audio, data, program and system

53

control information, etc. The elementary bit streams for video and audio are

themselves wrapped in a variable-length packet structure called the packetized

elementary stream (PES) before transport processing. The PES layer provides

functionality for identification, and synchronization of decoding and presentation

of the individual application.

Figure 5.10 Transport packet format

Figure 5.11 Transmitter-Receiver for Digital Television

54

Section 5.7 MPEG-TS Transport Stream

The preferred method for video is to use the MPEG2-TS framing structure and

not use the ATM format. The TS stands for transport stream. The IEEE802.14

supports both formats. The MPEG2-TS framing is shown in Figure 5.12. The

first octet (byte=8bits) is the SYNC field used to recognize the beginning of the

transport stream. The next field is 1 bit TEI and shows the mpeg decoder if the

entire packet has an error. The next bit is PUSI (payload unit start indicator) and

is reserved for future use. The next bit is TP (transport priority) and can be used

in giving some packets higher priority. The next 13 bits are the program id (PID)

and is set to 0x1FFD. The next 2 bits are TSC (transport scrambling control)

which is 00 for now (reserved). The next two bits are AFC (adaptation field

control) which is not discussed at all in the IEEE802.14 spec. The next four bits

are CC (continuity counter) which keeps the packet identified with the program

id. This too is poorly understood and not described in the spec. Finally the

payload! The next 184 octets (1472 bits) are used to deliver the payload (video

data). So a total of 1504 bits are used to make up an MPEG2-TS packet.

Figure 5.12 MPEG-2 Frame

55

Section 5.8 Set-Top Boxes

Basic Analog Boxes

Today set-top boxes in homes are analog and the RF signal coming in is

demodulated to recover the analog signal. Key components in a basic analog

set-top box include an RF tuner, mixed-signal demodulator for intermediate-

frequency (IF) processing, and a descrambler chip. There are audio/video

amplifiers and a standard UHF channel modulator to communicate with the

NTSC television set. Most boxes also have 8-bit controllers and associated

memory for internal and remote control functions.

Analog-Addressable Interactive Boxes

A great deal of development activity is currently focused on analog-addressable

interactive set-top boxes. These set-top boxes have a return channel to the

CATV head-end station. This return channel enables subscribers to obtain a

variety of services at their fingertips, including pay-per-view programs, online

program guides, bulletin boards, and other online services such as stock quotes,

sports scores, weather and home shopping. The return channel uses

Quadrature Phase Shift Keying (QPSK) or Frequency Shift Keying (FSK)

demodulation techniques.

Low-End Interactive Digital Boxes

At the present time it seems that most digital set-top (ST) boxes will be used for

satellite transmission. However there are companies developing Digital ST

boxes for CATV. These ST boxes will utilize MPEG-II decompression

technology to increase the number of channels possible. Digital audio will range

from CD-quality in the low-end box to Dolby surround sound quality in the high-

end boxes. In the satellite ST box demodulation will be done with QPSK and in

CATV boxes it will be QAM or Vestigial Sideband (VSB). VSB is a proprietary

standard backed by Zenith. QAM is still an open standard for the cable industry

promoted by a number of set-top box manufacturers such as General

Instruments.

The decompressed (MPEGII) video and audio signal has to be up converted to

NTSC (or PAL, SECAM) for today's television, as the true digital television

receiver has not yet arrived. The return channel is similar to the analog

addressable ST box, except in the case of satellite ST box which uses a

conventional telephone modem. The CATV return channel will be about 100K

bps.

56

High-End Interactive Digital Boxes

High-end interactive digital boxes are strictly for CATV at the moment. They will

be capable of displaying 3-D graphics. A RISC or CISC microprocessor with

16Mbytes of RAM will be common. The return channel will be similar to the Low-

end interactive digital boxes, i.e. using QPSK or FSK (in some cases), but with

transmission rates of 1.5 Mbps. These boxes will have flexible and upgradeable

features since they have microprocessors and software in them.

Figure 5.13 Digital Video Standards

57

Glossary of terms

ATSC ATSC: Advanced Television Systems Committee. Formed to establish

technical standards for advanced television systems, including digital

high definition television (HDTV). Internet: http://www.atsc.org/

AC3 Dolby Digital (formally Dolby AC-3, now also Dolby D): The approved 5.1

channel (surround-sound) audio standard for ATSC digital television,

using approximately 13:1 compression. Six discreet audio channels are

used: Left, Center, Right, Left Rear (or side) Surround, Right Rear (or

side) Surround, and a subwoofer. The bit rate can range from 56 Kbps to

640 Kbps.

When moving from analog recording to a digital recording medium, one

finds that the digital audio coding used yields an amount of data too

immense to store or transmit economically, especially when multiple

channels are required. As a result, new forms of digital audio coding-

often known as "perceptual coding"-have been developed to allow the

use of lower data rates with a minimum of perceived degradation of

sound quality.

Dolby's third generation audio coding algorithm (originally called AC-3) is

such a coder. This coder has been designed to take maximum

advantage of human auditory masking in that it divides the audio

spectrum of each channel into narrow frequency bands of different sizes,

optimized with respect to the frequency selectivity of human hearing.

This makes it possible to sharply filter coding noise so that it is forced to

stay very close in frequency to the frequency components of the audio

signal being coded. Reducing or eliminating coding noise wherever there

are no audio signals to mask it can subjectively preserve the sound

quality of the original signal. In this key respect, a coding system like

Dolby Digital is essentially a form of very selective and

Powerful noise reduction.

CATV Community antenna television.

DAVIC Digital Audio-Visual Council

DCT Discrete Cosine Transform. A widely used method of data compression

of digital video pictures basically by resolving blocks of the picture

(usually 8 x 8 pixels) into frequencies, amplitudes, and colors. JPEG and

DV depend on DCT.

DSS Digital satellite system. An alternative to cable and analog satellite

reception initially utilizing a fixed 18-inch dish focused on one or more

geostationary satellites. DSS units are able to receive multiple channels

of multiplexed video and audio signals as well as programming

information, Email, and related data. DSS typically uses MPEG-2

encoding.

DVB Digital Video broadcasting (European)

DVB-C Digital Video broadcasting for Cable

58

HDTV High definition television. Typically 1,125-, 1,080- and 1,035-line

interlace and 1,080-line progressive formats in a 16:9 aspect ratio.

Officially a format is high definition if it has at least twice the horizontal

and vertical resolution of the standard signal being used. There is a

debate as to whether 720-line progressive is also high definition.

JPEG Joint Photographic Experts Group. ISO/ITU-T. JPEG is a standard for

the data compression of still pictures (intrafield). In particular its work has

been involved with pictures coded to the ITU-R 601 standard. JPEG

uses DCT and offers data compression of between two and 100 times

and three levels of processing are defined: the baseline, extended and

"loss less" encoding.

MPEG Compression standards for moving images conceived by the Motion

Pictures Expert Group, an international group of industry experts set up

to standardize compressed moving pictures and audio. Four MPEG

standards were originally planned but the accommodation of HDTV

within MPEG-2 has meant that MPEG-3 is now redundant. . The main

interest for the television industry is in MPEG-1 and MPEG-2.

MPEG-1 MPEG-1: A group of picture blocks, usually four, which are analyzed

during MPEG coding to give an estimate of the movement between

frames. This generates the motion vectors that are then used to place

the macroblocks in decoded pictures. This was designed to work

at 1.2 Mbits/sec, the data rate of CD-ROM, so that video could be played

from CDs. However the quality is not sufficient for TV broadcast.

MPEG-2 MPEG-2 is the basis for ATSC digital television transmission.

Its work follows on from that of JPEG to add interfield compression, the

extra compression potentially available through similarities between

successive frames of moving pictures.

MPEG4 MPEG-4 is intended for unrelated applications, however can be used to

display ATSC formats on a PC

NTSC National Television Standards Committee

QAM Quadrature Amplitude Modulation

QPSK Quadrature Phase Shift Key

SMPTE Society of Motion Picture and Television Engineers. A professional

organization that sets standards for American television.

http://www.smpte.org

Return to Table of Contents TOC

59

Chapter 6 Modem Design

Section 6.1 Basic Modulator

To understand the demodulator one must first understand the modulator basics.

The modulator described here will accept a data stream (bit stream) with a

symbol rate equal to B (standing for baud) and will output a modulated QAM

signal centered at an IF (intermediate frequency) equal to the symbol rate or

twice the symbol rate (B or 2B). A typical application would be a 5 MBaud (5

million symbols per second) 64 QAM modulator for a digital television

transmitter. The modulator will Nyquist filter (pulse shape) the QAM signal, mix it

up to be centered at either 5 MHz or 10 MHz (digital sine/cosine generator), D/A

convert it and output an analog signal ready to be mixed up to a final radio

carrier frequency of several hundred megahertz.

Figure 6.1 Basic Modulator

The basic functions of a QAM modulator are shown in Figure 6.1: The bit stream

is formatted into symbols consisting of In-phase (I) and Quadrature (Q) words. A

64-QAM symbol uses 6 input bits per symbol, 3 bits for the I and 3 bits for the Q.

The I and Q values for 64 QAM are 1, 3, 5 and 7. The symbols are zero

padded to generate a data stream at the desired sample rate for the final digital

to analog converter (DAC). The desired sample rate is a function of the IF signal

frequency and its bandwidth. If the excess bandwidth of the Nyquist filter is ,

and the IF signals center frequency is F, then the DAC frequency must be at

least twice (F + (1+ )B/2). This means that the DAC frequency must be

greater than (2F + (1+ )B). If the IF is centered at the symbol rate B, then a

DAC frequency of 4B is adequate. If the IF center frequency is 2B, then a DAC

frequency of 8B is needed. If the DAC frequency is chosen as 4B, then the zero

pad circuit must insert 3 zeroes between each symbol. If the DAC frequency is

8B, then 7 zeroes must be inserted between each symbol. The pulse shape filter

is typically the raised cosine pulse defined in eqn 6.1 below.

FORMAT

INTO

SYMBOLS

ZERO PAD

ZERO PAD PULSE SHAPE

FILTER

PULSE SHAPE

FILTER

DIGITAL

SIN/COS OSC

D/A

BIT

STREAM

IN

IF

SIGNAL

OUT

I

Q

(IF=5

Mhz)

CLOCK

SYNTHESIZER

30

Mbps

30 Mhz

=(6bitsx5Mhz)

FDAC=20 Mhz =(4 x 5Mhz)

Mixer

20

Mhz

20

Mhz

60

(

(

(

(

(

,

\

,

,

,

,

,

(

j

(

,

\

,

(

j

(

,

\

,

(

j

(

(

(

(

,

\

,

,

,

,

(

j

(

,

\

,

(

j

2

2

1

cos sin

) (

s

s

s

s

T

t

T

t

T

t

T

t

t p

eqn 6.1

Where sets the excess bandwidth of the pulse and T

s

is the symbol time

spacing and baud rate B = 1/T. If the DAC frequency is 4B, then the pulse filter

will use the impulse response h(k) = p(kT/4) for k = -N to +N. The length of the

filter is 2N+1. The value of N, and hence the length of the filter, is set so that the

value of p(t) in eqn 2.1 is sufficiently close to zero for k > N. If the DAC frequency

is 8B, then h(k) = p(kT/8). Typically N is less than 30 for a DAC frequency of 4B

and is less than 60 for a DAC frequency of 8B. The I/Q signal coming from the

pulse shape filters is mixed up to the desired IF center frequency as shown in

Figure 6.1. The real part of the mixer output is retained and sent to the DAC. A

lowpass filter smoothes the DAC output. The lowpass filters passband extends

from 0 to (F + (1+ )B/2) and its stop band starts at F

DAC

- (F + (1+ )B/2)

Figure 6.2 Low Pass Filter

DAC frequency F

DAC

is calculated on the next page for our case.

F+(1+ )B/2 FDAC F-(1+ )B/2

61

If the DAC frequency is 4B and the IF is B, or if the DAC frequency is 8B and the

IF is 2B, then the mixer frequency is

n j

e

4

j,...). This means that the mixer only needs to make sign changes and to

multiplex between the I and Q filter outputs.

Three different raised cosine pulses are shown in Figure 6.4 , Figure 6.5, and

Figure 6.6 for 0 , 0.5, and 1. The case of 0 (0 excess bandwidth) is ideal

low pass, sin(x)/x response, the case of 5 . 0 (50% excess bandwidth) is a

realistic filter with some trade-off between excess bandwidth and pulse rate. The

case of 1 is called full cosine roll-off and the excess bandwidth is 100%. A

cable system uses typically 13 . 0 (please see Figure 6.3 and Table 6.1).

Figure 6.3 Raised Cosine Pulse 13 . 0

p t ( )

10 5 0 5 10

0.5

0

0.5

1

DAC Frequency Rajat Sewal DAC_freq.mcd

0.13 F 5

IF center frequency (Mhz)

B 5

Baud rate (Mhz)

Dac_freq 2 F

.

1 ( ) B

.

( ) Dac_freq 15.65 Mhz

so we can use 20 Mhz ie F

DAC

= 4B = 20 Mhz. Also

note that F=B

Low Pass Filter

Pass Band from 0 to (B+(1+ )B/2 Stop Band starting at 3B-(1+ )B/2

Pass_band B 1 ( )

B

2

.

Pass_band 7.825 Mhz

Stop_band 3 B

.

1 ( )

B

2

.

Stop_band 12.175 Mhz

62

Figure 6.4 Raised Cosine Pulse 0 (ideal low pass)

Figure 6.5 Raised Cosine Pulse 5 . 0

Figure 6.6 Full Raised Cosine Pulse 1

p(t)

t

10 5 0 5 10

0.5

0

0.5

1

p t ( )

t

10 5 0 5 10

0.5

0

0.5

1

t

p t ( )

10 5 0 5 10

0.5

0

0.5

1

63

Section 6.2 Modem Specification

A video modem processing an MPEG2-TS stream has to be fast because it is

not only processing high-speed video data but also the overhead bits used in

synchronizing and other housekeeping tasks. This adds more demands on the

modem design. The symbol rate has to be in accordance with the IEEE802.14

standard (in development) and is 5.05Mbaud for 64 QAM. The architecture of a

64 QAM modem is shown in Figure 6.7. Because of its high bandwidth efficiency

quadrature amplitude modulation has become the established modulation

scheme for digital high-capacity modems.

Figure 6.7 QAM Architecture

The RF input (88Mhz to 860Mhz in USA) has several 6Mhz bandwidth channels

and is the cable input to the subscriber and carries digital RF modulated signals

which are down-converted (carrier is stripped off) and filtered by a SAW (surface

acoustic wave) filter in the tuner. A SAW filter is simply an analog version of a

FIR filter but is made from a piezoelectric material on a ceramic substrate. The

SAW filter performs a very sharp cut-off, low-pass filtering operation without

adding any noise. The only drawback is that it has some insertion loss, as it is a

passive device. It is kept away from any hot components to keep its Johnson

noise to a minimum. The output is then fed into an AGC circuit whose gain is

controlled by the output of the ADC (analog to digital converter). This allows the

ADC to have a good dynamic range as the input signal amplitude may vary

considerably. The ADC is a 10 bit fast sampling device and considerable design

effort goes into this component. One difficult part of the ADC design is that the

sampling FET introduces noise current as charge is rapidly pulled in and out of

its gate. The charge couples into the drain/source circuitry and results in errors

in the storage element. The FET has to be large to be able to switch quickly but

a large FET area means more gate to source/drain coupling. This conflicting

requirement has been a real challenge for design engineers and some clever

64

ways have been developed to try and reduce this effect. Another area of the

design that has been a challenge is controlling the phase jitter of the PLL driver

to the ADC sampling circuit. If the clock driving the PLL has jitter or the PLL

itself introduces jitter noise then the ADC sampling is in real trouble and the

accuracy of the ADC is effected directly. The sampling frequency of the ADC

depends on whether the IF frequency (Intermediate frequency) is centered at the

symbol rate B or twice the symbol rate, 2B. If the IF is centered around symbol

rate B then the ADC sampling is done at 4B, if the IF is at 2B then ADC sampling

is done at 8B.

The output of the ADC now contains the in-phase and quadrature components of

the baseband QAM modulated signal. These are demodulated by a cosine and a

sine wave signal generated by the symbol timing recovery circuits.

For high performance transmission equalization is necessary after the

demodulation to compensate for the dispersive fading of the transmission

channel (cable exhibits loss at high frequencies). The amount of computation

necessary in the tap coefficient updates (multiply and accumulate) far exceeds

the capabilities of programmable DSP chips (such as TI 320 series, Motorola

56000, Analog Devices 2600 series and Intel i860). These DSP chips

(processors) are good for up to 100K Baud. Above 100K Baud one must design

custom chips (ASICS) that are fully optimized for high computation rates to

support rates as high as 35 M Baud. The multiplier time using pipelined

multipliers that I have seen are 10ns. This level of performance requires

pipelining and large multipliers.

Recall that in the case of 64 QAM, 6 bits are used to map into the 64 possible

symbols. In other words, 1 symbol takes 6 bits to represent. Furthermore, 2 of

these six bits are used to decode the quadrant (1

st

, 2

nd

, 3

rd

, 4

th

). As shown in

Figure 4.13 the first two bits (bits 5,4) in the six bit symbol are used to decode

the quadrant and the next four bits (bits 3,2,1,0) are used to find which symbol

within that quadrant was transmitted.

The probability of error for a rectangular constellation is repeated here:

2

] [ ) (

1

3

)

1

1 ( 2 1 1

o

av

M

N

E

M

Q

M

P

eqn 6.2

where

M P probability of symbol error in QAM M-ary

M # of symbols

o

av

N

E

SNR, signal energy/noise energy

) ( Q erf function which can be calculated using a table

The block diagram of a 64-QAM from National Semiconductor is shown in Figure

6.8 and it shows a more practical view down to the external input/output pins.

65

The demodulator is controllable from an external microprocessor via a serial

interface.

Figure 6.8 National Semiconductor-QAM Schematic

66

Section 6.3 IEEE802.14 Specification

The IEEE802.14 supports three physical layer (PHY) formats A, B and C as

shown in the table below.

PHY Type A PHY Type B PHY Type C (USA)

64QAM & 256 QAM 64QAM & 256 QAM 64QAM & 256 QAM

8 Mhz Channel BW 6 Mhz Channel BW 6 Mhz Channel BW

FEC is Reed Solomon FEC is RS for outer and

Trellis (TCM) for inner

symbols ie concatenated

FEC is Reed Solomon

Spectral roll-off 15 . 0 Spectral roll-off

64QAM: 18 . 0

256QAM: 12 . 0

Spectral roll-off 13 . 0

Modulation rate:

6~6.952 Mbaud

64QAM: 5.05 Mbaud

256QAM: 5.19, 5.36

Mbaud

Modulation rate:

5.0 ~ 5.31 Mbaud

Table 6.1 PHY Formats

Figure 6.9 Type C PHY

Return to Table of Contents TOC

67

Chapter 7 Matlab Simulation

Section 7.1 Communication Tool Box

The modem is simulated using the Communication ToolBox of Matlab. The

communication toolbox from Matlab allows one to design a high level system

without having to design every single lower level function. A higher level of

abstraction gives the designer mobility in choosing various system parameters

and try out different scenarios in a shorter time. There is another toolbox called

DSP Blocksets which has larger blocks built in, such as equalizers and carrier

recovery blocks. I did not have access to the DSP Blocksets toolbox

unfortunately. The version of Matlab I used is listed here:

MATLAB Toolbox Version 5.2 18-Dec-1997

Communications Toolbox Version 1.3 01-Dec-1997

Signal Processing Toolbox Version 4.1 21-Nov-1997

Simulink Version 2.2 21-Nov-1997

68

Section 7.2 Matlab Code

The matlab code is shown in the next few pages and to understand the code you

need to refer to Figure 7.1, the system block diagram.

% EE297 Project Rajat Sewal

% File Name : qam64.m

%

% This program simulates a 64 QAM Modem

%

% Date Revision History

% ------- -------- ----------------------------

% 7/11/98 1.0 Started writing code

% 10/24/98 2.0 Added channel impairment

% 10/26/98 3.0 Display Ber vs Eb_No curve

% 10/27/98 4.0 Added RS Error correction with prompt

% 10/27/98 5.0 Fixed some errors in data lengths

% 10/28/98 6.0 Prompt for extra graphs and zoom in Eb_No curve

% 10/29/98 7.0 Prompt for code word length N & log start/stop time

%

% Initialization

fprintf('Clearing all variables...\n')

clear all

%symbol rate, digital transfer frequency Fd

Fd=1;

%assign Carrier Frequency

Fc=10;

%Sample Rate or sample freq Fs. This is the rate Matlab samples the analog

signals because after all the computer cannot sample infinitely fast to simulate

an analog signal. This frequency has more to do with the computer than the

modem itself.

Fs=100; N=7;

%

%Error-control coding

use_reed_solomon=input('Do you want Reed Solomon error

correction?[1=Yes,0=No]: ');

if use_reed_solomon==1

N=input('Enter code word length {N=2^M-1}, say 7,15,31: ');

end

fprintf('Do you want extra graphs of Mapped Data, XMIT Filtered output\n');

extra_graphs=input('RF Data, FFT of RCVR Filt,& QASk

Constellation?[1=Yes,0=No]: ');

K=6;

% N=(2^M)-1; Check bits = N-K

%

start_time=clock;

69

%QAM bits/symbol Specification

bits_per_symbol=6; % note: 2^6=64 QAM

Data_length=[10 10 10 10 10 10 10]*N*bits_per_symbol*K;

%

for i=1:length(Data_length)

% the message source

bits = randint(Data_length(i),1,2);

% Reed Solomon Encoding

%

if use_reed_solomon==1

coded_data = encode(bits,N,K,'rs'); % encode data

else

coded_data = bits; % don't encode data

end

% Generate symbols (0 to 63) from binary bits (0,1,1,0,1,0...)

symbols=bi2de(vec2mat(coded_data,bits_per_symbol));

% Digital to analog signal mapping

mapped_data = modmap(symbols,Fd,Fs,'qask',64);

%%%%%%%%%% Transmit Raised Cosine shaping %%%%%%%%%%

filtered_data=rcosflt(mapped_data,Fd,Fs/50,'fir/sqrt',0.13);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%% QAM MODULATION & %%%%%%%%%%%%

%%%%%%% Analog Upconversion to communication channel

transmit_rf = amod(filtered_data,Fc,Fs,'qam');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%% CHANNEL NOISE %%%%%%%%%%%%%%%

%%%%%%%%%% Channel Impairment Section %%%%%%%%%%%%%

% Add AWGN noise and compute Eb/No

%fprintf('adding AWGN... ')

noise_var=[2,1.5,1,0.3,0.2,0.15,0.01];

fprintf('adding AWGN with variance: %2.1d\n',noise_var(i))

%Additive noise variance

noise_gaussian=randn(length(transmit_rf),1) * noise_var(i);

noisy_rf_signal=transmit_rf + noise_gaussian;

% Calculate signal and noise energy

signal_energy=transmit_rf' * transmit_rf / length(transmit_rf);

noise_energy=noise_gaussian' * noise_gaussian / length(noise_gaussian);

Eb_No(i)= signal_energy/noise_energy;

70

%%%%%%%%%%% QAM 64 RECEIVER %%%%%%%%%%%%%%%%

% analog demodulation of carrier and qam signal

analog_rx=ademod(noisy_rf_signal,Fc,Fs,'qam');

%%%%% Received Matched filter - Raised Cosine %%%%%%%%%%%%

% with excess bandwidth = 0.13

rx_ana_data=rcosflt(analog_rx,Fd,Fs/50,'fir/sqrt',0.13);

%%%%%% Decimate results by taking every 1/Fs sample %%%%%%%%%

% decimate to subsample the Matlab rcosflt output

exp_ana_data_i = decimate(rx_ana_data(:,1), 4);

exp_ana_data_q = decimate(rx_ana_data(:,2), 4);

%%%%%%%%%%%%%%%%% SLICER %%%%%%%%%%%%%%%%%

slicer=demodmap([exp_ana_data_i exp_ana_data_q],Fd,Fs,'qask',64);

%%%%%%%%% decode symbols into bits %%%%%%%%%%%%%

demod_bit=de2bi(slicer,bits_per_symbol)';

demod_bit=demod_bit(:);

%

% Reed Solomon Decoding

%

if use_reed_solomon==1

decoded_bits = decode(demod_bit,N,K,'rs');

else

decoded_bits = demod_bit;

end

%

%%%%%%%%%%%%%% BER Tests %%%%%%%%%%%%%%%%%%

%err = symerr(bits,demod_bit);

[numb(i),BER(i)]=biterr(decoded_bits(:),bits);

ber_array(i,1)=BER(i)

end

%%%%%%%%%%%%%%%% Extra Graphs %%%%%%%%%%%%%%%%

if extra_graphs==1

plot(mapped_data);title('Mapped Data');figure;

plot(filtered_data);title('XMIT Filtered Data');figure;

plot(transmit_rf);title('RF data');figure;

plot(abs(fft(rx_ana_data)));title('FFT of RCVR filter output');figure;

qaskenco(slicer,64); % plot received symbols on constellation

end

%%%%%%%%%%%%%%% BER PLOTS %%%%%%%%%%%%%%%%%%

% Curve fitting using Spline function

x_axis=logspace(log10(min(Eb_No)),log10(max(Eb_No)),20);

Eb_No(find(BER==0))=[];

BER(find(BER==0))=[];

y_data=spline(log10(Eb_No),log10(BER),log10(x_axis));

%

%plot results

figure

loglog(x_axis,10.^y_data,'b-',Eb_No,BER,'bo')

71

xlabel('Eb/No')

ylabel('BER')

% next line added to fix the xy axis scales

axis([1 1E4 1E-12 1]);

if use_reed_solomon==1

title([num2str(2^bits_per_symbol),'-ary QASK with [',num2str(N),',',num2str(K),']

Reed Solomon simulation result'])

grid;

else

title([num2str(2^bits_per_symbol),'-ary QASK Simulation result'])

grid;

end

zoom

fprintf('Select area to zoom in and right click to zoom out\n')

stop_time=clock;

elapsed_time=stop_time - start_time

%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%

72

Figure 7.1 QAM -Matlab System

decoded_bits

DATA

SOURCE

ENCODE

Reed

Solomon

VEC2MAT BI2DE MODMAP

RCOSFLT AMOD

NOISE

ADEMOD RCOSFLT

DECIMATE

DEMODMAP

DE2BI

bits

coded_data

symbols

mapped_dat

a

mapped_dat

a

filtered_data transmit_rf

noise_gaussia

n

analog_rx

rx_ana_da

ta

rx_ana_data

exp_ana_data

i

exp_ana_data_

q

slicer

demod_bi

t

noisy_rf_signal

DECIMATE

DECODE

Reed

Solomon

73

Section 7.3 Discussion of Matlab Code

The user launches Matlab and then types the name of the program qam64.

The program then prompts the user to activate the Reed Solomon error

correction block or bypass correction. If the user selects Reed Solomon error

correction then he is asked to input the code word length N. There is a rule for

selecting N and it is 1 2

M

N where M = 3, 4, 5, 6 etc. M cannot be less than

3. Here is a list of valid N 7, 15, 31, 63 based on the four values of M listed

above. If Reed Solomon is not selected then N defaults to 7 so that we get a

reasonable Data_length. Then the program prompts for extra graphs and if one

chooses not to display them, a graph of BER vs E

B

/N

o

is displayed at the end

anyway.

Random data is then generated with a function called RANDINT, which has the

format:

RANDINT Random integer matrix generator.

OUT = RANDINT(N,M,RANGE) generates an N-by-M matrix of random

binary numbers in the RANGE. The appearance of "0" and "1" have even

probability. When

RANGE is a scalar positive integer, the output integer range is [0, RANGE-1].

In my program I have: bits = randint(Data_length(i),1,2);

Since Data_length is defined earlier on as

Data_length=[10 10 10 10 10 10 10]*N*bits_per_symbol*K;

It takes on the value depending on N, bits_per_symbol, and K. The value of

bits_per_symbol is 6 in accordance with 64-QAM. The value of K is 6. So

Data_length comes out to be 360N. However coding changes that as discussed

below.

The program runs through its entire course 7 times (Data_length). So if we

wanted to increase the number of loops we simply increase the length of

Data_length by adding another 10. The program is designed so that for each set

of runs out of the 7 runs it generates and pushes as many bits as dictated by

the following algorithm:

Data_length.mcd

RajatSewal

N 31 bits_per_symbol 6 K 6

data_length 10 N

.

K

.

bits_per_symbol

.

data_length 11160

uncoded_data_length data_length uncoded_data_length 11160

coded_data_length

uncoded_data_length

bits_per_symbol

N K ( )

.

uncoded_data_length

coded_data_length 57660

74

Using the above equations the coded_data_length with several values of N are

tabulated in Table 7.1.

N (uncoded)

Data_length=360*N

Coded Data Length

7 2520 2940

15 5400 13500

31 11160 57660

63 22680 238140

Table 7.1 Data Lengths

So bits contains Data_length number of binary data (0110001010101010).

This is then Reed Solomon encoded if the choice was made or left un-encoded.

The format of the function encode is:

ENCODE Error-control code encoding computation.

CODE = ENCODE(MSG, N, K, METHOD)

Encodes the binary message specified in MSG using the coding technique in

METHOD. The code word length is N and the message length is K. The format

of MSG can be either a vector or K column matrix. A code has code word length

2^M -1, where M is an integer no less than 3. The message length is 2^M - M - 1.

Hamming code is a single error-correction code.

The METHOD can be 'hamming' Hamming code, 'linear' Linear block code,

'cyclic' Cyclic code, 'bch' Binary BCH code, 'rs' Reed-Solomon code, or

'convol' Convolution code.

When MSG is a K-column matrix, the output CODE is an N-column matrix.

In my program the usage is:

coded_data = encode(bits,N,K,'rs');

After coding the data is called coded_data and is still binary data. This data is

then sent to a block called VEC2MAT described next:

VEC2MAT Vector to matrix conversion.

MAT = VEC2MAT(VEC, M) converts VEC to be an M column matrix with row

priority arrangement. If it needs to add an element, 0 will be added to the end of

the input vector to form the required matrix.

In my program the usage is:

symbols=bi2de(vec2mat(coded_data,bits_per_symbol));

Where bits_per_symbol=6 so that the output of vec2mat is a binary data of 6

column matrix partitioned symbol by symbol. This step is followed by a

conversion from binary to decimal format:

75

symbols=bi2de(vec2mat(coded_data,bits_per_symbol));

So now symbols is a decimal grouping of numbers from 0 to 63.

Here is the format of the bi2de command:

BI2DE Converts binary to decimal format.

D = BI2DE(B) converts a binary representation vector B to a decimal

representation D. When B is a matrix, the output D is a column vector with each

element being the transfer of a row of B. The first element in B represents the

lowest binary bit. For example bi2de([1 0]) results in 1; bi2de([0 1]) results in 2.

The next step is to take the symbols vector and run it into MODMAP which

maps the decimal formatted numbers into their equivalent QAM symbol

constellation coordinates ( 1, 3, 5, and 7). The modmap function is

described next.

MODMAP Maps a digital signal to an analog signal for modulation.

Y = MODMAP(X, Fd, Fs, METHOD,M) maps a sample

frequency Fd (Hz) signal vector X into a sample frequency Fs (Hz)

in-phase and quadrature components in Y. Y is a two column matrix.

The first column is an in-phase component and second column is a

quadrature component. When METHOD = 'ask', Y is a column vector

instead of a matrix.

This function does mapping only. M defines the M-ary number of a square

constellation when METHOD is qask. METHOD is a string, which can be one of

the following: 'ask' M-ary Amplitude shift keying modulation. 'psk' M-ary Phase

shift keying modulation. 'qask' M-ary Quadrature amplitude shift-keying

Modulation. 'fsk' M-ary Frequency shift keying modulation. 'msk' Minimum

shift keying modulation. 'sample' Up sample the input signal.

In my program the usage is:

mapped_data = modmap(symbols,Fd,Fs,'qask',64)

The next block is the filter block to pulse-shape the symbols that are to be

transmitted. This is the RCOSFLT ie raised cosine filter with excess bandwidth

13 . 0 . The format is shown next:

RCOSFLT Filters the input signal using raised cosine filter.

Y = RCOSFLT(X, Fd, Fs, TYPE_FLAG, R) filters the input signal X using raised

cosine (R-C) FIR filter. The sample frequency for X is Fd (Hz). The sample

frequency for Y is Fs. Fs must be larger than Fd. Fs/Fd must be an integer. The

rolloff factor R has a default of 0.5 but must a real number in the range [0, 1].

TYPE_FLAG is a string, which can be one of the following:

'fir' Use FIR R-C filter (default).

'iir' Use IIR R-C filter.

'normal' Use normal R-C filter (default), in contrast to 'qart'.

76

'sqrt' Use square root raised cosine filter.

'wdelay' Keep the full length of the filtered result, in the case

the row number (or vector length) of Y is

(length_of_X + DELAY)*Fs/Fd. The value DELAY is a default of

3. The function default has had the delay cut off from

the output.

'Fs' X is input with sample frequency Fs. In this case, only

elements X(i*Fs/Fd+1,:) are used in the calculation. All

others are discarded.

In my program the usage is:

filtered_data=rcosflt(mapped_data,Fd,Fs/50,'fir/sqrt',0.13)

The next section is the last part of the transmitter and is AMOD (analog

modulator).

AMOD Analog signal modulation.

Y = AMOD(X, Fc, Fs, METHOD) modulates the message signal X with

carrier frequency Fc (in Hz) and sample frequency Fs (Hz) using the modulation

scheme in string variable METHOD. The time interval between two successive

points in X is 1/Fs. When Fs is a two-element vector, the second element

specifies the initial phase in the carrier signal modulation. The unit of the initial

phase is rad. For best results, Fs > Fc is required (by Nyquist theory).

METHOD is a string, which can be one of the following:

'amdsb-tc' Amplitude modulation, double sideband with transmission carrier

'amdsb-sc' Amplitude modulation, double sideband suppressed carrier

'amssb' Amplitude modulation, single sideband suppressed carrier

'qam' Quadrature amplitude modulation

'fm' Frequency modulation

'pm' Phase modulation

In my program the usage is:

transmit_rf = amod(filtered_data,Fc,Fs,'qam')

Now the signal goes through an ideal channel with AWGN (additive white

gaussian noise) added at the input of the receiver. The code that generates the

random noise is discussed next.

First we define a noise variance matrix called noise_var

noise_var=[2,1.5,1,0.3,0.2,0.15,0.01]

Here the length of the noise_var matrix is 7 elements long to match the way the

program is designed: it loops through the entire program 7 times picking the first

noise variance of 2 and then moving on to smaller and smaller noise till it gets to

0.01. The function that is used in generating noise is RANDN.

RANDN Normally distributed random numbers.

77

RANDN(M,N) is an M-by-N matrix with random entries. RANDN produces

pseudo-random numbers. The sequence of numbers generated is determined

by the state of the generator.

In my program the usage is:

noise_gaussian=randn(length(transmit_rf),1) * noise_var(i)

The noise is then added to the tranmitted rf signal:

noisy_rf_signal = transmit_rf + noise_gaussian

Now we enter the receiver with noisy_rf_signal and process it with ADEMOD

(analog demodualtor) which is the opposite function of AMOD. The output of the

ADEMOD is analog_rx, which is the demodulated analog baseband QAM signal.

This signal needs to be filtered to remove any carrier components and to reduce

intersymbol interference (ISI). Another raised cosine filter (Receive Filter) is

used here in the filter block rcosflt.

The output of the RCVR filter is rx_ana_data and since the XMIT filtering

operation had interpolated data, we need to decimate this data at the same rate

using the DECIMATE blocks. We decimate the in-phase and quadrature

portions separately. The command is described next.

DECIMATE Resample data at a lower rate after lowpass filtering.

Y = DECIMATE(X,R) resamples the sequence in vector X at 1/R times the

original sample rate. The resulting resampled vector Y is R times shorter,

LENGTH(Y) = LENGTH(X)/R.

DECIMATE filters the data with an eighth order Chebyshev type I lowpass

filter with cutoff frequency .8*(Fs/2)/R, before resampling.

In my program the usage is:

exp_ana_data_i = decimate(rx_ana_data(:,1), 4)

exp_ana_data_q = decimate(rx_ana_data(:,2), 4)

The next step is to do a demapping of the exp_ana_data_i and

exp_ana_data_q signals so that the symbol value is

extracted. This is done with inverse function of modmap ie.

DEMODMAP described next.

DEMODMAP Demaps a modulation mapped signal to the closest digit number.

The sampling frequency for Y is Fs (Hz) and the digital sampling frequency is Fd

(Hz).

slicer = demodmap([exp_ana_data_i exp_ana_data_q],Fd,Fs,qask,64)

Z = DEMODMAP(Y, Fd, Fs, METHOD,M) is a reverse mapping of function

MODMAP. This function demaps a sampling frequency Fs (Hz) analog signal

into a sampling frequency Fd (Hz) digital signal Z. Y is a two column matrix

78

where the first column is an in-phase component and second column is a

quadrature component. When METHOD = 'ask', 'fsk', or 'msk', Y is a one column

vector instead of a matrix. When Fd is a two element vector, the second

element is the offset value for the decision point. The offset timing in the plot is

offset/Fs. The default offset is 0. The received digital signal is sampled at time

i/Fd + offset/Fs. The sample value holds until time (i+1)/Fd +offset/Fs when the

next sample point is taken. The demapping process finds the distance from the

sample value to all of the possible digital symbols. The digital symbols with the

shortest distance to the current sampling point is the demodulated output.

In my program the usage is:

slicer = demodmap([exp_ana_data_i exp_ana_data_q],Fd,Fs,qask,64)

The output slicer is then sent to a decimal to binary converter so that the binary

bits can be recovered. This function is described next.

DE2BI Converts positive decimal numbers to binary numbers.

B = DE2BI(D, N) specifies the column number for matrix B. N is a

positive scalar number.

The first element in B represents the lowest binary bit. For example

DE2BI(1, 2) results in [1 0]; DE2BI(2) results in [0 1].

In my program the usage is:

demod_bit=de2bi(slicer,bits_per_symbol)

The next step is to take all the columns of demod_bit and convert them into one

single column so we have a string of bits in one column. This is done with the

command

demod_bit=demod_bit(:)

The next step is to decode with Reed Solomon algorithm if encoded. This is

done in an if statement:

if use_reed_solomon==1

decoded_bits = decode(demod_bit,N,K,'rs');

else

decoded_bits = demod_bit;

end

DECODE Error-control code decoding computation.

MSG = DECODE(CODE, N, K,METHOD) decodes binary codeword in

CODE using decode METHOD. The code word length is N and the message

length is K. The format of CODE can be either a vector or an N column matrix.

METHOD ENCODE SCHEME

79

'hamming' Hamming code

'linear' Linear block code

'cyclic' Cyclic code

'bch' BCH code

'rs' Reed-Solomon code

'convol' Convolution code

In using methods other than the "rs" method, L equals N. In using the "rs"

method, L = M, where N = 2^M - 1. M is an integer >= 3. CODE can also be a

non-negative integer in the range of [0, 2^L-1]. In this case, you have to add

'/decimal' in the method specification. For example, 'bch' is equivalent to

'bch/binary'. 'bch/decimal' means the data in MSG is binary. Except for the 'rs'

method, MSG can only be a vector when using the decimal method.

The output MSG contains the decoded message. The format of MSG matches

the format of CODE. When CODE is a N-column matrix, the output MSG is a K-

column matrix.

When the format of the input CODE is not the same as the output of function

ENCODE, this function stops processing.

The next step is to take decoded_bits and perform BER (bit error tests) and

graph the results.

The BER tests are done with a function called biterr

BITERR Computes bit error.

[NUMBER, RATIO] = BITERR(X, Y) compares the elements in the input

matrices X and Y. The number of the bit differences is outputted in

NUMBER. The ratio of NUMBER to the total bit number contained in

Y is output in RATIO. All elements in X and Y should be non-negative

integers. The total bit number in Y is estimated by

column_y * row_y * K,

where K is the bit number for each element in Y. K is the smallest

integer satisfying MAX < 2^K, where MAX is the maximum number in both

X and Y. When X or Y is a matrix and the other is a vector, this

function convert the vectors to a matrix with the column number the

same as the matrix before the comparison.

In my program the usage is:

[numb(i),BER(i)]=biterr(decoded_bits(:),bits);

Signal and noise energy is calculated using

signal_energy=transmit_rf' * transmit_rf / length(transmit_rf)

noise_energy=noise_gaussian' * noise_gaussian / length(noise_gaussian)

and SNR is calculated using:

Eb_No(i)= signal_energy/noise_energy;

80

Section 7.4 Discussion of Simulation Results

The data beside the graph is the bit error array produced for 7 different noise

variances.

Data_length=[10 10 10 10 10 10 10]*N*bits_per_symbol*K;

noise_var=[2,1.5,1,0.3,0.2,0.15,0.01];

The program runs through 7 times, each time picking a new noise variance from

the array shown above. The bit error is logged into an array called ber_array and

each point is plotted using a sophisticated algorithm called spline for curve

fitting. The circles on the graph are the data points in the ber_array. Values that

are zero (no single error) are not shown because this is a log scale and it does

not go below 1x10

-12

.

CASE 1

N=7 (default), since No error correction selected, number of bits = 2520.

Bits pushed = 2520 x 7 = 17,640

ber_array =

0.1246

0.0798

0.0444

0.0004

0

0

0

Figure 7.2 No Error Correction

10

0

10

1

10

2

10

3

10

4

10

-12

10

-10

10

-8

10

-6

10

-4

10

-2

10

0

Eb/No

B

E

R

64-ary QASK Simulation result

81

CASE 2

N=7 , Reed Solomon error correction selected, number of bits (coded) = 2940

Correction bits = N-K=7-6=1. Bits pushed = 2940 x 7 = 20,580

ber_array =

0.1187

0.0857

0.0353

0

0

0

0

Figure 7.3 Error Correction N=7

10

0

10

1

10

2

10

3

10

4

10

-12

10

-10

10

-8

10

-6

10

-4

10

-2

10

0

Eb/No

B

E

R

64-ary QASK with [7,6] Reed Solomon simulation result

82

CASE 3

N=15 , Reed Solomon error correction selected, number of bits (coded) =

13,500. Bits pushed = 13,500 x 7 = 94,500

Correction bits = N-K=15-6=9

ber_array =

0.1385

0.0617

0.0104

0

0

0

0

Figure 7.4 Error Correction N=15

10

0

10

1

10

2

10

3

10

4

10

-12

10

-10

10

-8

10

-6

10

-4

10

-2

10

0

Eb/No

B

E

R

64-ary QASK with [15,6] Reed Solomon simulation result

83

CASE 4

N=31 , Reed Solomon error correction selected, number of bits (coded) =

57,660. Bits pushed = 57,660 x 7 = 403,620

Correction bits = N-K=31-6=25

ber_array =

0.1228

0.0461

0.0002

0

0

0

0

Figure 7.5 Error Correction N=31

10

0

10

1

10

2

10

3

10

4

10

-12

10

-10

10

-8

10

-6

10

-4

10

-2

10

0

Eb/No

B

E

R

64-ary QASK with [31,6] Reed Solomon simulation result

84

CASE 5

N=7 , No error correction selected, number of bits pushed = 2520 x 7 = 17,640

Additional graphs selected. In this mode the following graphs are displayed:

Mapped Data Figure 7.6

XMIT Filtered Data Figure 7.7

RF Data Figure 7.8

FFT of RCVR Filter Figure 7.9

QASK Constellation Figure 7.10

85

Figure 7.6 Mapped Data

86

Figure 7.7 XMIT Filtered Data

87

Figure 7.8 RF Data

88

Figure 7.9 FFT of RCVR Filter Output

89

Figure 7.10 QASK Constellation

90

Section 7.5 Summary of Simulation Results

The simulation results are summarized in Table 7.2. The error correction

algorithm used in cases 2-4 is the Reed Solomon with ) , ( k n = ) 6 , (N , where k is

the message length and N is the code word length. The effect of increasing the

code word length on the bit error rate is explored. The value of BER is a ratio

not a percentage (so BER = 0.0444 is 4.44%). The values of BER = 0 mean no

bits were in error and is not a result of rounding off in the calculations.

CASE 1

No Error

Correction

CASE 2

Reed

Solomon

N=7

CASE 3

Reed

Solomon

N=15

CASE 4

Reed

Solomon

N=31

1 0.1246 0.1187 0.1385 0.1228

2 0.0798 0.0857 0.0617 0.0461

3 0.0444 0.0353 0.0104 0.0002

4 0.0004 0 0 0

5 0 0 0 0

6 0 0 0 0

7 0 0 0 0

Table 7.2 BER Summary

As can be seen going across any row, there is improvement in the BER

performance as the value of N increases because more and more redundancy is

added as correction bits (N-K) increases. Increasing N does come at a cost of

reduced source rate. The simulation times can be large for N=31 and can range

somewhere around 8-12hrs depending on the machine.

How N is picked is very important and the rule is 1 2

M

N where 6 , 5 , 4 , 3 M

resulting in N 7, 15, 31, and 63 respectively. I actually ran N 63 and the

computer (233Mhz Pentium, 64 Mbyte of SD Ram) ran out of resources after 32

hrs. The total number of bits I was trying to push through the modem was

1,666,980 bits. A factor in simulation speed is whether one is doing a passband

simulation or a baseband simulation of a passband system. The later runs much

faster because it does not involve a carrier (less computation on the part of the

computer). However, the baseband simulation involves using the complex

envelope of the Qam signals and the math can be complex. The filters also have

to be complex. Matlab allows one to do the baseband simulation in Simulink and

although I have familiarity with it I did not use a Simulink model in this project.

My model does not have an equalizer because the channel I was using is an

ideal channel corrupted by AWGN and this cannot be equalized. The carrier

recovery in the ADEMOD function is direct. The model picks up Fc directly from

the transmitter. Carrier Phase offsets can be modeled by the ADEMOD function

call by specifying the phase offset but I let it run with zero phase offset.

91

Chapter 8 Set-top Box ASIC Design

For a set-top terminal, most of the hardware design work is implemented in

ASICs. An ASIC's functionality is usually defined in the system engineering,

feature selection, and customer requirements phase. After the functions have

been defined and partitioned, design teams can be assembled to complete the

task of designing and fabricating the product ASICs. The kind of tools needed by

the ASIC engineers are Synopsys design compiler, Chronologic Verilog

simulators, Motive static timing analyzers, and Cadence Verilog simulators. Sun

Sparc workstations are used as simulation and synthesis servers. The first stage

of the ASIC implementation is writing a high-level description document. The

document contains high-level block diagrams, and architecture descriptions for

the modules contained in the ASIC. The document is written by the ASIC design

team and is supervised by an ASIC lead designer or project leader. This high-

level description document is used by the design team as a guide through the

ASIC development phase.

After implementation of the high-level description is approved, the ASIC

design team codes the design in Verilog. The design is simulated and each code

block is verified at the module level. Each designer is responsible for the

functionality of his/her assigned sections. Individual integration efforts can begin

at a point where major modules can be connected. Typically, integration occurs

in phases, but each stage of integration only proceeds after the modules to be

integrated have been thoroughly verified. While preliminary integration occurs,

synthesis of lower-level modules may be completed in parallel. Synthesis scripts

can be developed in an infant state, then later optimized and integrated when

synthesizing at the full chip level.

After full ASIC-level integration has been completed, chip synthesis may

begin. This process converts the Verilog RTL (register transfer level) behavioral

code to the actual chip netlist for the targeted ASIC library. In parallel to chip

synthesis, regression tests that verify the functionality are developed. The

regression tests verify the functionality of the behavioral code, and later can be

used to verify the gate-level implementation. After the ASIC has been

synthesized, regression tests should be run to verify the ASIC functionality by

simulating the design at a unit-delay level. Once the design functions at the unit-

delay level, the design can be back annotated with estimated pre-layout delays.

Functionality is then rechecked with the regression tests. The design should also

be checked with a static timing analyzer tool (Design Compiler by Synopsys) to

verify that worst-case paths (which are hard to simulate) meet timing. Once the

design meets timing and functionality with pre-layout estimated timing, the

design is ready for floor planning followed by cell placement and routing.

The floor planning is sometimes done in parallel with the estimated timing

verification phase of the design. This occurs because the design is somewhat

stable and usually the major blocks of the design do not change architecturally.

The first stage of the cell placement and routing can take up to 2 weeks for

designs greater than 100,000 gates. The average turn time for designs ranging

92

from 50,000 gates to 150,000 gates can be anywhere from 1 to 2 weeks. After all

nets are routed and all cells placed, the layout engineer delivers a wire delay file

(based on actual capacitive loading) back to the ASIC designer so that actual

timing can be back-annotated into the design. Typically, loading constraints on

buffers and some timing has been violated with the first cut of the layout. The

designer is required to perform a regression test and retime static paths in the

design so that all violations due to the actual wire loading can be corrected.

When all violations are detected and repaired, the ASIC designer returns the

updated netlist to the layout engineer so that the new and changed cells can be

updated in the layout database. One more wire delay file is delivered from the

layout engineer to the ASIC designer for final verification.

Once the ASIC designer completes the final verification, they will run the final

LVS (layout vs. schematic) and DRC (design rule checker) tools before handing

the layout database to the mask shop.

Return to Table of Contents TOC

- IT Final Upto 4th Year Syllabus 12.07.13Uploaded byNirmalya123
- Modern Digital and Analog Communication Systems 3rd EditionUploaded byMr.Puppy
- Huawei Microwave RTN 980 Product OverviewUploaded byabd961
- Comsys UnitenUploaded byAzrul Mohamad
- DC Digital Communication PART7Uploaded byARAVIND
- 1 Frenzel 3rd EdUploaded byGherzone Noah Trinidad Pasion
- bidirectional incoherent 16QAM transmission over Hybrid WDM-TDM passive optical networkUploaded bykenta2010
- Achievable Rates for Transmission of Discrete ConstellationsUploaded byJawad Ahmed
- PERFORMANCE ANALYSIS OF DIFFERENTIAL PHASE MODULATION. FOR HF COMMUNICATIONUploaded byShima Mohd Saad
- wirelessUploaded byduy_daoba
- Old Exams TM1Uploaded byAhmad Bader Obeidat
- PART 1 Microwave Communication Principle 20080219 AUploaded byGiang Le Truong
- Digit_ModulatUploaded byVagi Gowda
- Waspmote Lora 868mhz 915mhz Sx1272 Networking GuideUploaded byjohnmechanji
- Domain Name System(DNS)Uploaded byPikesh Patel
- Vision & Mission of Ece DeptUploaded byanandbabugopathoti
- Chapter01 CommUploaded byDavid Orozco
- 2.lecture2Uploaded bymailstonaik
- 01352869Uploaded byengineeryasin
- pulse amplitude modulationUploaded byShubhangBaghel
- Audio Watermarking Techniques TablesUploaded byFatin Amira
- PLM01 St7537 App NoteUploaded byapi-3723964
- Ds Siaemic Alc Pdh Radio TechnicalUploaded bye_alvarez_eaam
- lab1commUploaded byShravan Kumar Luitel
- Thesis Presentation - Terence ZarbUploaded byTerence Zarb
- 1 - 1 - Introduction (23-08)Uploaded byMatthew Vincent
- FPGA Implementation of OFDMUploaded byTrịnh Văn Sơn
- EC2301-NOL.pdfUploaded byRajaShekar
- Articulo A brief introduction to the analysis and design of networked control systems.pdfUploaded byPaulina Marquez
- an121bUploaded bySohail Sardar

- EA-452 Chapter 7Uploaded bywoodksd
- FE_Sem_2_1112_8_nov.docxUploaded byshah
- Accelerating the Vehicle Development Process by Employing EMI and EMC Numerical Analysis Assisted by High Performance ComputingUploaded byBernardo NG
- RG1 Communication SystemsUploaded byKoen Van Den Brande
- Application GuideUploaded byWaseem
- Baseband.doccommunicationUploaded bymisse07
- 09-1 Teleprotection FundamentalsUploaded bydmugalloy
- Cost 273Uploaded bymarwaabd
- Fall2016 Lecture 01Uploaded bySyed Muhammad Danish
- Data.docxUploaded byksu2006
- 6-ZXWR Node B System 71Uploaded byUdithaNavod
- Mobile Communication SlideUploaded byVõ Thanh Liêm
- A Comparative Performance Study of OFDM System With the Implementation of Comb Pilot-Based MMSE Channel EstimationUploaded byAnonymous lVQ83F8mC
- Discrete Memoryless Source FinalUploaded byNylNicart
- Data Communication BasicUploaded byroy@daes
- MATLAB-Simulink-Fading Channels.pdfUploaded byminhthangbk
- IEEE papersUploaded bysaveetharavi
- Data Communication and NetworkingUploaded byAsadul Hoque
- Digital Comm NotesUploaded byJuan Barrett
- Digital Communication IntroductionUploaded bylokeshwarrvrjc
- IT Assignment 2Uploaded bysyed02
- (Chapter 11) Digital T-carriers and Multiplexing (71-77)Uploaded byWelvin Asid
- 12301 ShannonUploaded bySai Ram Bachu
- CR.docxUploaded byMasterMM12
- Lec-1 [Introduction_ Shannon_ FT]Uploaded bynasim_majoka803
- information theoryUploaded byjohnharkin43
- Information Theory-pptUploaded bySuhas Ns
- 5334b_eUploaded byWisley Brito
- Exam 1 SGUploaded bydiney06
- Lecture 1 Introduction to Digital commUploaded bySheraz Alam Khan

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.