eitf25’internet,,techniques’and’applicaons’ stefan’höst ·...

Post on 18-Mar-2018

217 Views

Category:

Documents

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

EITF25 Internet-­‐-­‐Techniques and Applica8ons Stefan Höst

L2 Physical layer

OSI model Open Systems Interconnec8on

•  Developed by ISO, 1970~

2

TCP/IP model •  Developed by DARPA, 1970~

3

Physical layer

•  Analog vs digital signals •  Sampling, quan8sa8on

•  Modula8on •  Represent digital data in a con8nuous world

•  Transmission media •  Cables and such

•  Disturbances •  Noise and distor8on

4

Data vs Signal

•  Data: Sta8c representa8on of informa8on •  For storage (oUen digital)

•  Signal: Dynamic representa8on of informa8on •  For transmission (oUen analog)

5

Analog vs digital

Analog •  Con8nuous 8me and

amplitude signal •  Electrical/op8cal domain

Digital • Discrete 8me and amplitude • Binary representa8on

6

t

s(t)

n

s[n]

Digitaliza8on of analog signals

Performed in three steps: 1.  Sampling

Discre8za8on in 8me 2.  Quan8za8on

Discre8za8on in amplitude 3.  Encoding

Binary representa8on of amplitude levels

7

Sampling •  The process of

discre8zing 8me of a con8nuous signal.

•  Sampling 8me: •  Sampling frequnecy:

•  Loose iforma8on about 8me

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−4

−2

0

2

4

t

s(t)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−4

−2

0

2

4

ts(t)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−4

−2

0

2

4

t

s(t)

0 5 10 15 20 25 30 35 40 45−4

−2

0

2

4

n

s[n]

8

s[n]= s(nTs )Ts

Fs = 1/Ts

Aliasing

9

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−1

−0.5

0

0.5

1y(t)=cos(14π t), ΩT=20π rad/s

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−1

−0.5

0

0.5

1yr(t)=cos(6π t)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−1

−0.5

0

0.5

1y(t)=cos(14π t), ΩT=20π rad/s

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7−1

−0.5

0

0.5

1yr(t)=cos(6π t)

y(t)=cos(14πt) Fs=10 Hz

y(t)=cos(6πt)

Reconstruc8on to lowest possible frequency

Shannon-­‐Nyquist Sampling Theorem If s(t) is a band limited signal with highest frequency component Fmax, then s(t) is uniquely determined by the samples s[n] = s(nT) if and only if The signal can be reconstructed with Fs/2 is the Nyquist frequency and 2Fmax the Nyquist rate

max21 FT

Fs ≥=

s(t) = s[n]sinc t − nTsTs

⎛⎝⎜

⎞⎠⎟n=−∞

10

Reconstruc8on Example

11

−2 0 2 4 6 8 10 12−1

−0.5

0

0.5

1

y(t)=sin(2π/10*t), Fs=1Hz

−2 0 2 4 6 8 10 12−1

−0.5

0

0.5

1

sum y[n]sinc((t−nT)/T)

−2 0 2 4 6 8 10 12−1

−0.5

0

0.5

1

y(t)=sin(2π/10*t), Fs=1Hz

−2 0 2 4 6 8 10 12−1

−0.5

0

0.5

1

sum y[n]sinc((t−nT)/T)

y(t)=sin(2/7πt), Fs=1Hz

Sampling theorem proof Two important transforms

12

-1/2 1/2

-1 1 2 3 -1 1 2 3

1 2 3-1 t f

t f

sinc(t)

F

p(f)

x(t) =P

n (t n)

Fx(f) =

Pn (f n)

+

+

1

Sampling theorem proof Mathema8cal descrip8on of sampling

13

-T T 2T

-1/T 1/T 2/T -1/T 1/T 2/T

-T T 2T 3T3Tt t t

f f f

F

s(t)

1Tx( t

T ) =P

n (t nT )

=

ss(t) = s(t) 1Tx( t

T )

=P

n s[n](t nT )

S(f) x(Tf) = 1T

Pn (f n

T ) Ss(f) = S(f) x(Tf)

= 1t

Pn S(f n

T ) =

+

+

2

Sampling theorem proof Reconstruc8on

14

-1/T 1/T 2/T -1/2T 1/2T

-T T 2T 3T T 2T 3T-T

T

f f f

t t t

F1

Ss(f) =1T

Pn S(f n

T )Tp(fT )

S(f)

=

ss(t) =P

n s[n](t nT )sinc( t

T )s(t) = ss(t) sinc( t

T )

=P

n s[n]sinc(tnTT )

=

+

+

3

Sampling theorem Aliasing

Let Fs<2Fmax

15

Sampling Reconstruction

-F F 2F -F/2 F/2f f f

S(f) Ss(f) S(f)

+

+

4

Example

16

y(t) = cos(2π 7t)→Y ( f ) = 12δ ( f + 7)+δ ( f − 7)( )

7-7

-10-20 10 20 30-7 -3 3 7 13 17 23 27-13-17

-5 5

-3 3

f

f

f

Sampling with Fs=10 Hz

Reconstruct in [-­‐Fs/2, Fs/2]: Y ( f ) =12δ ( f + 3)+δ ( f − 3)( )→ y(t) = cos(2π 3t)

Quantization

Linear Quan8za8on for k bits •  2k equidistant

levels •  Represent sample

with k bits

17

ii

“InfoTheory” — 2014/9/22 — 16:12 — page 34 — #40 ii

ii

ii

34 10. Rate Distortion

x

xQ

D

D

M12 D

M12 D

M2 D M

2 D

Figure 10.7: A linear quantisation function.

used to form the quantiser for the statistics of the continuous source. However,in most practical implementations a linear quantiser is used. If the statisticsdiffer much from the uniform distribution the quantiser can be followed by asource code like the Huffman code.

In the figure a quantiser with M output levels is shown. Assuming a maximumlevel of the output mapping of D = M1

2 D, the granularity becomes D = 2DM1 .

The mth output level then corresponds to th evalue

xQ(m) =m M 1

2D= (2m M + 1)

D2

(10.58)

The mapping function shown in the figure is detrmined from finding an integerm such that

xQ(m) D2 x < xQ(m) D

2(10.59)

then the output index is y = m. If the input value x can exceed the intevallxQ(0) D

2 x < xQ(M 1) D2 the limits should be

y =

8><

>:

m, xQ(m) D2 x < xQ(m) D

2 , 1 m M 20, x < xQ(0) + D

2M 1, x xQ(M 1) D

2

(10.60)

Encoding Representa8on of quan8zed samples in bits

18

0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x(t)x[n]Quant level

000

001

010

011

100

101

110

111

x=011100100101101101111111111…

Quan8sa8on distor8on

19

Distor8on: Average distor8on for uniform input:

ii

“InfoTheory” — 2014/10/30 — 10:08 — page 278 — #286 ii

ii

ii

278 11. Rate Distortion

xQ(0) D2 x < xQ(M 1) + D

2 the limits should be

y =

8

>

<

>

:

m, xQ(m) D2 x < xQ(m) D

2 , 1 m M 20, x < xQ(0) + D

2M 1, x xQ(M 1) D

2

(11.61) eq:RD:Quant:y-v1

From (eq:RD:Quant:x_Q=11.59) this can equivalently be written as

y =

8

>

<

>

:

m, (2m M)D2 x < (2m M)D

2 + D, 1 m M 20, x < (2 M)D

2M 1, x (M 2)D

2(11.62) eq:RD:Quant:y-v2

The output values from the quantiser can be represented by a finite length bi-nary vector. The price for representing a real value with a finite levels is anerror introduced in the signal. In Figure

fig:RD:LinQuantDist11.8 this error, defined as the dif-

ference x xQ, is shown in the upper plot, and the corresponding distortionIDX:quantisation distortion,

d(x, xQ) = (x xQ)2 in the lower plot.

x

x xQM2 D

M2 D

x

d(x, xQ)

M2 D M

2 D

Figure 11.8: The quantisation error, x xQ, and distortion, d(x, xQ) = (x xQ)

2, for the linear quantisation function in Figurefig:RD:LinQuant11.7. fig:RD:LinQuantDist

An estimate of the distortion introduced can be made by considering a uni-formly distributed input signal, X U(M D

2 , M D2 ). Then all quantisation

levels will have uniformly distributed input with f (x) = 1D , and deriving the

average distortion can be made with normalised xQ = 0,

E

(X XQ(m))2|Y = m

=Z D/2

D/2x2 1

Ddx =

D2

12(11.63)

From the uniform assumption we have P(Y = m) = 1M and hence

E

(X XQ)2 =

M1

Âm=0

1M

D2

12=

D2

12(11.64)

d(x, xQ ) = (x − xQ )2

E X − XQ( )2⎡⎣

⎤⎦ = x2 1

Δdx =

−Δ/2

Δ/2

∫Δ2

12

Quan8za8on

Delta modula+on •  Represent

change in amplitude with 1 bit •  1: +1 •  0: −1

•  Must be faster sampling

20

n5 10 15

s(n)

1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1

Examples Telephony Fmax= 4 kHz Fs= 8 kHz (samples per sec) 8 bit/sample => 64 kb/s

CD Fmax= 20 kHz Fs= 44.1 kHz (samples per sec) 16 bit/sample => 705.6 kb/s 2 channels (stereo) => 1.4 Mb/s

21

From bits to signals

Principles of digital communica8ons

22

Internet

Digital data

Analog signal

On-­‐off keying

•  Send one bit during Tb seconds and use two signal levels, “on” and “off”, for 1 and 0.

Ex.

23

t

s(t)

T 2T 3T

x=10010010101111100

A

0

Non-­‐return to zero (NRZ)

•  Send one bit during Tb seconds and use two signal levels, +A and -­‐A, for 0 and 1.

Ex.

24

t

s(t)

T 2T 3T

x=10010010101111100

A

-A

Mathema8cal descrip8on

With g(t)=A, 0<t<T, the signals can be described as •  On-­‐off •  NRZ

25

s(t) = ang(t − nT )n∑

an = xn

an = (−1)xn

Two signal alterna8ves •  s0(t)=0 and s1(t)=g(t)

•  s0(t)=g(t) and s1(t)=-­‐g(t)

Manchester coding

•  To get a zero passing in each signal 8me, split the pulse shape g(t) in two parts and use +/-­‐ as amplitude.

Ex.

26

T

g(t)

t

A

T/2

-A

t

s(t)

T/2 T 3T/2

x=10010010101111100

A

-A

2T 3T 4T 5T 6T 7T

Mul8 level modula8on

•  To transmit k bits in one signal alterna8ve of dura8on Ts, use M=2k levels.

Ex. Two bits per signal

27

t

s(t)

T 2T 3T

x=10 01 00 10 10 11 11 10 00

A

-A

3A

-3A

01:

10:

00:

11:

Pulses in frequency

28 0 2 4 6 8 10−50

−45

−40

−35

−30

−25

−20

−15

−10

−5

0

Normalised frequency

|G(f)

|2 [dB]

RecManTri

Bandwidth

•  The bandwidth is the posi8ve frequency interval occupied by the main part of the signal power •  Main lobe •  WX% bandwidth contains X% of power in signal

Typical X: •  90% •  99% •  99.9%

29

Pulse Wlobe W90% W99%

Rect 2/T 1.7/T 20.6/T

Man 4/T ≈ 6/T ≈ 60/T

Tri 4/T 1.7/T 2.6/T

TRC 4/T 1.9/T 2.82/T

HCS 3/T 1.6/T 2.36/T

Some system parameters •  With signal 8me Ts the signal rate is Rs=1/Ts. The

unit of the signal rate is oUen Hz. •  If k bits are transmiqed each signal alterna8ve, the

8me per bit is Tb=Ts/k. The bit rate, or data rate, is Rb=1/Tb. The unit is b/s or bps. Rb=kRs

•  Bandwidth efficiency Rb/W, in bps/Hz •  If P signal power, then •  Es = TsP is energy per signal alterna8ve •  Eb = TbP = Es/k energy per bit

30

Modula8on in frequency

•  Baseband signal centered around f=0. •  Pass-­‐band signal centered around f=f0, f0>>W. •  ShiU a BB signal up in frequency to PB by

mul8plying with cos(2 pi f0 t). •  ShiU a PB signal down to BB by mul8plying with

cos(2 pi f0 t) followed by low-­‐pass filtering.

31

Modula8on in frequency

32

=

# F

s(t)

t

3A

1A

1A

3A

cos(2f0t)

t

sf0(t)

t

3A

1A

1A

3A

=S(f)

f

12 ((f + f0) + (f f0))

ff0 f0

12 (S(f + f0) + S(f f0))

ff0 f0

ASK (Amplitude ShiU Keying)

Use on-­‐off keying at frequency f0.

33

t

s(t)

T 2T 3T

x=10010010101111100

A

0

BPSK (Binary Phase ShiU Keying)

Use NRZ at frequency f0, but view informa8on in phase

34

s(t) = (−1)xn g(t − nT )cos(2π f0t) = g(t − nT )cos(2π f0t + xnπ )n∑

n∑

t

s(t)

T 2T 3T

x=10010010101111100

A

-A

QPSK and M-­‐PSK

Quadrature PSK • 2 bits/signal gives 4 different phase levels,

35

s(t) = g(t − nT )cos 2π f0t + xnπ2

⎛⎝⎜

⎞⎠⎟n

∑xn ∈0,1,2,3

M-­‐PSK •  k bits/signal gives M=2k

different phase levels,

s(t) = g(t − nT )cos 2π f0t +ϕn( )n∑

ϕn =xnM2π

xn ∈0,1,...,M −1

Signal space

Since and cos and sin behaves orthogonal, view PSK signals as points on a circle.

36

cos(2π f0t + π2 ) = sin(2π f0t)

cos

sin

s0(t)

s1(t)

s2(t)

s3(t)

cos

sin

s0(t)

s2(t)

s4(t)

s6(t)

s1(t)s3(t)

s5(t) s7(t)

QPSK 8-­‐PSK

M-­‐PAM (Pulse Amplitude Modula8on)

•  Use amplitude for informa8on carryer. •  M=2k amplidudes

where

37

s(t) = ang(t − nT )cos(2π f0t)n∑ an = −M +1+ 2xn

g(t)cos1 3 5 7-1-3-5-7

s0(t) s1(t) s2(t) s3(t) s4(t) s5(t) s6(t) s7(t)

M-­‐QAM (Quadrature amplitude Modula8on)

Use that cos and sin are orthogonal to combine two orthogonal PAM constella8ons

38

g(t)cos

g(t)sin

g(t)cos

g(t)sin

OFDM Orthogonal Frequency Division Mul8plexing

N QAM signals combined in an orthogonal way •  Used in e.g. ADSL, VDSL, WiFi, DVB-­‐C&T&H, LTE, LTE-­‐A

39

f

W

Transmission media

Guided media •  Twisted pair copper

cables •  Coax cable •  Fibre op8c cable

Unguided media •  Radio •  Microwave •  Infra red

40

Fibre op8c

•  Transmission is done by light in a glass core (very thin)

•  Total reflec8on from core to cladding

•  Bundle several fibres in one cable

•  Not disturbed by radio signals

41

Op8cal network architekture

Point to point •  Two nodes are connected by one dedicated fibre

Point to mul8-­‐point •  One one is connected to several end nodes •  PON (Passive Op8cal Network)

2.5/1 Gbps

•  Used in •  Core network

•  FqH 42

Twisted pair copper cables

Two conducters twisted around each other •  Twis8ng decreases disturbances (and emission) •  Used for •  Telephony grid (CAT3) •  Ethernet (CAT5, CAT6 and some8mes CAT 7)

43

Coax cable

One conductor surrounded by a shield •  Used for •  Antenna signals •  Measurement instrumenta8ons

44

Radio structures

Single antenna system

MIMO (Mul8ple In Mul8ple Out)

45

Transmission impairments

When a signal is transmiqed on a link, it will deteriorate due to transmission impairment: •  Aqenua8on, loss of energy

•  Electromagne8c emission

•  Distor8on, modifica8on of signal shape •  Mul8-­‐path propaga8on

•  Noise, various noise sources

46

Signal-­‐to-­‐noise ra8o (SNR) = Average signal power Average noise power

Noise disturbances

Thermal noise (Johnson-­‐Nyquist) •  Generated by current in

a conductor •  -­‐174 dBm/Hz

(3.98*10-­‐18 mW/Hz) •  Rela8vely white Impulse noise •  OUen user generated

Intermodula8on noise •  Different systems disturb

each other Cross-­‐talk •  User in the same system

disturb each other Background noise •  Misc disturbances

(e.g. Telephony cable -­‐140 dBm/Hz)

47

Addi8ve white noise

A commonly used model for noise is the AWGN channel (Addi8ve White Gaussian Noise) •  White noise with PSD(f) = N0/2 is added to the

signal •  AUer LP filter and sampling the added noise

samples are Gaussian distributed

48

zn ∼ N 0, N0 / 2( )

Gaussian channel

A Gaussian channel is a sta8s8cal transmission model with input variable X of total power E[X2]<P and output variable Y=X+Z, where Z is Normal distributed with zero mean and variance N.

49

X

Z N0,pN

Y = X + Z

1

A glimpse of Informa8on Theory

•  The channel represents all impairments during transmission. •  The informa8on about X by observing Y is given by the mutual informa8on

50

Channel X Y

I(X;Y ) = f (x, y)log2f (x, y)f (x) f (y)

dxdyR2∫

Maximise for E[X2]=P over all distribu8ons to get the channel capacity For the Gaussian channel

C = maxf (x ),E[X2 ]=P

I(X;Y )

C = 12log2 1+

PN

⎛⎝⎜

⎞⎠⎟

= 12log2 1+ SNR( )

Shannon capacity

If s(t) is a band limited signal with bandwidth W and power P is transmiqed over an AWGN channel, the maximum achievable data rate [b/s] is given by

51

C =W log2 1+P

N0W⎛⎝⎜

⎞⎠⎟

=W log2 1+ SNR( )

ii

“InfoTheory” — 2014/11/5 — 10:13 — page 235 — #243 ii

ii

ii

9.3. Fundamental Shannon limit 235

Consider a band limited Gaussian channel with bandwidth W and noise levelN0. If the transmitted power constraint is P, then the capacity is given by

C = W log

1 +P

N0W

[b/s] (9.52) Eq:Gauss:Capacity

The capacity maximises the throughput for a fixed signal power when usinga certain bandwidth. As the bandwidth increases the noise power will alsoincrease, whereas the signal power will remain, meaning that the capacity in-crease will diminish with increasing bandwidth. In Figure

fig:Gauss:GbandlimWvsC9.6 the capacity as a

function of the bandwidth is shown. As the bandwidth increases to infinity thefollowing limit value will be reached.

C• = limW!•

W log

1 +P/N0

W

= limW!•

log

1 +P/N0

W

W

= log eP/N0 =P/N0ln 2

W

C

Figure 9.6: Capacity as a function of the bandwidth W for a fixed total signalpower P. fig:Gauss:GbandlimWvsC

Denoting the achieved bit rate as Rb, it is required that this is not more than thecapacity, C• > Rb. Further, assume that the signalling time is Ts and that ineach signal k information bits are transmitted. Then the average power is theenergy per time instance, which can be derived according to

P =EsTs

=EbkTs

=EbTb

(9.53) Gauss:Limit:PT

where Es is the average energy per transmitted symbol, Eb the average energyper information bit and Tb = Ts/k the average transmission time for each infor-mation bit. The variable Eb is very important since it can be compared between

Fundamental Shannon limit

Leng the bandwidth approach infinity gives

The achieved bit rate is Rb=Ts/k. Then Hence, communica8on is only possible if

Approaching the limit means leng the computa8onal complexity go to infinity.

52

C∞ = limW→∞

W log 1+ P / N0

W⎛⎝⎜

⎞⎠⎟ =

P / N0

ln2 C∞

Rb= Eb / N0

ln2>1

Eb

N0

> ln2 = 0.69 = −1.59dB

Data communication

Two nodes that transmit data on a physical link cannot do this simultaneously on the same frequencies with the same coding scheme.

53

Data flow concepts

54

Duplexing

Duplex communica8on can be achieved by •  TDD (Time Division Duplexing)

Each direc8on has its 8me slots to transmit in. •  FDD (Frequency Division Duplexing)

Each direc8on has its frequency slots to transmit in

55

Multiplexing of links

Also, physical links need to be shared. This is called mulOplexing, where one physical link is divided into several channels.

56

Multiplexing techniques

5 basic types of mul8plexing techniques: •  Space-­‐Division mul8plexing (SDM) •  Time-­‐Division Mul8plexing (TDM) •  Frequency-­‐Division Mul8plexing (FDM) •  Wavelength-­‐Division Mul8plexing (WDM) •  Code-­‐Division Mul8ple Access (CDMA)

57

Space-Division Multiplexing (SDM)

SDM is used in cables. Each channel uses one line (op8cal fibre or twisted pair).

58

Time-Division Multiplexing (TDM)

In TDM, each channel occupies a por8on of the 8me in the link.

59

Frequency-Division Multiplexing (FDM)

FDM is an analog mul8plexing technique where each link has its own frequency band

Each channel uses a unique carrier frequency.

Ch 1 Ch 2

fCh N...

60

Wavelength-Division Multiplexing (WDM)

In an op8cal fibre different wavelengths can be combined.

61

Synchronous TDM

If a channel has nothing to send, its 8me slots will be empty!

62

Example: Empty slots

63

Statistical Time-Division Multiplexing

In Sta8s8cal TDM, the channels have no reserved 8me slots. Instead, slots are dynamically allocated. Data about the des8na8on is added to each slot. Sta8s8cal TDM usually has beqer performance than Synchronous TDM when not all channels transmit data all the 8me.

64

TDM comparison

65

CDMA (Code-Division Multiple Access)

CDMA, or Spread Spectrum, is a mul8ple access technique for wireless links. The original signal is changed in a spreading process.

66

Spread Spectrum techniques

•  Frequency Hopping Spread Spectrum (FHSS) •  A source uses many carrier frequencies. One

frequency is used at a 8me, but the frequencies are changed very oUen (e.g. 1000 8mes a second).

•  Direct Sequence Spread Spectrum (DSSS) •  Each data bit is replaced with n bits (called chips)

using a unique spreading code. The chip sequences for all users are orthogonal.

67

Comparison with FDM

68

DSSS

The original signal is combined with the spreading code.

69

Mod seq 1

Mod seq 2

Mod seq M

U 1

U 2

U N

US 1

US 2

US M

All added

Mod seq M

U N

Mod seq 2

U 2

Mod seq 1

U 1

DSSS example

70

top related