1 why do we computer scientists need to know communication technologies? professor r. c. t. lee

85
1 Why do we computer scientists need to know communication technologies? Professor R. C. T. Lee

Post on 19-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

1

Why do we computer scientists need to know communication

technologies?

Professor R. C. T. Lee

2

• In these days, it is hard to imagine any computer which stands entirely alone. A computer is often connected to others, through communication technologies.

• Many CPU’s simply have built-in communication mechanisms.

3

• Besides, many systems which were traditionally considered as communication systems are actually quite similar to computers.

• Examples: TV, mobile phone.

4

We can use our mobile phone to access internet.

Is a mobile phone a computer?

We can also insert a sim-card into a computer and the computer suddenly can access the base stations which were built for mobile phones?

Is a computer a mobile phone?

5

• But, unfortunately, almost all computer scientist students do not understand some very basic communication technologies.

• Question 1: How is a bit represented when it is transmitted in a wireless environment?

6

• We often thought that a bit is represented by a pulse.

• (1,1,0,0,1)

1 1 10 0

7

• But we cannot send a pulse in the wireless environment.

• Question 2: We often mix bits together.

• An example: In the ADSL system, 256 bits are bundled together.

8

• If the bits are represented by pulses, how can they be mixed and later be distinguished.

• Question 3: We often mix bits by different users together.

• If the bits are represented by pulses, how can they be distinguished when they are received?

9

• A very fundamental problem in communications is to study how digital information is represented, sent and later separated.

• Fundamental concept: There is no digital signal. Every digital bit is represented by an analog signal.

10

• Consider the simplest case: There is only one user.

• We represent bit 1 by and represent bit 0 by .

• We further require that and are orthogonal.

)(1 tf)(2 tf

)(1 tf )(2 tf

11

• That is, the inner product

• and for every i. .

0)()()(),(0 2121 dttftftftfT

1)(),( tftf ii

12

For the receiver, it either receives or .

How do we know which function is received? We perform two inner products.

Let the sent signal, which is received, be denoted by .

We calculate and

)(1 tf )(2 tf

)(ts

)(),( 11 tftsx .)(),( 22 tftsx

13

Suppose the sent signal is , xf1

1)(),()(),( 1111 xfxfxftsx

.0)(),()(),( 2122 xfxftftsx

If , we conclude that we sent , which is 1(0).

)1(1 21 xx

Conclusion:

))()(( 21 tftf

14

There are millions of possible functions for and .

We may let and

We may also let and

We may of course let and .

)(1 tf )(2 tf

)2cos()(1 tftf c ).2sin()(2 tftf c

)2cos()(1 tmftf c

).2cos()(2 tnftf c

)2sin()(1 tmftf c)2sin()(2 tnftf c

15

It can be easily seen that

We can also prove, for instance, that

.0)2sin()2cos()2sin(),2cos(0

dttftftftf c

T

ccc

0

)2cos()2cos(

)2cos(),2cos(

0

dttnftmf

tnftmf

cc

T

cc

if . nm

16

)(),( 11 tftsx .)(),( 22 tftsx and

11 x iff )()( 1 tfts

12 x iff )()( 1 tfts

If the sent bit is 1(0), )).()(()( 21 tftfts

17

We should now always remember that everybit, 1 or 0, is represented by a cosine ora sine function.

In the above, we assumed that every bit is sent alone.

Can we send two bits together?

Yes, we can.

18

Let us assume that we are going to send twobits: Bit 1 and Bit 2.

Bit 1 can be 1 or 0 and Bit 2 can also be 1 or0.

We like to mix Bit 1 and Bit 2 together and send the mixed signal out.

The important thing is that the receiver mustbe able to correctly determine what Bit 1 and Bit 2 are .

19

Let Bit 1(Bit 2) be represented by .

The value of is determined by the value of Bit 1(Bit 2) .

We may let be 1(-1) if Bit i is 1(0) for

Thus the sent signal is

For instance. Suppose Bit 1 is 1 and Bit 2 is 0.Then the send signal is

)).()(( 2211 tfatfa

)( 21 aa

ia .2,1i

).()( 2211 tfatfa

).()( 21 tftf

20

The job of the receiver is to determine thevalues of for

Note that

To determine , we perform an inner product between and

Let

).()()( 2211 tfatfats

1a)(ts ).(1 tf

.)(),( 11 tftsx

ia .2,1i

21

.

)(),()(),(

)(),()(

)(),()(

1

122111

12211

11

a

tftfatftfa

tftfatfa

tftstx

Similarly, we have

.

)(),()(

)(),()(

2

22211

22

a

tftfatfa

tftstx

22

)2sin()(2 tftf c

)2cos()(1 tftf c

For instance, let

And

Then, at any time,

)2sin()2cos()( 21 tfatfatS cc

23

)2sin()2cos()( 21 tfatfatS cc For cases,(1)a1=1, a2=1

(2) a1=1, a2=-1

(3) a1=-1, a2=1

(4) a1=-1, a2=-1

)2sin()2cos()( 21 tfatfatS cc

)2sin()2cos()( 21 tfatfatS cc

)2sin()2cos()( 21 tfatfatS cc

This is called the QPSK system.

24

If we conclude that User 1 sends 1(0).

Similarly, if we conclude that User 2sends 1(0).

),1(1 11 aa

),1(1 22 aa

25

We can now see how two bits can be mixedand sent without any trouble.

Essentially, we must understand that thedigital signals are represented by analog signals which are orthogonal to each other.

The receiver uses the property of orthogonalityto separate the signals.

26

If we can mix 2 bits together, we can of course mix 256 bits together.

In fact, the ADSL system uses this kind of scheme.

This is why the ADSL system is a very fast system.

27

In the ADSL system, each bit i is representedby

Thus, each signal is orthogonal to others due to the distinct frequencies.

This is why the system is called OrthogonalFrequency Division Multiplexing (OFDM) system.

.256,,2,1),2cos( itfi

28

The coding of digital data by analogsignals is often called digital modulation.

The decoding of analog signals back todigital signals is called demodulation.

29

Let us go one step further by mixing bitsfrom different people.

Our trick is the following: A bit of 1 or 0 forUser 1 is represented differently from abit of 1 or 0 for User 2.

Let us consider a simple case: two users.

30

Let the bit of 1 for User 1 be coded as and the bit of 0 for User 1 be coded as

Let the bit of 1 for User 2 be coded as and the bit of 0 for User 2 becoded as

We may say that User i sends where or

)1,1(1 s

).1,1()1,1(1 s

)1,1(2 s

).1,1(2 s

iisa1ia .1

31

Since and are vectors, we use dot-product as the inner product.

We therefore conclude that and areorthogonal to each other.

1s 2s

0

)1(1

))1(1()11(

)1,1()1,1(

, 21

ss

1s 2s

32

We may mix the bits of User 1 and User 2and the mixed signal is therefore where or .

The job of the receiver is to determine

Again, this can be done by using the orthogonality of and

,2211 sasa 1ia 1

.ia

1s .2s

33

To find we calculate

Thus

can be found similarly.

,1a

.2

,,

,

,

1

122111

12211

11

a

ssassa

ssasa

ssx

.21

1

xa

2a

34

Example:

User 1 sends 1 and User 2 sends 0.

02)1,1)(2,0(,

)2,0()1,1()1,1(

11

21

ssx

sss

User 1 sends 1..02)1,1)(2,0(, 22 ssx

User 2 sends 0.

35

• Thus we can see that we can even mix

• bits of two different users.

• The main trick is that we represent the

• bits of different users by vectors and make

• sure that they are orthogonal to each other.

• This can be easily extended to more than 2 users.

36

Let us now ask another interesting question.

Our cables are often used to transmit digitaldata.

We like our channel to transmit a large amount of bits per second.

We are talking about high bit rate systems.

Why do we often call these channelsbroadband systems?

37

By a broadband system, we mean it can transmit signals with a large range of frequencies .

Why is a high bit system also a broadbandsystem?

This can be understood only through theknowledge of Fourier transform.

38

• Fourier transform tells us that any signal contains a set of cosine functions with different frequencies.

39

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

-4

-3

-2

-1

0

1

2

3

4

Time

t

f(t)

A signal

40 The Discrete Fourier Transform Spectrum of the

Signal in the Previous Slide

0 10 20 30 40 50 600

0.5

1

1.5

2

2.5

3

3.5

4

Frequency

f

f(t)=cos(2π(7)t)+3cos(2π(13)t).

41A Music Signal Lasting 1 Second

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

Time

t

42

0 2000 4000 6000 8000 10000 12000 14000 160000

50

100

150

Frequency

f

A Discrete Fourier Transform Spectrum of the Music Signal in the Previous Slide.

43

Suppose that a bit is a rather wide one, asshown below:

Then its Fourier transform spectrum is as follows:

Not much frequenciesare contained.

44

Suppose the system is a high bit rate system,the bit length is therefore very very short:

Its Fourier transform is as follows:

A large numberof frequenciesare contained.

45

Conclusion: In a low bit rate system, the bitlength is very long and it actually contains anarrow band of frequencies.

This can be understood by imagining thebit length to be so long that the signalbecomes DC.

In this case, the only frequency it containsis .0f

46

On the contrary, in a high bit rate system, thebit length is very very short, it contains a widerange of frequencies.

The system is consequently called abroadband system because for a wide range of frequencies, it must respond equally well.

47

• By using Fourier transform, we can see that the frequency components in our human voice are roughly contained in 3k Hertz.

48

• For a signal with frequency f, its wavelength can be found as follows:

• where f is the velocity of light?

f

v

49

• If , .3103f km100m10103

103 53

8

50

• It can also be proved that the

length of an antenna is around .

• For human voice, this means that the wavelength is 50km.

• No antenna can be that long.

2

51

• What can we do?

• Answer: By amplitude modulation.

52

• Let be a signal.

The amplitude modulation is defined as follows:

• where fc is the carrier frequency?

)(tx

)2cos()( tftx c

53

• What is the Fourier transform of

? )2cos()( tftx c

54

Fourier transform tells us that every signal containsa bunch of cosine functions.

Let us consider .)2cos( ft

))(2cos())(2(cos(2

1

)2cos()2cos(

tfftff

tfft

cc

c

55

Thus every frequency f is lifted to

.ffandff cc

))(2cos())(2(cos(2

1

)2cos()2cos(

tfftff

tfft

cc

c

56

• The effect of amplitude modulation is to lift the baseband frequency to the carrier frequency level, a much higher one.

• Once the frequency becomes higher, its corresponding wavelength becomes smaller.

• An antenna is now possible.

57

• After we receive , how can we take out of it?

• Answer: Multiply by .

)2cos()()( tftxts c)(tx

)(ts )2cos( tfc

58

• Thus is recovered.

• We need a low-pass filter to get because is of low frequency.

)2(cos)()2cos()( 2 tftxtfts cc

)))2(2cos()()((2

1tftxtx c

)(tx

)(tx)(tx

59

• We should all remember that digital signals are all sent as analog signals. Conceptually, the following is a typical one what we call a truncated cosine signal.

60

The Voice Hiding ProblemThe Artificial Music Pitch Generation Problem

Analog modulation:

We shall show that the voice hiding problem can be solved by analog modulation.

61

I want to hide a voice message

into a music message , and the people who listen to the music can not detect . What can I do?

)(1

tm

)(2

tm

)(2

tm

)(1

tm

)(1

tm

62

The frequencies of and

are all low frequencies. If we make the frequencies of become high frequencies, people can not hear it.

How do we make the frequencies higher?

Approach: analog modulation:

)(2

tm)(1

tm

)2(cos)()( 11 tπftmtm c'

)(1

tm

63

)2(cos)()( 11 tπftmt'm c

cf cf

m1(t)

f

f

)2(cos)()( 11 tπftmtm c'

64

Mixer )2(cos)()( 11 tπftmtm c' )2(cos tπfc

)(1 tm'

)(1

tm

65

It is a signal of high frequency (We can not hear it.).

It is a signal of low frequency (We can hear it.).

High pass filter (We still can not hear

it.).

)()(

)()2(cos)()(

21

21

tmt m

tmtπftmts'

c

)(ts

)(ts )2(cos)()( 11 tπftmtm c'

)(1 tm'

66

If we want to extract the from

, we multiply

by .

)2(cos)()( 11 tπftmtm c'

)(1 tm' )2(cos tπfc

)(1

tm

67

The humans only can hear , because it is a low frequency signal.

)(ty

2

)(1 tm

)4(cos2

)(

2

)(

))4(cos1(2

1)(

)2(cos)(

)2(cos)()(

11

1

21

1

tπftmtm

tπft m

tπftm

tπftmty

c

c

c

c'

68

We now show that the Fourier transform can be used to produce artificial music sounds.

69

What is the meaning of Do?

• Each music note corresponds to the vibration of the air in sinusoidal form with a certain frequency. Therefore, suppose one uses a signal generator to produce a cosine function with frequency 262Hz and let it go through a speaker, we shall hear a Middle C(Do).

Cosine function of 262 Hz

70

Middle C of Piano

71

13f

For the middle C range, let the frequency of the first Do be denoted as and the frequency of the next Do be . We then have .

. We like to point out the following:

12

1

1

2

262

1

i

i ff

Hzf

131221 ,,, ffff

1f

72

Let denote the frequency of the ithkeyboard of a piano.

Then .

if

12

ij

ij ff

Hzf 44049

73

• For example, A4 (La) is the 49th key from the left end of a piano (tuned to 440 Hz), and C4 (Do) is the 40th key. These numbers can be used to find the frequency of C4:

• D4(Re) is the 42th key, and the frequency of D4 is:

HzHzf 2622440 12

4940

40

HzHzf 2942440 12

4942

42

C C# D D# E F F# G G# A A# B

262 277 294 311 330 349 370 392 415 440 466 494

All frequencies of music tones of the middle C range

74

We can use a simple cosine function torepresent a music tone.

75

Can we simulate the sound of a piano?

The time domain function of middle C of piano is as following:

76

• We transform the time domain function into the frequency domain function by using Discrete Fourier Transform(DFT).

77

Suppose we want to generate a simulatedmusic note of any music instrument. We proceed as follows:

1.Obtain the time domain function of this music of note of the music instrumentby asking someone to play it.2.Perform a discrete Fourier transform of this function to obtain its frequency spectrum.

78

• The Fourier transform will consist of roughly, say around 40,000 frequencies and their magnitudes. Among these frequencies, we pick frequencies with the largest magnitudes, and let us denote the frequencies as where and their magnitudes as , . We calculate

for , and denote the function frequency as .

kkfff ,,, 21

kfff 21

kaaa ,,, 21 10 ia

1/ ffb ii ki 1

cpf

79

• Example: For piano and middle C: we have the table as following:

10k Hzfcp 262

1 0.2635 1 262

2 0.7042 1.0038 263

3 0.505 1.0077 264

4 0.3326 2.0038 525

5 0.8 2.0077 526

6 0.2255 2.0115 527

7 0.3013 5.0345 1319

8 0.2823 7.0766 1854

9 0.2631 7.0805 1855

10 0.2402 7.0843 1856

i iaib api fb

Thus, we say that the music note Do for simulated piano has the frequency spectrum as described in the left table.

80

Similarly, we can generate frequency spectrum for other music notes for piano as well as for any other music instrument.

81

• Having obtained the frequency spectrum of a music note, we use the Discrete Inverse Fourier Transform (DIFT) to transform the frequency domain function into time domain function, and now we can play a song by using the simulated music instrument.

Amazing Grace played by simulated piano

82

• We also simulated like violin or organ.

Amazing Grace played by simulated violin

Amazing Grace played by simulated organ

83

• We can play other songs by the simulated instruments.

Dreaming of home and mother (simulated violin)

Auld lang syne (simulated organ and violin)

花非花 (simulated violin)

84

Conclusions

• You must have the analog feeling because digital signals are all analog signals.

• You should learn more about analog circuit design because this is where our country is exceedingly weak.

85

Thank you.