2. Analog Data, Analog Signals
Why modulate analog signals?
Higher frequency can give more efficient
transmission
Permits frequency division multiplexing
Types of modulation
Amplitude
Frequency
Phase
3. Analog-to-analog conversion is the
representation of analog information by an
analog signal.
One may ask why we need to modulate an
analog signal; it is already analog.
Modulation is needed if the medium is
bandpass in nature or if only a bandpass
channel is available to us.
4. Topics discussed in this section:
Amplitude Modulation
Frequency Modulation
Phase Modulation
5. Amplitude Modulation
A carrier signal is modulated only in
amplitude value
The modulating signal is the envelope of
the carrier
The required bandwidth is 2B, where B is
the bandwidth of the modulating signal
Since on both sides of the carrier freq. fc,
the spectrum is identical, we can discard
one half, thus requiring a smaller
bandwidth for transmission.
9. Frequency Modulation
The modulating signal changes the freq. fc
of the carrier signal
The bandwidth for FM is high
It is approx. 10x the signal frequency
10. The total bandwidth required for FM can
be determined from the bandwidth
of the audio signal: BFM = 2(1 + β)B.
Where is usually 4.
13. Phase Modulation (PM)
The modulating signal only changes the
phase of the carrier signal.
The phase change manifests itself as a
frequency change but the instantaneous
frequency change is proportional to the
derivative of the amplitude.
The bandwidth is higher than for AM.
14.
15.
16. Multiplexing : Sharing a
Medium
Under the simplest conditions, a medium can carry only one signal
at any moment in time.
For multiple signals to share one medium, the medium must
somehow be divided, giving each signal a portion of the total
bandwidth.
The current techniques that can accomplish this include
• frequency division multiplexing (FDM)
• time division multiplexing (TDM)
• Synchronous vs statistical
• wavelength division multiplexing (WDM)
• code division multiplexing (CDM)
18. Two or more simultaneous transmissions
on a single circuit.
Transparent to end user.
Multiplexing costs less.
19. Frequency Division Multiplexing
Assignment of non-overlapping frequency ranges to each
“user” or signal on a medium. Thus, all signals are
transmitted at the same time, each using different
frequencies.
A multiplexor accepts inputs and assigns frequencies to
each device.
The multiplexor is attached to a high-speed
communications line.
A corresponding multiplexor, or demultiplexor, is on the
end of the high-speed line and separates the multiplexed
signals.
20.
21. Frequency Division Multiplexing
Analog signaling is used to transmits the signals.
Broadcast radio and television, cable television,
and the AMPS cellular phone systems use
frequency division multiplexing.
This technique is the oldest multiplexing
technique.
Since it involves analog signaling, it is more
susceptible to noise.
22. Time Division Multiplexing
Sharing of the signal is accomplished by
dividing available transmission time on a
medium among users.
Digital signaling is used exclusively.
Time division multiplexing comes in two
basic forms:
1. Synchronous time division multiplexing, and
2. Statistical, or asynchronous time division multiplexing.
23. Synchronous Time Division Multiplexing
The original time division multiplexing.
The multiplexor accepts input from
attached devices in a round-robin fashion
and transmit the data in a never ending
pattern.
T-1 and ISDN telephone lines are common
examples of synchronous time division
multiplexing.
24.
25. Synchronous Time Division
Multiplexing
If one device generates data at a faster
rate than other devices, then the
multiplexor must either sample the
incoming data stream from that device
more often than it samples the other
devices, or buffer the faster incoming
stream.
If a device has nothing to transmit, the
multiplexor must still insert a piece of data
from that device into the multiplexed
stream.
26. So that the receiver may stay synchronized with
the incoming data stream, the transmitting
multiplexor can insert alternating 1s and 0s into
the data stream.
27. Synchronous Time Division
Multiplexing
Three types popular today:
• T-1 multiplexing (the classic)
• ISDN multiplexing
• SONET (Synchronous Optical NETwork)
28. The T1 (1.54 Mbps) multiplexor stream is
a continuous series of frames of both
digitized data and voice channels.
29. Synchronous TDM
Very popular
Line will require as much bandwidth as all
the bandwidths of the sources
30. Statistical Time Division
Multiplexing
A statistical multiplexor transmits only the data from
active workstations (or why work when you don’t have
to).
If a workstation is not active, no space is wasted on the
multiplexed stream.
A statistical multiplexor accepts the incoming data
streams and creates a frame containing only the data to
be transmitted.
31.
32. To identify each piece of data, an address
is included.
33. If the data is of variable size, a
length is also included.
34. More precisely, the transmitted frame
contains a collection of data groups.
35. Statistical Time Division
Multiplexing
A statistical multiplexor does not require a
line over as high a speed line as
synchronous time division multiplexing
since STDM does not assume all sources
will transmit all of the time!
Good for low bandwidth lines (used for
LANs)
Much more efficient use of bandwidth!
37. Dense Wavelength Division
Multiplexing (DWDM)
Dense wavelength division multiplexing is often called
just wavelength division multiplexing
Dense wavelength division multiplexing multiplexes
multiple data streams onto a single fiber optic line.
Different wavelength lasers (called lambdas) transmit the
multiple signals.
Each signal carried on the fiber can be transmitted at a
different rate from the other signals.
Dense wavelength division multiplexing combines many
(30, 40, 50, 60, more?) onto one fiber.
38.
39.
40.
41.
42. My Name is RAM
User 1-0101
User 2-0110
User 3-1010
User4- 1110
45. Code Division Multiplexing (CDM)
Old but now new method
Also known as code division multiple
access (CDMA)
An advanced technique that allows
multiple devices to transmit on the same
frequencies at the same time using
different codes
Used for mobile communications
46. Code Division Multiplexing
An advanced technique that allows
multiple devices to transmit on the same
frequencies at the same time.
Each mobile device is assigned a unique
64-bit code (chip spreading code)
To send a binary 1, mobile device
transmits the unique code
To send a binary 0, mobile device
transmits the inverse of code
47. Receiver gets summed signal, multiplies it
by receiver code, adds up the resulting
values
Interprets as a binary 1 if sum is near +64
Interprets as a binary 0 if sum is near –64
48.
49. Business Multiplexing In Action
XYZ Corporation has two buildings
separated by a distance of 300 meters.
A 3-inch diameter tunnel extends
underground between the two buildings.
Building A has a mainframe computer and
Building B has 66 terminals.
List some efficient techniques to link the
two buildings.
50.
51. Possible Solutions
Connect each terminal to the mainframe
computer using separate point-to-point lines.
Connect all the terminals to the mainframe
computer using one multipoint line.
Connect all the terminal outputs and use
microwave transmissions to send the data to the
mainframe.
Collect all the terminal outputs using
multiplexing and send the data to the mainframe
computer using a conducted line.
52. What did we cover
Multiplexing
Types of multiplexing
TDM
Synchronous TDM (T-1, ISDN, optical fiber)
Statistical TDM (LANs)
FDM (cable, cell phones, broadband)
WDM (optical fiber)
CDM (cell phones)
56. Modulation of Digital Data
ASK – strength of carrier signal is varied to
represent binary 1 or 0 •
both frequency & phase remain constant
while amplitude changes •
commonly, one of the amplitudes is zero
57.
58. • demodulation: only the presence or
absence of a sinusoid in a given time
interval needs to be determined
advantage: simplicity
• disadvantage: ASK is very susceptible to
noise interference – noise usually (only)
affects the amplitude, therefore ASK is the
modulation technique most affected by
noise
• application: ASK is used to transmit
digital data over optical fiber
60. Modulation of Digital Data: FSK
FSK – frequency of carrier signal is varied
to represent binary 1 or 0
peak amplitude & phase remain constant
during each bit interval
61.
62. demodulation: demodulator must be able
to determine which of two possible
frequencies is present at a given time
advantage: FSK is less susceptible to
errors than ASK – receiver looks for
specific frequency changes over a number
of intervals, so voltage (noise) spikes can
be ignored
disadvantage: FSK spectrum is 2 x ASK
spectrum • application: over voice lines, in
high-freq. radio transmission, etc.
63.
64. Modulation of Digital Data: PSK
phase of carrier signal is varied to
represent binary 1 or 0
peak amplitude & freq. remain constant
during each bit interval
example: binary 1 = 0º phase, binary 0 =
180º (πrad) phase ⇒ PSK is equivalent to
multiplying carrier signal by +1 when the
information is 1, and by -1 when the
information is 0
65.
66. • demodulation: demodulator must
determine the phase of received sinusoid
with respect to some reference phase
• advantage: ƒ
PSK is less susceptible to
errors than ASK, while it requires/occupies
the same bandwidth as ASK ƒ
more efficient
use of bandwidth (higher data-rate) are
possible, compared to FSK !!!
• disadvantage: more complex signal
detection / recovery process, than in ASK
and FSK
67.
68. QPSK = 4 QPSK = 4 -PSK – PSK that uses
phase shifts of 90º= π/2 rad ⇒ 4 different
signals generated, each representing 2
bits
69.
70. advantage: higher data rate than in PSK
(2 bits per bit interval), while bandwidth
occupancy remains the same
• 4-PSK can easily be extended to 8-PSK,
i.e. n-PSK
• however, higher rate PSK schemes are
limited by the ability of equipment to
distinguish small differences in phase
71. Modulation of Digital Data: QAM
Quadrature Quadrature Amplitude
Amplitude Modulation Modulation (QAM)
uses “two-dimensional” signalling •
original information stream is split into two
sequences that consist of odd and even
symbols, e.g. B k and A k
72. Analog Data, Digital Signal
Digitization
Conversion of analog data into digital data
Digital data can then be transmitted using NRZ-L
Digital data can then be transmitted using code
other than NRZ-L
Digital data can then be converted to analog
signal
Analog to digital conversion done using a codec
Pulse code modulation
Delta modulation
73. PCM
PCM consists of three steps to digitize an
analog signal:
1. Sampling
2. Quantization
3. Binary encoding
Before we sample, we have to filter the signal
to limit the maximum frequency of the signal
as it affects the sampling rate.
Filtering should ensure that we do not distort
the signal, ie remove high frequency
components that affect the signal shape.
74.
75. Recovery of a sampled sine
wave for different sampling
rates
77. Pulse Code Modulation(PCM)
If a signal is sampled at regular intervals
at a rate higher than twice the highest
signal frequency, the samples contain all
the information of the original signal
Voice data limited to below 4000Hz
Require 8000 sample per second
Analog samples (Pulse Amplitude
Modulation, PAM)
Each sample assigned digital value
78. 4 bit system gives 16 levels
Quantized
Quantizing error or noise
Approximations mean it is impossible to
recover original exactly
8 bit sample gives 256 levels
Quality comparable with analog
transmission
8000 samples per second of 8 bits each
gives 64kbps
82. OBJECTIVES
After reading this topic, one should
be able to:
Realize the need for data compression
Differentiate between lossless and lossy
compression.
Understand three lossless compression
encoding techniques: run-length, Huffman,
and Lempel Ziv.
Understand two lossy compression methods:
JPEG and MPEG.
85. In lossless data compression, the integrity of the
data is preserved.
The original data and the data after compression
and decompression are exactly the same
because the compression and decompression
algorithms are exactly the inverse of each other.
Example:
Run-length encoding
Huffman encoding
Lempel Ziv (L Z) encoding (dictionary-based encoding)
86. Run-length encoding
It does not need knowledge of the
frequency of occurrence of symbols and
can be very efficient if data are
represented as 0s and 1s.
For example:
87. Run-length encoding for two
symbols
We can encode one symbol which is more
frequent than the other.
This example only encode 0’s between 1’s.
There is no 0 between 1’s
88. Huffman coding
In Huffman coding, you assign shorter
codes to symbols that occur more
frequently and longer codes to those that
occur less frequently.
For example:
Character A B C D E
------------------------------------------------------
Frequency 17 12 12 27 32
89. A Method for the Construction of
Minimum-Redundancy Codes.
Huffman coding is not always
optimal among all compression methods.
94. The technique works by creating a binary
tree of nodes.
Internal nodes contain a weight, links
to two child nodes and an optional link
to a parent node.
As a common convention, bit '0'
represents following the left child and bit
'1' represents following the right child.
97. The beauty of Huffman coding is that no
code in the prefix of another code.
There is no ambiguity in encoding.
The receiver can decode the received data
without ambiguity.
Huffman code is called instantaneous
code because the decoder can
unambiguously decode the bits
instantaneously with the minimum number
of bits.
98. Lempel Ziv encoding
LZ encoding is an example of a category
of algorithms called dictionary-based
encoding.
The idea is to create a dictionary (table) of
strings used during the communication
session.
The compression algorithm extracts the
smallest substring that cannot be found in
the dictionary from the remaining non-
compressed string.
99. Lempel–Ziv–Welch (LZW) is a
universal lossless data
compression algorithm created by Abraham
Lempel, Jacob Ziv, and Terry Welch.
It was published by Welch in 1984 as an
improved implementation of
the LZ78 algorithm published by Lempel
and Ziv in 1978.
The algorithm is simple to implement and
has the potential for very high throughput
in hardware implementations.
100. It is the algorithm of the widely
used Unix file compression
utility compress and is used in
the GIF image format.
101. The plaintext to be encoded (from an
alphabet using only the capital letters) is:
TOBEORNOTTOBEORTOBE
ORNOT#
102. The # is a marker used to show that the
end of the message has been reached.
There are thus 26 symbols in the plaintext
alphabet (the 26 capital
letters A through Z), and the # character
represents a stop code. We arbitrarily
assign these the values 1 through 26 for
the letters, and 0 for '#'.
103. Five-bit codes are needed to give
sufficient combinations to encompass this
set of 27 values.
The dictionary is initialized with these 27
values.
As the dictionary grows, the codes will
need to grow in width to accommodate
the additional entries.
104. A 5-bit code gives 25 = 32 possible
combinations of bits, so when the 33rd
dictionary word is created, the algorithm
will have to switch at that point from 5-bit
strings to 6-bit.
Note that since the all-zero code 00000 is
used, and is labeled "0", the 33rd
dictionary entry will be labeled 32.
105. O 01111 15
P 10000 16
Q 10001 17
R 10010 18
S 10011 19
T 10100 20
U 10101 21
V 10110 22
W 10111 23
X 11000 24
Y 11001 25
Z 11010 26
Symbol Binary
Decimal
# 00000 0
A 00001 1
B 00010 2
C 00011 3
D 00100 4
E 00101 5
F 00110 6
G 00111 7
H 01000 8
I 01001 9
J 01010 10
K 01011 11
L 01100 12
M 01101 13
N 01110 14
106. Current Next Output Extended Dictionary Comments
Sequ Char Code Bits
NULL T
T O 20 10100 27: TO 27 = first available code after 0 through 26
O B 15 01111 28: OB
B E 2 00010 29: BE
E O 5 00101 30: EO
O R 15 01111 31: OR
R N 18 10010 32: RN 32 requires 6 bits, so for next output use 6 bits
N O 14 001110 33: NO
O T 15 001111 34: OT
T T 20 010100 35: TT
TO B 27 011011 36: TOB
BE O 29 011101 37: BEO
OR T 31 011111 38: ORT
TOB E 36 100100 39: TOBE
EO R 30 011110 40: EOR
RN O 32 100000 41: RNO
OT # 34 100010 # stops the algorithm; send the cur seq
0 000000 and the stop code
107. Unencoded length = 25 symbols × 5 bits/symbol = 125
bits
Encoded length = (6 codes × 5 bits/code) + (11 codes
× 6 bits/code) = 96 bits.
Using LZW has saved 29 bits out of 125, reducing the
message by almost 22%. If the message were longer,
then the dictionary words would begin to represent
longer and longer sections of text, allowing repeated
words to be sent very compactly.
108. Decoding
To decode an LZW-compressed archive,
one needs to know in advance the initial
dictionary used, but additional entries can
be reconstructed as they are always
simply concatenations of previous entries.
115. Loss of information is acceptable in a
picture of video.
The reason is that our eyes and ears
cannot distinguish subtle changes.
Loss of information is not acceptable in a
text file or a program file.
For examples:
Joint photographic experts group (JPEG)
Motion picture experts group (MPEG)
118. The JPEG image compression technique
consists of 5 functional stages.
1. an RGB to YCC color space conversion,
2. a spatial subsampling of the chrominance channels in YCC
luminance/chrominance-red/chrominance blue color space,
3. the transformation of a blocked representation of the YCC spatial image
data to a frequency domain representation using the discrete cosine
transform,
4. a quantization of the blocked frequency domain data according to a user-
defined quality factor, and finally
5. the coding of the frequency domain data, for storage, using Huffman
coding.
119.
120.
121. A photo of a european wildcat with the compression rate
decreasing, and hence quality increasing, from left to right
122.
123. Discrete cosine transform
T(0, 0): DC value (direct current value)
T(m, n) : AC values (represent changes in
the pixel values
Case 1: uniform gray scale
T(0, 0)
126. DCT discussion
The DCT transformation creates table T
from table P.
The DC value gives the average value of
the pixels.
The AC values gives the changes.
Lack of changes in neighboring pixels
creates 0s.
The DCT transformation is reversible.
Appendix F (Mathematical formula for DCT
transformation)
127. Quantization
After the T table is created, the values are
quantized to reduce the number of bits
needed for encoding.
Quantization:
Divide the number by a constant and then
drop the fraction.
The quantizing phase is not reversible.
Some information will be lost.
128. Compression
After quantization, the values are read
from the table, and redundant 0s are
removed.
The reason is that if the picture does not
have fine changes, the bottom right
corner of the T table is all 0s.
134. Video compression--MPEG
MPEG method
Spatial compression
The spatial compression of each frame is
done with JPEG.
Temporal compression
The temporal compression removes the
redundant frames.
MPEG method first divides frames into
three categories: I-frames, P-frames, B-
frames.
136. I-frames: (intra-coded frame)
It is an independent frame that is not related
to any other frame.
They are present at regular intervals.
I-frames are independent of other frames and
cannot be constructed from other frames.
138. P-frames: (predicted frame)
It is related to the preceding I-frame or P-frame.
Each P-frame contains only the changes from the
preceding frame.
P-frames can be constructed only from previous I- or
P-frames.
B-frames: (bidirectional frame)
It is relative to the preceding and following I-frame or
P-frame.
Each B-frame is relative to the past and the future.
A B-frame is never related to another B-frame.