Pri rinciples nciples of of Com ommunications munications EC - - PowerPoint PPT Presentation

pri rinciples nciples of of com ommunications munications
SMART_READER_LITE
LIVE PREVIEW

Pri rinciples nciples of of Com ommunications munications EC - - PowerPoint PPT Presentation

Pri rinciples nciples of of Com ommunications munications EC ECS S 332 32 Dr. Prapun Suksompong prapun@siit.tu.ac.th 7. Angle Modulation Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00 1 Instantaneous Frquency


slide-1
SLIDE 1

1

Pri rinciples nciples of

  • f Com
  • mmunications

munications

EC ECS S 332 32

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

  • 7. Angle Modulation

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-2
SLIDE 2

Instantaneous Frquency

2

 

 

2 1

cos 2 x t t t  

1 2 3 4 1  0.5  0.5 1 1 1  x1 t ( ) 4 t

At t = 2, frequency = ?

slide-3
SLIDE 3

Instantaneous Frquency

3

 

 

2 1

cos 2 x t t t  

1 2 3 4 1  0.5  0.5 1 1 1  x1 t ( ) 4 t

At t = 2, f = t2 = 4 Hz?

 

cos 2 ft 

Correct?

slide-4
SLIDE 4

Instantaneous Frquency

4

 

 

2 1

cos 2 x t t t  

1 2 3 4 1  0.5  0.5 1 x1 t ( ) cos 2   4  t  ( ) t      

Correct? At t = 2, f = t2 = 4 Hz?

 

cos 2 ft 

slide-5
SLIDE 5

Instantaneous Frquency

5

 

 

2 1

cos 2 x t t t  

4 Hz is too low!!!

1 2 3 4 1  0.5  0.5 1 x1 t ( ) cos 2   4  t  ( ) t 1.9 2 2.1 1  0.5  0.5 1 x1 t ( ) cos 2   4  t  ( ) t

slide-6
SLIDE 6

Instantaneous Frquency

6

 

 

2 1

cos 2 x t t t  

12 Hz?

1 2 3 4 1  0.5  0.5 1 x1 t ( ) cos 2   12  t  ( ) t 1.9 2 2.1 1  0.5  0.5 1 x1 t ( ) cos 2   12  t  ( ) t

slide-7
SLIDE 7

FM vs. PM

7

Message signal Unmodulated carrier Phase-modulated signal Frequency-modulated signal

slide-8
SLIDE 8

FM vs. PM

8

 

FM

x t

 

PM

x t

Remark: To see xPM(t) of time varying m(t), it is usually easier to look at the instantaneous freq. via the derivative first.

slide-9
SLIDE 9

FM vs. PM

9

Message signal Unmodulated carrier Phase-modulated signal Frequency-modulated signal

slide-10
SLIDE 10

AM, FM, and PM

10

slide-11
SLIDE 11

FM vs. PM

11

 

FM

x t

 

PM

x t

slide-12
SLIDE 12

Amplitude vs. phase modulation

12

 Purely amplitude-modulated?  Purely phase-modulated?

 

1( )

( )cos 2

c

x t a t f t  

 

2

2 ( ) cos ( )

c

x t f A t t    

slide-13
SLIDE 13

Amplitude vs. phase modulation

13

 

1( )

( )cos 2

c

x t a t f t  

Assume that 𝑏 𝑢 is bounded such that 0 ≤ 𝑏 𝑢 ≤ 𝐵. Let

1 1

1 ( ) cos ( ) 2

c

t x t t A f  

 

      

 

2 1

( ) cos ( ( ) 2 )

c

t t x t f x A t     

slide-14
SLIDE 14

Five frequencies

12

0.05 0.1 0.15 0.2 0.25

  • 1
  • 0.5

0.5 1 Seconds 0.03

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

Rate = R frequency-change per second

Each tone lasts 1/R sec.

slide-15
SLIDE 15

Five frequencies

13

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

1300 Hz 1100 Hz 1200 Hz 1500 Hz 1400 Hz

1 2 3 4 5 6 7 8 9 10

  • 1
  • 0.5

0.5 1 Seconds

  • 3000
  • 2000
  • 1000

1000 2000 3000 0.5 1 1.5 Frequency [Hz] Magnitude

R = 0.5

slide-16
SLIDE 16

Five frequencies

14

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz

1 2 3 4 5 6 7 8 9 10

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.2 0.4 0.6 0.8 1 Frequency [Hz] Magnitude

R = 0.5

slide-17
SLIDE 17

Five frequencies

15

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz R = 1

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.1 0.2 0.3 0.4 0.5 Frequency [Hz] Magnitude

slide-18
SLIDE 18

Five frequencies

16

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz R = 5

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.02 0.04 0.06 0.08 0.1 Frequency [Hz] Magnitude

slide-19
SLIDE 19

Five frequencies

17

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz R = 20

0.05 0.1 0.15 0.2 0.25

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.01 0.02 0.03 Frequency [Hz] Magnitude

slide-20
SLIDE 20

Five frequencies

18

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz R = 50

0.02 0.04 0.06 0.08 0.1 0.12

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.005 0.01 0.015 Frequency [Hz] Magnitude

slide-21
SLIDE 21

Five frequencies

19

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

300 Hz 100 Hz 200 Hz 500 Hz 400 Hz

1 2 3 4 5 6 7 8 9 10

  • 1
  • 0.5

0.5 1 Seconds

  • 1000
  • 800
  • 600
  • 400
  • 200

200 400 600 800 1000 0.2 0.4 0.6 0.8 1 Frequency [Hz] Magnitude

R = 0.5

95 100 105 Frequency [Hz]

slide-22
SLIDE 22

Cos and Cos Pulse Comparison

20

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.5

0.5 1 Seconds

  • 200
  • 150
  • 100
  • 50

50 100 150 200 0.1 0.2 0.3 0.4 0.5 Frequency [Hz] Magnitude 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.5

0.5 1 Seconds

  • 200
  • 150
  • 100
  • 50

50 100 150 200 0.02 0.04 0.06 0.08 0.1 Frequency [Hz] Magnitude

𝑦 𝑢 = cos 2𝜌 100 𝑢 𝑦 𝑢 = cos 2𝜌 100 𝑢 , 0.4 ≤ 𝑢 ≤ 0.6, 0,

  • therwise.
slide-23
SLIDE 23

Sony VAIO Logo

1

The Sony VAIO logo illustrates the integration of analog and digital technology. The VA letters form an analog wave and the IO part represents a binary one and zero.

slide-24
SLIDE 24

2

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

  • 8. Sampling and Alising

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-25
SLIDE 25

Converting Analog Signals to Digital

3

 The real world is analog!  Interfacing between analog and digital is important.  Digitization

1.

Sampling (and hold): Discretize the time

Get sampled values of the analog signal. 2.

Quantization: Discretize quantity values

Convert each sampled value to a binary code.

slide-26
SLIDE 26

Digitization (analog to digital)

4

Time Vertical lines are used for sampling Horizontal lines are used for quantization 001 000 010 011 100 101 110 111 111 100 100 111 011 100 101 010 000 001 001 100111111100001000010100011001

slide-27
SLIDE 27

Sampling = loss of information?

5

 At first glance, digitization of a continuous signal (audio,

image) appears to be an enormous loss of information, because a continuous function is reduced to a function on a grid of points.

 Therefore the crucial question arises as to which criterion we

can use to ensure that the sampled points are a valid representation of the continuous signal, i.e., there is no loss

  • f information.
slide-28
SLIDE 28

Sampling

6

 Sampling is the process of taking a (sufficient) number of

discrete values of points on a waveform that will define the shape of wave form.

 Suppose that we sample a signal at a uniform rate, once every

Ts seconds.

 We refer to Ts as the sampling period, and to its reciprocal fs

= 1/Ts as the sampling rate.

 The more samples you take, the more accurately you can

define a waveform.

 Caution: If the sampling rate is too low, your may experience

distortion (aliasing).

slide-29
SLIDE 29

Example: sin(100t) (1/4)

7

This is the plot of sin(100t). What’s wrong with it?

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 t

[AliasingSin_2.m]

slide-30
SLIDE 30

Example: sin(100t) (2/4)

8

Signal of the form

 

sin 2 f t  have frequency f f  Hz. So, the frequency of

 

sin 100 t  is 50 Hz.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 t

From time 0 to 1, it should have completed 50 cycles. However, our plot has only

  • ne cycle.

It looks more like the plot

  • f

 

sin 2 t 

slide-31
SLIDE 31

Example: sin(100t) (3/4)

9

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 t

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 t

Aliasing causes high-frequency signal to be seen as low frequency.

slide-32
SLIDE 32

Sampling Theorem

10

 In order to (correctly and completely) represent an analog

signal, the sampling frequency, fs, must be at least twice the highest frequency component of the analog signal.

 Given a sampling frequency, fs,

the Nyquist frequency is defined as fs/2.

 Given that highest (positive-)frequency component fmax of

the analog signal, the Nyquist sampling rate is 2 fmax

And the Nyquist sampling interval is 1/(2 fmax)

slide-33
SLIDE 33

11

Signal of the form

 

sin 2 f t  have frequency f f  Hz. So, the frequency of

 

sin 100 t  is 50 Hz.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 t

We need to sample at least 100 times per time unit. Here, the number of sample per time unit is 49, which is too small to avoid aliasing.

Example: sin(100t) (4/4)

slide-34
SLIDE 34

Ex: Aliasing

12

 If you've ever watched a film and seen the wheel of a rolling

wagon appear to be going backwards, you've witnessed aliasing.

slide-35
SLIDE 35

plotspec.m

13

 fs: Sampling frequency = 200 samples/sec

1 2 3 4 5 6 7 8 9 10

  • 1
  • 0.5

0.5 1 Seconds

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

𝑔

𝑡

2 − 𝑔

𝑡

2 cos 2𝜌 5 𝑢

slide-36
SLIDE 36

plotspec.m

14

 fs: Sampling frequency = 200 samples/sec

𝑔

𝑡

2 − 𝑔

𝑡

2 cos 2𝜌 10 𝑢

1 2 3 4 5 6 7 8 9 10

  • 1
  • 0.5

0.5 1 Seconds

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

slide-37
SLIDE 37

plotspec.m

15

 fs: Sampling frequency = 200 samples/sec

cos 2𝜌 50 𝑢

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

cos 2𝜌 70 𝑢

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 8 Frequency [Hz] Magnitude

cos 2𝜌 100 𝑢

slide-38
SLIDE 38

plotspec.m

16

 fs: Sampling frequency = 200 samples/sec

cos 2𝜌 110 𝑢 cos 2𝜌 130 𝑢 cos 2𝜌 190 𝑢

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 1 2 3 4 Frequency [Hz] Magnitude

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

  • 100
  • 80
  • 60
  • 40
  • 20

20 40 60 80 100 2 4 6 Frequency [Hz] Magnitude

slide-39
SLIDE 39

Pac Man

17

slide-40
SLIDE 40

Another Example

18

 When sampled at 10 Samples per sec, there is no way to tell

the difference between 3Hz, 7Hz, or the 13Hz waves below.

slide-41
SLIDE 41

Aliasing: One complex exponential

19

f fS 2fS

  • fS
  • 2fS

𝑓𝑘2𝜌𝑔

0𝑢

f0 Let’s increase f0

slide-42
SLIDE 42

Aliasing: One complex exponential

20

f fS 2fS

  • fS
  • 2fS

𝑓𝑘2𝜌𝑔

0𝑢

f0

slide-43
SLIDE 43

Aliasing: Two complex exponentials

21

f fS 2fS

  • fS
  • 2fS

𝑓𝑘2𝜌𝑔

0𝑢

f0

𝑓𝑘2𝜌𝑔

1𝑢

f1

slide-44
SLIDE 44

Aliasing: Two complex exponentials

22

f fS 2fS

  • fS
  • 2fS

𝑓𝑘2𝜌𝑔

0𝑢

f0

𝑓𝑘2𝜌𝑔

1𝑢

f1 Let’s change f0 and f1. For sine wave, f1 = -f0.

slide-45
SLIDE 45

Reconstruction

23

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8

  • 2
  • 1

1 2 3 4 5 6 7 8

m[k] m(t)

slide-46
SLIDE 46

Practical Reconstruction

24

  • 4
  • 3
  • 2
  • 1

1 2 3 4 2 4 6 8 10 12 14 16

  • 4
  • 3
  • 2
  • 1

1 2 3 4 2 4 6 8 10 12 14 16

slide-47
SLIDE 47

1

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

9.1 Analog Pulse Modulation

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-48
SLIDE 48

Naturally digital information

2

 Text is commonly encoded using ASCII, and MATLAB

automatically represents any string file as a list of ASCII numbers.

text string (decimal) ASCII representation of the text string binary (base 2) representation of the decimal numbers

slide-49
SLIDE 49

Illustration of PAM, PWM, and PPM

3

slide-50
SLIDE 50

4

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

9.2 Nyquist Pulse Shaping

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-51
SLIDE 51

PAM: Pulse Amplitude Modulation

5

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

  • .5T

   

y t x t 

1 .5T

   

m n m n 

No ISI

           

ˆ 1 1 ˆ 0 ˆ 1 1 m m m m m m     

Transmitted signal Received signal Pulse

slide-52
SLIDE 52

PAM: Pulse Amplitude Modulation

6

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

   

y t x t 

1

   

ˆ m n m n 

No ISI

           

ˆ 1 1 ˆ 0 ˆ 1 1 m m m m m m     

Transmitted signal Received signal Pulse

𝑈 4 − 𝑈 4

slide-53
SLIDE 53

ISI Inter-Symbol Interference

7

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

T

  • T

   

y t x t 

   

ˆ m n m n 

Suffer ISI

1 1.5T

  • 1.5T

                       

2 ˆ 1 1 ˆ 0 ˆ 1 1 1 1 2 m m m m m m m m m m m m             

slide-54
SLIDE 54

ISI Inter-Symbol Interference

8

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

   

y t x t 

1

   

ˆ m n m n 

No ISI

           

ˆ 1 1 ˆ 0 ˆ 1 1 m m m m m m     

Transmitted signal Received signal Pulse

3𝑈 4 − 3𝑈 4

slide-55
SLIDE 55

ISI Inter-Symbol Interference

9

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

T

  • T

   

y t x t 

   

ˆ m n m n 

No ISI

1

slide-56
SLIDE 56

ISI Inter-Symbol Interference

10

 

p t

T 2T 3T 4T

  • T
  • 2T
  • 3T
  • 4T

t t

           

ˆ

n t nT t nT

x t m n p t nT m n y t x t

   

   

T

  • T

   

y t x t 

   

ˆ m n m n 

No ISI

1 2T

  • 2T
slide-57
SLIDE 57

ISI

11

 Some pulses displaying intersymbol interference.

[Blahut, 2008, Fig 2.8] t

slide-58
SLIDE 58

f

Spectra of Raised Cosine Pulses

12

[Blahut, 2008, Fig 2.10]

 

RC

1 , 2 1 1 1 ; 1 cos , 2 2 2 2 1 0, 2 T f T T T P f f f T T T f T                                                

slide-59
SLIDE 59

Ny quist criterion

13

[Blahut, 2008, Fig 2.9]

slide-60
SLIDE 60

Raised Cosine Pulses

14

  • 3
  • 2
  • 1

1 2 3

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1 Time [T] Roll-off = 0 Roll-off = 0.5 Roll-off = 1

  • 1
  • 0.5

0.5 1

  • 0.2

0.2 0.4 0.6 0.8 1 1.2 Frequency [1/T] magnitude Roll-off = 0 Roll-off = 0.5 Roll-off = 1

For fixed nonzero , the tails decay as 1/t3 for large |t|. Although the pulse tails persist for an infinite time, they are eventually small enough so they can be truncated with only negligible perturbations of the zero crossings.  

RC 2 2 2 2 2 2

cos ; sinc 4 1 cos sin 4 1 t t T p t t T T t t T T t t T T            

slide-61
SLIDE 61

15

slide-62
SLIDE 62

Ex.

16

     

n

x t m n p t nT

 

 

0.5 1 1.5 2 2.5 3 3.5

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 t

0.5 1 1.5 2 2.5 3 3.5

  • 2
  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2 t

0.5 1 1.5 2 2.5 3 3.5

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 t

   

;0

RC

p t p t 

   

;1

RC

p t p t 

   

;0.5

RC

p t p t 

slide-63
SLIDE 63

1

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Digitization and PCM

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-64
SLIDE 64

Digitization (analog to digital)

2

Time Vertical lines are used for sampling Horizontal lines are used for quantization 001 000 010 011 100 101 110 111 111 100 100 111 011 100 101 010 000 001 001 100111111100001000010100011001

slide-65
SLIDE 65

Quantization

3

Quantizer rounds off the sample values to the nearest discrete value in a set of q quantum levels. This process introduces permanent errors that appear at the receiver as quantization noise in the reconstructed signal.

slide-66
SLIDE 66

Aliasing in 2D

4

slide-67
SLIDE 67

Quantization in 2D

5

slide-68
SLIDE 68

6

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Digital PAM

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-69
SLIDE 69

Digital Message

7

 An ordered sequence of symbols (or characters)  Produced by a discrete information source.  The source draws from an alphabet of M  2 different

symbols.

 Ex. English text source: 26 (a to z) + 26 (A to Z) + 10 (0 to 9)

+ . , ! @ ( ) …

 Ex. Thai text source: 44 consonants (พยัญชนะ) + 15 vowel

symbols (สระ) + 4 tone marks (วรรณยุกต์) + …

 Ex. A typical computer terminal has an alphabet of

M  90 symbols (the number of character keys multiplied by two to account for the shift key)

slide-70
SLIDE 70
  • Ex. ASCII

8

 Text is commonly encoded using ASCII  MATLAB automatically represents any string file as a list of

ASCII numbers.

text string (decimal) ASCII representation of the text string binary (base 2) representation of the decimal numbers

slide-71
SLIDE 71

Line Codes: PAM Format

9

Unipolar RZ (return-to-zero) Unipolar NRZ (nonreturn-to-zero) Polar RZ Polar NRZ Bipolar NRZ

(successive 1s are represented by pulses with alternating polarity)

Split-phase Manchester (twinned binary) Polar quaternary NRZ.

(Derived by grouping the message bits in blocks of two and using four amplitude levels to prepresent the four possible combinations)

slide-72
SLIDE 72

10

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

PAM with Noise

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-73
SLIDE 73

Noise: Ex 1

11

50 100 150 200 250 300 350 400 450 500

  • 2

2 50 100 150 200 250 300 350 400 450 500

  • 10

10 200

m[0] = 2 m[1] = 2 m[2] = -2

     

n

x t m n p t nT  

     

y t x t N t  

   

2, 1,0,1,2 m n   

slide-74
SLIDE 74

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 10
  • 5

5 10

Noise: Ex 2 (1/5)

12

m[0] = 1 m[1] = -1

     

n

x t m n p t nT  

     

y t x t N t  

 

2 T r n y nT         To decode, consider

       

ˆ decode as 1 ˆ decode as 1 r n m n r n m n        m[2] = -2

   

1,1 m n  

slide-75
SLIDE 75

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 10
  • 5

5 10

Noise: Ex 2 (2/5)

13

m[0] = 1 m[1] = -1 m[2] = -1

     

n

x t m n p t nT  

     

y t x t N t  

n 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1

𝒏 𝒐 1 1 1 1

  • 1
  • 1

1

  • 1

1

  • 1
slide-76
SLIDE 76

Noise: Ex 2 (3/5)

14

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 10
  • 5

5 10 50 100 150 200 250 300 350 400 450 500

  • 100
  • 50

50 100

Q: Where should we sample?

       

*

t r t T

r t y d y t h t  

 

   

* r

h t p T t  

 

x t

 

y t

 

r t

Matched filter

slide-77
SLIDE 77

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 50

50

Noise: Ex 2 (4/5)

15

       

*

t r t T

r t x d x t h t  

 

   

* r

h t p T t  

 

x t

 

r t

when there is no noise

   

r n y nT T   To decode, consider

       

ˆ decode as 1 ˆ decode as 1 r n m n r n m n       

slide-78
SLIDE 78

Noise: Ex 2 (5/5)

16

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 10
  • 5

5 10 50 100 150 200 250 300 350 400 450 500

  • 100
  • 50

50 100

 

x t

 

y t

 

r t

n 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1

𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1
slide-79
SLIDE 79

17

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Digital Modulation

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-80
SLIDE 80

Digital Modulation

18

 A digital signal can modulate the amplitude, frequency, or

phase of a sinusoidal carrier wave.

 If the modulating waveform consists of NRZ rectangular

pulses, then the modulated parameter will be switched or keyed from one discrete value to another.

 

cos 2

c

A f t   

Amplitude-shift keying (ASK) Frequency-shift keying (FSK) Phase-shift keying (PSK)

slide-81
SLIDE 81

Digital Modulation: Binary Signaling

19

Binary ASK FSK Binary PSK (BPSK)

DSB mod. w/ Nyquist pulse shaping at baseband OOK(on-off keying) PRK (phase-reversal keying)

[Carlson and Crilly, 2009, Fig 14.1-1]

slide-82
SLIDE 82

FSK

20

0.05 0.1 0.15 0.2 0.25

  • 1
  • 0.5

0.5 1 Seconds 0.03

cos 2𝜌𝑔

1𝑢

cos 2𝜌𝑔

2𝑢

cos 2𝜌𝑔

5𝑢

cos 2𝜌𝑔

4𝑢

cos 2𝜌𝑔

3𝑢

Rate = R frequency-change per second

Each tone lasts 1/R sec.

slide-83
SLIDE 83

1

Pri rinciples nciples of

  • f Com
  • mmunications

munications

EC ECS S 332 32

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Source Coding

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-84
SLIDE 84

Morse code

2

 Telegraph network  Samuel Morse, 1838  A sequence of on-off tones (or , lights, or clicks)

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

(wired and wireless)

slide-85
SLIDE 85

Example

3

[http://www.wolframalpha.com/input/?i=Morse+Code+%22I+Love+ECS332!%22]

slide-86
SLIDE 86

Morse code: Key Idea

4

Frequently-used characters (e,t) are mapped to short codewords.

Basic form of compression.

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

slide-87
SLIDE 87

Morse code: Key Idea

5

Relative frequencies

  • f letters in the

English language

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

Frequently-used characters are mapped to short codewords.

slide-88
SLIDE 88

Morse code: Key Idea

6

0.02 0.04 0.06 0.08 0.1 0.12 0.14 a b c d e f g h i j k l m n o p q r s t u v w x y z

Relative frequencies

  • f letters in the

English language

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

Frequently-used characters are mapped to short codewords.

slide-89
SLIDE 89

รหัสมอร์สภาษาไทย

7

slide-90
SLIDE 90
  • Ex. DMS (1)

8

 

, , , ,

X

a b c d e 

a c a c e c d b c e d a e e d a b b b d b b a a b e b e d c c e d b c e c a a c a a e a c c a a d c d e e a a c a a a b b c a e b b e d b c d e b c a e e d d c d a b c a b c d d e d c e a b a a c a d

Information Source

   

1 , , , , , 5 0,

  • therwise

X

x a b c d e p x        Approximately 20% are letter ‘a’s

slide-91
SLIDE 91
  • Ex. DMS (2)

9

 

1,2,3,4

X 

   

1 , 1, 2 1 , 2, 4 1 , 3,4 8 0,

  • therwise

X

x x p x x             

Information Source

Approximately 50% are number ‘1’s

2 1 1 2 1 4 1 1 1 1 1 1 4 1 1 2 4 2 2 1 3 1 1 2 3 2 4 1 2 4 2 1 1 2 1 1 3 3 1 1 1 3 4 1 4 1 1 2 4 1 4 1 4 1 2 2 1 4 2 1 4 1 1 1 1 2 1 4 2 4 2 1 1 1 2 1 2 1 3 2 2 1 1 1 1 1 1 2 3 2 2 1 1 2 1 4 2 1 2 1

slide-92
SLIDE 92

Shannon–Fano coding

10

 Proposed in Shannon’s “A Mathematical Theory of

Communication” in 1948

 The method was attributed to Fano, who later published it as

a technical report.

 Should not be confused with

 Shannon coding, the coding method used to prove Shannon's

noiseless coding theorem, or with

 Shannon–Fano–Elias coding (also known as Elias coding), the

precursor to arithmetic coding.

slide-93
SLIDE 93

Huffman Code

11

 MIT, 1951  Information theory class taught by Professor Fano.  Huffman and his classmates were given the choice of

 a term paper on the problem of finding the most efficient binary

code.

  • r

 a final exam.

 Huffman, unable to prove any codes were the most efficient, was

about to give up and start studying for the final when he hit upon the idea of using a frequency-sorted binary tree and quickly proved this method the most efficient.

 Huffman avoided the major flaw of the suboptimal Shannon-Fano

coding by building the tree from the bottom up instead of from the top down.

slide-94
SLIDE 94

Huffman Coding in MATLAB (1)

12

pX = [0.5 0.25 0.125 0.125]; % pmf of X SX = [1:length(pX)]; % Source Alphabet [dict,EL] = huffmandict(SX,pX); % Create codebook %% Pretty print the codebook. codebook = dict; for i = 1:length(codebook) codebook{i,2} = num2str(codebook{i,2}); end codebook % Try to encode some random source string n = 5; % Number of source symbols to be generated sourceString = randsrc(1,10,[SX; pX]) % Create data using pX encodedString = huffmanenco(sourceString,dict) % Encode the data [Huffman_Demo_Ex1]

slide-95
SLIDE 95

Huffman Coding in MATLAB (2)

13

codebook = [1] '0' [2] '1 0' [3] '1 1 1' [4] '1 1 0' sourceString = 1 4 4 1 3 1 1 4 3 4 encodedString = 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 1 0

slide-96
SLIDE 96

Huffman Coding: Source Extension

14

1 2 3 4 5 6 7 8 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Order of source extension

 

H X

 

1 H X n  n

 

1 E X n    

slide-97
SLIDE 97

Huffman Coding: Uniform pmf

15

2 4 6 8 10 12 14 16 18 20 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

𝑁 = |𝑇𝑌|

 

2

1 log M 

 

2

log M

 

X    

(no source extension)

slide-98
SLIDE 98

1

Pri Principles of Comm nciples of Communi unications cations

EC ECS 332 S 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Source Coding

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-99
SLIDE 99

Morse code

2

 Telegraph network  Samuel Morse, 1838  A sequence of on-off tones (or , lights, or clicks)

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

(wired and wireless)

slide-100
SLIDE 100

Example

3

[http://www.wolframalpha.com/input/?i=Morse+Code+%22I+Love+ECS332!%22]

slide-101
SLIDE 101

Morse code: Key Idea

4

Frequently-used characters (e,t) are mapped to short codewords.

Basic form of compression.

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

slide-102
SLIDE 102

Morse code: Key Idea

5

Relative frequencies

  • f letters in the

English language

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

Frequently-used characters are mapped to short codewords.

slide-103
SLIDE 103

Morse code: Key Idea

6

0.02 0.04 0.06 0.08 0.1 0.12 0.14 a b c d e f g h i j k l m n o p q r s t u v w x y z

Relative frequencies

  • f letters in the

English language

U V W X Y Z A B C D E F G H I J K L M N O Q P R S T 1 2 3 4 5 6 7 8 9

Frequently-used characters are mapped to short codewords.

slide-104
SLIDE 104

รหัสมอร์สภาษาไทย

7

slide-105
SLIDE 105
  • Ex. DMS (1)

8

 

, , , ,

X

a b c d e 

a c a c e c d b c e d a e e d a b b b d b b a a b e b e d c c e d b c e c a a c a a e a c c a a d c d e e a a c a a a b b c a e b b e d b c d e b c a e e d d c d a b c a b c d d e d c e a b a a c a d

Information Source

   

1 , , , , , 5 0,

  • therwise

X

x a b c d e p x        Approximately 20% are letter ‘a’s

slide-106
SLIDE 106
  • Ex. DMS (2)

9

 

1,2,3,4

X 

   

1 , 1, 2 1 , 2, 4 1 , 3,4 8 0,

  • therwise

X

x x p x x             

Information Source

Approximately 50% are number ‘1’s

2 1 1 2 1 4 1 1 1 1 1 1 4 1 1 2 4 2 2 1 3 1 1 2 3 2 4 1 2 4 2 1 1 2 1 1 3 3 1 1 1 3 4 1 4 1 1 2 4 1 4 1 4 1 2 2 1 4 2 1 4 1 1 1 1 2 1 4 2 4 2 1 1 1 2 1 2 1 3 2 2 1 1 1 1 1 1 2 3 2 2 1 1 2 1 4 2 1 2 1

slide-107
SLIDE 107

Shannon–Fano coding

10

 Proposed in Shannon’s “A Mathematical Theory of

Communication” in 1948

 The method was attributed to Fano, who later published it as

a technical report.

 Should not be confused with

 Shannon coding, the coding method used to prove Shannon's

noiseless coding theorem, or with

 Shannon–Fano–Elias coding (also known as Elias coding), the

precursor to arithmetic coding.

slide-108
SLIDE 108

Huffman Code

11

 MIT, 1951  Information theory class taught by Professor Fano.  Huffman and his classmates were given the choice of

 a term paper on the problem of finding the most efficient binary

code.

  • r

 a final exam.

 Huffman, unable to prove any codes were the most efficient, was

about to give up and start studying for the final when he hit upon the idea of using a frequency-sorted binary tree and quickly proved this method the most efficient.

 Huffman avoided the major flaw of the suboptimal Shannon-Fano

coding by building the tree from the bottom up instead of from the top down.

slide-109
SLIDE 109

1

Pri Principles of Comm nciples of Communi unications cations

EC ECS S 33 332

  • Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Digital Communication in the Presence of Noise

Office Hours: BKD 3601-7 Monday 14:40-16:00 Friday 14:00-16:00

slide-110
SLIDE 110

Big Picture (so far)

2

Source Pulse Shaping p(t) baseband PAM signal LPF Receiving Filter hr(t) Decision Device Source Decoder Decoded source symbols Source Encoder m[1], m[2], …

  • 1, 1, …

cos 2𝜌𝑔

𝑑𝑢

cos 2𝜌𝑔

𝑑𝑢

N(t)

0>-1 1> 1

0101011110

𝑛 𝑙 𝑞 𝑢 − 𝑙𝑈

𝑙

>=<

0101011110

e.g. Huffman coding

slide-111
SLIDE 111

Big Picture: Assumption

3

Source Pulse Shaping p(t) baseband PAM signal LPF Receiving Filter hr(t) Decision Device Source Decoder Decoded source symbols Source Encoder m[1], m[2], …

cos 2𝜌𝑔

𝑑𝑢

cos 2𝜌𝑔

𝑑𝑢

N(t)

0>-1 1> 1

0101011110

𝑛 𝑙 𝑞 𝑢 − 𝑙𝑈

𝑙

>=<

0101011110

For the analysis in this section, we assume that the modulation and demodulation are performed perfectly (or do not exist).

slide-112
SLIDE 112

Big Picture: Simplified

4

Source Pulse Shaping p(t) baseband PAM signal Receiving Filter hr(t) Decision Device Source Decoder Decoded source symbols Source Encoder m[1], m[2], … N(t)

0>-1 1> 1

0101011110…

𝑛 𝑙 𝑞 𝑢 − 𝑙𝑈

𝑙

>=<

0101011110

These parts are studied in the previous section.

  • 1,1,…

Previously, we have seen two techniques. 1) No receiving filter: ℎ𝑠 𝑢 =  𝑢 2) Matched filter: ℎ𝑠 𝑢 = 𝑞∗ 𝑈 − 𝑢

slide-113
SLIDE 113

System under consideration

5

Pulse Shaping p(t) baseband PAM signal Receiving Filter hr(t) Decision Device m[1], m[2], … N(t)

x 𝑢 = 𝑛 𝑙 𝑞 𝑢 − 𝑙𝑈

𝑙

>=<

  • 1,1,…
  • 1,1,…

Previously, we have seen two techniques. 1) No receiving filter: ℎ𝑠 𝑢 =  𝑢 2) Matched filter: ℎ𝑠 𝑢 = 𝑞∗ 𝑈 − 𝑢 Note that we still need to convert -1,1 back to 0,1 r(t) r[n] y(t)

slide-114
SLIDE 114

50 100 150 200 250 300 350 400 450 500

  • 1
  • 0.5

0.5 1 50 100 150 200 250 300 350 400 450 500

  • 10
  • 5

5 10

Old Example (1)

6

m[0] = 1 m[1] = -1

     

n

x t m n p t nT  

     

y t x t N t  

 

2 T r n y nT         Technique 1: consider

       

ˆ decode as 1 ˆ decode as 1 r n m n r n m n        m[2] = -2

   

1,1 m n  

10 bits are transmitted

slide-115
SLIDE 115

Old Example (2)

7

50 100 150 200 250 300 350 400 450 500

  • 100
  • 50

50 100

       

*

t r t T

r t y d y t h t  

 

   

* r

h t p T t  

 

r t

Matched filter

Technique 2:

   

r n y nT T   To decode, consider

       

ˆ decode as 1 ˆ decode as 1 r n m n r n m n       

slide-116
SLIDE 116

BER (Bit Error Rate)

8

 Technique 1  Technique 2

n 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1

𝒏 𝒐 1 1 1 1

  • 1
  • 1

1

  • 1

1

  • 1

4 0.4 10 BER  

n 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1

𝒏 𝒐 1

  • 1
  • 1

1

  • 1

1 1 1 1

  • 1

10 BER  

slide-117
SLIDE 117

BER (Bit Error Rate)

9

Technique 1 Technique 2

Severity of the noise 10 bits simulation

2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

BER

[rectPulse_Demo_5_difftPulse_BERCurve.m]

slide-118
SLIDE 118

BER (Bit Error Rate)

10

Severity of the noise 10,000 bits simulation

2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

BER

Technique 1 Technique 2

[rectPulse_Demo_5_difftPulse_BERCurve.m]

slide-119
SLIDE 119

50 100 150 200 250 300 350 400 450 500

  • 1

1 50 100 150 200 250 300 350 400 450 500

  • 10

10 100

Noise

11

     

n

x t m n p t nT  

     

y t x t N t  

50 100 150 200 250 300 350 400 450 500

  • 10

10

 

N t

Note that in MATLAB, the signals are all in discrete-time approximating the actual signals in continuous-time. The noise here was generated by running the command 2*randn 500 times. (Actually, we use the command 2*randn(1,500).

slide-120
SLIDE 120

Noise

12

50 100 150 200 250 300 350 400 450 500

  • 10

10

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 50 100 n Number of occurrences

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 5 10 15 n Frequency (%) of occurrences

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 Number of samples = 500

 

N t

2*randn(1,500) generates 500 i.i.d. Gaussian RVs. These random variables have expected value = 0 and std = 2.

slide-121
SLIDE 121

Noise

13

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10

4

  • 10

10

  • 8
  • 6
  • 4
  • 2

2 4 6 8 5000 10000 n Number of occurrences

  • 8
  • 6
  • 4
  • 2

2 4 6 8 10 20 n Frequency (%) of occurrences

  • 8
  • 6
  • 4
  • 2

2 4 6 8 Number of samples = 50000

2*randn(1,5e4) generates 50,000 i.i.d. Gaussian RVs. These random variables have expected value = 0 and std = 2.

slide-122
SLIDE 122

Describing the noise

14

 

2

0, N 

 

2

1 2

1 2

x N

f n e



      

slide-123
SLIDE 123

BER (Bit Error Rate)

15

Technique 1 Technique 2

Severity of the noise 10 bits simulation

2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

BER

[rectPulse_Demo_5_difftPulse_BERCurve.m]

slide-124
SLIDE 124

BER (Bit Error Rate)

16

Severity of the noise 10,000 bits simulation

2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

BER

Technique 1 Technique 2

[rectPulse_Demo_5_difftPulse_BERCurve.m]

slide-125
SLIDE 125

BER (Bit Error Rate)

17

2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

BER

Technique 1 Technique 2 Majority Vote

[rectPulse_Demo_3_Maj.m]