This action might not be possible to undo. Are you sure you want to continue?
Quadrature Amplitude
Demodulator
(64QAM)
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, Bitrate, Modem Speed_______________________________________ 50
Section 5.5 Digital TV Standards______________________________________________ 51
Section 5.6 Overview of transport subsystem ____________________________________ 52
Section 5.7 MPEGTS Transport Stream________________________________________ 54
Section 5.8 SetTop 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 Settop 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 64QAM 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 TRANSMITTERRECEIVER FOR DIGITAL TELEVISION _______________________________ 53
FIGURE 5.12 MPEG2 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 SEMICONDUCTORQAM 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
• LempelZiv 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
• Fiberoptic 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 bandlimited
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
• Nearend and Farend 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 inphase
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 that’s 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 Shannon’s 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 Shannon’s 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 (faceup) 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 nonsense, 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 fullydependent, 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 selfinformation 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 selfinformation 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 (1q). 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 discretetime
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
− − −
∆
−
for a 3bit quantizer.
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 nonlinear (nonuniform) 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 nonuniform quantizers (ALaw,
µ 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
Durbin’s.
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
(1bit) 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 biterror 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 slidingwindow fashion, introducing a
memory (in the case of slidingwindow) 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 (Nonlinear 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 (NONLINEAR BLOCK CODES)
When the source symbols are not equally probable an efficient encoding method
is to use variablelength 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 nk 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 nonbinary 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 nbit 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 (1511) 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 (don’t 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 onetoone 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 informationbearing
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
π
M m ,..., 2 , 1 eqn 4.2
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 onedimensional 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 rewrite 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
−
π θ M m ,..., 2 , 1 eqn 4.6
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 (=4QAM)
1 symbol ➛ 2
bits
2
16QAM
1 symbol ➛ 4
bits
4
256QAM
1 symbol ➛ 8
bits
8
6
64QAM
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 64QAM 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 Mary 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 Mary
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
−
− − ≤ with the simplification 1 )
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
−
≤ for odd k eqn 4.11
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 highspeed device for digital transmission of bits over a
coaxial cable. A simpleminded 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 highspeed 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 cableTV settop boxes whose FEC (Forward Error Correction)
is compliant with the IEEE802.14 (not released yet). Other standards that may
apply are the European DVBC standards (Digital Video broadcasting) and the
DAVIC standard (Digital AudioVisual 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 inhouse wiring, and
5.the settop 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 highgain 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 reamplification. 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 150200ft. 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 copperclad 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 100ftlength 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
RG58/U 53.5 Ω Ethernet (but not
recommended due to
improper shielding)
RG58A/U or RG
58C/U
50 Ω 10 Base2 CSMA/CD (Thin
wire Ethernet)
RG59/U 75 Ω CATV (cable TV)
RG62/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, Bitrate, 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 (18451903), the French
engineer who constructed the first successful teleprinter.
Comparison of speed of transferring a 10Megabyte file over different modems:
MODEM SPEED / TYPE
TRANSFER TIME
9.6Kbps Telephone Modem 2.3 hours
14.4Kbps Telephone Modem 1.5 hours
28.8Kbps Telephone Modem 46 minutes
56Kbps Telephone Modem 24 minutes
128Kbps ISDN Modem 10 minutes
1.54Mbps T1 Connection 52 seconds
4Mbps Cable Modem 20 seconds
10Mbps Cable Modem 8 seconds
30Mbps 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 bitspersec 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 DVBC 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 MPEG2 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 oddnumbered lines
being scanned from top to bottom first and then the 240 evennumbered 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 highend 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.
MPEG2
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. That’s 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 MPEG1 standard was derived. This standard is already being used in
the VideoCD and CDI products. The MPEG2 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 bitstream. The MPEG
standard also has a major drawback. Because of the many available bitrates,
framerates and resolutions in the MPEG standard, the MPEG hardware vendors
choose to support only a few of those different bitrates, framerates 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 16VSB system tested by ATTC (Advanced
Television Test Center) delivered 38.5 Mbps. Cable companies are deploying
64QAM (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 MPEG2 compressed signal rides on a mass
transitlike 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 transmitterreceiver 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 fixedlength 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 variablelength 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 TransmitterReceiver for Digital Television
54
Section 5.7 MPEGTS Transport Stream
The preferred method for video is to use the MPEG2TS framing structure and
not use the ATM format. The TS stands for transport stream. The IEEE802.14
supports both formats. The MPEG2TS 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 MPEG2TS packet.
Figure 5.12 MPEG2 Frame
55
Section 5.8 SetTop Boxes
Basic Analog Boxes
Today settop boxes in homes are analog and the RF signal coming in is
demodulated to recover the analog signal. Key components in a basic analog
settop box include an RF tuner, mixedsignal 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 8bit controllers and associated
memory for internal and remote control functions.
AnalogAddressable Interactive Boxes
A great deal of development activity is currently focused on analogaddressable
interactive settop boxes. These settop boxes have a return channel to the
CATV headend station. This return channel enables subscribers to obtain a
variety of services at their fingertips, including payperview 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.
LowEnd Interactive Digital Boxes
At the present time it seems that most digital settop (ST) boxes will be used for
satellite transmission. However there are companies developing Digital ST
boxes for CATV. These ST boxes will utilize MPEGII decompression
technology to increase the number of channels possible. Digital audio will range
from CDquality in the lowend 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 settop 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
HighEnd Interactive Digital Boxes
Highend interactive digital boxes are strictly for CATV at the moment. They will
be capable of displaying 3D 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 AC3, now also Dolby D): The approved 5.1
channel (surroundsound) 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 AC3) 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 AudioVisual 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 18inch 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 MPEG2
encoding.
DVB Digital Video broadcasting (European)
DVBC Digital Video broadcasting for Cable
58
HDTV High definition television. Typically 1,125, 1,080 and 1,035line
interlace and 1,080line 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 720line progressive is also high definition.
JPEG Joint Photographic Experts Group. ISO/ITUT. JPEG is a standard for
the data compression of still pictures (intrafield). In particular its work has
been involved with pictures coded to the ITUR 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 MPEG2 has meant that MPEG3 is now redundant. . The main
interest for the television industry is in MPEG1 and MPEG2.
MPEG1 MPEG1: 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 CDROM, so that video could be played
from CDs. However the quality is not sufficient for TV broadcast.
MPEG2 MPEG2 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 MPEG4 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 Inphase (I) and Quadrature (Q) words. A
64QAM 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 signal’s 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
J
`
'
'
'
'
'
(

J
J
`
'
(

−
J
J
`
'
(

J
J
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 filter’s 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
π
which is simply the sequence (1, j, 1, 
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 tradeoff between excess bandwidth and pulse rate. The
case of 1 α is called full cosine rolloff 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 MPEG2TS stream has to be fast because it is
not only processing highspeed 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 highcapacity 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 downconverted (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 cutoff, lowpass 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 inphase 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 Mary
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 64QAM 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 SemiconductorQAM 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 rolloff 15 . 0 α Spectral rolloff
64QAM: 18 . 0 α
256QAM: 12 . 0 α
Spectral rolloff 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 18Dec1997
Communications Toolbox Version 1.3 01Dec1997
Signal Processing Toolbox Version 4.1 21Nov1997
Simulink Version 2.2 21Nov1997
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;
%
%Errorcontrol 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^M1}, 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 = NK
%
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 1E12 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 NbyM 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, RANGE1].
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 64QAM. 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 unencoded.
The format of the function “encode” is:
ENCODE Errorcontrol 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 errorcorrection code.
The METHOD can be 'hamming' Hamming code, 'linear' Linear block code,
'cyclic' Cyclic code, 'bch' Binary BCH code, 'rs' ReedSolomon code, or
'convol' Convolution code.
When MSG is a Kcolumn matrix, the output CODE is an Ncolumn 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)
inphase and quadrature components in Y. Y is a two column matrix.
The first column is an inphase 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 Mary number of a square
constellation when METHOD is qask. METHOD is a string, which can be one of
the following: 'ask' Mary Amplitude shift keying modulation. 'psk' Mary Phase
shift keying modulation. 'qask' Mary Quadrature amplitude shiftkeying
Modulation. 'fsk' Mary 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 pulseshape 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 (RC) 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 RC filter (default).
'iir' Use IIR RC filter.
'normal' Use normal RC 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 twoelement 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:
'amdsbtc' Amplitude modulation, double sideband with transmission carrier
'amdsbsc' 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 MbyN matrix with random entries. RANDN produces
pseudorandom 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 inphase 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 inphase 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 Errorcontrol 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' ReedSolomon 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
nonnegative integer in the range of [0, 2^L1]. 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 Ncolumn 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 nonnegative
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
64ary QASK Simulation result
81
CASE 2
N=7 , Reed Solomon error correction selected, number of bits (coded) = 2940
Correction bits = NK=76=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
64ary 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 = NK=156=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
64ary 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 = NK=316=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
64ary 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 24 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 (NK) 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 812hrs 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 Settop Box ASIC Design
For a settop 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 highlevel description document. The
document contains highlevel 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 highlevel 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 lowerlevel 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 ASIClevel 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 gatelevel implementation. After the ASIC has been
synthesized, regression tests should be run to verify the ASIC functionality by
simulating the design at a unitdelay level. Once the design functions at the unit
delay level, the design can be back annotated with estimated prelayout 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 worstcase paths (which are hard to simulate) meet timing. Once the
design meets timing and functionality with prelayout 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 backannotated 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
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, Bitrate, Modem Speed _______________________________________ 50 Section 5.5 Digital TV Standards______________________________________________ 51 Section 5.6 Overview of transport subsystem ____________________________________ 52 Section 5.7 MPEGTS Transport Stream________________________________________ 54 Section 5.8 SetTop 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
2
Section 7.4 Discussion of Simulation Results ____________________________________ 80 Section 7.5 Summary of Simulation Results_____________________________________ 90
Chapter 8 Settop Box ASIC Design _______________________________________ 91
3
& PSK __________________________________________________ 28 FIGURE 4.9 MODULATED WAVEFORMS __________________________________________________ 33 FIGURE 4.13 ____________________________________________ 61 FIGURE 6.4 ERROR CORRECTION N=15 ___________________________________________________ 82 FIGURE 7.3 RAISED COSINE PULSE α = 0.6 SIMPLE CHANNEL CODING ____________________________________________________ 18 FIGURE 3.1 BASIC MODULATOR _________________________________________________________ 59 FIGURE 6.4 DPCM ENCODER _________________________________________________________ 16 FIGURE 2.5 DELTA MODULATION ________________________________________________________ 17 FIGURE 2.10 RECTANGULAR QAM_______________________________________________________ 34 FIGURE 4.7 QPSK WAVEFORM ________________________________________________________ 31 FIGURE 4.2 PAM SIGNAL.11 QAM MODULATOR ________________________________________________________ 34 FIGURE 4.7 TRUNK CABLE FREQUENCY RESPONSE __________________________________________ 44 FIGURE 5.5 ERROR CORRECTION N=31 ___________________________________________________ 83 4 .2 HYBRID FIBER/COAX NETWORK ________________________________________________ 41 FIGURE 5.11 TRANSMITTERRECEIVER FOR DIGITAL TELEVISION _______________________________ 53 FIGURE 5.13 64QAM BIT ASSIGNMENT __________________________________________________ 36 FIGURE 4.1 ENTROPY OF SOURCE _______________________________________________________ 12 FIGURE 2.3 PCM ____________________________________________________________________ 15 FIGURE 2.1 VECTOR MODEL OF COMMUNICATION SYSTEM _________________________________ 26 FIGURE 4.3 HFC NETWORK ____________________________________________________________ 42 FIGURE 5.5 FCC FREQUENCY ALLOCATION ________________________________________________ 43 FIGURE 5.15 NOISY SIGNAL CONSTELLATION ______________________________________________ 38 FIGURE 5.3 PAM CONSTELLATION _______________________________________________________ 29 FIGURE 4.5 RAISED COSINE PULSE α = 0.2 ANATOMY OF A CODEWORD __________________________________________________ 21 FIGURE 3.12 MPEG2 FRAME __________________________________________________________ 54 FIGURE 5.8 QAM CONSTELLATIONS _____________________________________________________ 33 FIGURE 4.2 DIGITAL COMMUNICATION SYSTEM ____________________________________________ 13 FIGURE 2.13 DIGITAL VIDEO STANDARDS _________________________________________________ 56 FIGURE 6.12 QAM DEMODULATOR _______________________________________________________ 35 FIGURE 4.1 DIGITAL COMMUNICATION SYSTEM MODEL _______________________________________ 6 FIGURE 2.4 RAISED COSINE PULSE α = 0 (IDEAL LOW PASS) _________________________________ 62 FIGURE 6.14 PM VS SNR FOR QAM & PSK ________________________________________________ 38 FIGURE 4.5 PASS BAND PAM __________________________________________________________ 31 FIGURE 4.9 FCC FREQUENCY DETAIL ____________________________________________________ 49 FIGURE 5.8 TRUNK COAX CONSTRUCTION _________________________________________________ 45 FIGURE 5.10 TRANSPORT PACKET FORMAT ______________________________________________ 53 FIGURE 5.1 CABLE NETWORK___________________________________________________________ 40 FIGURE 5.1 QAM MATLAB SYSTEM ___________________________________________________ 72 FIGURE 7.2 NO ERROR CORRECTION _____________________________________________________ 80 FIGURE 7.4 BASE BAND PAM __________________________________________________________ 30 FIGURE 4.5 ______________________________________________ 62 FIGURE 6.3 CLASS OF CHANNEL CODES ___________________________________________________ 22 FIGURE 4.3 ERROR CORRECTION N=7 ____________________________________________________ 81 FIGURE 7.4 COAXIAL CABLE____________________________________________________________ 43 FIGURE 5.1 SYSTEMATIC BLOCK ENCODER ________________________________________________ 21 FIGURE 3.6 DROP CABLE FREQUENCY RESPONSE ___________________________________________ 44 FIGURE 5.6 FULL RAISED COSINE PULSE α = 1 __________________________________________ 62 FIGURE 6.2 LOW PASS FILTER __________________________________________________________ 60 FIGURE 6. FSK.8 NATIONAL SEMICONDUCTORQAM SCHEMATIC ________________________________ 65 FIGURE 6.List of Figures FIGURE 1.9 TYPE C PHY ______________________________________________________________ 66 FIGURE 7.7 QAM ARCHITECTURE _____________________________________________________ 63 FIGURE 6.6 PSK ____________________________________________________________________ 31 FIGURE 4.
10 QASK CONSTELLATION _____________________________________________________ 89 5 .8 RF DATA _________________________________________________________________ 87 FIGURE 7.FIGURE 7.6 MAPPED DATA ____________________________________________________________ 85 FIGURE 7.7 XMIT FILTERED DATA ______________________________________________________ 86 FIGURE 7.9 FFT OF RCVR FILTER OUTPUT ________________________________________________ 88 FIGURE 7.
So we 2.1. perform compression of redundancy in a systematic manner and that is called source encoding.Chapter 1 QAM Demodulator Section 1. 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. Figure 1. 6 . 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. Examples • Speech/Audio • Image/Video • Telemetry • Computer Data Source Encoder: Messages from users are highly redundant.1 INTRODUCTION – DIGITAL COMMUNICATION SYSTEM A Demodulator for a Quadrature Amplitude Modulated signal with 64 symbol constellations for Cable Modem is designed.Chapter 3. Each block is defined below.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. Since we are looking to represent the source output with as few binary digits as possible this is also called compression.
In digitization of bandlimited signals. must pass to get to the Receiver.3. There are two classes of Channel encoders (a) Block Codes (b) Convolutional codes.Examples • CELP coding for speech/audio signals • JPEG coding for still images • LempelZiv universal lossless coding for test compression. However. In addition. medium. signals in the communication link are faced with a number of ills. Refer to Figure 4. there is always a cost associated with the process. 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”. we employ Nyquist Theorem to guarantee exact reconstruction. Examples • Air/Deep space Radio Frequency • Telephone twisted pair (POTS . See Figure 3. They are loosely called noise. also called LZ compression Channel Encoder: any coding for improved transmission over a physical 3. This is called distortion and it is NOT recoverable. any other source compression is realized at a cost of varying degree of imperfect representation. 7 . • • • PSK QPSK QAM Channel: This is any physical medium over which the Transmitted signal 5.1 for another perspective of a Discrete Data Transmission system with vector representation. 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.Plain Old Telephone System) • Ethernet • Fiberoptic Link (using a pulsed laser light) • CD Rom • Magnetic Disk Distortion & Noise: When analog signals are digitized and compressed 6. The main difference between Block codes and Convolutional codes is the existence of memory in Convolutional codes. Digital Modulator: This is one of many modulation schemes possible. 4.
functions Channel Decoder and Source Decoder are often lumped as Vector Detector as shown in Figure 4. modulator. Here the carrier is removed from the signal stream and the inphase and quadrature components (in the case of QAM) separated into two paths. The two 9. At this point the message is in its original format but may not be identical. 10. Channel Decoder: Perform inverse operations of Channel Coder Source Decoder: Perform inverse operations of Source Coder. etc. Examples: • • • • • • • • Additive Gaussian White Noise Device noise Atmospheric noise in the microwave channels Intersymbol interference in data communication systems Interspeaker interference in voice communications Nearend and Farend crosstalk Echoes in Link and chamber Friendly and unfriendly jammers. Digital Demodulator: This operation is the exact mirror operation of the 7. User: The final destination of the message. and thereby affects the rate of reliable communication. 8. This is referred to as the ˆ recovered message m .1. Return to Table of Contents TOC 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 F 9 . We shall see how this works. It is very important to realize that if the occurrence of the first event x2 tells us something about the event y3 then we have some knowledge or information about Y from X.ym} 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.….y3. It was a great scientist named Claude Shannon in 1948 who based on probabilistic models presented two papers that gave birth to Information Theory. Section 2. more so than we realize at first. and C written on the face. But when the events x2 and y3 are so tightly related such as in the following example then no information is conveyed. 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. It is this sort of thing we are doing with the random variables X and Y. It is worthwhile to appreciate that Shannon’s 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 Shannon’s theory. B.1 LOGARITHMIC MEASURE OF INFORMATION Say we have two discrete random variables X and Y which can take on values from X ∈ {x1.Chapter 2 DISCUSSION OF INFORMATION THEORY Rare events carry more information than common events Information is directly linked with probability. He discussed the basic problem of reliable transmission of information in statistical terms. There are only six possible outcomes so this is a discrete random event.x2. E. Say we have a blue card with the letters A. and a yellow card with letters D. 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. 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. 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. Now that’s information! The nature of information defined scientifically is explored next. 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.x3.y2.xn} and Y ∈ {y1.
Again nonsense. the occurrence of Y = yj provides no information about the occurrence of the event X = xi. I have told you nothing. Now we draw a card (faceup) and given that we pull the yellow card. yj ) are bits and when the base is e then the units of I ( xi. what is the probability that it also shows the letter E? Well this is of course P(E/yellow) = 1 . yj ) = log P( xi / yj ) P( xi ) eqn 2. The units of I ( xi. we know that it is impossible to do this. Similarly there is no information when P=0. The information content provided by the occurrence of the event Y = yj about the event X = xi is defined as I ( xi. yj ) are called nats (natural units). When X and Y are statistically independent.1 I ( xi.on it. Now for the definition of mutual information. We can start putting this is mathematical terms. When the base of the logarithm is 2 the units of I ( xi. written log() then divide by the log of 2 to base 10: 10 . yj ) is called the mutual information between xi and yj. On the other hand. yj ) are determined by the base of the logarithm which is usually selected as 2 but can be the natural base e . Note: when working with log2() it is easier to calculate the log to base 10. This is like saying “you know what? Astronauts are going to land on the surface of the Sun". So if I told you that I pulled a yellow card (given) and I have also pulled the letter E. or no information. Here is a basic review of probability: P( X = xi ) ≡ P( xi ) is read probability of the random variable X taking on the value xi is read conditional probability of X taking on the value xi P( X = xi / Y = yj ) ≡ P( xi / yj ) given that Y has occurred and is yi. when X and Y are fully dependent such that the occurrence of Y = yj determines the occurrence of X= xi the information content is simply that provided by the event X = xi. When do we have information? When there is some probability of event y3 occurring when x3 has occurred. A B C D E F 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). A suitable measure that satisfies these conditions is the logarithm of the ratio of the conditional probability.
301 When the random variables X and Y are statistically independent P( xi / yj ) = P( X = xi / Y = yj ) = P( xi ) because the probability of X is not affected by what happens to Y. To plot the graph we use log to base 10.2 becomes H ( X ) = −∑ log = log n n i =1 n When a general problem is considered where a source emits a sequence of statistically independent letters.2 where X represents the alphabet of possible output letters from a source and H ( X ) represents the average selfinformation per source letter and is also called the entropy of the source. P( xi ) However when the occurrence of Y = yj uniquely determines the occurrence of X = xi ie fullydependent. This is defined as H ( X ) = ∑ P( xi ) I ( xi ) but I ( xi ) = − log P( xi ) so that H ( X ) = −∑ P( xi ) log P( xi ) i =1 n i =1 n eqn 2. 1 In the special case when letters from the source are equally probable P( xi ) = n n 1 1 for all i eqn 2.1 becomes. the mutual information is zero. I ( xi. or is 1 with probability (1q). where each output letter is either 0 with probability q.log 2(a) = log 10(a) log(a ) = log 10(2) 0. yj ) = log P( xi ) = log(1) = 0 . yj ) = log I ( xi ) = − log P( xi ) What is even more important than the selfinformation is the average self information of the source H ( X ) . H ( X ) = −∑ P( xi ) log P( xi ) = −∑ P( xi ) log P( xi ) = −q log q − (1 − q ) log(1 − q ) i =1 i =1 n 2 Note: log in above eqn is in base 2.2. So equation 2. the conditional probability in the numerator of eq 2. so use the following eqn: 11 . The entropy of such a source is calculated using eqn 2.1 is 1 and so 1 P( xi / yj ) ) = − log P( xi ) Which is just the information of the = log( P( xi ) P( xi ) event X = xi and for this reason is called the self information of the event X = xi and is denoted as I ( xi.
6 0.6 0. 1 Entropy in bits/letter 0.2 0 0.8 H( q ) 0. 12 . the entropy H ( X ) of the source represents the average amount information emitted by the source.4 q Probability 0.8 1 Figure 2. Thus the entropy of a discrete source is a at q = 2 2 maximum when the output letters are equally probable.1 Entropy of Source Also note that when X is the output of a discrete source.301 0.301 Note from the graph in Figure 2.H (q) = −q log q log(1 − q ) − (1 − q ) 0.4 0.2 0.1 that the maximum value of the entropy occurs 1 1 where H ( ) = 1 .
This is important to discuss now. Source Source Encoder (analog to digital) Channel Encoder Digital Modulator Distortion & Noise Channel User Source Decoder Channel Decoder Digital DeModulator Figure 2. This converts the continuous time source into an equivalent discrete time source. Data compression is achieved at the cost of some distortion. However. The objective of source coding is to minimize the source bit rate while keeping the distortion tolerable. So each sample is quantized in amplitude to a finite number of levels. Why we do source encoding or sometimes called simply source coding is to remove redundancy in the input data. a continuous time source (analog source) has an output X (t ) that is characterized by a stochastic process. Thus the quantization process introduces some distortion depending on the method used. the amplitudes of the samples are continuous random variables and so each sample cannot be represented by a finite sequence of binary digits.Section 2. If the source output is bandlimited and the sampling is performed at Nyquist rate or higher we get no loss of information. Since an exact representation of an analog output requires an infinite number of bits quantization results in data compression.2 SOURCE ENCODING Please refer to 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 . There is more fundamental reasoning behind source coding when considering analog sources. 13 .2 for this discussion. Having discussed the measure for information. In the encoding of such a signal the first step involves in sampling the source periodically. The analog source is therefore reduced to a discretetime source having a finite number of levels or finite alphabet. We now examine the process of encoding the output of a source called source encoding.
When source coding is performed on a block of outputs the efficiency of the encoding method improves as the block size is increased. There are several source coding techniques used for analog sources and they are listed below. 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 H ( X ) . • • • • 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 2 R amplitude levels where R is the number of binary digits used to represent each sample.3. If R = 3 and we use a uniform quantizer then we get an input/output relationship as shown in Figure 2. When a block of samples is quantized jointly as a single vector the process is called vector quantization or block quantization. It is always more efficient to encode blocks of symbols instead of encoding each symbol separately.When each sample is quantized separately the process is called scalar quantization. 14 . 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).
125 ∆2 2 −2 R This leads to a mean square quantization error of E = = = 0. 15 . Telephone central office uses PCM codes with nonuniform quantizers (ALaw.3 PCM The unit delta should be replaced with ∆ in Figure 2. So for our example ∆ = 2 −3 = 0.8db for a 3bit quantizer. 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. 12 12 What this tells us is that for one added bit in the quantizer we reduce the error by 6db. DPCM exploits the redundancy in the samples to achieve a lower bit rate for the source output. So for a 7 bit quantizer error = 52. µ Law). For such signals we use nonlinear (nonuniform) quantizers that have more closely spaced levels for small amplitudes and widely spaced levels at large signal amplitudes.3 and then the step size of the quantizer is defined as ∆ = 2 − R .0013 12 12 Measured in db the mean square quantization error is: 2 −2 R ∆2 10 log 10 log E= = = −6 R − 10.8db = −28.8 db Many signals such as speech waveforms have the characteristic that small signal amplitudes occur more frequently than large amplitudes.Figure 2.
DPCM also achieves higher dynamic range and improved resolution as the encoder “looks at” tiny variations (resolution) and can follow large signals (dynamic range). Each value of the quantized prediction x x x error ~n is encoded into a sequence of binary digits and transmitted over the e channel to the destination. x e x i =1 p 16 . 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. ˆ ˆ Also. Sampler x(t) xn + e(n) Quantizer ~n e ~n x ~n ˆ x _ ~n ˆ x Predictor predicted _ value Figure 2. The prediction algorithm used is Levinson and Durbin’s. ~n = ∑ ai~n − i and en = xn − ~n .3 ˆ xn = ∑ aixn − i i =1 p eqn 2.3 ˆ where xn is the weighted linear combination of the past p samples and ai are the predictor coefficients. At the destination the same predictor that was used ˆ in the transmitter is synthesized and its output ~n is added to ~n to yield ~n .4 DPCM ENCODER The input to the predictor is denoted as ~n which is the signal sample xn modified x by the quantization process.
DM – DELTA Modulation Delta modulation can be viewed as a special case of DPCM in which a two level (1bit) quantizer is used in conjunction with a fixed first order predictor z − 1 . Instead of transmitting the samples of the source waveform to the receiver. In order for the approximation to be relatively good the waveform x(t ) must change slowly relative to the sampling rate. 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. Sampler x(t) xn + e(n) Quantizer ~ n = ±1 e _ ~n ˆ x Unit Delay ~n x ~n ˆ x z −1 predicted _ value Figure 2. This requirement implies that the sampling rate must be several (at least 5 ) times the Nyquist rate. To put it neatly. 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.5 Delta Modulation In effect the DM encoder approximates a waveform x(t ) by a linear staircase function. 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 17 . 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. the parameters of a linear system are transmitted along with the proper excitation signal. 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.
Systems that use channel coding are said to employ coded waveform signaling. So coding is a more bandwidth efficient way to improve the biterror rate. Higher bandwidth increases the noise introduced in the channel and if we simply increased M we would increase noise proportionally.1.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. 18 .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.2 emphasizes the analog to digital nature of source coding.synonymously. to lower Pe . One way to reduce the bit error rate ( Pe ) is to add more orthogonal signals (by introducing more symbols M ) but this increases the bandwidth required proportional to M . Channel Encoding is discussed in the next section and in more detail under Error Correction. Section 2. Coding results in a lower probability of error at the price of increasing the bandwidth and the complexity of the system. So in the case of digital signals we can go directly to the channel encoding methods. However. 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. 0 Encoder 1 000 111 001 010 100 011 101 110 Figure 2.6 below. With coding the gain in lower Pe comes at a lower cost of noise than with increasing M . The redundancy introduced at the transmitter aids the receiver in decoding the desired information bearing sequence. 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. The Communication model in Figure 2. 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. A SIMPLE EXAMPLE OF CHANNEL CODING Here is a simple example to illustrate how redundancy can be introduced.
So in short. Fixed length codes will be discussed in more detail but first let me get the Nonlinear codes out of the way. There are two major classes of codes 1. Some textbooks classify them as 1. Block Codes and 2. FIXED LENGTH CODES (LINEAR BLOCK CODES) Say we have M possible symbols that we would like to transmit using binary digits. introducing a memory (in the case of slidingwindow) and redundancy into the signaling process. This type of encoding is called entropy coding. Convolutional or Trellis Codes. Block Codes and 2. 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: k = log 2 M where 2 k = M and when M is not a power of 2 it is k = log 2 M + 1 Fixed length codes is the subject of Chapter 3 and this is discussed in more detail there. the probabilities of occurrence of the source letters are used in assigning the code words.where n > k . Please refer to Figure 3. VARIABLE LENGTH CODES (NONLINEAR BLOCK CODES) When the source symbols are not equally probable an efficient encoding method is to use variablelength code words. The process of channel coding produces modulator input symbols that are interrelated in either a block by block or slidingwindow fashion. Sliding Block codes but I prefer the former identification. 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. The amount of redundancy introduced by this is measured by the ratio k / n and is called the code rate Rc . 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. HAMMING DISTANCE The number of bit positions by which two codewords for a particular code are different is called the Hamming distance d H . Under block codes we have Fixedlength codes (Linear Codes) and Variable length codes (Nonlinear codes). An example of such encoding is the Morse code from the 1800s.3 for clarification and a quick synopsis of this. what is their Hamming distance? 19 . A modern day example of this coding is the Huffman code (1952). Example: Given two code words c1 = 101001 and c2 = 101110.
1 1 same 0 0 same 1 1 same 0 1 Different 0 1 different 1 0 different 3 bit positions are different so d H = 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 d H min . Return to Table of Contents TOC 20 .
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. k message bits n code bits Figure 3.1. transforms each information block u into the codeword v by a static time invariant digital system G(u). If a code is transmitted without being altered (ie parity bits are tacked on) it is called systematic encoding shown in Figure 3.1 Block Codes Block channel encoders are implemented by combinatorial circuits.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. This simple coder appends parity check digits so that the message appears unaltered in the codeword occupying the last k bits. Each codeword results from a unique message. Most block codes are systematic.k) block encoder over the field with N elements. The job of the encoder is to choose the nk digits called parity check digits.3. Refer to Figure 3. This mapping is independent from previous blocks (there exists no memory from one block to another). The decoder simply picks the last k digits to recover the message. In this project I shall discuss only Linear and Cyclic codes while the Convolutional codes will only be mentioned in passing. An (n. Section 3. An inverse circuit is used in the decoder.2 Anatomy of a Codeword 21 . A key point in block codes (as opposed to convolutional codes) is that each codeword is formed independently from other codewords. Figure 3.2.
The method by which convolutional codes are decoded is probabilistic and most often done using the Viterbi Algorithm. which moves over the sequence of information symbols in steps of K symbols. With each step of the sliding window. M is called the constraint length of the code and K is usually equal to 1. Hamming codes. The decoding of block codes is done using algebraic methods based on a special branch of linear algerbra called Galois 22 . the encoding process generates N symbols based on the M symbols visible in the window.3 Class of Channel Codes There are two methods of decoding (a) algebraic and (b) probabilistic.Section 3. The encoding process can be envisioned as a sliding window M symbols wide.2 Convolutional Codes Convolutional channel encoders are encoders with memory. Convolutional codes differ from block codes in that there are no independent codewords. Cyclic Hamming. The code rate is always k / n . Golay codes BCH. Hadamard codes. Cyclic Golay Figure 3. Most Convolutional codes are nonsystematic. Reed Solomon.
We then choose M = 2 k of these vertices as codewords. d H min then the number of errors that can be corrected is t ≤ (d H min − 1) / 2 and the number of errors that can be detected is ≤ d H min . Block length n = 2 m − 1 Number of message bits k = 2 m − m − 1 Hamming distance d H min = 3 For some integer m ≥ 3 23 . This is done by making the minimum Hamming distance d H min as large as possible. k ) bock code. and p is a prime number.3 Block Codes in Detail In general block codes break the data stream up into k − bit blocks and (n − k ) check bits are added to these blocks.11) code has 15 bit codewords. The goal is to choose parity bits to correct as many errors as possible getting as close to the theoretical limit of t ≤ (d H min − 1) / 2 while keeping the communication efficiency as high as possible (don’t use too much bandwidth). The vertices of the codewords should be chosen to be as far apart as possible to minimize the error probability. 4 bits of which (1511) are parity bits and the remaining 11 bits are data. Section 3. The general form of a Galois Field is GF(pM) where there are pM elements. and Golay codes. This is referred to as a (n. a (15. If we know the Hamming distance of a code. An encoder outputs a unique nbit code for each of the 2 k possible input k − bit blocks . Hamming Codes: A good example of Block codes with the special property given below are the Hamming codes. The idea of coding should be envisioned as creating an n dimensional hypercube in n dimensional space with 2 n vertices. Galois Field is needed only for nonbinary codes (in fact the binary codes are a special case of GF with M=2). For example. 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. Hadamard codes. Examples of Block codes are Hamming codes.(pronounced "Galua") finite fields. A linear block code is a k dimensional linear subspace of the n dimensional space. Note: 2 k < 2 n since k < n .
4) Hamming code.k) = (7.4) Hamming code.Some valid Hamming codes are: N K M 7 4 3 15 11 4 31 26 5 63 57 6 127 120 7 255 247 8 511 502 9 1023 1013 10 2047 2036 11 4095 4083 12 8191 8178 13 16383 16369 14 32767 32752 15 Consider the example of a (7.4) Syndrome 000 100 010 001 110 011 111 101 Error Pattern 0000000 1000000 0100000 0010000 0001000 0000100 0000010 0000001 Table 3. Since (n.2 Decoding Table Error in bit position No errors 1 2 3 4 5 6 7 24 .1 Code Words for (7. Message Word 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Code Word 0000000 1010001 1110010 0100011 0110100 1100101 1000110 0010111 1101000 0111001 0011010 1001011 1011100 0001101 0101110 1111111 Table 3. k ) = (7.4) Hamming Code Correcting an error Here is a listing of Code words for a (n.4) the last condition of m ≥ 2 is satisfied n = 7 = 2 m − 1 so m = 3 k = 2m − m −1 = 4 Code rate Rc = k / n = 4 / 7 Example of (7.
The syndrome vector s is calculated from s = rH T In the syndrome table Table 3. 1100010 0010000 1110010 (which is the same as the =3 Since we can correct only t ≤ (d H min − 1) / 2 errors. Received vector: Error Pattern: Corrected vector original transmitted vector). To correct the error we add the received vector to the error pattern and get the corrected vector.2 above the matrix HT 100 010 001 Is known and so s = [1100010]110 = [001] . for Hamming codes d H so (d H min − 1) / 2 = (3 − 1) / 2 = 1 we can only correct 1 bit error. so we look for the error pattern for the 011 111 101 syndrome [001] in Table 3.2 and it is [0010000] which tells us that bit 3 is in error. We realize by inspection that bit 3 is wrong. min 25 . The error correction circuit needs to do this via the algorithm as follows.Now say we transmit a [1110010] and receive r = [1100010] instead.
The message source generates messages mi which are binary bits.1 Discrete Data Transmission A Discrete data transmission system involves transmission of one of a finite set of messages over a communication channel. Refer to Figure 4. A vector encoder converts each message mi into a symbol xi. and wants to communicate with the message sink at the receiver. The receiver must determine the message sent (estimate m ) and provide it to the message sink. Message Source mi Vector Encoder Modulator xi Symbol xi(t) Transmitter Channel ˆ m Message Sink Vector Detector y DeModulator y(t) Receiver Figure 4. which is a real vector (in signal space).1.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. 26 . The source must select which of the allowed messages in a finite set that the transmitter sends over the communication channel.Chapter 4 DATA MODULATION & DEMODULATION Section 4.
When the mapping from the digital sequence {an} 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 memoryless. or a set of discrete phases (PSK). In the transmission of digital information over a communication channel. 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. In general the conversion of a discrete data signal into a continuous time analog signal is called digital modulation.Modulation is a procedure for converting the encoder output vectors into analog waveforms for transmission over a physical channel. The output of the carrier modulator is a passband signal that can be represented as follows: s (t ) = Re{v(t )e j 2πfct } eqn 4. In digital modulation the modulator maps the sequence of binary digits into a corresponding set of discrete amplitudes (PAM). Section 4. There is a set of possible M signal waveforms xi(t) that is in direct onetoone correspondence with the set of M messages. the modulator is the interface device that maps the digital information into analog waveforms that match the characteristics of the channel. This estimate from the detector is m . 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.1 Where fc is the carrier frequency and v(t ) is the baseband informationbearing signal. or the carrier frequency (frequency modulation – FM). 27 . The mapping is performed by taking blocks of k = log 2 M binary digits at a time from the information sequence {an} and selecting one of M waveforms for transmission over the 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. See Figure 4. its FSK version and then its PSK signal.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).2 for an example of a binary PAM message signal. or a set of discrete frequencies (FSK).
Figure 4. & PSK 28 .2 PAM Signal. FSK.The signal waveform v(t ) 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.
2.2 Where { Am. m = 1. 4 and 8. M } are the M possible signal amplitudes corresponding to the M = 2 k possible k bit blocks or symbols.... The signal waveform is then.. The symbol rate is the rate at which changes occur in the amplitude of the carrier to reflect the transmission of new information.2. Note that this is a onedimensional modulation scheme.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 space diagram of PAM is shown in Figure 4.. M eqn 4.. Figure 4.3 PAM Constellation 29 .3 for M =2. sm (t ) = Re{ Amu (t )e j 2πfct } m = 1. Suppose the bit rate is R bits/sec then the symbol rate is R / k ... u (t ) is a real valued signal pulse whose shape constitutes a signal design problem when there is a band limited channel.
. M ˆ And uses half the bandwidth of the DSB version. M eqn 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.2) sm (t ) = Re{ Amu (t )e j 2πfct } is a double sideband (DSB) signal and requires twice the channel bandwidth of the equivalent lowpass signal for transmission.Digital PAM can also be used for transmission over a channel that does not require carrier modulation.... There is a single sideband (SSB) PAM that is given by ˆ sm(t ) = Re{ Am[u (t ) ± ju (t )]e j 2πfct } m = 1.3 Since there is no carrier this is called a baseband signal.2.. Figure 4.4 Base Band PAM 30 ... In this case the signal waveform is simply Am (t ) = Amu (t ) m = 1.2. u (t ) denotes the Hilbert transform of u (t ) .5 The PAM carrier modulated signal (eqn 4.. Figure 4.
M − 1 .1.. When M = 4 the phase difference works out to 90 and this is called QPSK. 4. Because the range of the carrier phase is 0 ≤ θ ≤ 2π . the phase of each of the M symbols is θk = 2πk / M where k = 0.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. and 8. PSK is a 2 dimensional modulation scheme.7 QPSK Waveform 31 .. This is shown in Figure 4..6 PSK Figure 4.Figure 4. Figure 4..6 for M = 2.2 for M=2.
4th).6 where M is the total number of signal points in two dimensional space. θm = tan −1 Figure 4. In other words. Furthermore. 3rd. 2nd.10 several different signal space diagrams for QAM are shown for M = 4. In Figure 4. QAM is a 2 dimensional modulation scheme.5 it is apparent that QAM signal waveforms are a form of combined amplitude and phase modulation.The QPSK waveform is shown in Figure 4. To see why eqn 4. QAM QAM modulates the phase and the amplitude of the carrier.7 where T is the symbol period. 1 symbol takes 6 bits to represent. M eqn 4..2. 8.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.0) are used to find which symbol within that quadrant was transmitted. 2 of these six bits are used to decode the quadrant (1st. As shown in Figure 4..4 where Amc is the signal amplitude modulated by the cosine carrier and Ams is the signal amplitude modulated by the sine carrier. 6 bits are used to map into the 64 possible symbols.. The signal waveforms are sm (t ) = Re{( Amc + jAms )u (t )e j 2πfct } = Amcu (t ) cos 2πfct − Amsu (t ) sin 2πfct m = 1. So in the case of 64 QAM.4 is a phase and amplitude modulation scheme we can rewrite eqn 4.. 16. The resulting modulation technique is called quadrature PAM or QAM (quadrature amplitude modulation).4 as sm(t ) = Re{Vme jθm u (t )e j 2πfct } = Vmu (t ) cos(2πfct + θm ) where Vm = Amc 2 + Ams 2 and eqn 4..2.8 shows various QAM constellations and how many bits are needed to modulate the data.1. M eqn 4..2. 32 . Abrupt changes in phase may seem like mathematical absurdities but these phase changes are actually continuos but very rapid. The bandwidth efficiency of PAM/SSB can also be obtained by simultaneously impressing two separate k bit symbols from the sequence {an} on two quadrature carriers cos 2πfct and sin 2πfct . The phase angle θm for each constellation (M) can be calculated from θm = 2π (m − 1) M m = 1.. They are always shown as abrupt in textbooks..5 Ams Amc From eqn 4. 32 and 64.
9 Modulated Waveforms 33 .8 QAM Constellations Figure 4.“Constellations” QPSK (=4QAM) 1 symbol ➛ 2 bits 2 16QAM 1 symbol ➛ 4 bits 4 64QAM 1 symbol ➛ 6 bits 6 6 256QAM 1 symbol ➛ 8 bits 8 6 Figure 4.
Figure 4.11 and the Demodulator is shown in Figure 4.12.3 QAM Schematic The schematic of a QAM modulator is shown in Figure 4. Figure 4.11 Qam Modulator 34 .10 Rectangular QAM Section 4.
Figure 4.12 Qam Demodulator 35 .
The signal constellation in a noisy QAM system is depicted in Figure 4.15. The starting point of this discussion is the probability of error in a PAM system given by 1 M )Q( 3 Eav ) M − 1 No P M = 2(1 − eqn 4.7 and the above is related to the probability of correct decision in a Mary QAM.Figure 4. For rectangular k constellations in which M = 2 where k is even the QAM signal constellation is M = 2k / 2 equivalent to two PAM signals on quadrature carriers each having signal points. 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.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. Pc as follows: 36 .13 64QAM Bit Assignment Section 4.
1). So for k = odd we calculate an upper bound on PM .10 is exact for k = even but if k = odd in M = 2 k we have no equivalent M ary PAM system. This is the exact form of the probability of error in a QAM system.9 PM = 1 − [1 − 2(1 − where PM = probability of symbol error in QAM Mary M = # of symbols Eav = SNR.8 where P M is the probability of a symbol error in M ary PAM with 12 the average power in each quadrature signal of the equivalent QAM system. PM = 1 − Pc = 1 − (1 − P M ) 2 Substituting eqn 4. 3 Eav 2 1 ) ≈ 1 . Since the probability of making a wrong decision is 1 – probability of making the correct decision. this has with the simplification (1 − )] M − 1 No M the effect of overestimating PM so it is okay to do so.0.7 into eqn 4.9 eqn 4.11 37 .Pc = (1 − P M ) 2 eqn 4. signal energy/noise energy No Q( ) = erf function which can be calculated using a table or solved in MathCad using Q(x) = 1 – pnorm(x.10 3 Eav 3 Eav ) − 4Q 2 ( ) M − 1 No M − 1 No 3 Eav 3 Eav 3 Eav ) − 4Q 2 ( ) ≈ 4Q( ) M − 1 No M − 1 No M − 1 No for k = odd Further simplification 4Q( gives PM ≤ 4Q( 3 Eav ) M − 1 No eqn 4. PM ≤ 1 − [1 − 2Q( PM ≤ 1 − [1 − 4Q( PM ≤ 4Q( 3 Eav 3 Eav ) + 4Q 2 ( )] M − 1 No M − 1 No 1 M )Q( 3 Eav 2 )] M − 1 No eqn 4. Now eqn 4.
14 Return to Table of Contents TOC 38 .Figure 4.15 Noisy Signal Constellation The probability of error for various modulation schemes is shown in Figure 4.14 PM vs SNR for QAM & PSK Figure 4.
the distribution (or feeder) cable in the neighborhood.1).Chapter 5 Cable Modem Introduction Section 5. 2.the drop cable to the home and inhouse wiring. The term Cable modem has since the initial writing of this project changed its meaning and it was intended to refer to a highspeed video modem. and 5. Actual implementation involves many other blocks and will be covered in detail later. Other standards that may apply are the European DVBC standards (Digital Video broadcasting) and the DAVIC standard (Digital AudioVisual Council) which is also a European standard.the headend. Due to the availability of the IEEE802. It is hoped that this standard will be adopted and companies can begin competing in the video modem arena.2 Structure of Cable systems The basic structure of a cable system is a simple one (see Figure 5.14 (not released yet). A cable modem as the term applies today is a very highspeed modem for Internet access over a cable CATV present in a lot of homes in the USA today. The head end gathers signals from various sources such as satellite dishes and highgain antenna. Contrasted with the kind of modem we are used to talking about in the context of telephone line modems which are very slow indeed.14 in draft form this design concerns mostly with this standard. 4.the trunk cable. Section 5. A simpleminded view is as a modulator (at the transmitting end) and a demodulator (at the receiving end).1 Definition of Cable Modem Cable Modem A cable modem is a highspeed device for digital transmission of bits over a coaxial cable. 39 . called POTS modem for Plain Old Telephone Modem. The head end is the source in a central facility that broadcasts signals onto the cable network. 3. However in this project the term Cable modem refers to modems used in digital cableTV settop boxes whose FEC (Forward Error Correction) is compliant with the IEEE802. Perhaps I should have chosen the title "Video Modem design".the settop box equipment (consumer electronics). There are five major parts to a cable system: 1.
The distribution network is coax and is bridged off the trunk.Figure 5. Here is the surprising part. Optical transmission of digital data (fiber) can go much longer before requiring reamplification. Where does the power for the amplifiers come from? Answer: from the cable itself! A 60V. The subscriber drop line is taken from the distribution network by tapping the line and is no more than 150200ft.2 and in a broader context of networks in Figure 5. At times the power is taken from a telephone pole transformer and fed into the cable midway and this is why cable 40 . This combination is called a hybrid fiber coax (HFC) shown in Figure 5. This trunk amplifier in the case of an analog signal adds noise. The distribution network is the “neighborhood network” and amplifiers here are called line extenders. 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).3. This simplifies the trunk architecture and reduces the noise that is introduced. For the same length of coax cable and fiber. 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. coax can have 500 times more attenuation than the fiber.1 Cable Network The trunk network is made of a larger coax and in fact today an optical fiber is used for this. This tap is at the curb usually inside an underground service box. Power is not carried beyond the distribution networks into the subscriber drop.
Figure 5.service may be interrupted during a power failure in a certain neighborhood even when the Cable Company has emergency generators.2 Hybrid fiber/coax network 41 .
3 HFC Network 42 .Figure 5.
The graphs show the attenuation for a 100ftlength cable over various frequencies. The characteristic impedance of this cable is 75 Ω . For the frequency response of a drop cable see Figure 5.7. Oregon. see Figure 5.CATV stands for Community antenna television. If channel 2 is attenuated 10db in 1000ft then channel 13 will be attenuated 20db (see Figure 5.6 and for that of a trunk cable see Figure 5.5). The logarithm of the attenuation of cable (db) varies with the square root of the frequency. It consists of a copperclad steel center conductor inside an insulating foam dielectric material surrounded by a braided wire and/or metal foil. Figure 5. So the attenuation at 216Mhz (channel 13) is twice that of 54Mhz (channel 2) since the frequency is four times as great.4 Coaxial Cable Figure 5. Cable does have a high loss and it depends on the frequency of interest.5 FCC Frequency Allocation 43 . It was first built in 1948 by Ed Parson of Astoria.4 and Figure 5. Finally a plastic sheath protects the contents from damage. It can be seen that the trunk cable has a higher performance than the drop cable.8.
6 Drop Cable Frequency Response Trunk Cable 10 Attenuation (db/100ft) 1 0.1 1 10 Frequency (Mhz) 100 3 1 10 Figure 5.Drop Cable 10 Attenuation (db/100ft) 1 0.1 1 10 Frequency (Mhz) 100 3 1 10 Figure 5.7 Trunk Cable Frequency Response 44 .
Figure 5.8 Trunk Coax Construction 45 .3 Cable Specifications TRUNK CABLE SPECIFICATIONS courtesy of CommScope.Section 5.
46
DROP CABLE SPECIFICATIONS Cable type RG58/U Used In Ethernet (but not recommended due to improper shielding) RG58A/U or RG10 Base2 CSMA/CD (Thin 50 Ω 58C/U wire Ethernet) RG59/U CATV (cable TV) 75 Ω RG62/U IBM 3270 terminals, 93 Ω ARCnet RG stands for radio guide as the cable guides radio frequency signals. The /U means general utility. Characteristic Impedance 53.5 Ω
47
48
Figure 5.9 FCC Frequency Detail 49 .
3 hours 1. Modulation rate refers to the rate at which the symbols are transmitted over the physical medium.Section 5. or 4.4Kbps Telephone Modem 28. 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). Bitrate. Modem Speed The units can be confusing to a new comer so here is a quick summary.8Kbps Telephone Modem 56Kbps Telephone Modem 128Kbps ISDN Modem 1.5x106 Baud then it translates into 6bits / Baud 50 . the French engineer who constructed the first successful teleprinter. and named after J. In 64 QAM which is one of the modulation schemes in the downstream Digital Video DVBC standard and IEEE802. The unit of data rate or bit rate is bits/sec. Baudot (18451903). The relationship between Baud and bitspersec depends on the number of bits used to make up a symbol. it takes 6 bits to make up a symbol. So the relationship between bits per sec (bps) and Baud (symbols/sec) is Baud = bps 6bits / Baud For 64 QAM Example: If we are using a 64 QAM modulation scheme and we have 27 Mbps 27 Mbps = 4. A symbol is a unique state of the communication channel. The symbol rate (called Baud or loosely Baud rate) is about 3000 Baud. The term "baud" was originally a unit of telegraph signaling speed. the reciprocal of the duration of the shortest signaling element.4 Baud.5 hours 46 minutes 24 minutes 10 minutes 52 seconds 20 seconds 8 seconds 2. Or.5MBaud . more generally.54Mbps T1 Connection 4Mbps Cable Modem 10Mbps Cable Modem 30Mbps Cable Modem TRANSFER TIME 2. For example. set at one Morse code dot per second. Data rate refers to the rate at which bits are transmitted over the physical medium. It was proposed at the International Telegraph Conference of 1927.M. distinguishable by the receiver from all other possible states.14. The unit of modulation rate (also called signaling rate) is baud or symbols/sec. Comparison of speed of transferring a 10Megabyte file over different modems: MODEM SPEED / TYPE 9.7 seconds POTS modems are modems used for modulating digital data inside a computer onto an analog phone line.6Kbps Telephone Modem 14.E.
In 1988 the process of creating a universal audio and video compression standard was started by the Motion Pictures Expert Group. This is great news for the FCC as they can sell more channels in the same space. 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. HDTV will contain seven times more information than what today's format allows. Also. High definition TV changes all that. an international group of industry experts set up to standardize compressed moving pictures and audio. This is why computer monitor pictures appear sharper. HDTV uses 1080 interlaced lines or 720 progressively scanned lines on a 16:9 aspect ratio screen. Most stations in the Bay area are going to transmit some digital channel by Nov 1999. A little history is in order. Computer monitors on the other hand use 480 lines and display all 480 lines from top to bottom without interlacing. This 6Mhz bandwidth can accommodate 36 Mbps under the adopted ATSC standard for digital TV. SDTV stands for Standard Definition Television. so around 4 digital TV channels can be safely supported in a single channel without congestion. and green colors. Section 5. In 51 . 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. This gives the present TV its flicker and is called the interlaced format. blue. With compression these bit rates can be in the 27x106 bits/s range.5 Digital TV Standards HDTV Current TV sets display 480 lines of information with the 240 oddnumbered lines being scanned from top to bottom first and then the 240 evennumbered lines are scanned next. MPEG2 Compression standard for moving images conceived by the Motion Pictures Expert Group. 480 lines progressive scanning. That’s nearly 100Mhz of analog signal and would require more than a gigabit (109 bits) per second of straight digital transmission if no compression was used. the minimum frames per sec are 60fps or up to 85fps in some highend monitors. The aspect ratio of today's TV sets is 4:3. Each set of odd and then even lines is scanned 30 times a sec. This is called progressive format.A Digital TV channel bandwidth is 6Mhz (based on the current analog NTSC allocation). SDTV This is HDTV in a standard resolution comparable to the existing standard but of course digital i.e. Audiovisual signals with standard resolution can be compressed using MPEG2 to sustainable rates of around 6 Mbps.
11. Modulation Methods Two main competitors are Quadrature amplitude modulation (QAM) and Vestigial sideband (VSB) modulation.5 Mbps. so in order to create one standard for many different applications. the standard does not define a standard encoder or decoder.. It is illustrated in Figure 5. The MPEG2 is a more advanced standard supporting higher picture resolutions for HDTV and DVD (Digital Video Disk). To ensure the support of many different equipment and chip vendors.10. framerates and resolutions in the MPEG standard. The MPEG standard also has a major drawback. which forms the payload of the packet. framerates and resolutions necessary for specific applications.14. many different standards are created with one common name: MPEG. the encoder transport subsystem is responsible for formatting the encoded bits and multiplexing the different components of the program for transmission. program and system 52 . The transport resides between the application (e. Because of the many available bitrates. Applications supported include video. Cable companies are deploying 64QAM (with 27 Mbps) because it maps one 27 Mhz satellite transponder capacity in one 6 Mhz channel (allocated by FCC). The MPEG2 compressed signal rides on a mass transitlike system already developed for ATM networks. Other competing standards are Indeo. the MPEG hardware vendors choose to support only a few of those different bitrates. audio or video) encoding/decoding function and the transmission subsystem. A 16VSB system tested by ATTC (Advanced Television Test Center) delivered 38. audio. At its lowest layer. These different solutions are not interoperable. but only the coded bitstream.6 Overview of transport subsystem There are several transport methods.g. Each header identifies a particular application bit stream (also called an elementary bit stream). This standard is already being used in the VideoCD and CDI products. it is responsible for recovering the bit streams for the individual application decoders and for the corresponding error signaling. This is called the Packet Transport. data.1990 the MPEG1 standard was derived. One way is to use the ATM network and is supported in the IEEE802. Section 5. The data transport mechanism is based on the use of fixedlength packets that are identified by headers. Everyone must work within the 6 Mhz bandwidth allocated. At the receiver. Quicktime and Cinepack. The organization of a digital television transmitterreceiver pair and the location of the transport subsystem in the overall system is shown in Figure 5.
11 TransmitterReceiver for Digital Television 53 . The elementary bit streams for video and audio are themselves wrapped in a variablelength packet structure called the packetized elementary stream (PES) before transport processing.control information. etc.10 Transport packet format Figure 5. and synchronization of decoding and presentation of the individual application. Figure 5. The PES layer provides functionality for identification.
The MPEG2TS framing is shown in Figure 5.7 MPEGTS Transport Stream The preferred method for video is to use the MPEG2TS framing structure and not use the ATM format.14 supports both formats. So a total of 1504 bits are used to make up an MPEG2TS packet.14 spec. This too is poorly understood and not described in the spec.12 MPEG2 Frame 54 . The next four bits are CC (continuity counter) which keeps the packet identified with the program id. The TS stands for transport stream. The IEEE802. The next bit is PUSI (payload unit start indicator) and is reserved for future use. The next field is 1 bit TEI and shows the mpeg decoder if the entire packet has an error. The next 13 bits are the program id (PID) and is set to 0x1FFD. The next two bits are AFC (adaptation field control) which is not discussed at all in the IEEE802. Figure 5. The first octet (byte=8bits) is the SYNC field used to recognize the beginning of the transport stream. The next bit is TP (transport priority) and can be used in giving some packets higher priority. Finally the payload! The next 184 octets (1472 bits) are used to deliver the payload (video data).12. The next 2 bits are TSC (transport scrambling control) which is 00 for now (reserved).Section 5.
However there are companies developing Digital ST boxes for CATV. and a descrambler chip. QAM is still an open standard for the cable industry promoted by a number of settop box manufacturers such as General Instruments. The return channel is similar to the analog addressable ST box. mixedsignal demodulator for intermediatefrequency (IF) processing. This return channel enables subscribers to obtain a variety of services at their fingertips. Most boxes also have 8bit controllers and associated memory for internal and remote control functions.Section 5. as the true digital television receiver has not yet arrived. Key components in a basic analog settop box include an RF tuner. SECAM) for today's television. The return channel uses Quadrature Phase Shift Keying (QPSK) or Frequency Shift Keying (FSK) demodulation techniques. The decompressed (MPEGII) video and audio signal has to be up converted to NTSC (or PAL. The CATV return channel will be about 100K bps. 55 .8 SetTop Boxes Basic Analog Boxes Today settop boxes in homes are analog and the RF signal coming in is demodulated to recover the analog signal. and other online services such as stock quotes. LowEnd Interactive Digital Boxes At the present time it seems that most digital settop (ST) boxes will be used for satellite transmission. There are audio/video amplifiers and a standard UHF channel modulator to communicate with the NTSC television set. including payperview programs. except in the case of satellite ST box which uses a conventional telephone modem. sports scores. These ST boxes will utilize MPEGII decompression technology to increase the number of channels possible. weather and home shopping. These settop boxes have a return channel to the CATV headend station. Digital audio will range from CDquality in the lowend box to Dolby surround sound quality in the highend boxes. online program guides. AnalogAddressable Interactive Boxes A great deal of development activity is currently focused on analogaddressable interactive settop boxes. bulletin boards. VSB is a proprietary standard backed by Zenith. In the satellite ST box demodulation will be done with QPSK and in CATV boxes it will be QAM or Vestigial Sideband (VSB).
They will be capable of displaying 3D graphics. A RISC or CISC microprocessor with 16Mbytes of RAM will be common.5 Mbps. but with transmission rates of 1.e.13 Digital Video Standards 56 . These boxes will have flexible and upgradeable features since they have microprocessors and software in them. i.HighEnd Interactive Digital Boxes Highend interactive digital boxes are strictly for CATV at the moment. The return channel will be similar to the Lowend interactive digital boxes. using QPSK or FSK (in some cases). Figure 5.
atsc. An alternative to cable and analog satellite reception initially utilizing a fixed 18inch dish focused on one or more geostationary satellites. a coding system like Dolby Digital is essentially a form of very selective and Powerful noise reduction. using approximately 13:1 compression. now also Dolby D): The approved 5. Left Rear (or side) Surround. including digital high definition television (HDTV). As a result. Community antenna television. Digital Video broadcasting (European) Digital Video broadcasting for Cable CATV DAVIC DCT DSS DVB DVBC 57 . Digital AudioVisual Council Discrete Cosine Transform. Formed to establish technical standards for advanced television systems. Digital satellite system. In this key respect. Dolby's third generation audio coding algorithm (originally called AC3) is such a coder. Six discreet audio channels are used: Left. especially when multiple channels are required. DSS units are able to receive multiple channels of multiplexed video and audio signals as well as programming information. Reducing or eliminating coding noise wherever there are no audio signals to mask it can subjectively preserve the sound quality of the original signal. amplitudes. and related data. and a subwoofer.1 channel (surroundsound) audio standard for ATSC digital television. The bit rate can range from 56 Kbps to 640 Kbps. one finds that the digital audio coding used yields an amount of data too immense to store or transmit economically.Glossary of terms ATSC AC3 ATSC: Advanced Television Systems Committee. 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. Right Rear (or side) Surround. 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. 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. Center. Email. When moving from analog recording to a digital recording medium. optimized with respect to the frequency selectivity of human hearing. new forms of digital audio codingoften known as "perceptual coding"have been developed to allow the use of lower data rates with a minimum of perceived degradation of sound quality.org/ Dolby Digital (formally Dolby AC3. Internet: http://www. DSS typically uses MPEG2 encoding. JPEG and DV depend on DCT. and colors. Right.
however can be used to display ATSC formats on a PC National Television Standards Committee Quadrature Amplitude Modulation Quadrature Phase Shift Key Society of Motion Picture and Television Engineers. the data rate of CDROM.smpte.035line interlace and 1. This generates the motion vectors that are then used to place the macroblocks in decoded pictures. . JPEG is a standard for the data compression of still pictures (intrafield). The main interest for the television industry is in MPEG1 and MPEG2. Officially a format is high definition if it has at least twice the horizontal and vertical resolution of the standard signal being used. Compression standards for moving images conceived by the Motion Pictures Expert Group. Its work follows on from that of JPEG to add interfield compression.HDTV JPEG MPEG MPEG1 MPEG2 MPEG4 NTSC QAM QPSK SMPTE High definition television. However the quality is not sufficient for TV broadcast.125. http://www.2 Mbits/sec.and 1. There is a debate as to whether 720line progressive is also high definition.080. ISO/ITUT.080line progressive formats in a 16:9 aspect ratio. Four MPEG standards were originally planned but the accommodation of HDTV within MPEG2 has meant that MPEG3 is now redundant.org Return to Table of Contents TOC 58 . usually four. Joint Photographic Experts Group. which are analyzed during MPEG coding to give an estimate of the movement between frames. MPEG2 is the basis for ATSC digital television transmission. A professional organization that sets standards for American television. 1. MPEG4 is intended for unrelated applications. extended and "loss less" encoding. JPEG uses DCT and offers data compression of between two and 100 times and three levels of processing are defined: the baseline. MPEG1: A group of picture blocks. In particular its work has been involved with pictures coded to the ITUR 601 standard. This was designed to work at 1. an international group of industry experts set up to standardize compressed moving pictures and audio. the extra compression potentially available through similarities between successive frames of moving pictures. so that video could be played from CDs. Typically 1.
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). D/A convert it and output an analog signal ready to be mixed up to a final radio carrier frequency of several hundred megahertz. If the DAC frequency is 8B. 3 bits for the I and 3 bits for the Q. If the IF is centered at the symbol rate B. then a DAC frequency of 8B is needed. then 7 zeroes must be inserted between each symbol.1 Basic Modulator To understand the demodulator one must first understand the modulator basics. mix it up to be centered at either 5 MHz or 10 MHz (digital sine/cosine generator). The desired sample rate is a function of the IF signal frequency and its bandwidth. 59 . A typical application would be a 5 MBaud (5 million symbols per second) 64 QAM modulator for a digital television transmitter. then a DAC frequency of 4B is adequate.1 Basic Modulator The basic functions of a QAM modulator are shown in Figure 6. The symbols are zero padded to generate a data stream at the desired sample rate for the final digital to analog converter (DAC). If the excess bandwidth of the Nyquist filter is α .1: The bit stream is formatted into symbols consisting of Inphase (I) and Quadrature (Q) words. ±3. The I and Q values for 64 QAM are ±1. then the DAC frequency must be at least twice (F + (1+ α )B/2). If the DAC frequency is chosen as 4B.Chapter 6 Modem Design Section 6. The modulator will Nyquist filter (pulse shape) the QAM signal. and the IF signal’s center frequency is F. If the IF center frequency is 2B. The pulse shape filter is typically the raised cosine pulse defined in eqn 6.1 below. This means that the DAC frequency must be greater than (2F + (1+ α )B). ±5 and ±7. BIT STREAM IN 30 Mbps I FORMAT INTO SYMBOLS ZERO PAD PULSE SHAPE FILTER Mixer Q ZERO PAD PULSE SHAPE FILTER 20 Mhz (IF=5 Mhz) DIGITAL SIN/COS OSC D/A IF SIGNAL OUT 20 Mhz CLOCK SYNTHESIZER 30 Mhz =(6bitsx5Mhz) FDAC=20 Mhz =(4 x 5Mhz) Figure 6. A 64QAM symbol uses 6 input bits per symbol. then the zero pad circuit must insert 3 zeroes between each symbol.
Typically N is less than 30 for a DAC frequency of 4B and is less than 60 for a DAC frequency of 8B. 60 . The lowpass filter’s passband extends from 0 to (F + (1+ α )B/2) and its stop band starts at FDAC . is set so that the value of p(t) in eqn 2. If the DAC frequency is 8B.1 Where α sets the excess bandwidth of the pulse and Ts is the symbol time spacing and baud rate B = 1/T. then the pulse filter will use the impulse response h(k) = p(kT/4) for k = N to +N.1 is sufficiently close to zero for k > N. The length of the filter is 2N+1. A lowpass filter smoothes the DAC output. The I/Q signal coming from the pulse shape filters is mixed up to the desired IF center frequency as shown in Figure 6. πt απt sin cos Ts Ts p (t ) = πt 2αt 2 1 − Ts Ts eqn 6.(F + (1+ α )B/2) F+(1+ α )B/2 FDAC – F(1+ α )B/2 Figure 6. If the DAC frequency is 4B.1. and hence the length of the filter. The real part of the mixer output is retained and sent to the DAC.2 Low Pass Filter DAC frequency FDAC is calculated on the next page for our case. then h(k) = p(kT/8). The value of N.
175 Mhz Stop_band (1 α ). j.3 Raised Cosine Pulse α = 0.5 (50% excess bandwidth) is a realistic filter with some tradeoff between excess bandwidth and pulse rate.mcd B 5 Baud rate (Mhz) Dac_freq Dac_freq = 15.13 ( 2 .B ) DAC = Rajat Sewal DAC_freq..65 4B = 20 Mhz. B 2 B 2 Stop Band starting at 3B(1+ α )B/2 Pass_band = 7. 0. A cable system uses typically α = 0. The case of α = 1 is called full cosine rolloff and the excess bandwidth is 100%.5.B (1 α ).DAC Frequency α 0. sin(x)/x response.. 1. Mhz If the DAC frequency is 4B and the IF is B.F F (1 5 IF center frequency (Mhz) α ) .6 for α = 0 .5 p( t ) 0 0.825 Stop_band = 12. the case of α = 0.5 10 5 0 5 10 Figure 6. The case of α = 0 (0 excess bandwidth) is ideal low pass.5.. and 1. then the mixer frequency is e which is simply the sequence (1.13 61 .3 and Table 6. Figure 6. 1 π j n 4 0. or if the DAC frequency is 8B and the IF is 2B. j. This means that the mixer only needs to make sign changes and to multiplex between the I and Q filter outputs. Also Mhz so we can use 20 Mhz ie F note that F=B Low Pass Filter Pass Band from 0 to (B+(1+ α )B/2 Pass_band B 3 .).4 .1).13 (please see Figure 6. Three different raised cosine pulses are shown in Figure 6. and Figure 6.
4 Raised Cosine Pulse α = 0 (ideal low pass) 1 0 t 5 10 0.5 p(t) 0 0.5 p( t ) 0 0.5 10 5 0 5 10 t Figure 6.6 Full Raised Cosine Pulse α = 1 62 .5 Raised Cosine Pulse α = 0.5 10 5 t 0 5 10 Figure 6.5 1 0.5 p( t ) 0 0.5 10 5 Figure 6.1 0.
The output is then fed into an AGC circuit whose gain is controlled by the output of the ADC (analog to digital converter).7. Because of its high bandwidth efficiency quadrature amplitude modulation has become the established modulation scheme for digital highcapacity modems. Figure 6. The ADC is a 10 bit fast sampling device and considerable design effort goes into this component. The charge couples into the drain/source circuitry and results in errors in the storage element. A SAW filter is simply an analog version of a FIR filter but is made from a piezoelectric material on a ceramic substrate. The architecture of a 64 QAM modem is shown in 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 downconverted (carrier is stripped off) and filtered by a SAW (surface acoustic wave) filter in the tuner. This adds more demands on the modem design. It is kept away from any hot components to keep its Johnson noise to a minimum.Section 6.14 standard (in development) and is 5.05Mbaud for 64 QAM. This allows the ADC to have a good dynamic range as the input signal amplitude may vary considerably. The SAW filter performs a very sharp cutoff.2 Modem Specification A video modem processing an MPEG2TS stream has to be fast because it is not only processing highspeed video data but also the overhead bits used in synchronizing and other housekeeping tasks. The symbol rate has to be in accordance with the IEEE802. as it is a passive device. 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 63 . The only drawback is that it has some insertion loss. lowpass filtering operation without adding any noise. 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 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. Analog Devices 2600 series and Intel i860).ways have been developed to try and reduce this effect. As shown in Figure 4. 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).2 . 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. This level of performance requires pipelining and large multipliers.8 and it shows a more practical view down to the external input/output pins. 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. 6 bits are used to map into the 64 possible symbols.4) in the six bit symbol are used to decode the quadrant and the next four bits (bits 3. Furthermore. The probability of error for a rectangular constellation is repeated here: PM = 1 − [1 − 2(1 − where PM = probability of symbol error in QAM Mary M = # of symbols Eav = SNR. Recall that in the case of 64 QAM. 2 of these six bits are used to decode the quadrant (1st. These DSP chips (processors) are good for up to 100K Baud. The output of the ADC now contains the inphase 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. 1 symbol takes 6 bits to represent.13 the first two bits (bits 5. 4th). 2nd. Another area of the design that has been a challenge is controlling the phase jitter of the PLL driver to the ADC sampling circuit. Motorola 56000. 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. In other words.2.1. If the IF is centered around symbol rate B then the ADC sampling is done at 4B. 2B. 3rd. 64 1 M )Q( 3 Eav 2 )] M − 1 No eqn 6. signal energy/noise energy No Q( ) = erf function which can be calculated using a table The block diagram of a 64QAM from National Semiconductor is shown in Figure 6.0) are used to find which symbol within that quadrant was transmitted. if the IF is at 2B then ADC sampling is done at 8B.
8 National SemiconductorQAM Schematic 65 .The demodulator is controllable from an external microprocessor via a serial interface. Figure 6.
15 Modulation rate: 6~6.19.Section 6.18 256QAM: α = 0.36 Mbaud Table 6.9 Type C PHY Return to Table of Contents TOC 66 .0 ~ 5.13 Modulation rate: 5.31 Mbaud Figure 6.1 PHY Formats PHY Type C (USA) 64QAM & 256 QAM 6 Mhz Channel BW FEC is Reed Solomon Spectral rolloff α = 0.12 64QAM: 5.952 Mbaud PHY Type B 64QAM & 256 QAM 6 Mhz Channel BW FEC is RS for outer and Trellis (TCM) for inner symbols ie concatenated Spectral rolloff 64QAM: α = 0. 5. PHY Type A 64QAM & 256 QAM 8 Mhz Channel BW FEC is Reed Solomon Spectral rolloff α = 0.14 supports three physical layer (PHY) formats A.14 Specification The IEEE802.05 Mbaud 256QAM: 5. B and C as shown in the table below.3 IEEE802.
Chapter 7 Matlab Simulation Section 7. There is another toolbox called DSP Blocksets which has larger blocks built in.2 Version 1.1 Communication Tool Box The modem is simulated using the Communication ToolBox of Matlab. such as equalizers and carrier recovery blocks.3 Version 4. 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. I did not have access to the DSP Blocksets toolbox unfortunately.2 18Dec1997 01Dec1997 21Nov1997 21Nov1997 67 .1 Version 2. The version of Matlab I used is listed here: MATLAB Toolbox Communications Toolbox Signal Processing Toolbox Simulink Version 5.
& QASk Constellation?[1=Yes.0 Prompt for extra graphs and zoom in Eb_No curve % 10/29/98 7. This frequency has more to do with the computer than the modem itself.0 Display Ber vs Eb_No curve % 10/27/98 4. if use_reed_solomon==1 N=input('Enter code word length {N=2^M1}.0 Added RS Error correction with prompt % 10/27/98 5. This is the rate Matlab samples the analog signals because after all the computer cannot sample infinitely fast to simulate an analog signal.Section 7. extra_graphs=input('RF Data.31: ').0=No]: '). %assign Carrier Frequency Fc=10. K=6.% 7/11/98 1.0 Fixed some errors in data lengths % 10/28/98 6. N=7. % EE297 Project Rajat Sewal % File Name : qam64.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. the system block diagram.. end fprintf('Do you want extra graphs of Mapped Data. Check bits = NK % start_time=clock.\n') clear all %symbol rate. %Sample Rate or sample freq Fs.0=No]: ').0 Started writing code % 10/24/98 2. FFT of RCVR Filt. 68 .m % % This program simulates a 64 QAM Modem % % Date Revision History % .15. XMIT Filtered output\n').. digital transfer frequency Fd Fd=1.0 Added channel impairment % 10/26/98 3. Fs=100.1. % N=(2^M)1. % %Errorcontrol coding use_reed_solomon=input('Do you want Reed Solomon error correction?[1=Yes. say 7.0 Prompt for code word length N & log start/stop time % % Initialization fprintf('Clearing all variables..
Fs.64).'rs').noise_var(i)) %Additive noise variance noise_gaussian=randn(length(transmit_rf)..1.0. %%%%%%%%%% Transmit Raised Cosine shaping %%%%%%%%%% filtered_data=rcosflt(mapped_data. % Reed Solomon Encoding % if use_reed_solomon==1 coded_data = encode(bits. % note: 2^6=64 QAM Data_length=[10 10 10 10 10 10 10]*N*bits_per_symbol*K.3.bits_per_symbol)).%QAM bits/symbol Specification bits_per_symbol=6.13). % Digital to analog signal mapping mapped_data = modmap(symbols. Eb_No(i)= signal_energy/noise_energy.Fs/50.'qask'. % for i=1:length(Data_length) % the message source bits = randint(Data_length(i)..1) * noise_var(i).Fs..0.01]. % don't encode data end % Generate symbols (0 to 63) from binary bits (0. % Calculate signal and noise energy signal_energy=transmit_rf' * transmit_rf / length(transmit_rf). noisy_rf_signal=transmit_rf + noise_gaussian.0.0.2.1d\n'.5.N.0.1. % encode data else coded_data = bits.1. 69 . fprintf('adding AWGN with variance: %2.'qam').'fir/sqrt'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%% CHANNEL NOISE %%%%%%%%%%%%%%% %%%%%%%%%% Channel Impairment Section %%%%%%%%%%%%% % Add AWGN noise and compute Eb/No %fprintf('adding AWGN.15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% QAM MODULATION & %%%%%%%%%%%% %%%%%%% Analog Upconversion to communication channel transmit_rf = amod(filtered_data.K. ') noise_var=[2.0.Fd.0.) symbols=bi2de(vec2mat(coded_data.1. noise_energy=noise_gaussian' * noise_gaussian / length(noise_gaussian)..Fc.Fd.1.2).1.
Fd. plot(abs(fft(rx_ana_data))).64).1).bits_per_symbol)'.Fd.2).Eb_No.'qask'. exp_ana_data_q = decimate(rx_ana_data(:.K.Fc. % plot received symbols on constellation end %%%%%%%%%%%%%%% BER PLOTS %%%%%%%%%%%%%%%%%% % Curve fitting using Spline function x_axis=logspace(log10(min(Eb_No)).title('Mapped Data').1)=BER(i) end %%%%%%%%%%%%%%%% Extra Graphs %%%%%%%%%%%%%%%% if extra_graphs==1 plot(mapped_data). % %plot results figure loglog(x_axis.'fir/sqrt'.Fs/50.'bo') 70 .log10(x_axis)). ber_array(i. qaskenco(slicer.0. %%%%%%%%%%%%%%%%% SLICER %%%%%%%%%%%%%%%%% slicer=demodmap([exp_ana_data_i exp_ana_data_q]. 4).demod_bit).'rs'). %%%%%%%%% decode symbols into bits %%%%%%%%%%%%% demod_bit=de2bi(slicer. Eb_No(find(BER==0))=[].Fs.figure.BER.13 rx_ana_data=rcosflt(analog_rx. plot(transmit_rf).'b'. plot(filtered_data).13).figure.log10(BER).BER(i)]=biterr(decoded_bits(:).N. % % Reed Solomon Decoding % if use_reed_solomon==1 decoded_bits = decode(demod_bit.%%%%%%%%%%% QAM 64 RECEIVER %%%%%%%%%%%%%%%% % analog demodulation of carrier and qam signal analog_rx=ademod(noisy_rf_signal. %%%%% Received Matched filter .'qam'). %%%%%% Decimate results by taking every 1/Fs sample %%%%%%%%% % decimate to subsample the Matlab rcosflt output exp_ana_data_i = decimate(rx_ana_data(:. 4).title('FFT of RCVR filter output'). else decoded_bits = demod_bit. [numb(i). end % %%%%%%%%%%%%%% BER Tests %%%%%%%%%%%%%%%%%% %err = symerr(bits.^y_data. y_data=spline(log10(Eb_No).64).10.20).Raised Cosine %%%%%%%%%%%% % with excess bandwidth = 0.title('RF data').figure.bits).log10(max(Eb_No)). BER(find(BER==0))=[].figure. demod_bit=demod_bit(:).title('XMIT Filtered Data').Fs.
xlabel('Eb/No') ylabel('BER') % next line added to fix the xy axis scales axis([1 1E4 1E12 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 %%%%%%%%%%%%%%%%%%
71
DATA SOURCE
bits
ENCODE Reed Solomon
coded_data
VEC2MAT
BI2DE
symbols
MODMAP
mapped_dat a
mapped_dat a
filtered_data RCOSFLT AMOD
transmit_rf
noisy_rf_signal ADEMOD
analog_rx RCOSFLT
noise_gaussia n NOISE rx_ana_data rx_ana_da ta
DECIMATE
exp_ana_data i
slicer DEMODMAP
DE2BI
demod_bi t
DECODE Reed Solomon
decoded_bits
DECIMATE exp_ana_data_ q
Figure 7.1 QAM Matlab System
72
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 N = 2 M − 1 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 EB/No 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 NbyM 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, RANGE1]. 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 64QAM. 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:
N 31 bits_per_symbol 10.N .K .bits_per_symbol data_length uncoded_data_length . (N bits_per_symbol 6 K 6 Data_length.mcd RajatSewal
data_length
data_length = 11160 uncoded_data_length = 11160 K) uncoded_data_length
uncoded_data_length coded_data_length
coded_data_length = 57660
73
M . The format of MSG can be either a vector or K column matrix. METHOD) Encodes the binary message specified in MSG using the coding technique in METHOD. where M is an integer no less than 3.bits_per_symbol)).K. Where bits_per_symbol=6 so that the output of vec2mat is a binary data of 6 column matrix partitioned symbol by symbol. The format of the function “encode” is: ENCODE Errorcontrol code encoding computation. Hamming code is a single errorcorrection code. When MSG is a Kcolumn matrix. 'linear' Linear block code.1. CODE = ENCODE(MSG. In my program the usage is: symbols=bi2de(vec2mat(coded_data.N. 'rs' ReedSolomon code. The message length is 2^M . This data is then sent to a block called VEC2MAT described next: VEC2MAT Vector to matrix conversion. After coding the data is called “coded_data” and is still binary data.'rs'). 'cyclic' Cyclic code. MAT = VEC2MAT(VEC. This is then Reed Solomon encoded if the choice was made or left unencoded. If it needs to add an element. This step is followed by a conversion from binary to decimal format: 74 .1.1 Data Lengths So “bits” contains Data_length number of binary data (0110001010101010…). N. In my program the usage is: coded_data = encode(bits.Using the above equations the coded_data_length with several values of N are tabulated in Table 7. The METHOD can be 'hamming' Hamming code. N 7 15 31 63 (uncoded) Data_length=360*N 2520 5400 11160 22680 Coded Data Length 2940 13500 57660 238140 Table 7. or 'convol' Convolution code. The code word length is N and the message length is K. M) converts VEC to be an M column matrix with row priority arrangement. 0 will be added to the end of the input vector to form the required matrix. K. A code has code word length 2^M 1. the output CODE is an Ncolumn matrix. 'bch' Binary BCH code.
and ± 7). 'psk' Mary Phase shift keying modulation.Fs. MODMAP Maps a digital signal to an analog signal for modulation.'qask'. 'msk' Minimum shift keying modulation. M defines the Mary number of a square constellation when METHOD is qask. 'normal' Use normal RC filter (default). METHOD is a string. The format is shown next: RCOSFLT Filters the input signal using raised cosine filter.64) The next block is the filter block to pulseshape the symbols that are to be transmitted. When METHOD = 'ask'. which can be one of the following: 'fir' Use FIR RC filter (default). the output D is a column vector with each element being the transfer of a row of B.13 . So now symbols is a decimal grouping of numbers from 0 to 63.M) maps a sample frequency Fd (Hz) signal vector X into a sample frequency Fs (Hz) inphase and quadrature components in Y. The sample frequency for X is Fd (Hz). Here is the format of the bi2de command: BI2DE Converts binary to decimal format. Y is a column vector instead of a matrix. Fd. In my program the usage is: mapped_data = modmap(symbols. The modmap function is described next. Fs must be larger than Fd. 1]. The rolloff factor R has a default of 0. 'fsk' Mary Frequency shift keying modulation. Fd.5 but must a real number in the range [0. This is the RCOSFLT ie raised cosine filter with excess bandwidth α = 0. which can be one of the following: 'ask' Mary Amplitude shift keying modulation.bits_per_symbol)). TYPE_FLAG is a string. 'sample' Up sample the input signal. 'qask' Mary Quadrature amplitude shiftkeying Modulation. Y is a two column matrix. Fs/Fd must be an integer. TYPE_FLAG. bi2de([0 1]) results in 2. D = BI2DE(B) converts a binary representation vector B to a decimal representation D. in contrast to 'qart'. 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. 'iir' Use IIR RC filter. Y = MODMAP(X. R) filters the input signal X using raised cosine (RC) FIR filter. The sample frequency for Y is Fs. This function does mapping only. ± 3.Fd. When B is a matrix.symbols=bi2de(vec2mat(coded_data. METHOD. 75 . Y = RCOSFLT(X. ± 5. Fs. For example bi2de([1 0]) results in 1. The first column is an inphase component and second column is a quadrature component. Fs. The first element in B represents the lowest binary bit.
Fs. Fc.01. Fs > Fc is required (by Nyquist theory). The function that is used in generating noise is RANDN. AMOD Analog signal modulation.13) The next section is the last part of the transmitter and is AMOD (analog modulator). 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.0.:) are used in the calculation.'qam') Now the signal goes through an ideal channel with AWGN (additive white gaussian noise) added at the input of the receiver. When Fs is a twoelement vector. 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.1. In my program the usage is: filtered_data=rcosflt(mapped_data. First we define a noise variance matrix called noise_var noise_var=[2.0.Fs/50.0.'sqrt' Use square root raised cosine filter.Fc. The value DELAY is a default of 3.0. Fs. All others are discarded. in the case the row number (or vector length) of Y is (length_of_X + DELAY)*Fs/Fd. 'wdelay' Keep the full length of the filtered result. 'Fs' X is input with sample frequency Fs.15.5. only elements X(i*Fs/Fd+1. Y = AMOD(X. double sideband with transmission carrier 'amdsbsc' Amplitude modulation.3. which can be one of the following: 'amdsbtc' Amplitude modulation.'fir/sqrt'. 76 . The time interval between two successive points in X is 1/Fs. METHOD is a string. The code that generates the random noise is discussed next. the second element specifies the initial phase in the carrier signal modulation.0. double sideband suppressed carrier 'amssb' Amplitude modulation. In this case.Fd. RANDN Normally distributed random numbers. For best results. The unit of the initial phase is rad.2. The function default has had the delay cut off from the output.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.1.
Fd. The output of the RCVR filter is rx_ana_data and since the XMIT filtering operation had interpolated data.R) resamples the sequence in vector X at 1/R times the original sample rate. DECIMATE Resample data at a lower rate after lowpass filtering. The output of the ADEMOD is analog_rx. In my program the usage is: exp_ana_data_i = decimate(rx_ana_data(:. DEMODMAP described next.Fs.’qask’. In my program the usage is: noise_gaussian=randn(length(transmit_rf). RANDN produces pseudorandom numbers. METHOD. before resampling. 4) exp_ana_data_q = decimate(rx_ana_data(:. The sequence of numbers generated is determined by the state of the generator.2).1). Fd. we need to decimate this data at the same rate using the DECIMATE blocks.N) is an MbyN matrix with random entries. The command is described next.M) is a reverse mapping of function MODMAP. DEMODMAP Demaps a modulation mapped signal to the closest digit number. This function demaps a sampling frequency Fs (Hz) analog signal into a sampling frequency Fd (Hz) digital signal Z. slicer = demodmap([exp_ana_data_i exp_ana_data_q]. We decimate the inphase and quadrature portions separately. The resulting resampled vector Y is R times shorter. Fs. This is done with inverse function of modmap ie. which is the demodulated analog baseband QAM signal. The sampling frequency for Y is Fs (Hz) and the digital sampling frequency is Fd (Hz). Y = DECIMATE(X.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. LENGTH(Y) = LENGTH(X)/R. DECIMATE filters the data with an eighth order Chebyshev type I lowpass filter with cutoff frequency . Another raised cosine filter (Receive Filter) is used here in the filter block “rcosflt”.RANDN(M. This signal needs to be filtered to remove any carrier components and to reduce intersymbol interference (ISI). 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.8*(Fs/2)/R. Y is a two column matrix 77 .64) Z = DEMODMAP(Y.
’qask’.Fs. B = DE2BI(D. 2) results in [1 0]. The received digital signal is sampled at time i/Fd + offset/Fs.64) The output “slicer” is then sent to a decimal to binary converter so that the binary bits can be recovered. end DECODE Errorcontrol code decoding computation.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. The code word length is N and the message length is K. In my program the usage is: demod_bit=de2bi(slicer. The first element in B represents the lowest binary bit.'rs'). else decoded_bits = demod_bit. This is done with the command demod_bit=demod_bit(:) The next step is to decode with Reed Solomon algorithm if encoded. For example DE2BI(1. N) specifies the column number for matrix B. The format of CODE can be either a vector or an N column matrix. DE2BI(2) results in [0 1]. MSG = DECODE(CODE. K. In my program the usage is: slicer = demodmap([exp_ana_data_i exp_ana_data_q]. or 'msk'. the second element is the offset value for the decision point. N. When METHOD = 'ask'.Fd. N is a positive scalar number. This is done in an if statement: if use_reed_solomon==1 decoded_bits = decode(demod_bit.METHOD) decodes binary codeword in CODE using decode METHOD. The offset timing in the plot is offset/Fs. 'fsk'. When Fd is a two element vector. Y is a one column vector instead of a matrix. The digital symbols with the shortest distance to the current sampling point is the demodulated output. This function is described next. The default offset is 0. DE2BI Converts positive decimal numbers to binary numbers.K. The sample value holds until time (i+1)/Fd +offset/Fs when the next sample point is taken.where the first column is an inphase component and second column is a quadrature component. METHOD ENCODE SCHEME 78 . The demapping process finds the distance from the sample value to all of the possible digital symbols.N.
BER(i)]=biterr(decoded_bits(:). L equals N. [NUMBER.bits). where MAX is the maximum number in both X and Y. this function stops processing. L = M. The ratio of NUMBER to the total bit number contained in Y is output in RATIO. M is an integer >= 3. where K is the bit number for each element in Y. 2^L1]. you have to add '/decimal' in the method specification. 79 . When X or Y is a matrix and the other is a vector. where N = 2^M . All elements in X and Y should be nonnegative integers. RATIO] = BITERR(X. MSG can only be a vector when using the decimal method. The number of the bit differences is outputted in NUMBER. The format of MSG matches the format of CODE.1. The output MSG contains the decoded message. When CODE is a Ncolumn matrix. In this case. When the format of the input CODE is not the same as the output of function ENCODE. CODE can also be a nonnegative integer in the range of [0. In using the "rs" method. For example. In my program the usage is: [numb(i). The next step is to take decoded_bits and perform BER (bit error tests) and graph the results. the output MSG is a Kcolumn matrix. K is the smallest integer satisfying MAX < 2^K. Except for the 'rs' method. The BER tests are done with a function called biterr BITERR Computes bit error. The total bit number in Y is estimated by column_y * row_y * K. Y) compares the elements in the input matrices X and Y. 'bch/decimal' means the data in MSG is binary.'hamming' 'linear' 'cyclic' 'bch' 'rs' 'convol' Hamming code Linear block code Cyclic code BCH code ReedSolomon code Convolution code In using methods other than the "rs" method. 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. 'bch' is equivalent to 'bch/binary'. this function convert the vectors to a matrix with the column number the same as the matrix before the comparison.
0798 0. Bits pushed = 2520 x 7 = 17. The circles on the graph are the data points in the ber_array. 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.2. Values that are zero (no single error) are not shown because this is a log scale and it does not go below 1x1012.0004 0 0 0 BER 64ary QASK Simulation result 10 0 10 2 10 4 10 6 10 8 10 10 10 12 10 0 10 1 10 Eb/No 2 10 3 10 4 Figure 7.1.0444 0.0.4 Discussion of Simulation Results The data beside the graph is the bit error array produced for 7 different noise variances.0.0. since No error correction selected.01].1. The program runs through 7 times.15. CASE 1 N=7 (default).Section 7. number of bits = 2520. noise_var=[2. each time picking a new noise variance from the array shown above. Data_length=[10 10 10 10 10 10 10]*N*bits_per_symbol*K.640 ber_array = 0.2 No Error Correction 80 .3.1246 0.5.0.
3 Error Correction N=7 81 .6] Reed Solomon simulation result 10 10 2 10 4 10 6 10 8 10 10 10 12 10 0 10 1 10 Eb/No 2 10 3 10 4 Figure 7.CASE 2 N=7 .1187 0. number of bits (coded) = 2940 Correction bits = NK=76=1.0353 0 0 0 0 BER 0 64ary QASK with [7.0857 0. Reed Solomon error correction selected.580 ber_array = 0. Bits pushed = 2940 x 7 = 20.
1385 0.500 x 7 = 94. number of bits (coded) = 13.4 Error Correction N=15 82 .CASE 3 N=15 .500. Reed Solomon error correction selected. Bits pushed = 13.0104 0 0 0 0 BER 10 0 64ary QASK with [15.6] Reed Solomon simulation result 10 2 10 4 10 6 10 8 10 10 10 12 10 0 10 1 10 Eb/No 2 10 3 10 4 Figure 7.0617 0.500 Correction bits = NK=156=9 ber_array = 0.
660 x 7 = 403.0002 0 0 0 0 BER 10 0 64ary QASK with [31.620 Correction bits = NK=316=25 ber_array = 0.660. number of bits (coded) = 57. Reed Solomon error correction selected.6] Reed Solomon simulation result 10 2 10 4 10 6 10 8 10 10 10 12 10 0 10 1 10 Eb/No 2 10 3 10 4 Figure 7.0461 0. Bits pushed = 57.CASE 4 N=31 .5 Error Correction N=31 83 .1228 0.
In this mode the following graphs are displayed: • • • • • Mapped Data Figure 7. number of bits pushed = 2520 x 7 = 17.640 Additional graphs selected.CASE 5 N=7 .7 RF Data Figure 7.9 QASK Constellation Figure 7. No error correction selected.6 XMIT Filtered Data Figure 7.8 FFT of RCVR Filter Figure 7.10 84 .
Figure 7.6 Mapped Data 85 .
Figure 7.7 XMIT Filtered Data 86 .
Figure 7.8 RF Data 87 .
9 FFT of RCVR Filter Output 88 .Figure 7.
Figure 7.10 QASK Constellation 89 .
the baseband simulation involves using the complex envelope of the Qam signals and the math can be complex.0444 0.666.0857 0.4. The later runs much faster because it does not involve a carrier (less computation on the part of the computer).0444 is 4.0104 0 0 0 0 CASE 4 Reed Solomon N=31 0. 31.1228 0. 90 . where k is the message length and N is the code word length. How N is picked is very important and the rule is N = 2 M − 1 where M = 3. 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.2 BER Summary As can be seen going across any row.1385 0.0004 0 0 0 CASE 2 Reed Solomon N=7 0. The total number of bits I was trying to push through the modem was 1. The values of BER = 0 mean no bits were in error and is not a result of rounding off in the calculations. and 63 respectively.1246 0. A factor in simulation speed is whether one is doing a passband simulation or a baseband simulation of a passband system.2. Increasing N does come at a cost of reduced source rate. However.5 Summary of Simulation Results The simulation results are summarized in Table 7. The model picks up Fc directly from the transmitter. The simulation times can be large for N=31 and can range somewhere around 812hrs depending on the machine.1187 0. I actually ran N = 63 and the computer (233Mhz Pentium.Section 7. The carrier recovery in the ADEMOD function is direct. CASE 1 No Error Correction 1 2 3 4 5 6 7 0. The effect of increasing the code word length on the bit error rate is explored. 64 Mbyte of SD Ram) ran out of resources after 32 hrs.44%). 15. 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 error correction algorithm used in cases 24 is the Reed Solomon with (n.0353 0 0 0 0 CASE 3 Reed Solomon N=15 0.0002 0 0 0 0 Table 7.0798 0.6) .0461 0. k ) = (N . The filters also have to be complex.0617 0.980 bits.5. 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. The value of BER is a ratio not a percentage (so BER = 0.6 resulting in N = 7. there is improvement in the BER performance as the value of N increases because more and more redundancy is added as correction bits (NK) increases.
Chapter 8 Settop Box ASIC Design For a settop terminal. design teams can be assembled to complete the task of designing and fabricating the product ASICs. the ASIC design team codes the design in Verilog. regression tests that verify the functionality are developed. The design is simulated and each code block is verified at the module level. The floor planning is sometimes done in parallel with the estimated timing verification phase of the design. and architecture descriptions for the modules contained in the ASIC. Typically. Individual integration efforts can begin at a point where major modules can be connected. and Cadence Verilog simulators. chip synthesis may begin. The regression tests verify the functionality of the behavioral code. synthesis of lowerlevel modules may be completed in parallel. feature selection. Synthesis scripts can be developed in an infant state. most of the hardware design work is implemented in ASICs. An ASIC's functionality is usually defined in the system engineering. After full ASIClevel integration has been completed. and customer requirements phase. then later optimized and integrated when synthesizing at the full chip level. While preliminary integration occurs. Functionality is then rechecked with the regression tests. The kind of tools needed by the ASIC engineers are Synopsys design compiler. Each designer is responsible for the functionality of his/her assigned sections. The first stage of the cell placement and routing can take up to 2 weeks for designs greater than 100. This process converts the Verilog RTL (register transfer level) behavioral code to the actual chip netlist for the targeted ASIC library. The document contains highlevel block diagrams. This occurs because the design is somewhat stable and usually the major blocks of the design do not change architecturally.000 gates. integration occurs in phases. but each stage of integration only proceeds after the modules to be integrated have been thoroughly verified. The design should also be checked with a static timing analyzer tool (Design Compiler by Synopsys) to verify that worstcase paths (which are hard to simulate) meet timing. After the ASIC has been synthesized. the design can be back annotated with estimated prelayout delays. the design is ready for floor planning followed by cell placement and routing. The first stage of the ASIC implementation is writing a highlevel description document. This highlevel description document is used by the design team as a guide through the ASIC development phase. regression tests should be run to verify the ASIC functionality by simulating the design at a unitdelay level. The average turn time for designs ranging 91 . and later can be used to verify the gatelevel implementation. After implementation of the highlevel description is approved. After the functions have been defined and partitioned. The document is written by the ASIC design team and is supervised by an ASIC lead designer or project leader. In parallel to chip synthesis. Sun Sparc workstations are used as simulation and synthesis servers. Once the design functions at the unitdelay level. Once the design meets timing and functionality with prelayout estimated timing. Motive static timing analyzers. Chronologic Verilog simulators.
Typically. When all violations are detected and repaired.from 50. schematic) and DRC (design rule checker) tools before handing the layout database to the mask shop. loading constraints on buffers and some timing has been violated with the first cut of the layout. the layout engineer delivers a wire delay file (based on actual capacitive loading) back to the ASIC designer so that actual timing can be backannotated into the design. One more wire delay file is delivered from the layout engineer to the ASIC designer for final verification. they will run the final LVS (layout vs. 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. Once the ASIC designer completes the final verification.000 gates can be anywhere from 1 to 2 weeks.000 gates to 150. 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. Return to Table of Contents TOC 92 . After all nets are routed and all cells placed.