5 Digital Baseband
5 Digital Baseband
5 Digital Baseband
Digital baseband and digital carrier transmission systems have many advantages
over their analog counterparts. Some of these advantages are:
1. Digital transmission systems are more immune to noise due to threshold detection
at the receiver; and the availability of regenerative repeaters, which can be used
instead of analog amplifiers at intermediate points throughout the transmission
channel.
2. Digital transmission systems allow multiplexing at both the baseband level (e.g.,
TDM) and carrier level (e.g., FDM, CDMA and OFDMA), which means we can
easily carry multiple conversations (signals) on a single physical medium
(channel).
3. The ability to use spread spectrum techniques in digital systems help overcome
jamming and interference and allows us to hide the transmitted signal within
noise if necessary. In addition, the use of orthogonality is easier and allows
increasing the transmission rate by overcoming impairments such as fading.
4. The possibility of using channel coding techniques (i.e., error correcting codes) in
digital communications reduces bit errors at the receiver (i.e., it effectively
improves the signal-to-noise ratio (SNR)).
5. The possibility of using source coding techniques (i.e., compression) in digital
communications reduces the amount of bits being transmitted, and hence, allows
for more bandwidth efficiency. Encrypting the bits can also lead to privacy.
1
6. Digital communication is inherently more efficient than analog systems in
exchanging SNR for bandwidth, and allows such exchange at both the baseband
and carrier levels.
7. Digital hardware implementation is flexible and permits the use of
microprocessors. Using microprocessors to perform digital signal processing (DSP)
eliminates the need to build expensive and bulky discrete-component devices. In
addition, the price of microprocessors continues to drop every day.
8. Digital signal storage is relatively easy and inexpensive. Also the reproduction of
digital messages can be extremely reliable without deterioration, unlike analog
signals.
This article provides a very quick overview of some of the main concepts that are
relevant to digital baseband transmission. You will study more about this topic in the
EE422 “Communications II” course. The main concepts to be emphasized here will
be the analog-to-digital conversion process and the line coding concept.
These four steps are shown in Figure 2 below and are explained in the following
subsections.
Digital
Analog Digital
1's & 0's Encoding & Baseband Digital
Baseband A/D Carrier
Signal Pulse Shaping Signal Modulation Signal
2
I. Sampling:
Sampling is the first step in converting an analog baseband signal into a digital
baseband signal. Sampling is defined as the process in which only a relatively-small
set of values, called discrete samples {mn}, are used to represent the signal m(t)
instead of the (time-continuous) infinite set of values included in the original analog
signal (see Figure 3 below, which shows the process of ideal sampling).
\
t
Ts Ts
Sampling Time
-mp
Figure 3. Ideal Sampling.
In uniform sampling, the time interval between successive samples is set to a constant
value equal to Ts, called the sampling time. In this case, the sampling frequency is
fs = 1/Ts.
Nyquist–Shannon sampling theorem states that for the samples {mn} to truly represent
the original signal m(t), we need the sampling frequency fs to be at least twice as high
as the bandwidth B of the band-limited analog signal m(t) (i.e., fs ≥ 2B). Such a
condition will prevent aliasing. Aliasing should be avoided1 at all costs since it means
that the signal m(t) cannot be recovered from the discrete samples {mn} by simple
low-pass filtering (LPF) at the receiver.
3
impulses, as shown in Figure 4 below4. We will explain in class the difference
between practically-sampled signals, naturally-sampled signals, and ideally-sampled
signals.
Samples Values Sampled Signal, ms(t)
mp
Ts Ts
Sampling Time
-mp
Figure 4. Practical Sampling.
II. Quantization:
The next step in analog-to-digital conversion is Quantization, which limits the digital
data to be sent. Quantization is the process in which each sample value is
approximated or “limited to” a relatively-small set of discrete quantization levels. For
example, in uniform quantization if the amplitude of the signal m(t) lies in the range
(-mp, mp), we can partition this continuous range into L discrete intervals, each of
length v = 2 mp /L, and the value of each sample is then approximated to only one
of these L levels.
Notice that quantization can be done in several different ways. In one method the
value of each sample can be “truncated” to the quantization level just below it. This
is shown in Figure 5 below for L = 5 levels.
mp
m(t)
error v
L=5
t Levels,
Rule =
Truncate
4
Typical IC-based ADC chips perform sampling, quantization and mapping all on the same chip.
4
Notice that the quantization error (i.e., the difference between the original sample
value and the quantized sample value) is limited to the range [0, v]. This
quantization error is a deliberate error introduced by the transmitter to control the
transmitted bit rate. Notice, however, that this error can be controlled by reducing
the value of v, which can be achieved by increasing the number of quantization
levels L as shown in Figure 6 below where L = 10 levels now.
mp
m(t) error v
L = 10
t Levels,
Rule =
Truncate
Another valid method of quantization is where samples are “rounded off” to the
nearest quantization level either below it or above it. This is shown in Figure 7
below. Notice that in this method the quantization error is now limited to [-v/2,
v/2].
L = 10
Levels,
Rule =
t
Approx.
5
In voice telephony, for example, the number of quantization levels is chosen to be
L = 28 = 256 since intelligibility (rather than high fidelity) is required, while for
compact disc (CD) audio, the number of quantization levels is L = 216 = 65,536
possible values per sample. Of course, the bigger value of L means a smaller
quantization error range v, and thus better quality.
We will discuss in class how quantization can be visualized as a noise signal. We will
also explain how adaptive quantization can improve the signal-to-quantization-noise
ratio (SQNR).
III. Mapping:
After the analog signal is discretized in time (i.e., sampled) and value (i.e.,
quantized), it is converted into a binary bit stream using a process called mapping, in
which each of the quantized sample values (e.g., 6V, 10V, etc) is mapped to a
corresponding binary code (e.g., 0110, 1010, etc). The result is a stream of 1‟s and 0‟s.
Notice that each sample is represented by n = log2 (L) bits, and hence the bit time T0
is given by T0 = Ts / log2 (L), where Ts is the sample period. For example, if L = 256,
we have 𝑇0 = 𝑇𝑠 8 (see Figure 8 below).
The total number of bits generated in one second is called the data bit rate f0 = 1 / T0
measured in bits/s (or bps) and is given by:
msq(t)
t
Ts
Ts
0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 0
mdigital(t)
T0 T0
Ts = log2(L)×T0 Ts = log2(L)×T0
Figure 8. The Sampled Signal being Mapped into 1's and 0's.
6
IV. Encoding:
Now that we have a bit stream of 1‟s and 0‟s, those bits are first manipulated into a
new (and better) sequence of 1‟s and 0‟s, and then converted into voltages
appropriate for transmission on a physical channel. This manipulation and
conversion is collectively called encoding. Encoding schemes are usually divided
into: source encoding, channel encoding and line encoding (see Figure 2).
A. Source coding: Source coding refers to the process of compressing data. This is
typically done by replacing long binary codewords that occur frequently by shorter
ones, and those that occur less frequently by longer codes. For example, a 4-bit
sequence “0110” occurring frequently can be mapped into the shorter 2-bit sequence
“01”, while another 4-bit sequence “1011” occurring less frequently can be mapped
to the longer 6-bit sequence “111001”. This makes sure that sequences that occur
more often in the bit stream are the shorter ones.
B. Channel coding: Channel coding refers to error correcting codes. The most
obvious example of such codes is the simple parity bit system. Such codes are used to
protect data sent over the channel from corruption even in the presence of noise. In
other words, channel codes can improve the signal-to-noise ratio (SNR) of the
received signal.
The theory behind designing and analyzing channel codes is called Shannon’s noisy
channel coding theorem. It puts an upper limit on the amount of information you
can send in a noisy channel using a perfect channel code. This is given by the
following equation:
𝐶 = 𝐵𝑐ℎ × log 2 1 + 𝑆𝑁𝑅
where C is the upper bound on the capacity of the channel (bit/s), Bch is the
bandwidth of the channel (Hz) and SNR is the Signal-to-Noise ratio on the channel
(unitless). Examples of channel codes currently in-use include: Hamming codes,
Reed-Solomon codes, convolutional codes (usually decoded by an iterative Viterbi
decoder), Turbo codes, etc.
C. Line coding: Line coding refers to the process of representing the final bit stream
(1‟s and 0‟s) in the form of voltage or current variations optimally tuned for the
specific properties of the physical channel being used.
The selection of a proper line code can help in so many ways: (a) One possibility is to
aid in clock recovery at the receiver. A clock signal is recovered by observing
transitions in the received bit sequence, and if enough transitions exist, a good
recovery of the clock is guaranteed, and the line code is said to be self-clocking. Self-
5
MPEG is short for Moving Picture Experts Group.
7
clocking is important in digital systems as all digital receivers require the existence
of the clock to function properly (this is similar to the synchronous detection process
in DSB-SC demodulators).
(b) Another advantage is to the ability to control the DC component in the resulting
line code. This is important because most long-distance communication channels
cannot transport a DC component6, and hence, most line codes try to eliminate the
DC component before being transmitted on the channel. Such codes are called zero-
DC or DC equalized.
Other advantages of proper line coding include the (c) possibility of transmitting at a
higher data bit rate while requiring smaller bandwidth for the resulting baseband
signal, (d) the possibility of increasing the average power of the baseband signal
compared to noise (i.e., improving SNR), and (e) reducing the amount of power at
low-frequency components of the spectrum, which is important in telephone line
applications, where the channel exhibits heavy attenuation below 300 Hz.
Some types of line encoding in common-use nowadays are unipolar, polar, bipolar,
Manchester, MLT-3 and Duobinary encoding. These codes are explained here:
Two possibilities for the pulse p(t) exist7: Non-Return-to-Zero (NRZ) rectangular
pulse and Return-to-Zero (RZ) rectangular pulse. The difference between Unipolar
NRZ and Unipolar RZ codes is that the rectangular pulse in NRZ stays at a positive
value (e.g., +5V) for the full duration of the logic 1 bit, while the pule in RZ drops
from +5V to 0V in the middle of the bit time. The figure below shows the difference
between Unipolar NRZ and Unipolar RZ for the example bit stream 1110110001001.
Clock
Data 1 1 1 0 1 1 0 0 0 1 0 0 1
Code
0
T0 Bit time
Ts
Sampling time (assuming 8 bits per sample)
Unipolar NRZ Code
6 DC-values create excessive heat generation in the channel, they cause baseline drift and also do not
fit systems that carry an additional small direct current to power intermediate amplifiers (an example
is telephone networks).
7 Actually there are so many possibilities for the pulse shape p(t); not just a rectangular NRZ or
rectangular RZ pulses. Changing p(t) waveform is called Pulse Shaping and affects the characteristics
of the line code as will be explained later.
8
Clock
Data 1 1 1 0 1 1 0 0 0 1 0 0 1
Code
0
T0 Bit time
Unipolar RZ Code
w w
-8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0 -8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0
f f
-4f0 -3f0 -2f0 -f0 0 f0 2f0 3f0 4f0 -4f0 -3f0 -2f0 -f0 0 f0 2f0 3f0 4f0
Using the assumption that in a regular bit stream a logic 0 is just as likely as a logic 1,
polar line codes (whether RZ or NRZ) have the advantage that the resulting DC-
component is very close to zero.
8 The above spectra were calculated based on the assumption that logic 1‟s and logic 0‟s are equally likely in the
transmitted bit sequence. This is a simplifying assumption that we use throughout this article.
9
Polar NRZ Code
Polar RZ Code
In addition, the rms value of polar signals is bigger than unipolar signals, which
means that polar signals have more power than unipolar signals9, and hence have
better SNR at the receiver. Actually, polar NRZ signals have more power compared
to polar RZ signals.
The drawback of polar NRZ, however, is that it lacks clock information especially
when a long sequence of 0‟s or 1‟s is transmitted. This problem does not exist in
polar RZ signals, since the signal drops to zero in the middle of each pulse period.
The power spectral densities (PSD) of both polar NRZ and polar RZ are shown
below.
Sm(w)
Polar NRZ
Polar RZ
w
-8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0
f
-4f0 -3f0 -2f0 -f0 0 f0 2f0 3f0 4f0
Signals transmitted on a computer motherboard often use Polar NRZ code. Another
useful application of this encoding is in Fiber-based Gigabit Ethernet (1000BASE-SX
and 1000BASE-LX).
9 Remember that the average power in a signal is the square of its rms value (𝑃𝑥 = 𝑥𝑟𝑚𝑠
2
).
10
A variant of Polar NRZ is Non-Return-to-Zero-Level (NRZ-L) in which the 1‟s and
0‟s are represented by -p(t) and p(t), respectively. This is Polar NRZ using negative
logic. An example where NRZ-L is used is the legacy RS-232 serial port
communication.
NRZ-L Code
NRZI Code10
This is the code used on compact discs (CD), USB ports, and on fiber-based Fast
Ethernet at 100-Mbit/s (100Base-FX).
NRZI can achieve synchronization between the transmitter and receiver, if we make
sure that there are enough umber of 1‟s in the transmitted bit stream.
10
NRZI is always polar not unipolar.
11
Bipolar (AMI) Code
w
0 2pf0 4pf0
f
0 f0 2f0
Note: Coded Mark Inversion (CMI) is another variation of AMI, where 0 bits are
represented by a transition in the middle of the bit time instead of zero voltage.
12
5. Duobinary:
In a duobinary line code a 0 bit is represented by a zero-level electric voltage; a 1 bit
is represented by a p(t) if the quantity of 0 bits since the last 1 bit is even, and by -p(t)
if the quantity of 0 bits since the last 1 bit is odd. An illustration of the duobinary line
code is shown below.
Clock
Data 1 1 1 0 1 1 0 0 0 1 0 0 1
Code
0
Duobinary Code
For a bit rate of f0, duobinary line code requires f0/2 bandwidth, which is the
minimum possible (theoretical) bandwidth for any digital baseband signal (called
Nyquist bandwidth). In addition, the duobinary line code permits the detection of
some transmission errors without the addition of error-checking bits. However,
duobinary line codes have significant low frequency components as seen by the PSD
shown earlier. The differential version of the duobinary line code is common in the
20 Gbit/s and 40 Gbit/s uncompensated optical fiber transmission systems.
It is important, however, that you do not confuse a duobinary line code (explained
above) with something completely different called a duobinary pulse (shown below).
This pulse (which you are going to study in the “Communications II” course) is
commonly used in controlled inter-symbol interference (ISI) scenarios. Confusingly,
duobinary signaling refers to using the duobinary pulse with a polar line coding rule
(not a duobinary line coding rule).
p(t) = Duobinary Pulse
1V
-2T0 2T0
t
-3T0 -T0 0 T0 3T0
13
MLT-3 Code
7. Manchester:
There are two opposing conventions for the representation of Manchester codes:
The first convention of these was first published by G. E. Thomas in 1949 and is
followed by numerous authors (e.g., Andrew S. Tanenbaum). It specifies that for a 0
bit the signal levels will be Low-High with a low level in the first half of the bit
period, and a high level in the second half (see figure below). For a 1 bit the signal
levels will be High-Low.
The second convention is also followed by numerous authors (e.g., Stallings) as well
as by IEEE 802.4 and IEEE 802.3 (Ethernet 10 Mbps 10Base-T) standards. It states
that a logic 0 is represented by a High-Low signal sequence and a logic 1 is
represented by a Low-High signal sequence.
Manchester Code11
11
Manchester is always polar not unipolar.
14
Although transitions allow the signal to be self-clocking, it carries significant
overhead as there is a need for essentially twice the bandwidth of a simple Polar
NRZ or NRZI encoding (see the PSD below). This is the main disadvantage of the
Manchester code.
Sm(w) MLT-3
Line Code Bandwidth
Polar NRZ Polar NRZ f0
Manchester Polar RZ 2 f0
MLT-3 0.9 f0
Manchester 2 f0
Polar RZ
w
0 2pf0 4pf0
f
0 f0 2f0
Figure 22.
Because only the presence of a transition is important, differential schemes will work
exactly the same if the signal is inverted (wires swapped).
In the middle of the bit-time there is always a transition, whether from high to low,
or low to high, which provides a clock signal to the receiver.
Differential Manchester is specified in the IEEE 802.5 standard for IBM Token Ring
LANs, and is used for many other applications, including magnetic and optical
storage.
15
8. M-ary Coding
All the line coding schemes discussed above are called binary codes, since the
number of bits per second is identical to the number of symbols per second (called
baud rate). We say that for binary signaling:
f0, data bit rate [in units of bit/s] = fsymb, symbol rate [in units of baud]
Notice that a symbol is defined as a waveform pattern that the line code has for a
certain period of time before switching to another waveform pattern (i.e., another
symbol).
In M-ary signaling, on the other hand, a cluster of bits is grouped to represent one
symbol. For example, in the 4-ary (also called Quaternary) case, two bits are grouped
into one symbol. The two bits can be in one of 4 possible states, which means that the
symbol can take M=4 different symbols. The following table shows a possible
mapping of two bit values to four symbols of a Quaternary signal. The
corresponding line code for this Quaternary signal representing the bit stream
1110110001001 is shown next.
Bits Symbol
00 -5 V
01 -10 V M=4
10 5V levels
11 10 V
Clock
Data 1 1 1 0 1 1 0 0 0 1 0 0 1
10 V
5 V
Code 0
T0 Bit Time
-5 V
Tsymb Symbol Time
-10 V Ts
Sampling Time (assuming 8 bits per sample)
Quaternary Code
Notice that a symbol time Tsymb is now twice the bit time T0. This means that there are
half as much symbol transitions as there are bit transitions. We can say that:
symbol rate [in units of baud] = (½) × data bit rate [in units of bit/s]
16
where M is the number of levels (possibilities) for a symbol. Such a drop in transition
rate in the resulting signal will reduce the bandwidth of the signal by a factor of
log2 (M), because the bandwidth of digital signal is actually dependent on its baud
rate fsymb not its bit rate f0.
Remember: An M-ary signal is a baseband signal that has a bandwidth equal to its
baud rate (fsymb). The PSD of the M-ary signal is shown below.
Sm(w)
M-ary
w
-4pfsymb -2pfsymb 0 2pfsymb 4pfsymb
f
-2fsymb -fsymb 0 fsymb 2fsymb
V. Pulse Shaping:
In explaining the above line codes, we limited ourselves to pulses p(t) shaped as
either rectangular NRZ or rectangular RZ pulses. It is essential that you understand
that these two are not the only choices you have; instead a variety of pulse shapes
p(t) can be used without compromising the information transfer process. In this
section, we will discuss two possibilities: the triangular pulse and the raised cosine
pulse. The Figure below shows the bit stream 1110110001001 represented using a
polar line code combined with a triangular pulse shape.
Clock
Data 1 1 1 0 1 1 0 0 0 1 0 0 1
Code
0
Figure 25.
You might be wondering at this point about the advantages of choosing a pulse
shape different than the simple and familiar rectangular pulse? Well, there is a
number of advantages for doing so, the main of which is being able to control the
shape of the power spectral density PSD (and hence the bandwidth) of the resulting
digital baseband signal.
To understand this, recall that the line code you chose earlier (unipolar, polar,
bipolar, etc) has affected the bandwidth of the corresponding code. However, the
PSD shape always looked like a sinc2() function. The reason this was the case is that
the Fourier transform of a rectangular pulse has the sinc() shape and because the
PSD is the square of the Fourier transform, the PSD looked like a sinc2() function (see
Figure 27).
17
You also recall that using a RZ rectangular pulse instead of a NRZ rectangular pulse
resulted in expanding the bandwidth by a factor of 2. This is an immediate result of
the “Time compression, Frequency expansion” property of the Fourier transform,
and is also illustrated in Figure 27.
The question that arises now is this: If we pick a data stream encoded using a
particular line code (say polar encoding), can we control its bandwidth by changing
the pulse shape p(t) while still keeping the polar line code rule? The answer to this
question is YES; picking the right pulse shape can result in smaller bandwidth
compared to the bandwidth of the rectangular pulse which is, strictly-speaking,
infinity (because the sinc() function extends from minus infinity to positive infinity).
Reducing high frequency components in the PSD is important so that the signal can
pass through band-limited channels without too much linear distortion. Such
distortion usually creates what is called inter-symbol interference (ISI) in digital
systems, where one bit value overlaps with (and corrupts) the adjacent bits.
Using smoother pulses (and hence reducing their high frequency content) can be
taken to the extreme if we pick a pulse that is not limited in time. In other words, the
pulse spells outside the bit time (T0). This will limit its Fourier transform (because an
expansion in the time-domain results in compression in the frequency-domain).
One popular example used in many practical systems is the raised-cosine pulse. This is
a pulse that looks similar to (but decays much quicker than) a sinc(t) function and has a
Fourier transform similar to a raised cosine shape in the frequency domain. This
pulse and its corresponding Fourier transform are shown below. The raised-cosine
pulse shape changes with a parameter called the roll-off factor . The Figure below
shows a = 0.5 raised-cosine pulse with the corresponding Fourier transform.
P(w)
p(t) = Raised Cosine Pulse
1V T0
f0/2
-2T0 2T0
w
t - 2pf - pf0 0 pf0 2pf0
-3T0 -T0 0 T0 3T0 0
f
- f0 - f0/2 0 f0/2 f0
This type of pulse satisfies what is called the first Nyquist ISI criterion, which states
that it is OK for the pulse shape not to be limited to the bit time (T0), so long as it
does not introduce inter-symbol interference (ISI) in the transmitted pulse stream.
18
P(w) Sp(w)
p(t)
Power Spectral
Fourier Transform Density
t w w
0 -8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0
T0 Bit time -8pf0 -6pf0 -4pf0 -2pf0 2pf0 4pf0 6pf0 8pf0
P(w) Sp(w)
p(t)
Power Spectral
Fourier Transform Density
t w w
0 -8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0
T0 Bit time -8pf0 -6pf0 -4pf0 -2pf0 2pf0 4pf0 6pf0 8pf0
P(w) Sp(w)
p(t)
Power Spectral
Fourier Transform Density
t w w
0 -8pf0 -6pf0 -4pf0 -2pf0 0 2pf0 4pf0 6pf0 8pf0
T0 Bit time -8pf0 -6pf0 -4pf0 -2pf0 2pf0 4pf0 6pf0 8pf0
P(w) Sp(w)
p(t)
Power Spectral
Fourier Transform Density
Figure 27.
19
An example of using the raised-cosine pulse combined with polar line code is shown
in Figure 28, where the binary sequence „1011011100‟ is transmitted. Notice that we
use p(t) for logic 1 and -p(t) for logic 0 (i.e., the polar line code). The dotted lines
represent the raised-cosine pulses p(t) and -p(t) corresponding to individual bits,
while the solid line represents the result of adding these pulses (i.e., the transmitted
signal on the channel). At the receiver side, sampling the received signal at exactly
the middle of the bit time will retrieve the original bit sequence as shown in the
Figure.
Our example used raised-cosine pulses with parameter = 0.5. In such case, the
bandwidth of the resulting stream is given by the formula (1+) f0 / 2 = (1+0.5) f0 / 2
= 0.75 f0, where f0 is the data rate. Hence, if f0 = 50 kbit/s, the resulting bandwidth =
37.5 kHz. What would the bandwidth have been if you used a rectangular NRZ
pulse? How about a rectangular RZ pulse?
Clock
Data 1 0 1 1 0 1 1 1 0 0
1 V
-1 V
1 V
TX
signal
-1 V
1 V
RX
sampling
-1 V
Figure 28.
20