pri rinciples nciples of of com ommunications munications
play

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


  1. Example: sin(100  t) (4/4)     Signal of the form have frequency Hz. sin 2 f t f f 0 0    So, the frequency of is 50 Hz. sin 100 t 1 We need to sample at least 0.8 100 times per time unit. 0.6 0.4 Here, the number of 0.2 sample per time unit is 49, 0 which is too small to avoid -0.2 aliasing. -0.4 -0.6 -0.8 -1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 11 t

  2. Ex: Aliasing  If you've ever watched a film and seen the wheel of a rolling wagon appear to be going backwards, you've witnessed aliasing . 12

  3. plotspec.m  f s : Sampling frequency = 200 samples/sec 1 0.5 cos 2𝜌 5 𝑢 0 -0.5 -1 0 1 2 3 4 5 6 7 8 9 10 Seconds 6 Magnitude 4 2 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency [Hz] − 𝑔 𝑔 𝑡 𝑡 2 2 13

  4. plotspec.m  f s : Sampling frequency = 200 samples/sec 1 0.5 cos 2𝜌 10 𝑢 0 -0.5 -1 0 1 2 3 4 5 6 7 8 9 10 Seconds 6 Magnitude 4 2 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency [Hz] − 𝑔 𝑔 𝑡 𝑡 2 2 14

  5. plotspec.m  f s : Sampling frequency = 200 samples/sec 6 Magnitude 4 cos 2𝜌 50 𝑢 2 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 6 Frequency [Hz] Magnitude 4 cos 2𝜌 70 𝑢 2 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 8 Frequency [Hz] 6 Magnitude cos 2𝜌 100 𝑢 4 2 0 15 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency [Hz]

  6. plotspec.m  f s : Sampling frequency = 200 samples/sec 4 3 Magnitude cos 2𝜌 110 𝑢 2 1 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 6 Frequency [Hz] Magnitude 4 cos 2𝜌 130 𝑢 2 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency [Hz] 6 Magnitude 4 cos 2𝜌 190 𝑢 2 16 0 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency [Hz]

  7. Pac Man 17

  8. Another Example  When sampled at 10 Samples per sec, there is no way to tell the difference between 3Hz, 7Hz, or the 13Hz waves below. 18

  9. Aliasing: One complex exponential Let’s increase f 0 𝑓 𝑘2𝜌𝑔 0 𝑢 f -f S -2f S f 0 f S 2f S 19

  10. Aliasing: One complex exponential 𝑓 𝑘2𝜌𝑔 0 𝑢 f -f S -2f S f 0 f S 2f S 20

  11. Aliasing: Two complex exponentials 𝑓 𝑘2𝜌𝑔 0 𝑢 𝑓 𝑘2𝜌𝑔 1 𝑢 f -f S -2f S f 1 f 0 f S 2f S 21

  12. Aliasing: Two complex exponentials Let’s change f 0 and f 1 . For sine wave, f 1 = - f 0 . 𝑓 𝑘2𝜌𝑔 0 𝑢 f 1 f -f S -2f S f 0 f S 2f S 1 𝑢 𝑓 𝑘2𝜌𝑔 22

  13. Reconstruction m[k] m(t) 9 8 7 8 6 7 5 6 4 5 3 4 2 3 1 2 0 1 -1 0 -2 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 23

  14. Practical Reconstruction 16 16 14 14 12 12 10 10 8 8 6 6 4 4 2 2 0 0 -4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4 24

  15. 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 1

  16. Naturally digital information  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 2

  17. Illustration of PAM, PWM, and PPM 3

  18. 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 4

  19. PAM: Pulse Amplitude Modulation   Pulse p t 1 Transmitted signal t -.5T .5T Received signal      y t x t t -3T -2T -T 4T -4T T 2T 3T         ˆ        m 1 m 1        x t m n p t nT m n m n      ˆ 0  m m 0 n       No ISI   ˆ     m n y t x t  ˆ 1 m m 1   t nT t nT 5

  20. PAM: Pulse Amplitude Modulation   Pulse p t 1 Transmitted signal t − 𝑈 𝑈 Received signal 4 4      y t x t t -3T -2T -T 4T -4T T 2T 3T         ˆ        m 1 m 1        x t m n p t nT ˆ m n m n      ˆ 0  m m 0 n       No ISI   ˆ     m n y t x t  ˆ 1 m m 1   t nT t nT 6

  21. ISI Inter-Symbol Interference   p t 1 t -1.5T 1.5T -T T      y t x t t -3T -2T -T 4T -4T T 2T 3T                ˆ        1 2 1 0 m m m m        ˆ x t m n p t nT m n m n             ˆ 0  m m 1 m 0 m 1 n       Suffer ISI   ˆ         m n y t x t    ˆ 1 m m 0 m 1 m 2   t nT t nT 7

  22. ISI Inter-Symbol Interference   Pulse p t 1 Transmitted signal t − 3𝑈 3𝑈 Received signal 4 4      y t x t t -3T -2T -T 4T -4T T 2T 3T         ˆ        m 1 m 1        x t m n p t nT ˆ m n m n      ˆ 0  m m 0 n       No ISI   ˆ     m n y t x t  ˆ 1 m m 1   t nT t nT 8

  23. ISI Inter-Symbol Interference 1   p t t -T T      y t x t t -3T -2T -T 4T -4T T 2T 3T                ˆ m n m n x t m n p t nT  n No ISI         ˆ m n y t x t   t nT t nT 9

  24. ISI Inter-Symbol Interference 1   p t -2T t 2T -T T      y t x t t -3T -2T -T 4T -4T T 2T 3T                ˆ m n m n x t m n p t nT  n No ISI         ˆ m n y t x t   t nT t nT 10

  25. ISI  Some pulses displaying intersymbol interference. t [Blahut, 2008, Fig 2.8] 11

  26. Spectra of Raised Cosine Pulses    1   T , 0 f  2 T                T T 1 1 1                P f ; 1 cos f , f  RC     2  2  2 2  T T T    1   0, f  2 T f 12 [Blahut, 2008, Fig 2.10]

  27. Ny quist criterion [Blahut, 2008, Fig 2.9] 13

  28. Raised Cosine Pulses For fixed nonzero  , the tails 1 Roll-off = 0 Roll-off = 0.5 decay as 1/t 3 for large |t|. 0.8 Roll-off = 1 0.6 0.4 Although the pulse tails persist 0.2 for an infinite time, they are 0 eventually small enough so they -0.2 can be truncated with only -0.4 -3 -2 -1 0 1 2 3 Time [T] negligible perturbations of the zero crossings. Roll-off = 0 1.2 Roll-off = 0.5 Roll-off = 1 1  t 0.8 cos  magnitude t 0.6   T   p t ; sinc  0.4 RC 2 2 4 t T  1 0.2 2 T 0   t t -0.2 cos sin -1 -0.5 0 0.5 1  T T Frequency [1/T]   2 2 t 4 t  1 14 2 T T

  29. 15

  30.           Ex. x t m n p t nT  n 2 1.5 1     0.5  p t p t ;0 0 RC -0.5 -1 -1.5 -2 0 0.5 1 1.5 2 2.5 3 3.5 t 1.5     1  p t p t ;0.5 0.5 RC 0 -0.5 -1 -1.5 0 0.5 1 1.5 2 2.5 3 3.5 t 1.5     1  p t p t ;1 0.5 RC 0 -0.5 -1 -1.5 0 0.5 1 1.5 2 2.5 3 3.5 t 16

  31. 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 1

  32. Digitization (analog to digital) Vertical lines are used for sampling 111 111 111 110 101 101 100 100 100 100 011 011 010 010 001 001 001 000 000 Time Horizontal lines are used for quantization 100111111100001000010100011001 2

  33. Quantizer rounds off the sample values to the nearest Quantization 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. 3

  34. Aliasing in 2D 4

  35. Quantization in 2D 5

  36. 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 6

  37. Digital Message  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) 7

  38. Ex. ASCII  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 8

  39. Line Codes: PAM Format 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) 9

  40. 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 10

  41.     m n    Noise: Ex 1 2, 1,0,1,2          x t m n p t nT m[0] = 2 n 2 m[1] = 2 0 m[2] = -2 -2 0 50 100 150 200 250 300 350 400 450 500 10 0 -10 0 50 100 150 200 250 300 350 400 450 500         200 y t x t N t 11

  42.     m n   Noise: Ex 2 (1/5) 1,1          x t m n p t nT m[0] = 1 n 1 0.5 0 -0.5 m[1] = -1 -1 m[2] = -2 0 50 100 150 200 250 300 350 400 450 500       10   y t x t N t 5 0 -5 -10 0 50 100 150 200 250 300 350 400 450 500     To decode, consider    ˆ r n 0 decode as m n 1   T       r n y nT         ˆ 12   r n 0 decode as m n 1 2

  43. Noise: Ex 2 (2/5)          x t m n p t nT m[0] = 1 n 1 0.5 0 -0.5 m[1] = -1 m[2] = -1 -1 0 50 100 150 200 250 300 350 400 450 500       10   y t x t N t 5 0 -5 -10 0 50 100 150 200 250 300 350 400 450 500 n 0 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1 -1 -1 1 -1 1 1 1 1 -1 13 𝒐 𝒏 1 1 1 1 -1 -1 1 -1 1 -1

  44. Noise: Ex 2 (3/5) 1   0.5 x t 0 -0.5 -1 0 50 100 150 200 250 300 350 400 450 500 10   5 y t 0 -5 -10 0 50 100 150 200 250 300 350 400 450 500 100 50   r t 0 -50 -100 0 50 100 150 200 250 300 350 400 450 500 t Q: Where should we sample?              r t y d y t * h t r     14    * t T Matched filter h t p T t r

  45. Noise: Ex 2 (4/5) 1   0.5 x t 0 -0.5 -1 0 50 100 150 200 250 300 350 400 450 500 50   r t 0 when there is no noise -50 0 50 100 150 200 250 300 350 400 450 500 t                    * r t x d x t * h t h t p T t r r  t T     To decode, consider    ˆ r n 0 decode as m n 1       r n y nT T         ˆ r n 0 decode as m n 1 15

  46. Noise: Ex 2 (5/5) 1   0.5 x t 0 -0.5 -1 0 50 100 150 200 250 300 350 400 450 500 10   5 y t 0 -5 -10 0 50 100 150 200 250 300 350 400 450 500 100 50   r t 0 -50 -100 0 50 100 150 200 250 300 350 400 450 500 n 0 1 2 3 4 5 6 7 8 9 𝒏 𝒐 1 -1 -1 1 -1 1 1 1 1 -1 16 𝒐 𝒏 1 -1 -1 1 -1 1 1 1 1 -1

  47. 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 17

  48. Digital Modulation  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. Amplitude-shift keying (ASK) Frequency-shift keying (FSK) Phase-shift keying (PSK)      A cos 2 f t c 18

  49. Digital Modulation: Binary Signaling Binary OOK(on-off keying) ASK FSK Binary PRK (phase-reversal keying) PSK (BPSK) DSB mod. w/ Nyquist pulse shaping at baseband 19 [Carlson and Crilly, 2009, Fig 14.1-1]

  50. FSK cos 2𝜌𝑔 1 𝑢 cos 2𝜌𝑔 4 𝑢 cos 2𝜌𝑔 3 𝑢 cos 2𝜌𝑔 2 𝑢 cos 2𝜌𝑔 5 𝑢 1 0.5 0 -0.5 -1 0 0.05 0.1 0.15 0.2 0.25 Seconds 0.03 Each tone lasts 1/R sec. Rate = R frequency-change per second 20

  51. Pri rinciples nciples of of Com ommunications 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 1

  52. Morse code (wired and wireless)  Telegraph network  Samuel Morse , 1838  A sequence of on-off tones (or , lights, or clicks) A U B V C W D X E Y F Z G H I J 1 K L 2 M 3 N 4 O 5 P 6 7 Q 8 R S 9 T 0 2

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

  54. Morse code: Key Idea A U Frequently-used characters (e,t) B V C W are mapped to short codewords. D X E Y F Z G H I J 1 K L 2 M 3 N 4 O 5 P 6 7 Q R 8 S 9 T 0 Basic form of compression. 4

  55. Morse code: Key Idea A U Frequently-used characters are B V C W mapped to short codewords. D X E Y F Z G H I J 1 K L 2 M 3 N 4 O 5 P 6 7 Q R 8 S 9 T 0 Relative frequencies of letters in the English language 5

  56. Morse code: Key Idea A U Frequently-used characters are B V C W 0.14 mapped to short codewords. D X E Y F Z G 0.12 H I J 0.1 1 K L 2 M 3 N 4 0.08 O 5 P 6 7 Q 0.06 R 8 S 9 T 0 0.04 0.02 Relative frequencies of letters in the 0 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 English language 6

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

  58. Ex. DMS (1)     1 ,  x a b c d e , , , ,       5  p x a b c d e , , , , X X   0, otherwise Information a c a c e c d b c e Source 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 Approximately 20% are letter ‘a’s 8

  59.   1 , Ex. DMS (2) x 1,  2   1 ,  x 2,       4 X  p x 1,2,3,4 X     1 , x 3,4 8    0, otherwise Information 2 1 1 2 1 4 1 1 1 1 Source 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 Approximately 50% are number ‘ 1 ’s 9

  60. Shannon – Fano coding  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. 10

  61. Huffman Code  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. or  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. 11

  62. Huffman Coding in MATLAB (1) 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] 12

  63. Huffman Coding in MATLAB (2) 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 13

  64. Huffman Coding: Source Extension 1.8 1.6 1.4 1.2 1   1  H X n 0.8 1 E     X   n 0.6   H X 0.4 1 2 3 4 5 6 7 8 Order of source extension n 14

  65. Huffman Coding: Uniform pmf (no source extension) 5.5 5    1 log M 2 4.5 4   log M     2 3.5 X   3 2.5 2 1.5 1 2 4 6 8 10 12 14 16 18 20 𝑁 = |𝑇 𝑌 | 15

  66. 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 1

  67. Morse code (wired and wireless)  Telegraph network  Samuel Morse , 1838  A sequence of on-off tones (or , lights, or clicks) A U B V C W D X E Y F Z G H I J 1 K L 2 M 3 N 4 O 5 P 6 7 Q 8 R S 9 T 0 2

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

Recommend


More recommend