Data and Signals
Note
To be transmitted, data must be
transformed to electromagnetic signals.
ANALOG AND DIGITAL
Data can be analog or digital. The term analog data refers
to information that is continuous; digital data refers to
information that has discrete states. Analog data take on
continuous values. Digital data take on discrete values.
Analog and Digital Data
Data can be analog or digital.
Analog data are continuous and take
continuous values.
Digital data have discrete states and take
discrete values.
Analog and Digital Signals
• Signals can be analog or digital.
• Analog signals can have an infinite number
of values in a range.
• Digital signals can have only a limited
number of values.
Figure Comparison of analog and digital signals
PERIODIC ANALOG SIGNALS
In data communications, we commonly use periodic
analog signals and nonperiodic digital signals.
Periodic analog signals can be classified as simple or
composite. A simple periodic analog signal, a sine wave,
cannot be decomposed into simpler signals. A composite
periodic analog signal is composed of multiple sine
waves.
Figure A sine wave
Figure Two signals with the same phase and frequency,
but different amplitudes
Note
Frequency and period are the inverse of
each other.
Figure Two signals with the same amplitude and phase,
but different frequencies
Table Units of period and frequency
Example
The power we use at home has a frequency of 60 Hz.
The period of this sine wave can be determined as
follows:
Example
The period of a signal is 100 ms. What is its frequency in
kilohertz?
Solution
First we change 100 ms to seconds, and then we
calculate the frequency from the period (1 Hz = 10−3
kHz).
Frequency
• Frequency is the rate of change with respect
to time.
• Change in a short span of time means high
frequency.
• Change over a long span of
time means low frequency.
Note
If a signal does not change at all, its
frequency is zero.
If a signal changes instantaneously, its
frequency is infinite.
Note
Phase describes the position of the
waveform relative to time 0.
Figure Three sine waves with the same amplitude and frequency,
but different phases
Example
A sine wave is offset 1/6 cycle with respect to time 0.
What is its phase in degrees and radians?
Solution
We know that 1 complete cycle is 360°. Therefore, 1/6
cycle is
Figure Wavelength and period
Figure The time-domain and frequency-domain plots of a sine wave
Note
A complete sine wave in the time
domain can be represented by one
single spike in the frequency domain.
Example
The frequency domain is more compact and
useful when we are dealing with more than one
sine wave. For example, Figure 3.8 shows three
sine waves, each with different amplitude and
frequency. All can be represented by three
spikes in the frequency domain.
Figure The time domain and frequency domain of three sine waves
Signals and Communication
A single-frequency sine wave is not
useful in data communications
We need to send a composite signal, a
signal made of many simple sine
waves.
According to Fourier analysis, any
composite signal is a combination of
simple sine waves with different
frequencies, amplitudes, and phases.
Bandwidth and Signal
Frequency
The bandwidth of a composite signal is
the difference between the highest and
the lowest frequencies contained in that
signal.
Figure The bandwidth of periodic and nonperiodic composite signals
Example
If a periodic signal is decomposed into five sine waves
with frequencies of 100, 300, 500, 700, and 900 Hz, what
is its bandwidth? Draw the spectrum, assuming all
components have a maximum amplitude of 10 V.
Solution
Let fh be the highest frequency, fl the lowest frequency,
and B the bandwidth. Then
The spectrum has only five spikes, at 100, 300, 500, 700,
and 900 Hz (see Figure 3.13).
Figure The bandwidth for Example
Example
A periodic signal has a bandwidth of 20 Hz. The highest
frequency is 60 Hz. What is the lowest frequency? Draw
the spectrum if the signal contains all frequencies of the
same amplitude.
Solution
Let fh be the highest frequency, fl the lowest frequency,
and B the bandwidth. Then
The spectrum contains all integer frequencies. We show
this by a series of spikes (see Figure 3.14).
Figure The bandwidth for Example
Example
A nonperiodic composite signal has a bandwidth of 200
kHz, with a middle frequency of 140 kHz and peak
amplitude of 20 V. The two extreme frequencies have an
amplitude of 0. Draw the frequency domain of the
signal.
Solution
The lowest frequency must be at 40 kHz and the highest
at 240 kHz. Figure 3.15 shows the frequency domain
and the bandwidth.
Figure The bandwidth for Example
Fourier Analysis
Note
Fourier analysis is a tool that changes a
time domain signal to a frequency
domain signal and vice versa.
Time limited and Band limited
Signals
A time limited signal is a signal for which
the amplitude s(t) = 0 for t > T1 and t < T2
A band limited signal is a signal for which
the amplitude S(f) = 0 for f > F1 and f < F2
DIGITAL SIGNALS
In addition to being represented by an analog signal,
information can also be represented by a digital signal.
For example, a 1 can be encoded as a positive voltage
and a 0 as zero voltage. A digital signal can have more
than two levels. In this case, we can send more than 1 bit
for each level.
Figure Two digital signals: one with two signal levels and the other
with four signal levels
Example
A digital signal has eight levels. How many bits are
needed per level? We calculate the number of bits from
the formula
Each signal level is represented by 3 bits.
Example
A digital signal has nine levels. How many bits are
needed per level? We calculate the number of bits by
using the formula. Each signal level is represented by
3.17 bits. However, this answer is not realistic. The
number of bits sent per level needs to be an integer as
well as a power of 2. For this example, 4 bits can
represent one level.
Example
Assume we need to download text documents at the rate
of 100 pages per sec. What is the required bit rate of the
channel?
Solution
A page is an average of 24 lines with 80 characters in
each line. If we assume that one character requires 8
bits (ascii), the bit rate is
Figure The time and frequency domains of periodic and nonperiodic
digital signals
Figure Baseband transmission
Note
A digital signal is a composite analog
signal with an infinite bandwidth.
Figure Baseband transmission using a dedicated medium
Data Rate Limits
DATA RATE LIMITS
A very important consideration in data communications
is how fast we can send data, in bits per second, over a
channel. Data rate depends on three factors:
1. The bandwidth available
2. The level of the signals we use
3. The quality of the channel (the level of noise)
Capacity of a System
The bit rate of a system increases with an
increase in the number of signal levels we
use to denote a symbol.
A symbol can consist of a single bit or “n”
bits.
The number of signal levels = 2n.
As the number of levels goes up, the spacing
between level decreases -> increasing the
probability of an error occurring in the
presence of transmission impairments.
Nyquist Theorem
Nyquist gives the upper bound for the bit rate
of a transmission system by calculating the
bit rate directly from the number of bits in a
symbol (or signal levels) and the bandwidth
of the system (assuming 2 symbols/per
cycle).
Nyquist theorem states that for a noiseless
channel:
C = 2 B log22n
C= capacity in bps
B = bandwidth in Hz
Example
Consider a noiseless channel with a bandwidth of 3000
Hz transmitting a signal with two signal levels. Calculate
maximum bit rate.
Example
Consider the same noiseless channel transmitting a
signal with four signal levels (for each level, we send 2
bits). Calculate the maximum bit rate.
Example
We need to send 265 kbps over a noiseless channel with
a bandwidth of 20 kHz. How many signal levels do we
need?
Shannon’s Theorem
Shannon’s theorem gives the capacity
of a system in the presence of noise.
C = B log2(1 + SNR)
Example
Consider an extremely noisy channel in which the value
of the signal-to-noise ratio is almost zero. In other
words, the noise is so strong that the signal is faint. For
this channel calculate the capacity C.
This means that the capacity of this channel is zero
regardless of the bandwidth. In other words, we cannot
receive any data through this channel.
Example
A telephone line normally has a bandwidth of 3000. The
signal-to-noise ratio is usually 3162. For this channel
calculate the capacity.
Example
The signal-to-noise ratio is often given in decibels.
Assume that SNRdB = 36 and the channel bandwidth is 2
MHz. Calculate channel capacity.
Example
We have a channel with a 1-MHz bandwidth. The SNR
for this channel is 63. What are the appropriate bit rate
and signal level?
Example (continued)
The Shannon formula gives us 6 Mbps, the upper limit.
For better performance we choose something lower, 4
Mbps, for example. Then we use the Nyquist formula to
find the number of signal levels.
Note
The Shannon capacity gives us the
upper limit; the Nyquist formula tells us
how many signal levels we need.
PERFORMANCE
PERFORMANCE
One important issue in networking is the performance of
the network—how good is it?. In this section, we
introduce terms that we need for future chapters.
Note
In networking, we use the term
bandwidth in two contexts.
The first, bandwidth in hertz, refers to the
range of frequencies in a composite signal
or the range of frequencies that a channel
can pass.
The second, bandwidth in bits per second,
refers to the speed of bit transmission in a
channel or link. Often referred to as
Capacity.
Example
A network with bandwidth of 10 Mbps can pass only an
average of 12,000 frames per minute with each frame
carrying an average of 10,000 bits. What is the
throughput of this network?
The throughput is almost one-fifth of the bandwidth in
this case.
Propagation & Transmission delay
Propagation speed - speed at which a
bit travels though the medium from
source to destination.
Transmission speed - the speed at
which all the bits in a message arrive at
the destination. (difference in arrival
time of first and last bit)
Propagation and Transmission Delay
Propagation Delay = Distance/Propagation speed
Transmission Delay = Message size/bandwidth bps
Latency = Propagation delay + Transmission delay +
Queueing time + Processing time
Example
What is the propagation time if the distance between the
two points is 12,000 km? Assume the propagation speed
to be 2.4 × 10^8 m/s in cable.
Example
What are the propagation time and the transmission
time for a 2.5-kbyte message (an e-mail) if the
bandwidth of the network is 1 Gbps? Assume that the
distance between the sender and the receiver is 12,000
km and that light travels at 2.4 × 108 m/s.
Example (continued)
Note that in this case, because the message is short and
the bandwidth is high, the dominant factor is the
propagation time, not the transmission time. The
transmission time can be ignored.
Example
What are the propagation time and the transmission
time for a 5-Mbyte message (an image) if the bandwidth
of the network is 1 Mbps? Assume that the distance
between the sender and the receiver is 12,000 km and
that light travels at 2.4 × 108 m/s.
Example (continued)
Note that in this case, because the message is very long
and the bandwidth is not very high, the dominant factor
is the transmission time, not the propagation time. The
propagation time can be ignored.
Figure Concept of bandwidth-delay product
Note
The bandwidth-delay product defines
the number of bits that can fill the link.
Digital Transmission
DIGITAL-TO-DIGITAL CONVERSION
In this section, we see how we can represent digital
data by using digital signals. The conversion involves
three techniques: line coding, block coding, and
scrambling. Line coding is always needed; block
coding and scrambling may or may not be needed.
Line Coding
Converting a string of 1’s and 0’s
(digital data) into a sequence of signals
that denote the 1’s and 0’s.
For example a high voltage level (+V)
could represent a “1” and a low voltage
level (0 or -V) could represent a “0”.
Figure Line coding and decoding
Mapping Data symbols onto
Signal levels
A data symbol (or element) can consist of a
number of data bits:
1 , 0 or
11, 10, 01, ……
A data symbol can be coded into a single
signal element or multiple signal elements
1 -> +V, 0 -> -V
1 -> +V and -V, 0 -> -V and +V
The ratio ‘r’ is the number of data elements
carried by a signal element.
Relationship between data
rate and signal rate
The data rate defines the number of bits sent
per sec - bps. It is often referred to the bit
rate.
The signal rate is the number of signal
elements sent in a second and is measured in
bauds. It is also referred to as the modulation
rate.
Goal is to increase the data rate while
reducing the baud rate.
Figure Signal element versus data element
Considerations for choosing a good
line encoding
Baseline wandering - a receiver will evaluate
the average power of the received signal
(called the baseline) and use that to determine
the value of the incoming data elements. If
the incoming signal does not vary over a long
period of time, the baseline will drift and thus
cause errors in detection of incoming data
elements.
A good line encoding scheme will prevent long
runs of fixed amplitude.
Line encoding C/Cs
DC components - when the voltage
level remains constant for long periods
of time, there is an increase in the low
frequencies of the signal. Most channels
are bandpass and may not support the
low frequencies.
This will require the removal of the dc
component of a transmitted signal.
Line encoding C/Cs
Self synchronization - the clocks at the
sender and the receiver must have the
same bit interval.
If the receiver clock is faster or slower it
will misinterpret the incoming bit
stream.
Figure Effect of lack of synchronization
Line encoding C/Cs
Error detection - errors occur during
transmission due to line impairments.
Some codes are constructed such that
when an error occurs it can be
detected. For example: a particular
signal transition is not part of the code.
When it occurs, the receiver will know
that a symbol error has occurred.
Line encoding C/Cs
Noise and interference - there are line
encoding techniques that make the
transmitted signal “immune” to noise
and interference.
This means that the signal cannot be
corrupted, it is stronger than error
detection.
Line encoding C/Cs
Complexity - the more robust and
resilient the code, the more complex it
is to implement and the price is often
paid in baud rate or required
bandwidth.
Figure Line coding schemes
Unipolar
All signal levels are on one side of the time
axis - either above or below
NRZ - Non Return to Zero scheme is an
example of this code. The signal level does
not return to zero during a symbol
transmission.
Scheme is prone to baseline wandering and
DC components. It has no synchronization or
any error detection. It is simple but costly in
power consumption.
Figure Unipolar NRZ scheme
Polar - NRZ
The voltages are on both sides of the time
axis.
Polar NRZ scheme can be implemented with
two voltages. E.g. +V for 1 and -V for 0.
There are two versions:
NRZ - Level (NRZ-L) - positive voltage for one
symbol and negative for the other
NRZ - Inversion (NRZ-I) - the change or lack of
change in polarity determines the value of a
symbol. E.g. a “1” symbol inverts the polarity a “0”
does not.
Figure Polar NRZ-L and NRZ-I schemes
Note
In NRZ-L the level of the voltage
determines the value of the bit.
In NRZ-I the inversion
or the lack of inversion
determines the value of the bit.
Note
NRZ-L and NRZ-I both have a DC
component problem and baseline
wandering, it is worse for NRZ-L. Both
have no self synchronization &no error
detection. Both are relatively simple to
implement.
Polar - RZ
The Return to Zero (RZ) scheme uses three
voltage values. +, 0, -.
Each symbol has a transition in the middle.
Either from high to zero or from low to zero.
This scheme has more signal transitions (two
per symbol) and therefore requires a wider
bandwidth.
No DC components or baseline wandering.
Self synchronization - transition indicates
symbol value.
More complex as it uses three voltage level.
It has no error detection capability.
Figure Polar RZ scheme
Polar - Biphase: Manchester and
Differential Manchester
Manchester coding consists of combining the
NRZ-L and RZ schemes.
Every symbol has a level transition in the middle:
from high to low or low to high. Uses only two
voltage levels.
Differential Manchester coding consists of
combining the NRZ-I and RZ schemes.
Every symbol has a level transition in the middle.
But the level at the beginning of the symbol is
determined by the symbol value. One symbol
causes a level change the other does not.
Figure Polar biphase: Manchester and differential Manchester schemes
Note
In Manchester and differential
Manchester encoding, the transition
at the middle of the bit is used for
synchronization.
Note
The minimum bandwidth of Manchester
and differential Manchester is 2 times
that of NRZ. The is no DC component
and no baseline wandering. None of
these codes has error detection.
Bipolar - AMI and Pseudoternary
Code uses 3 voltage levels: - +, 0, -, to
represent the symbols (note not transitions to
zero as in RZ).
Voltage level for one symbol is at “0” and the
other alternates between + & -.
Bipolar Alternate Mark Inversion (AMI) - the
“0” symbol is represented by zero voltage
and the “1” symbol alternates between +V
and -V.
Pseudoternary is the reverse of AMI.
Figure Bipolar schemes: AMI and pseudoternary
Block Coding
For a code to be capable of error detection, we need
to add redundancy, i.e., extra bits to the data bits.
Synchronization also requires redundancy -
transitions are important in the signal flow and must
occur frequently.
Block coding is done in three steps: division,
substitution and combination.
Note
Block coding is normally referred to as
mB/nB coding;
it replaces each m-bit group with an
n-bit group.
Figure Block coding concept
Scrambling
The best code is one that does not increase
the bandwidth for synchronization and has no
DC components.
Scrambling is a technique used to create a
sequence of bits that has the required features
for transmission - self clocking, no low
frequencies, no wide bandwidth.
It is implemented at the same time as
encoding, the bit stream is created on the fly.
It replaces ‘unfriendly’ runs of bits with a
violation code that is easy to recognize.
Figure AMI used with scrambling
For example: B8ZS substitutes eight
consecutive zeros with 000VB0VB.
The V stands for violation, it violates the
line encoding rule
B stands for bipolar, it implements the
bipolar line encoding rule
Figure Two cases of B8ZS scrambling technique
HDB3 substitutes four consecutive
zeros with 000V or B00V depending
on the number of nonzero pulses after
the last substitution.
If # of non zero pulses is even the
substitution is B00V to make total # of
non zero pulse even.
If # of non zero pulses is odd the
substitution is 000V to make total # of
non zero pulses even.
Figure Different situations in HDB3 scrambling technique
Analog Transmission
DIGITAL-TO-ANALOG CONVERSION
Digital-to-analog conversion is the process of
changing one of the characteristics of an analog
signal based on the information in digital data.
Digital to Analog Conversion
Digital data needs to be carried on an
analog signal.
A carrier signal (frequency fc) performs
the function of transporting the digital
data in an analog waveform.
The analog carrier signal is manipulated
to uniquely identify the digital data
being carried.
Figure Digital-to-analog conversion
Figure Types of digital-to-analog conversion
Note
Bit rate, N, is the number of bits per
second (bps). Baud rate is the number of
signal
elements per second (bauds).
In the analog transmission of digital
data, the signal or baud rate is less than
or equal to the bit rate.
S=Nx1/r bauds
Where r is the number of data bits per
signal element.
Example
An analog signal carries 4 bits per signal element. If
1000 signal elements are sent per second, find the bit
rate.
Solution
In this case, r = 4, S = 1000, and N is unknown. We can
find the value of N from
Amplitude Shift Keying (ASK)
ASK is implemented by changing the
amplitude of a carrier signal to reflect
amplitude levels in the digital signal.
For example: a digital “1” could not affect the
signal, whereas a digital “0” would, by
making it zero.
Figure Binary amplitude shift keying
Frequency Shift Keying
The digital data stream changes the
frequency of the carrier signal, fc.
For example, a “1” could be
represented by f1=fc +f, and a “0”
could be represented by f2=fc-f.
Figure Binary frequency shift keying
Phase Shift Keyeing
We vary the phase shift of the carrier
signal to represent digital data.
PSK is much more robust than ASK as it
is not that vulnerable to noise, which
changes amplitude of the signal.
Figure Binary phase shift keying
Quadrature PSK
To increase the bit rate, we can code 2 or
more bits onto one signal element.
In QPSK, we parallelize the bit stream so that
every two incoming bits are split up and PSK
a carrier frequency. One carrier frequency is
phase shifted 90o from the other - in
quadrature.
The two PSKed signals are then added to
produce one of 4 signal elements. L = 4 here.
Figure QPSK and its implementation
Transmission of
Digital Data
Parallel Transmission
Serial Transmission
Asynchronous Transmission
Synchronous Transmission
DTEs and DCEs
Bandwidth Utilization:
Multiplexing
Note
Bandwidth utilization is the wise use of
available bandwidth to achieve
specific goals.
Efficiency can be achieved by
multiplexing; i.e., sharing of the
bandwidth between multiple users.
MULTIPLEXING
Whenever the bandwidth of a medium linking two
devices is greater than the bandwidth needs of the
devices, the link can be shared. Multiplexing is the set
of techniques that allows the (simultaneous)
transmission of multiple signals across a single data
link. As data and telecommunications use increases, so
does traffic.
Figure Dividing a link into channels
Figure Categories of multiplexing
Figure Frequency-division multiplexing (FDM)
Note
FDM is an analog multiplexing technique
that combines analog signals.
It uses the concept of modulation.
Figure FDM process
Figure FDM demultiplexing example
Figure Wavelength-division multiplexing (WDM)
Note
WDM is an analog multiplexing
technique to combine optical signals.
Figuree Prisms in wavelength-division multiplexing and demultiplexing
Figure Time Division Multiplexing (TDM)
Note
TDM is a digital multiplexing technique
for combining several low-rate digital
channels into one high-rate one.
Data Rate Management
Not all input links maybe have the same
data rate.
Some links maybe slower. There maybe
several different input link speeds
There are three strategies that can be
used to overcome the data rate
mismatch: multilevel, multislot and
pulse stuffing
Data rate matching
Multilevel: used when the data rate of the
input links are multiples of each other.
Multislot: used when there is a GCD between
the data rates. The higher bit rate channels
are allocated more slots per frame, and the
output frame rate is a multiple of each input
link.
Pulse Stuffing: used when there is no GCD
between the links. The slowest speed link will
be brought up to the speed of the other links
by bit insertion, this is called pulse stuffing.
Figure Multilevel multiplexing
Figure Multiple-slot multiplexing
Figure Pulse stuffing
Chapter 2
Data Communication
Principles
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3-4 TRANSMISSION IMPAIRMENT
Signals travel through transmission media, which are not
perfect. The imperfection causes signal impairment. This
means that the signal at the beginning of the medium is
not the same as the signal at the end of the medium.
What is sent is not what is received. Three causes of
impairment are attenuation, distortion, and noise.
Topics discussed in this section:
Attenuation
Distortion
Noise
3.2
Figure 3.25 Causes of impairment
3.3
3.4
Attenuation
Means loss of energy -> weaker signal
When a signal travels through a
medium it loses energy overcoming the
resistance of the medium
Amplifiers are used to compensate for
this loss of energy by amplifying the
signal.
3.5
Measurement of Attenuation
To show the loss or gain of energy the
unit “decibel” is used.
dB = 10log10P2/P1
P1 - input signal
P2 - output signal
3.6
Figure 3.26 Attenuation
3.7
Example 3.26
Suppose a signal travels through a transmission medium
and its power is reduced to one-half. This means that P2
is (1/2)P1. In this case, the attenuation (loss of power)
can be calculated as
A loss of 3 dB (–3 dB) is equivalent to losing one-half
the power.
3.8
Example 3.27
A signal travels through an amplifier, and its power is
increased 10 times. This means that P2 = 10P1 . In this
case, the amplification (gain of power) can be calculated
as
3.9
Example 3.28
One reason that engineers use the decibel to measure the
changes in the strength of a signal is that decibel
numbers can be added (or subtracted) when we are
measuring several points (cascading) instead of just two.
In Figure 3.27 a signal travels from point 1 to point 4. In
this case, the decibel value can be calculated as
3.10
Figure 3.27 Decibels for Example 3.28
3.11
Example 3.29
Sometimes the decibel is used to measure signal power
in milliwatts. In this case, it is referred to as dBm and is
calculated as dBm = 10 log10 Pm , where Pm is the power
in milliwatts. Calculate the power of a signal with dBm =
−30.
Solution
We can calculate the power in the signal as
3.12
Example 3.30
The loss in a cable is usually defined in decibels per
kilometer (dB/km). If the signal at the beginning of a
cable with −0.3 dB/km has a power of 2 mW, what is the
power of the signal at 5 km?
Solution
The loss in the cable in decibels is 5 × (−0.3) = −1.5 dB.
We can calculate the power as
3.13
3.14
Distortion
Means that the signal changes its form or
shape
Distortion occurs in composite signals
Each frequency component has its own
propagation speed traveling through a
medium.
The different components therefore arrive
with different delays at the receiver.
That means that the signals have different
phases at the receiver than they did at the
source.
3.15
Figure 3.28 Distortion
3.16
3.17
Noise
There are different types of noise
Thermal - random noise of electrons in the
wire creates an extra signal
Induced - from motors and appliances,
devices act are transmitter antenna and
medium as receiving antenna.
Crosstalk - same as above but between
two wires.
Impulse - Spikes that result from power
lines, lighning, etc.
3.18
Figure 3.29 Noise
3.19
Signal to Noise Ratio (SNR)
To measure the quality of a system the
SNR is often used. It indicates the
strength of the signal wrt the noise
power in the system.
It is the ratio between two powers.
It is usually given in dB and referred to
as SNRdB.
3.20
Example 3.31
The power of a signal is 10 mW and the power of the
noise is 1 μW; what are the values of SNR and SNRdB ?
Solution
The values of SNR and SNRdB can be calculated as
follows:
3.21
Example 3.32
The values of SNR and SNRdB for a noiseless channel
are
We can never achieve this ratio in real life; it is an ideal.
3.22
Figure 3.30 Two cases of SNR: a high SNR and a low SNR
3.23