You are on page 1of 52

Physical Layer:

Data and Signals


01204325: Data Communication
and Computer Networks
Asst. Prof. Chaiporn Jaikaeo, Ph.D.
chaiporn.j@ku.ac.th
http://www.cpe.ku.ac.th/~cpj
Computer Engineering Department
1
Kasetsart University, Bangkok, Thailand

Outline

Analog and digital data/signals


Time and frequency domain views of signals
Bandwidth and bit rate
Transmitting digital signals as analog
Theoretical data rate
Signal impairment

Analog vs. Digital Data

Analog data

Data take on continuous values


E.g., human voice, temperature reading

Digital data

Data take on discrete values


E.g., text, integers

Analog vs. Digital Signals


To be transmitted, data must be
transformed to electromagnetic signals

Analog signals

have an infinite number of


values in a range

Digital signals

value

Have a limited number of


values

time

value

time

Data and Signals


Analog Data

Analog Signal
Telephone

Digital Data

Analog Signal
Modem

Analog Data

Digital Signal
Codec

Digital Data

Digital Signal
Digital
transmitter

Periodic Signals

A periodic signal completes a pattern


within a timeframe, called a period
A signal x(t) is periodic if and only if
x(t) = x(t+T) - < t <
value
period

time

Sine Waves

Simplest form of periodic signal


signal strength
period
T = 1/f
peak
amplitude

time

General form: x(t) = Asin(2ft + )


phase / phase shift
7

Varying Sine Waves


3

0
0

0.5

1.5

2.5

-1

-1

-2

-2

A = 1, f = 1, = 0

-3

1.5

2.5

A = 2, f = 1, = 0

0
0

0.5

1.5

2.5

-1

-1

-2

-2

-3

-3

0.5

A = 1, f = 2, = 0

-3

0.5

1.5

2.5

A = 1, f = 1, = /4
8

Time vs. Frequency Domains


Consider the signal

x ( t ) sin( 2 t )

sin( 2 3 t )

1.5

1.5

1.5

0.5

0.5

0.5

0
0

0.5

1.5

2.5

0
0

0.5

1.5

2.5

0
0

-0.5

-0.5

-0.5

-1

-1

-1

-1.5

-1.5

-1.5

0.5

1.5

2.5

Demo: sine.py

Time vs. Frequency Domains


signal strength

signal strength

1
0

time

-1

Time Domain Representation

plots amplitude as a function


of time

frequency

-1

Frequency Domain Representation

plots each sine waves peak


amplitude against its frequency

Demo: Equalizer

10

Fourier Analysis

Any periodic signal can be represented


as a sum of sinusoids

known as a Fourier Series

Joseph Fourier
(1768-1830)

E.g., a square wave:


=

11

Fourier Analysis

Every periodic signal consists of

DC component
AC components
Fundamental frequency (f0)
Harmonics (multiples of f0)

fundamental
frequency

3rd harmonic

5th harmonic

DC component
AC components
12

Fourier Series: Representations

Amplitude-phase form

x (t ) c 0

cos( 2 f 0 nt n )

n 1

Sine-cosine form

x (t ) a 0

cos( 2 f 0 nt ) b n sin( 2 f 0 nt )

n 1

Complex exponential form (Euler formula)

x (t )

cne

j 2 f 0 nt

Note:
cn are complex
j = -1
ejx = cos x + j sin x
Demo: Falstad

13

The time and frequency domains of a nonperiodic signal

19

Frequency Spectrum

Frequency domain representation shows


the frequency spectrum of a signal
E.g., square wave

...

f0

3f0

5f0

7f0 9f0 11f0

20

Bandwidth

A property of a medium

Indicates the difference between the highest and the


lowest frequencies allowed to pass
<highest freq allowed> <lowest freq allowed>
Cutoff frequency
(half of power is lost)

Also a property of a single spectrum


21

Bandwidth of a Medium
gain

(low-pass channel)

freq
...
0 f0 3f0 5f0 7f0 9f0 f

Transmission medium
0 f0 3f0 5f0

22

Example

What is the bandwidth of this signal?


x ( t ) 2 sin( 2000 t )

sin( 6000 t )

A medium can pass frequencies from 4000


to 7000 Hz. Can the above signal pass
through?

23

Digital Signals

Properties:

Bit rate number of bits per second


Bit interval duration of 1 bit
amplitude
1

...
time
bit interval
24

Two digital signals: one with two signal levels and the other
with four signal levels

25

The time and frequency domains of periodic and nonperiodic


digital signals

26

Baseband transmission

Baseband transmission
Sending a digital signal over a channel
without changing it to an analog signal

Baseband transmission requires a lowpass channel


27

Note

A digital signal is a composite analog


signal with an infinite bandwidth.

28

Baseband transmission using a dedicated medium

29

Digital vs. Analog

Using one harmonic


Digital
1

Analog
1

1 sec

Bit rate = 6

f=0

Digital
1

Bit rate = 6

Analog
1

f=3
30

Digital vs. Analog

Using more harmonics

Adding 3rd harmonic to improve quality


Digital
1

Bit rate = 6

Analog
1

f0 = 3, fmax = 9

31

Table 3.2 Bandwidth requirements

32

Digital vs. Analog Bandwidth

Digital bandwidth

Expressed in bits per second (bps)

Analog bandwidth

Expressed in Hertz (Hz)

Bit rate and bandwidth are proportional to each other

33

Low-Pass and Band-Pass Channels

Low-pass channel
gain

f1

frequency

Band-pass channel
gain

f1

f2

frequency

34

Modulation of a digital signal for transmission on a bandpass channel

35

Transmission Impairment

Attenuation
Distortion
Noise

36

Signal Attenuation

Attenuation Loss of energy

Signal strength falls off with distance


Transmission medium

Attenuation depends on medium


Attenuation is an increasing function of
frequency

37

Relative Signal Strength

Measured in Decibel (dB)


dB = 10 log10 (P2/P1)

P1 and P2 are signal powers at points 1 and 2,


respectively
Point 1

Point 2

Positive dB signal is amplified (gains strength)


Negative dB signal is attenuated (loses strength)
38

Example
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

39

Example
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

40

Signal Distortion

Distortion Change in signal shape

Only happens in guided media

Propagation velocity varies with frequency

41

Noise

Noise Undesirable signals added


between the transmitter and the receiver

Types of noise

Thermal

Due to random motion of electrons in a wire


42

Noise

Types of noise (contd)

Crosstalk

Signal from one line picked up by another


Wire 1
Wire 2

Impulse
Irregular pulses or spikes
E.g., lightning
Short duration
High amplitude

43

Signal-to-Noise Ratio

Signal-to-Noise Ratio (SNR)

SNR

Power

signal

Power

noise

44

Example
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:

45

Data Rate: Noiseless Channels

Nyquist Theorem
Bit Rate = 2 Bandwidth log2L

Bit rate in bps


Bandwidth in Hz
L number of signal levels

Harry Nyquist
(1889-1976)

46

Example
We need to send 265 kbps over a noiseless channel with
a bandwidth of 20 kHz. How many signal levels do we
need?
Solution
We can use the Nyquist formula as shown:

Since this result is not a power of 2, we need to either


increase the number of levels or reduce the bit rate. If we
have 128 levels, the bit rate is 280 kbps. If we have 64
levels, the bit rate is 240 kbps.
47

Data Rate: Noisy Channels

Shannon Capacity
Capacity = Bandwidth log2(1+SNR)

Capacity (maximum bit rate) in bps


Bandwidth in Hz
Claude Elwood Shannon
SNR Signal-to-Noise Ratio
(1916-2001)

48

Example
A telephone line normally has a bandwidth of 3000. The
signal-to-noise ratio is usually 3162. Calculate the
theoretical highest bit rate of a regular telephone line.

This means that the highest bit rate for a telephone line
is 34.860 kbps. If we want to send data faster than this,
we can either increase the bandwidth of the line or
improve the signal-to-noise ratio.
49

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?
Solution
First, use the Shannon capacity

followed by the Nyquist formula

50

Note

The Shannon capacity gives us the


upper limit; the Nyquist formula tells us
how many signal levels we need.

51

Network Performance

Bandwidth

Throughput

Hertz
Bits per second (bps)
Actual data rate

Latency (delay)

Time it takes for an entire message to


completely arrive at the destination

52

Latency

Composed of

Propagation time
Transmission time
Queuing time
Processing time
Entire
message
propagation
time

transmission
time
53

Latency
Receiver

Sender

First bit leaves


First bit arrives

Propagation time

Data bits
Last bit leaves

Transmission time
Last bit arrives

Time

Time
54

Bandwidth-Delay Product

The link is seen as a pipe

Cross section = bandwidth


Length = delay

Bandwidth-delay product defines the


number of bits that can fill the link

55

Figure Filling the link with bits for case 1

56

Summary

Data need to take form of signal to be


transmitted
Frequency domain representation of signal
allows easier analysis

Fourier analysis

Medium's bandwidth limits certain


frequencies to pass
Bit rate is proportional to bandwidth
Signals get impaired by attenuation,
distortion, and noise
57

You might also like