Transcript Chapter3

Computer Networks
Chapter 3 – Time and Frequency Domain Concept,
Transmission Impairments
Analog and Discret Data
 Data used by the humans can be analog or discrete
 Analog data
 Can have unlimited number of values
 Examples of analog data are human voice, music,
picture, movie, ...
 Discrete data
 Can have limited number of values
 Example of discrete data is text written in English
language (28 characters are used).
Spring 2006
Computer Networks
2
Digital data
 Today computers are used to process data.
 Data stored in the computer memory are digital
data
 Digital data consist of 0s and 1s (bits)
 In order to be processed by computers, data used
by humans need to be transformed into digital data
 Transforming data from one type to another is
caled encoding or coding. The reverse process is
called decoding.
Spring 2006
Computer Networks
3
Transforming Characters
 It is conveinient to use equal number of bits for
each character. The number of bits used depends
on the number of characters to be coded.
 If N bits are used than 2N different codes (each
assigned to a different character) can be obtained.
 Standard ASCII code uses 7 bits. Then 27=128
different characters are obtained.
 Note that small and capital letters are coded with
different code.
 Extended ASCII code uses 8 bits. Then 28=256
different characters are obtained.
Spring 2006
Computer Networks
4
Transforming Pictures
 Pictures are splitted into small squres called pixels and each
of them is coded with a string of bits. In a simple picture
having only black and white spots, it is enough to have a
single bit for encoding pixels.
5 x 5 = 25 bits
are required
1
0
0
0
1
0
1
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
0
0
1
10001 01010 00100 01010 10001
Spring 2006
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
0
0
0
00000 00100 01110 00100 00000
Computer Networks
5
Example with different number of pixels
13x15 pixels och
256 färger
206x233 pixels
och 16 färger
206x233 pixels
och 256 färger
13x15x8bit
= 1560bit
bitmappad bild
206x233x4bit
= 192000bit
bitmappad bild
206x233x8bit
= 384000bit
bitmappad bild
Spring 2006
Computer Networks
6
Data and Electric Signals
 To transmit human data, they need first to be
transformed into electric signals.
 It is possible to transform analog data directly into
analog signals and digital data into digital signals.
 Before the invention of computers the analog data
were usually transformed into analog signals and
the communication systems used were mostly
analog.
 With the invention of computers most of the
systems ar digital. However, some analog systems
still exist.
Spring 2006
Computer Networks
7
Physical Layer
 One of the tasks of the physical layer is to deal
with electrical signal and their transformation.
 The possible transformations are:




Analog-to-digital
Digital-to-digital
Analog-to-analog
Digital-to-digital
 The transformations are required to make possible
transmmision of data through the physical
medium.
Spring 2006
Computer Networks
8
Time Domain Concept
 Analog or continous signal
 Varies in a smooth way over time
 Digital signal
 Maintains constant level, than changes to another
constant level
 Periodic signal
 Pattern repeats over time
 Non periodic signal
 Ppattern does not repeat over time
Spring 2006
Computer Networks
9
Analog versus Digital Signals
 Analog
s(t)
no breaks or
discontinuities
 Changes contnously with time.
t
 Digital
 Can have only two values.
s(t) changes abruptly from
one level to another.
 Conversion is possible
t
 Analog data  Digital signal
 Discrete (digital) data  Analog signal
Spring 2006
Computer Networks
10
Analog versus Digital Data
 What kind of data might be modeled by
 analog signal?
 digital signal?
 analog signal might be a
voltage representation of voice ,
such as a phone call
Spring 2006
 digital signal might be a
voltage representing data (text
coded with ASCII) consisting
of ones and zeros.
Computer Networks
11
Periodic vs. Non Periodic Signals
 Periodic signal
 repeat over and over again,
once per period
 The period ( T ) is the time
it takes to make one
complete cycle
 Non periodic signal
 signals don’t repeat
according to any particular
pattern
Spring 2006
Computer Networks
12
Most Common Periodic Signal
s(t)
f
Phase
Amplitude (A)
t
(T)
Wave Length (Period)
 Sine or cosine waveform: s(t) = A sin (t +)
 Characteristics: A –Amplitude, T – Period (wavelength),
f = 1/T (Hz) – Frequency, f -phase
Spring 2006
Computer Networks
13
Three Basic Features of the Sine Wave
A sin(2ft  f)
Amplitude
frequency
phase
The only variable is t (time)
Spring 2006
Computer Networks
14
Example Sine Waves
A=1, f=1, f=0
A=0.5, f=1, f=0
A=1, f=2, f=0
A=1, f=1, f=/4
Spring 2006
Computer Networks
15
Measurment Units for Period and Frequency
Units for Period
Second (s)
Equivalent
1s
Units for Frequency
Hertz (Hz)
Equivalent
1 Hz
Milliseconds (ms)
10–3 s
Kilohertz (kHz)
103 Hz
Microseconds (μs)
10–6 s
Megahertz (MHz)
106 Hz
Nanoseconds (ns)
10–9 s
Gigahertz (GHz)
109 Hz
Picoseconds (ps)
10–12 s
Terahertz (THz)
1012 Hz
Spring 2006
Computer Networks
16
Relationship between Period and Frequency
 The period is inversly proportional to the frequency.
f = 1/T
Example: What is the period for a signal with f=1 KHz?
Solution: T=1/1000 = 0.001s = 1ms.
Spring 2006
Computer Networks
17
Measuring the Phase
 The phase is measured in degrees or in radians.
 One full cycle is 360o
360o (degrees) = 2 (radians)
  3.14
Example: A sine wave is offset one-sixth of a cycle with
respect to time 0. What is the phase in radians?
Solution: (1/6) 360 = 60 degrees = 60 x 2p /360 rad =
1.046 rad
Spring 2006
Computer Networks
18
Time and Frequency Domain Concept
 For each signal, there is a time domain function
s(t), that specifies the amplitude of the signal in
each instant of time
 For each signal s(t), there is a frequiency domain
function S(f) that specifies the constituent
frequencies of the signal. This is also called the
frequency specrum of the signal.
 The signal with a simplest spectrum is the sine
(cosine) signal.
Spring 2006
Computer Networks
19
Example: Sine waves
Frequency domain
Time domain
t
f
f1
T1=1/f1
t
f
3f1
T2=1/3f1
t
f
5f1
T5=1/f5
Spring 2006
Computer Networks
20
Example: A signal with frequency 0
Frequency domain
Time domain
...
t
Spring 2006
f
0
Computer Networks
21
Composite Signals
 Composite signals are usually signals made up of
sine waves with different frequencies
 The components are called harmonics
 When components are known the frequency domain
can be easily plot
Spring 2006
Computer Networks
22
Example: Square Wave
Square wave with frequency fo
4A
1
1
s(t ) 
{cos ot  cos 3ot  cos 5ot  ...}

3
5
Component 1:
Component 3:
.
.
.
Spring 2006
Component 5:
.
.
.
Computer Networks
s1 (t ) 
4A
cos o t

4A
s3 (t ) 
cos 3ot
3
4A
s5 (t ) 
cos 5o t
5
23
Characteristic of the Component Signals in
the Square Wave
 Infinite number of components
 Only the odd harmonic components are present
 The amplitudes of the components diminish with
increasing frequency
Spring 2006
Computer Networks
24
Experimenting with Signals and Frequencies
 If you want to experiment and easily obtain
graphs of sine waves with different frequencies or
find the sine components of a square wave
download the program ”Frequency” , given on the
”Download” page.
Spring 2006
Computer Networks
25
Spectrum and Bandwidth of the Signal
 Spectrum of a signal
 range of frequencies contained in the signal
 Absolute bandwidth of the signal
 width of spectrum (the highest – the lowest frequency)
 Effective bandwidth of the signal
 Often just bandwidth
 Narrow band of frequencies containing most of the energy
of the signal
 DC Component - component of zero frequency
Spring 2006
Computer Networks
26
Bandwidth of Some Common Signals
 Sound
 Speech bandwidth
100Hz to 7kHz
 Telephone
bandwidth 300Hz
to 3400Hz
 Music  20 Hz to
20Khz
 Video, 0 – 4 MHz
 TV, 0 – 6 MHz
Spring 2006
Computer Networks
27
Filtering the Signal
 Filtering is equivalent to cutting all the frequiencies outside the
band of the filter
 Types of filters
Low pass
 Low pas
H(f)
INPUT
S1(f)
OUTPUT
S2(f)= H(f)*S1(f)
H(f)
f
Band pass
 Band pass
H(f)
INPUT
S1(f)
OUTPUT
S2(f)= H(f)*S1(f)
H(f)
f
High pass
 High pass
H(f)
INPUT
S1(f)
Spring 2006
H(f)
Computer Networks
f
OUTPUT
S2(f)= H(f)*S1(f)
28
Media Filters the Signal
Media
INPUT
OUTPUT
Certain frequencies
do not pass through
What happens when you limit frequencies?
Square waves (digital values) lose their edges -> Harder to read correctly.
Spring 2006
Computer Networks
29
Example
 A signal has a spectrum with frequencies between
1000 and 2000 Hz (Bandwidth of 1000 Hz). A
medium can pass frequencies from 3000 to 4000
Hz (a bandwidth of 1000 Hz). Can this signal
faithfully pass through this medium.
Solution: No. Although the bandwidth of the signal
and the media is the same, this signal will not pass
since its spectrum consists of frequencies that
cannot pass through this media.
Spring 2006
Computer Networks
30
Bandwidth of the Link
(analog vs. digital)
 The bandwidth (analog) of the link is the width of
the band of the frequencies (in Herz) that can be
carried by the link with reasonable fidelity and not
be grossly attenuated during propagation
 Some physical links have larger usable bandwidth than
others
 In digital world bandwidth is replaced by capacity
or the maximum bit rate that can be achieved
Spring 2006
Computer Networks
31
Bit Interval and Bit Rate
 For digital signals the period and the frequency are
not appropriate terms
 Two new terms are introduced
 bit interval (instead of period)
 bit rate (instead of frequency)
 Bit interval is the time required to send a single bit.
 Bit rate is the number of bit intervals per second or
the number of bits sent in one second (expressed in
bits/sec or bps).
Spring 2006
Computer Networks
32
Examples
1. If digital signal has bit rate of 2000 bps, what is
the duration of each bit?
bit interval = 1/2000 = 0.0005 = 500ms
2. If a digital signal has a bit interval of 400 ns, what is
the bit rate?
bit rate = 1/(400 ·10-9) = 25 ·106 = 25 Mbps
Spring 2006
Computer Networks
33
The Nature of a Digital Signal
 A digital signal is a composite signal with an
infinite bandwidth (consists of an infinite number
of harmonics).
 The largest portion of the power is contained in
the harmonics with the lowest frequency.
 Therefore, the signal can be reconstructed if it is
transfered throug a low-pass filter.
Spring 2006
Computer Networks
34
Bandwidth Requirements for a Digital
Signal
Bit
Rate
Harmonic
1
Harmonics
1, 3
Harmonics
1, 3, 5
Harmonics
1, 3, 5, 7
1 Kbps
500 Hz
2 KHz
4.5 KHz
8 KHz
10 Kbps
5 KHz
20 KHz
45 KHz
80 KHz
100 Kbps
50 KHz
200 KHz
450 KHz
800 KHz
Spring 2006
Computer Networks
35
What is Transmission Impairment?
 The properties of the signal at the beginning and
at the end of the media are not the same.
 Three types of impairments
 Attenuation
 Distortion
 Noise
Spring 2006
Computer Networks
36
Sources of Signal Degradation/Distortion
 Attenuation
 A decrease in signal amplitude due to the nature of
transmission media (imposing limits on length)
 Distortion
 A change of signal shape due to frequency dependant
attenuation
 Noise and interference
 Outside factors that interact with the signal
Spring 2006
Computer Networks
37
Attenuation
 Any overall attenuation factor in a transmission
medium does not distort the signal.
 All frequencies are affected the same way, and signal shapes
are preserved.
 The signal can be brought back up by ordinary amplifiers
Attenuated
Original
Amplified
Transmission line
Spring 2006
Computer Networks
38
Measurement of Attenuation
 Signal attenuation is measured in units called
decibels (dB).
 If over a transmission link the ratio of output power
is Po/Pi, the attenuation is said to be –10log10(Po/Pi) =
10log10(Pi/Po) dB.
 In cascaded links the attenuation in dB is simply a
sum of the individual attenuations in dB.
 dB is negative when the signal is attenuated and
positive when the signal is amplified
Spring 2006
Computer Networks
39
What is dB?
 A decibel is 1/10th of a Bel, abbreviated dB
 Suppose a signal has a power of P1 watts, and a
second signal has a power of P2 watts. Then the
power amplitude difference in decibels, symbolized
SdBP, is:
SdBP = 10 log10 (P2 / P1)
 As a rule of thumb:
S/N ratio of 10dB means 10/1
S/N ratio of 20dB means 100/1
S/N ratio of 30dB means 1000/1
S/N ratio of 40dB means 10000/1
Spring 2006
Computer Networks
40
Examples:
1. A signal that travels through a transmission medium is
reduced to half. This means that P2 = (1/2)P1
The attenuation can be calculated as follows:
10log10(P2/P1)=10 log10 (0.5 P1/P1)=10log10 (0.5)= 3 dB
2. Imagine a signal goes through an amplifier and its
power is increased 10 times. This means that P2 = 10P1
The amplification is: 10 log10 (10 P1/P1)=
=10log1010=10dB
Spring 2006
Computer Networks
41
Distortion
 Selective attenuation of some frequencies relative to
others results in signal distortion.
Media
INPUT
OUTPUT
Certain frequencies
do not pass through
 Bandwidth of the channel: The range of frequencies
that are not distorted
Spring 2006
Computer Networks
42
Noise and Interference
 Noise is present in the form of random motion of
electrons in conductors, devices and electronic
systems (due to thermal energy) and can be also
picked up from external sources (atmospheric
disturbances, ignition noise etc.)
 Interference (cross-talk) generally refers to the
unwanted signals, picked up by communication link
due to other transmissions taking place in adjacent
frequency bands or in physically adjacent
transmission lines
Spring 2006
Computer Networks
43
Capacity Limits
 Maximum bit rate (capacity) depends on:
 The analog bandwidth available (in Hz)
 The quality of the channel
 The level of the noise is one of the characteristics of the channel.
The ratio of the voltage of the signal sent and the noise present
in the channel is important for the maximum data rate
achieved.
 Shannon’s theorem determines the theoretical
highest data rate of a noisy channel
C = B log2 (1 + S/N)
S/N is the signal to noise ratio (often labeled as SNR)
Spring 2006
Computer Networks
44
Example:
 Problem: Given S/N ratio of 30.098756dB, bandwidth of
8Khz, compute maximum data rate.
 Answer:
S/N = 30.098756dB = 10 ^ 3.0098756 = 1022.9999205 
1023
C = 8 Khz * log2 (1 + 1023 )
C = 8 Khz * log2 (1024 )
C = 8 * 1000 cycles/second * 10 bits/cycle
C = 80 Kbps
Spring 2006
Computer Networks
45
How to calculate log2 x
 Calculators do not have a button for log2 x
calculation
 To calculate log2 x use the following formula:
log2 x = log10 x/log102  log x/0.3
Example: log230 = log 30/log 2 1.477/0.3 4.9
Spring 2006
Computer Networks
46
Delay (Time, Latency)
 When data are sent from one point to the other point (without
intermediate points), two types of delays are experienced:
 transmission delay (time)
 propagation delay (time)
 When data pass through intermediate points four types of
delay (latency) are experienced:




transmission delay (time)
propagation delay (time)
queue time
processing time
Spring 2006
Computer Networks
47
Transmission Delay (Time)
 The transmission time is the time necessary to put
the message on the link (chanel).
 The transmission time depends on the length of
the message and the throughput (bit rate) of the
link and is expressed as:
length of message (bits)
bit rate (bits/sec)
Spring 2006
Computer Networks
48
Propagation Delay (Time)
 The propagation delay is the time needed for the signal to
propagate (travel) from one end of a channel to the other.
 The transmition time depends on the distance between the two
ends and the speed of the signal and is expressed as
distance (m) / speed of propagation (m/s)
 Through free space signals propagate at the speed of light
which is 3 * 108 m/s
 Through wires signals propagate at the speed of
2 * 108 m/s
Spring 2006
Computer Networks
49
Queue and Processing time
 Queue time
 When the intermediate nodes are busy processing other
data, the data arrived at the node are queued. Queue
time is the time spent waiting in the queue.
 Processing time
 This is the time needed for the data to be processed at
the intermediate nodes.
Spring 2006
Computer Networks
50