84
EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam www.juniv.edu

EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

Embed Size (px)

Citation preview

Page 1: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

1

EMCS 607PData communication

Fall 2014

Prof. Dr. Md. Imdadul Islamwww.juniv.edu

Page 2: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

2

ADC

PCM signal

Sample

Quantize

Analog Input

Signal

Encode

Line Code

xs(t)

xQ(t)

xk(t)

x(t)

Analog to Digital Conversion

Page 3: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

3

1. Sampling of Continuous SignalFirst step of analog to digital conversion is the periodic sampling of continuous analog signal. A sampled signal is considered at some distinct instant t = nT; n = 0, 1, 2, 3,… for duration τ.

If some one asks what is the amplitude of the sampled signal between two consecutive sample, the answer is ‘undefined’ same is true for digital signal.

τ

xs(t)

t

Sampled signal

Page 4: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

4

Let an analog signal x(t), band limited to B Hz shown in fig.1, is sampled at a rate fc = 1/T samples/sec. If the width of each sample is τ then sampled signal xs(t) can be expressed as the product of x(t) and a unit amplitude pulse train s(t) of period T and width of each pulse of τ shown in fig.2. Sampled form xs(t) of x(t) is shown in fig.3.

T

τ

s(t)

t

t

x(t)

Fig. 1 (a) Continuous base band signal(b) Spectrum of x(t)

Fig.2 Unit amplitude pulse train Fig. 3 Sampled signal

-B B

f

X(f)

τ

xs(t)

t

Page 5: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

5

Lt us express s(t) in terms of Fourier co-efficient,

1

0 2sin

2cos

2s(t)

nnn T

ntb

T

nta

TT

a

ndcT

nc

T

n

T

n

T

nt

n

T

tdT

nt

tdT

nttsa

T

Tn

sinsin

/sin

2sin

2

2cos.1

2cos)(

2/

2/

2/

2/

2/

2/

Where

;Where d = τ/T, known as duty cycle.

T

τ

s(t)

t

1.sin000 T

ncLtaLta nnn

Page 6: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

6

0

2sin.1

2sin)(

2/

2/

2/

2/

tdT

nt

tdT

nttsb

T

Tn

1

1

2cossin2

2cossin

2s(t)

n

n

T

ntndcdd

T

ntndc

TT

T

τ

s(t)

t

Page 7: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

7

1

2cossin)(2)()().()(n

cs tnfndctdxtdxtstxtx

1

cossin)(2)(n

ctnndctxdtdx

Now

)()( Xtx Let

)()(2

1)cos()( ccc nXnXtntx

11

11

1

sin)(sin)()(

sin)(sin)()(

sin)()(2

12)()()(

nc

nc

nc

nc

nccss

ndcnXdndcnXddX

ndcnXdndcnXddX

ndcnXnXddXXtx

nc

nnc ndcnXdndcnXddX sin)(sin)()(

0,

Page 8: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

8

11

11

1

sin)(sin)()(

sin)(sin)()(

sin)()(2

12)()()(

nc

nc

nc

nc

nccss

ndcnXdndcnXddX

ndcnXdndcnXddX

ndcnXnXddXXtx

Page 9: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

9

...sin)()(sin)(2sin)2(...)( dcdXdXdcdXdcdXX cccs

nc

nnc ndcnXdndcnXddX sin)(sin)()(

0,

f

fc+B

ωωc+ ωBωc- ωB-ωc

- ωB ωB ωc

Xs(ω)

fc-B-fc fc-B B

Xs(f)

Page 10: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

10

Plot of above equation is shown in fig.4. To extract x(t)↔X(ω) from xs(t)↔Xs(ω) a low pass filter with cutoff frequency between B and fc-B can be used. There must not any overlapping between X(ω) and X(ω- ωc) for proper filtering, therefore fc-B ≥ B fc ≥ 2B because of practical characteristics of low pass filter. Therefore sampling rate of a signal must be greater than or equal to the twice the maximum frequency of the original/ base band signal.

The condition fc ≥ 2B is called Nyquist sampling rate.

fc-B-fc fc-B B

Xs(f)

Guard Band

Page 11: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

11

Example:An analog signal of highest frequency of 3.4 KHz sampled maintaining a guard band of 300Hz, find sampling rate. fc = G.B+2B = 0.3+2×3.4 =7.1KHz

Page 12: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

12

2. Quantization of Sampled Signal Second step of digitations of an analog signal is quantization of sampled signal into some known discrete amplitude levels. Now both the axis of the signal becomes discrete hence a quantized signal is actually a digital signal.

Due to quantization the signal losses its originality and an error is introduced with the signal known as quantization error. Actually amplitude of a sample is adjusted with its nearest quantization level. The spacing between adjacent levels are called quantization interval.

Level spacing a

Page 13: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

13

If ‘a’ be the quantization interval then mean square error of a sample of amplitude Sj+є in the vicinity of jth level Sj, in the interval, of fig. 5 is expressed like,

Sj

Sj+a/2

Sj - a/2

Sj+є

Fig. 5 Quantization error

12

1)(

22/

2/

22 ad

aE

a

a 22

aaWhere

Page 14: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

14

Let the signal at transmitting end is quantized into total N discrete levels with maximum plus-minus signal excursion of P volts, maximum excursion in positive or negative direction is V and the range of quantized samples is A .

Fig.6 shows a quantization technique of 6 levels. Here quantized amplitude would be ±a/2, ±3a/, ±5a/2 and ±7a/2. Now V = 4a , A = 7a and P = 8a. Therefore for N levels quantization, V = Na/2 , A = (N-1)a and P = Na.

A P

V

0

a/2

3a/2

5a/2

-5a/2

-3a/2

-a/2

4a

-4a

7a/2

-7a/2

Now peak signal to quantization ratio (SQR) of quantization system will be,

NN

a

aN

E

VSQR

log208.43log20

12/

4/log10

)(log10

2

22

2

2

Fig. 6 quantization technique of 8 levels

Page 15: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

15

Example-2A sinusoidal wave of peak amplitude A has mean square amplitude of A2/2. According to equation of previous slide SQR of the sine wave will be, SQR(dB)=10log10{(A2/2)/(a2/12)} =7.78+20log10(A/a)

0 2 4 6 8 10 125

10

15

20

25

30

A/a

SQ

R(d

B)

Fig. 7 SQR of a sinusoidal wave

SQR increases with increase in amplitude (loudness of voice signal) of baseband signal. Our aim is to keep SQR constant irrespective of amplitude of baseband signal

Page 16: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

16

3. Pulse Code ModulationPulse Code Modulation (PCM) is essentially final step of analog to digital conversion where each quantized sample in converted to equivalent binary pulses, resembles to decimal to binary conversion.

Fig.8 show 8 levels PCM technique. In PCM gray code is preferable compare to ordinary binary code to combat variable number of bit error for adjacent levels like 3 and 4, 7 and 8 etc when sampled pulses are transmitted directly. Because in gray code there is only one bit difference between adjacent decimal numbers hence there is only possibility of single bit error instead of variable number of bit error during reception of each sample.

Page 17: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

17

TT

6

34

t

Fig. 8(a) Quantized sample of 8 levels quantization

1 1 0

TTt

1 0 0 0 1 1

Fig.8(b) PCM data of fig. 8(a)

Page 18: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

18

Exerceise-1A voice signal of highest frequency of 3.4KHz sampled maintaining a guard band of 200Hz. After sampling the signal is quantized into 256 levels. Determine sampling rate and bit rate of PCM.

Page 19: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

19

Companding

From the analysis of previous section we can say, if the quantization interval is kept directly proportional to amplitude of signal then SQR will remain constant over the entire dynamic range.Let a = kA; where A is the amplitude a signal at a particular instant and k is a constant.

kkAk

A

a

AdBSQR log2079.10

12log10

12/log10

12/log10)(

222

2

2

2

Page 20: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

20

Therefore SQR(dB) is independent of signal amplitude. Above phenomenon can be implemented by compressing the signal nonlinearly (larger the sample amplitude, the more it is compressed) then providing uniform quantization is provided on it like fig.9.

Compressed output signal

Input signal

Fig. 9 Non linear compression of signal

Page 21: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

21

At receiving end signal is recovered by reverse operation (nonlinear expansion). The process of compression and expansion of signal is called companding shown in fig10.

Input Output

CompressionPCM

D/A Expansion

Fig. 10 Companding technique

Input signal x is compressed in North America and Japan according to following relation known as μ-law companding.

)1ln(

)1ln()sgn()(

xxxF ;-1 ≤ x ≤ 1

Page 22: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

22

where sgn(x) is the polarity of x and μ is a parameter used to define amount of compression. Practical compander uses μ = 255.

1)1(1

)sgn()(1 yyyF

The reverse operation or expansion of signal is expressed as,

; where y is the compressed signal.

Page 23: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

Another companding technique prevalent in Europe and most of the region of the world is known as A-law companding expressed as,

)Aln(1

xA)xsgn()x(FA

0 ≤ |x| ≤ 1/A

Inverse or expansion of the signal is expressed as,

A

)Aln(1y)ysgn()y(F 1

A

)Aln(1

1y0

Where

Practical compander uses A = 100.

23

Page 24: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

24

PAM, PWM and PPM

In all of above pulse modulation techniques unit amplitude pulse train is used as carrier wave.

In pulse amplitude modulation (PAM) the amplitude of the carrier pulses are proportional to instantaneous amplitude of continuous base band signal x(t) shown in fig.11.

In PWM the width of a pulse is proportional to the instantaneous amplitude of continuous base band signal. In PPM the position of the pulse i.e. distance from a reference instant is proportional to the instantaneous amplitude of continuous base band signal.

Page 25: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

25Fig. 11 PAM, PWM and PPMwave

0 Ts 2Ts 3Ts 4Ts 5Ts 6Ts

x(t),xp(t)

t

τ

Ts

τ

s(t)

t

t

xpo(t)

PWM

PPM

xd(t)

t

PAM

Page 26: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

26

PAM wave xp(t) can be generated using simple electronic circuit of fig.12 where pulses at G1 and G2 of FETs are shown in fig.13 and fig.14 respectively. PAM signal actually resembles to flat top sampled signal of period Ts. Since the width of each PAM pulse is τ therefore pulses at G2 stars at the position of τ unit delayed from kTs to discharge the capacitor C.

C

G2

G1

x(t) xp(t)

G1

0 Ts 2Ts 3Ts 4Ts 5Ts 6Ts

t

G2

0 τ Ts 2Ts 3Ts 4Ts 5Ts 6Ts

t

Fig. 12 Circuit to convert continuous signal to PAM wave

Fig. 13 Pulses at G1 of above circuit

Fig. 14 Pulses at G2 of above circuit

PAM (Pulse Amplitude Modulation)

Page 27: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

27

CG2

G1

x(t) xp(t)

G1

0 Ts 2Ts 3Ts 4Ts 5Ts 6Ts

t

G2

0 τ Ts 2Ts 3Ts 4Ts 5Ts 6Ts

t

0 Ts 2Ts 3Ts 4Ts 5Ts 6Ts

x(t),xp(t)

t PAM

τ

Page 28: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

28

In pulse width modulation (PWM) width of a carrier pulse is proportional to instantaneous amplitude of the baseband signal of course the amplitude of each pulse is equal.

PWM can be generated simply from a comparator circuit of fig.15 where input at non-inverting terminal is the baseband signal x(t) and a sawtooth wave at inverting terminal. Resulting wave is shown in fig.16 where starting position of each pulse is at kTs but terminating points depend on width of each pulse, hence amplitude of baseband signal.

Fig. 15 PWM and PPM generator

Sawtooth wave

x(t)

PWM wave

Monostable

Multivibrator

PPM wave

Comparator

PWM (Pulse Width Modulation)

xd(t)

t

Page 29: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

29

xd(t)

t

t

xpo(t)

PWM

PPM

Fig. 16 Output waves of PWM and PPM generator

In pulse position modulation (PPM), amplitude and width of each pulse is kept same but starting position of each pulse i.e. the distance between instant, t = kTs and stating point of kth pulse depends on instantaneous amplitude of base band signal.

PPM wave can be generated simply applying PWM pulses at the input of a monostable multivibrator.

Sawtooth wave

x(t)

PWM wave

Monostable

Multivibrator

PPM wave

Comparator

PPM (Pulse Position Modulation)

Page 30: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

30

Let us now consider the case of conversion of PWM signal to PAM. PWM pulses of fig. 17 (a) is passed through a ramp generator with large capacitor at output to hold the final amplitude of the signal, the resulting wave is shown in fig. 17(b).

A pulse train of period Ts is locally generated and added with the signal of fig 17(b) such that pulses fall on the constant part of the wave shown in fig. 17(c). Finally pulses of fig.17(c) is passed through a clipper circuit of threshold voltage shown by doted line of fig. 17.(c).

Clipper circuit actually clipped the signal below the threshold level, therefore the resulting wave would be like fig.17(d) i.e. the equivalent PAM signal. Baseband signal can be regenerated by passing the PAM wave through a low pass filter.

Conversion of PWM to PAM

Page 31: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

31

PWM

Fig. 17(a) PWM wave

Fig.17 (b) Output of Ramp Generator

Fig. 17(c) Locally generated pulses are added with ramp output

Fig. 17(d) Out put of clipper circuit

Page 32: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

32

It is found that average amplitude of sample to sample difference is less than that of original sampled wave of voice signal therefore less number bit is required for PCM, maintaining same SQR. If PCM is done on consecutive pulse difference instead of individual pulse known as differential pulse code modulation (DPCM).

When sample to sample difference is expressed by a single bit then the modulation scheme is called delta modulation is considered as an special case of DPCM.

Differential Pulse Code Modulation (DPCM)

Page 33: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

33

Major components of transmitter and receiver of delta modulation are sampler, predictor, quantizer, adder and smoothing filter shown in fig. 18. In transmitter the analog baseband signal x(t) is sampled and a difference signal, is generated. Here is jth sampled pulse of x(t) is xj and gj is jth predicted pulse.

x(t)

gj

xj +

_

Sampler

Predictor

Quantizer± k´

+

gj

± k´ +

_

Predictor

Smoothing filter

Fig. 18(a) Delta modulator

Fig. 18(b) Delta demodulator

j

j

Page 34: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

34

Predicted pulse is determined from linear combination of some previous sampled pulses shown in fig. 19 is expressed as,

k

1s

sjsj xhg

where is the jth estimated sample determined as, g ± k´

Based on difference signal a pulse of amplitude k´ is generated by a quantizer like,

jx

j

negativeisifk

positiveisifkP

j

j

j

gj

......Z-1 Z-1 Z-1 Z-1

h1 h2 hk

Σ

Fig. 19 Predictor circuit

Page 35: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

35

Let us demonstrate delta modulation transmitter and receiver with the graph of fig.20. Here predicted sample g1 at 1st sampling instant is determined from linear combination of some fixed previous samples. Now g1 has to be compared with 1st sample x1 and it is found from fig.20 that x1 > g1, therefore transmitter will generate g1+ k´ and 1st estimated sample, = g1+ k´ will be detected at receiver.

At 2nd sampling instant g2 is determined from the similar relation and compared with x2 where x2 > g2, therefore transmitter will generate g2 + k´ and 2nd estimated sample = g2+ k´ will be detected at receiver. Same condition is also found at 3rd sampling instant.

1x

2x

Page 36: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

36

At 4th sampling instant x4 < g4 therefore transmitter will generate -k´ and 4th estimated sample, = g4- k´ will be detected at receiver and so on.

Estimated samples are discrete points at the vicinity of the baseband wave but some times points are above the curve and some times fall below the curve depending on the profile of the baseband curve. These discrete points are made a continuous using a smoothing filter.

4x

Page 37: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

37

Fig. 20 Comparison of and xj)(ˆ tx j

x(t)

gj

xj +

_

Sampler

Predictor

Quantizer± k´

+

Page 38: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

38

Since the estimated sampled points are little away from the baseband wave hence a quantization noise is incorporated with delta modulation like fig. 21. If the step size k´ is lowered then the separation between and xj will be reduced and the zigzag curve of points would be smoother.

1x

Fig. 21 Output of the demodulator for larger step size

t

x(t)

Page 39: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

39

When step size k´ is very small then the zigzag curve of estimated points are simply unable to follow the baseband curve when the curve changes rapidly like fig.22, known as slope overload distortion.

Maximum slope supported by the zigzag curve is k´/Ts ; where Ts is the sampling period Therefore a tradeoff has to be made with quantization noise and slope overload distortion taking optimum step size kopt. Output of the demodulator for optimum step size is shown in fig. 23.

Ts

Fig. 22 Output of the demodulator for smaller step size

Fig. 23 Output of the demodulator for optimum step size

Page 40: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

40

Example-1Determine optimum step size for the signal x(t)= 5sin(2π20t) considering sampling frequency of 8KHz. Ans. The slope of the signal x(t),

The maximum slope is obtained taking =1.The maximum slope of the signal mmax= = 200π . From the trajectory of zigzag curve of fig. 23, the maximum slope supported by it,  

= kfs= k8000

Therefore 200 = 8000kkopt = 200π/8000 = π/40 volt

)202cos( t2025

)202cos(2025)(

tdt

tdx

sT

k)tan(

Page 41: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

41

Line codingBinary data (logic 0 or 1 of PCM) can be transmitted using a number of different types of serial pulses. The choice of a particular pair of pulses to represent the symbols 1 and 0 is called Line Coding. Line coding can be represented by the diagram of fig. below.

ADC

PCM signal

Sample

Quantize

Analog Input

Signal

Encode

Line Code

xs(t)

xQ(t)

xk(t)

x(t)

Fig. Line coding

Page 42: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

42

Line coding and decoding

Page 43: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

43

Each line code is described by a ‘symbol mapping function’ ak and a ‘pulse shape’ p(t):

kbk kTtpatx )()(

Line code can be classified based on symbol mapping functions (ak) like,

Unipolar: In unipolar signalling binary symbol 0 is represented by the absence of a pulse called space and the other binary symbol 1 is represented by the presence of a pulse called mark. It is also called on-off keying.  Polar: In polar signalling a binary 1 is represented by a pulse p(t) and a binary 0 by the opposite (or antipodal) pulse –p(t).  Bipolar: Bipolar Signalling is also called ‘alternate mark inversion’ (AMI) which uses three voltage levels (+V, 0, –V) to represent binary symbols. Zeros, as in unipolar, are represented by the absence of a pulse and ones (or marks) are represented by alternating voltage levels of +V and –V.

Page 44: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

44

Line code can again be classified based on pulse shapes p(t) like,

NRZ (Nonreturn-to-zero): The pulse occupies the full duration of a symbol.  RZ (Return to Zero): The pulse occupies the half of duration of a symbol. Manchester (split phase): In Manchester encoding, the duration of the bit is divided into two halves. The voltage remains at one level during the first half and moves to the other level during the second half. Binary logic 1 is +ve in 1st half and -ve in 2nd half. Binary logic 0 is -ve in 1st half and +ve in 2nd half.

Page 45: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

45

BINARY DATA

A

-A0(b) Polar NRZ

A

0(c) Unipolar RZ

A

-A0

(d) Bipolar RZ

1 1 0 1 0 0 1

Mark (hole)

Mark (hole)

Mark (hole)

Mark (hole)

space space space

A

-A0

(e) Manchester NRZ

Binary Signaling Formats

VoltsA

Time0(a) Unipolar NRZ

Tb

According to above classification different types of line coding is shown in fig. below.

Fig. Line coding

Page 46: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

46

Example of Bipolar-AMI (NRZ) Encoding

Page 47: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

47

Scrambling Technique

• Used to replace sequences that would produce constant voltage• Produce “filling” sequence that:

– Must be recognized by receiver and replace with original– Same length as original

• Avoid long sequences of zero level line signal• No reduction in data rate• Error detection capability• Two commonly used techniques are: B8ZS (Bipolar With 8 Zeros

Substitution), and HDB3 (High Density Bipolar 3 Zeros)• Used for long distance transmission (WAN)

Page 48: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

48

Bipolar With 8 Zeros Substitution (B8ZS)• 8 consecutive bits of all zeros are replaced by 000VB0VB where B is

called bipolar pulse i.e. nonzero level voltage in accordance with AMI rule. The V in the sequence denotes violation i.e. nonzero voltage breaks the AMI rule.

• If the preceding is positive, encode as 000 + - 0 - + again if the preceding was negative, encode as 000 - + 0 + -

• Causes two violations of AMI code - intentional– Unlikely to occur as a result of noise

• Receiver detects and interprets as octet of all zeros

Page 49: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

49

Example-1

Page 50: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

50

There are four rules for HDB3 coding.

I. More than three consecutive zeros are not allowed to be present in the waveform. For the fourth ‘0’ introduce a Violation bit.

II. Violation bit has to be of the same polarity as the previous mark.

III. Two consecutive violation bits has to be of opposite polarity.

IV. If the number of marks between two consecutive violation bits is even the format should be B00V (+00+ or −00− ) where B is called bipolar pulse i.e. nonzero level voltage in accordance with AMI rule. The V in the sequence denotes violation i.e. nonzero voltage breaks the AMI rule. It is opposite polarity to the previous mark. If the number of marks is an odd number the format should be 000V (000+ or 000− ).

HDB3 (High Density Bipolar 3 Zeros)

Page 51: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

51

The pattern of bits (initially consider odd 1s after last substitution): 101 0000 10000 1 100001 1 100001 1 1 10000 10 100002 Encoded in HDB3 considering odd parity at the starting is: +0−000V+000V−+B00V+−+000V−+−+ B00V+0− B00V which is: +0− 000− +000+ −+−00− +−+000+− +−+−00−+ 0− +00+Corresponding encoding using AMI is +0−0000+0000−+0000− + − 0000+ − + −0000+0−0000

Number of marks after last substitution

Example-1

Page 52: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

52

Example-2

Page 53: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

53

Multiplexing Techniques

Page 54: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

54

Page 55: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

55

Page 56: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

56

Page 57: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

57

In telecommunications, frequency-division multiplexing (FDM) is a technique by which the total bandwidth available in a communication medium is divided into a series of non-overlapping frequency sub-bands, each of which is used to carry a separate signal.

These sub-bands can be used independently with completely different information streams, or used dependently in the case of information sent in a parallel stream. This allows a single transmission medium such as the wireless link, a cable or optical fibre to be shared by multiple separate signals.

Frequency-division Multiplexing

Page 58: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

58

Multiplexing

De-multiplexing

Page 59: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

59

Frequency Division Multiplexing of Three Voice Calls

Page 60: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

60

In the North American system, there are:12 channels per group5 groups per supergroup10 super groups per mastergroup6 master groups per jumbogroup

In the European CCITT system, there are:12 channels per group5 groups per supergroup5 super groups per mastergroup3 master groups per supermastergroup

Page 61: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

61

Frequency Division Multiplexing

Page 62: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

62

Examples of FDMAs an example of an FDM system, Commercial broadcast radio (AM and FM radio) simultaneously transmits multiple signals or "stations" over the airwaves. These stations each get their own frequency band to use, and a radio can be tuned to receive each different station.

Another good example is cable television, which simultaneously transmits every channel, and the TV "tunes in" to which channel it wants to watch.

Page 63: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

63

Time division MultiplexingFig. below shows the frame of 30-channel system where out of 32 time slot (TS) the 0th TS is for frame alignment, 16th TS is for signaling and the rest 30 TS (1 to 15 and 17 to 31) for speech. Each TS contains 8 PCM bits, equivalent to each quantized pulse of 256 level system. Such frame is called E1 frame flowed by European.

0 1 to 15 16 17 to 30 31

Frame Alignment Signaling

b1 b2 b3 b4 b5 b6 b7 b8

Fig.E1 frame of 30 Channels

Page 64: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

64

The bit rate of the 30-channel PCM frame is, 8 kHz (sampling rate) × 8 (bits per sample or TS) × 32 (number of TS/frame) = 2.048 Mbps. The total number of bite/frame = 8×32 = 256bits. We know the sampling rate of voice signal is 8000 samples/sec, therefore sampling period, Ts = (1/8000) sec. The 8 PCM bits of each sample is placed in a TS, therefore the length of a frame, Tf = (1/8000) sec 125 μs. The width of each bit, d = 125/256 = 0.488 μs.Multiplexing hierarchy of European system is shown in fig.3.

E1

M

U

X

30 Voice channels, each of 64 kbps

.

..

E1 = 2.048 Mbps ( 30 voice channel)

E2

M

U

X

E1

E2 = 8.448 Mbps ( 120 voice channels)

E3

M

U

X

E3 = 34.368 Mbps ( 480 voice channels)

E4

M

U

X

E2

E3

E4 = 139.264 Mbps ( 1920 voice channels)

E5

M

U

X

E5= 564.992 Mbps ( 7680 voice channels)

E4

Fig.3 European synchronous digital hierarchy

Page 65: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

65

North American TDM frame contains 24 TS where each TS contains 8 bits of a user (equivalent of 8 PCM bits/sample) and the 0th TS contains a single bit for frame alignment called T1 frame like fig.4.

0 Channel-1

Frame Alignmentb1 b2 b3 b4 b5 b6 b7 b8

Channel-2 … … … Channel-24

Fig.4 T1 frame of 30 Channels

The total number of bits/frame = 8×24+1 = 193 bits. The 8 PCM bits of each sample is placed in a TS, therefore the length of a frame, Tf = (1/8000) sec 125 μs. The bit rate of T1 frame = 193/125 =1.544 Mbps.

Page 66: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

66

The objective of digital modulation is to convert the rectangular digital pulses to smooth sinusoidal wave hence considerable reduction in bandwidth is achieved. The bandwidth reduction is essential to cope the transmitted wave with the transmission medium of lower bandwidth.

For example MODEM is connected between PC and telephone line to convert the rectangular data pulse from the computer (infinite bandwidth) into continuous FSK wave of lower bandwidth to cope with the allowed bandwidth of the telephone line (transmission medium).

Digital Modulation Techniques

Page 67: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

67

In wired communication the digital modulation is necessary for,

To reduce the bandwidth of the baseband signal according the capacity of the transmission medium and receiver circuits.

If the wavelength of the signal is considerable with the length of the wire then the wire acts an antenna and radiates most of the signal energy. The remedial measure of the situation is to increase the frequency of the signal i.e. modulation with high frequency carrier.

Page 68: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

68

In wireless communications the reasons of digital modulation are,

In wireless communication digital modulation is necessary to avoid interferences of surrounding users with choose of appropriate carrier.

Noisy immunity is increased for a high frequency modulated wave.

Size of an antenna depends on wavelength of a signal. After modulation (using high frequency carrier) wavelength of the modulated wave is reduced hence size of the antenna is reduced.

A modulated wave can propagate far longer way than the baseband signal.

Page 69: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

69

Frequency Shift Keying (FSK) In binary FSK two sinusoidal waves of frequency f1 and f2 over a period [0, T] are used to represent binary logic 1 and 0 respectively. The waves are like,

for logic 1

for logic 0 ; where θ is the initial phase of sinusoidal wave i.e. at the stating point symbol wave.

)2cos()( 11 tfAtS TktkT )1(

;)2cos()( 22 tfAtS

;

TktkT )1(

Page 70: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

70

Input binary bits

as a selector

FSK wave

Oscillator-1

Oscillator-2

M

U

X

Fig. 1 FSK modulator

FSK wave can be generated using two oscillators of frequency f1 and f2 connected to a multiplexer like fig.1. The multiplexer is switched between the oscillators by binary input bits.

)2cos()( 11 tfAtS

)2cos()( 22 tfAtS

Page 71: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

71

Frequencies f1 and f2 are chosen such that S1(t) and S2(t) are mutually orthogonal. In that case at receiving end S1(t) and S2(t) can be detected using cross correlation called coherent demodulation.

Tk

kTdttStS

)1(

21 0)()(

To satisfy above condition, and ; where m and n are integers. The difference between frequencies,

For m = 2 the separation becomes 1/T which ensure phase continuity at bit transitions called Sunde’s FSK shown in fig.2. In case of discontinuity of phase at each bit transition point like fig. 3, spectral width becomes wider.

nTff )(2 21

mTff )(2 21

T

mff

2)( 21

Page 72: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

72

S(t)1 0 1 0

t

S(t)1 0 1 0

t

Fig.2 Continuous FSK

Fig.3 Discontinuous FSK

Page 73: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

73

The received signal contaminated by awgn is expressed as,r(t)=Si(t)+n(t); where i=1,2 and n(t) is the additive white Gaussian noise (awgn). The coherent detector of orthogonal FSK is shown in fig.4.

Decision

r(t)

1

0

Tk

kTdt

)1(

tftf 21 2cos2cos

Fig. 4 Coherent demodulator of FSK

Page 74: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

74

Binary Phase Shift Keying (BPSK)In BPSK binary logic 1 and 0 are presented by two sinusoidal waves of same frequency and peak amplitude over the period [0, T] but initial phases are 0 and π respectively. BPSK wave is expressed like,

)2cos()02cos()(1 tfAtfAtS cc TktkT )1( for logic 1

)2cos()2cos()(2 tfAtfAtS cc TktkT )1( for logic 0

Wave shape of BSK is shown in fig.5. 1 0 1 0

Fig. 5 BPSK waveform

;

;

Page 75: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

75

PSK signals are represented graphically in two dimensional co-ordinate system called signal constellation. Here x axis is represented by a function,

tfT

t c 2cos2

)(1 Tt 0and y axis by,

tfT

t c 2sin2

)(2 Tt 0

;

;

Orthogonal basis function Unit vector and and Correlation Dot product and . = 0 and . = 1Component along x-axis from is given as,

Component along x-axis from is given as,

tfT

t c 2cos2

)(1 tfT

t c 2sin2

)(2

0)()(0 21 T

tt 1)()(0 11 T

tt

jbiaS ˆˆ

j ii

)()( 21 tbtaS

atST

0 1 )(

i j

i

aiS ˆ.

Page 76: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

76

Let us represent S1(t) and S2(t) in terms of and )(1 t )(2 t

)()(

)(sin2

)(cos2

22sin

2sin2cos

2

2cos

2sinsin2coscos

)2cos()(

2111

21

tStS

tT

AtT

A

Ttf

TAtf

T

TA

tfAtfA

tfAtS

ii

cici

cici

ici

2/f2cos)( 2

0

122

0

21 TAdttAdttSE

TT

2/f2s)( 2

0

122

0

22 TAdttinAdttSE

TT

Energy of S1(t) or S2(t)

)(sin)(cos

)()()(

21

2111

tEtE

tStStS

ii

i

Page 77: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

77

The abscissa of the constellation point, The ordinate of the constellation point,

In BPSK θi = 0 or π

i

T

T

ii

ES

dtttStS

dtttSS

cos

)()()(

)()(

1

0 12111

0 11

i

T

T

ii

ES

dtttStS

dtttSS

sin

)()()(

)()(

2

0 22111

0 22

EEES i orcos1

0sin2 iES

Page 78: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

78

0,),( 121 SSS

The co-ordinate of the constellation points,

In Cartesian co-ordinate system shown in fig.6.

Fig.6 BPSK Constellation

S2=-√E S1=√E

Ψ1(t)

Ψ2(t)

0,cos iE )0,( E )0,( Eor

Page 79: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

79

Now BPSK modulator and its coherent demodulator can be implemented like fig. 3.

Local Oscillator

×Polar NRZ data pulse

sequence b(t)

Ab(t)cos(2πfct)

Acos(2πfct)

Fig.3 BPSK (a) Modulator (b) Demodulator

CR

×r(t)

Acos(2πfct)

1

01 or 0

L Tk

kT

dt)1(

k

k kTtpbtb )()(

Where bk ε {1, -1} and

T

Tttp

2/)(

Page 80: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

80

Here output of the correlator of demodulator assuming S1(t) transmitted is,

2)2cos()(0

2

)2cos()()4cos(12

)2cos()()2(cos

)2cos()()2cos(

)2cos()()(

)2cos()(

)1(

)1()1(

)1(2

)1(

)1(

1

)1(

ATdttftn

AT

dttftndttfA

dttftntfA

dttftntfA

dttftntS

dttftrL

Tk

kT

c

Tk

kT

c

Tk

kT

c

Tk

kT

cc

Tk

kT

cc

Tk

kT

c

Tk

kT

c

If S2(t) is transmitted then, 2

ATL

CR

×r(t)

Acos(2πfct)

1

0 1 or 0L

Tk

kT

dt)1(

Page 81: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

81

M-ARY PSKIn BPSK bit rate and modulation symbol rate are equal. In MPSK n = log2M bits are represented by a modulation symbol hence bit rate is n times higher than symbol rate. Therefore n times more information can be transmitted by MPSK (for the same baud/symbol rate) scheme compared to that of BPSK at the expense of bit error rate. MPSK wave is expressed as,

tfAtfA

tfAtS

cici

ici

2sinsin2coscos

)2cos()(

)()( 2211 tStS ii

Tt 0Where i = 1, 2, 3,…M, andare orthogonal basis functions. M

ii

)12( )(),( 21 tt

Page 82: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

82

The abscissa of the constellation points,

i

T

ii EdtttSS cos)()(0 11

The ordinate of the constellation point,

i

T

ii EdtttSS sin)()(0 22

The co-ordinates of the constellation points in Cartesian co-ordinate system are,

iiii EESS sin,cos),( 21

In polar co-ordinate system amplitude is,

EEE ii 22

sincos

The phase angle,2

21tani

ii S

S

Page 83: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

83

Therefore the polar co-ordinates of the signal constellation are ),( iE

For M = 8, initial phases are 0, π/4, π/2, 3π/4, π, 5π/4, 3π/2 and 7π/4 taking i = 0, 1, 2 ,..., 7. Constellation of 8-ARY PSK is shown in fig.1 below with its decision range.

Decision

rangeΨ1(t)

Ψ2(t)

Fig.1 8-ARY PSK Constellation

Page 84: EMCS 607P Data communication Fall 2014 1 Prof. Dr. Md. Imdadul Islam

84

QPSKQuadrature PSK is a special case of M-ary PSK (MPSK) where M = 4; Therefore the initial phases, ; i = 1, 2, 3, 4 provides π/4, 3π/4, 5π/4 and 7π/4. Bit rate of QPSK scheme is lower than that of M-ARY PSK for M > 4 (for same baud rate) but provide better performance in context of bit error rate. Each modulation symbol carries two binary bits correspond to a point on constellation shown in fig. 2. In any constellation gray code is used to ensues single bit discrepancy between adjacent points.

4

)12(

ii

01 11

00 10

θi

Ψ1(t)

Ψ2(t)

Fig. 2 QPSK Constellation