Download as pdf or txt
Download as pdf or txt
You are on page 1of 83

EHB

 415E    
DATA  COMMUNICATIONS  

İstanbul  Teknik  Üniversitesi  


Elektrik  Elektronik  Fakültesi  
Elektronik  Haberleşme  Mühendisliği  
Fall  2014  
WEEK   Course  Outline   DATE  
1   IntroducKon     08/09  
Protocol  Architecture,  TCP/IP,  and  Internet-­‐Based  ApplicaKons  
2   NO  LECTURE  (VTC  Fall  2014)   15/09  
3   Data  Transmission   22/09  
Transmission  Media    
4   Signal  Encoding  Techniques  (+  Project  Proposals)   29/09  
5   NO  LECTURE  (Kurban  Bayramı)   06/10  
6   Digital  Data  CommunicaKons  Techniques     13/10  
7   Midterm  Exam   20/10  
8   Data  Link  Control  Protocols   27/10  
9   MulKplexing  (+  Project  Progress  Reports)   03/11  
10   Circuit  Switching  and  Packet  Switching   10/11  
11   Midterm  Exam   17/11  
12   RouKng  in  Switched  Data  Networks     24/11  
13   Ethernet   01/12  
14   Project  Workshop    (+  Project  Final  Reports)   08/12  
2  
Project  Proposals  
• Proposals  will  be  evaluated:  
– Accept/Reject  
• You  will  receive  an  email  if  your  proposal  is  
NOT  ACCEPTED  
– Come  &  talk  to  me  
– Update  your  proposal:  
• Hand-­‐in  print  out  of  the  NEW  proposal    
• Send  an  e-­‐mail  of  pdf  copy  

3  
Data  and  Computer  
CommunicaKons  

Chapter 5 – Signal Encoding


Techniques

Ninth  EdiKon  
by  William  Stallings  
 

Data  and  Computer  CommunicaKons,  Ninth  


EdiKon  by  William  Stallings,  (c)  Pearson  
EducaKon  -­‐  PrenKce  Hall,  2011  
Signal  Encoding  Techniques  

Even the natives have difficulty mastering this


peculiar vocabulary.



—The Golden Bough,

Sir James George Frazer

Signal  Encoding  Techniques  

•Amplitude  
•Phase  
•Frequency  
Signal  Encoding  Techniques  
Data   Encoder  or   Signal   Decoder   EsKmated    
Modulator   Demodulator   Data  
Digital  or   Digital  or   Digital  or  
Analog   Analog   Analog  

Digital  Data   Digital  Data  


Digital  Signal   Analog  Signal  

Analog  Data   Analog  Data  


Digital  Signal   Analog  Signal  
7  
Signal  Encoding  Techniques  

Digital  Data   Digital  Data  


Digital  Signal   Analog  Signal  

Analog  Data   Analog  Data  


Digital  Signal   Analog  Signal  
8  
Digital  Data,  Digital  Signal  
Ø digital  signal  
l discrete,  disconKnuous  voltage  pulses  
l each  pulse  is  a  signal  element  
l binary  data  encoded  into  signal  elements  
Terminology  
Ø unipolar  –  all  signal  elements  have  the  same  sign  
Ø polar  –  one  logic  state  represented  by  posiKve  voltage  
and  the  other  by  negaKve  voltage  
Ø data  rate  –  rate  of  data  (  R  )  transmission  in  bits  per  
second  
Ø dura6on  or  length  of  a  bit  –  Kme  taken  for  transmijer  
to  emit  the  bit  (1/R)  
Ø modula6on  rate  –  rate  at  which  the  signal  level  
changes,  measured  in  baud  =  signal  elements  per  
second.  (symbol/second)  
Ø mark  and  space  –  binary  1  and  binary  0  
Key  Data  Transmission  Terms  
InterpreKng  Signals  

need  to  know:  


• Kming  of  bits  -­‐  when  they  start  and  end  
• signal  levels  

factors  affecKng  signal  interpretaKon:  


• signal  to  noise  raKo  
• data  rate  
• bandwidth  
• encoding  scheme  
An increase in data rate increases bit error rate (BER).
An increase in SNR decreases bit error rate.
An increase in bandwidth allows an increase in data rate.
 
 
 
 
 
Digital  Signal  
Encoding  
Formats  
Encoding  Schemes  
clocking  
signal  spectrum  
• need  to  synchronize  
• good  signal  design  should   transmi>er  and  
concentrate  the  transmi>ed   receiver  either  with  an  
power  in  the  middle  of  the   external  clock  or  sync  
transmission  bandwidth   mechanism  
• DC  is  undesired  

error  detec6on   signal  interference  and  noise  


immunity  
• responsibility  of  a  layer  
of  logic  above  the   • certain  codes  perform  be>er  in  
signaling  level  that  is   the  presence  of  noise  
known  as  data  link   • cost  and  complexity  
control   • the  higher  the  signaling  rate  the  
greater  the  cost  
Nonreturn  to  Zero-­‐Level  
(NRZ-­‐L)  

Ø easiest  way  to  transmit  digital  signals  is  to  use  


two  different  voltages  for  0  and  1  bits  
Ø voltage  constant  during  bit  interval  
l no  transiKon  (no  return  to  zero  voltage)  
l absence  of  voltage  for  0,  constant  posiKve  voltage  
for  1  
l more  oqen,  a  negaKve  voltage  represents  one  
value  and  a  posiKve  voltage  represents  the  
other(NRZ-­‐L)  
Encoding  Schemes  
Non-­‐return  to  Zero  Inverted  (NRZI)  
Ø Non-­‐return  to  zero,  invert  on  ones  
Ø constant  voltage  pulse  for  duraKon  of  bit  
Ø data  encoded  as  presence  or  absence  of  signal  
transiKon  at  beginning  of  bit  Kme  
l transiKon  (low  to  high  or  high  to  low)  denotes  binary  1  
l no  transiKon  denotes  binary  0  
Ø example  of  differenKal  encoding  
l data  represented  by  changes  rather  than  levels  
l more  reliable  to  detect  a  transiKon  in  the  presence  of  
noise  than  to  compare  a  value  to  a  threshold  
l easy  to  lose  sense  of  polarity  
NRZ  Pros  &  Cons  
Pros   Ø used  for  magneKc  
• easy  to  
recording  
engineer  
• make  efficient  
use  of  
bandwidth  
Ø not  oqen  used  for  
signal  transmission  
Cons  
• presence  of  a  
dc  component  
• lack  of  
synchronizaKon  
capability  
MulKlevel  Binary  
Bipolar-­‐AMI  
Ø use  more  than  two  signal  levels  
Ø Bipolar-­‐AMI  
l binary  0  represented  by  no  line  signal  
l binary  1  represented  by  posiKve  or  negaKve  pulse  
l binary  1  pulses  alternate  in  polarity  
l no  loss  of  sync  if  a  long  string  of  1s  occurs  
l no  net  dc  component  
l lower  bandwidth  
l easy  error  detecKon  
MulKlevel  Binary  
Pseudoternary  

Ø binary  1  represented  by  absence  of  line  signal  


Ø binary  0  represented  by  alternaKng  posiKve  
and  negaKve  pulses  
Ø no  advantage  or  disadvantage  over  bipolar-­‐
AMI  and  each  is  the  basis  of  some  applicaKons  
MulKlevel  Binary  Issues  
Ø synchronizaKon  with  long  runs  of  0’s  or  1’s  
l can  insert  addiKonal  bits  that  force  transiKons  
l scramble  data  
Ø not  as  efficient  as  NRZ  
l each  signal  element  only  represents  one  bit  
• receiver  disKnguishes  between  three  levels:  +A,  -­‐A,  0  
l a  3  level  system  could  represent  log23  =  1.58  bits  
l D=R/log2M  (D:  modulaKon  rate,  R:  data  rate,  M:#  of  signal  elements)  
l requires  approximately  3dB  more  signal  power  for  same  
probability  of  bit  error  
TheoreKcal  Bit  Error  Rate  
Manchester  Encoding  
Ø transiKon  in  middle  of  each  bit  period  
Ø midbit  transiKon  serves  as  clock  and  data  
Ø low  to  high  transiKon  represents  a  1  
Ø high  to  low  transiKon  represents  a  0  
Ø used  by  IEEE  802.3  (Twisted  pair  LAN)  
DifferenKal  Manchester  Encoding  
Ø midbit  transiKon  is  only  used  for  clocking  
Ø transiKon  at  start  of  bit  period  represenKng  0  
Ø no  transiKon  at  start  of  bit  period  represenKng  1  
l this  is  a  differenKal  encoding  scheme  
Ø used  by  IEEE  802.5    (token  ring  LAN)  
Biphase  Pros  and  Cons  

Pros  
• synchronizaKon  on  midbit  transiKon  (self  
clocking)  
• has  no  dc  component  
• has  error  detecKon  

Cons  
• at  least  one  transiKon  per  bit  Kme  and  
may  have  two  
• maximum  modulaKon  rate  is  twice  NRZ  
• requires  more  bandwidth  
Spectral  Density  of  Various  Signal  Encoding  
Schemes  
R=9600  bps  
Most  energy  is  located  betwen  0-­‐4800  Hz  
Stream  of  Binary  Ones  
at  1Mbps  

Bit  rate  =  1/Tb  


Signal  transmission  rate  =1/Tb  

Bit  rate  =  1/Tb  


Signal  transmission  rate  =2/Tb  
Normalized  Signal  TransiKon  Rate  of  
Various  Digital  Signal  Encoding  Schemes  
 
 
 
 
 
 
 
 
Table  5.3      
 
Scrambling  
Ø use  scrambling  to  replace  sequences  that  would  
produce  constant  voltage  
Ø these  filling  sequences  must:  
l produce  enough  transiKons  to  sync  
l be  recognized  by  receiver  &  replaced  with  original  
l be  same  length  as  original  
Ø design  goals  
l have  no  dc  component  
l have  no  long  sequences  of  zero  level  line  signal  
l have  no  reducKon  in  data  rate  
l give  error  detecKon  capability  
HDB3  SubsKtuKon  Rules  
 
 
 
 
 
 
 
Table  5.4  
 
B8ZS  and  HDB3  
Signal  Encoding  Techniques  

Digital  Data   Digital  Data  


Digital  Signal   Analog  Signal  

Analog  Data   Analog  Data  


Digital  Signal   Analog  Signal  
32  
Digital  Data,  Analog  Signal  
Ø Digital  CommunicaKons  
Ø Used  in  public  telephone  system  (PSTN  –  
Public  Switched  Telephone  Network)  
l has  frequency  range  of  300Hz  to  3400Hz  
l uses  modem  (modulator-­‐demodulator)  
Encoding  Techniques  
Amplitude  shiI   Frequency  shiI  keying   Phase  shiI  keying  (PSK)  
keying  (ASK)   (FSK)   • phase  of  carrier  signal  
• used  to  transmit   • most  common  form  is   is  shiqed  to  represent  
digital  data  over   binary  FSK  (BFSK)   data  
opKcal  fiber  

34  
ModulaKon  Techniques  
Digital  CommunicaKon  Problem  
• Elements  of  digital  communicaKon  system  
transmijer  
(phase  shiq  keying  modulaKon)  
message   transmijed   +   ∑   channel  output  
signal  m(t) ×   (received  signal)  x(t)
signal  s(t)
0→−1 +  
1 → +  1 channel  
for duration T carrier  wave   noise  w(t)
Accos(2πfc t),
where fc=1/T

received   T yT decision   say  1  if  yT > 0


signal  x(t) ×   ∫ dt making  
0
device   say  0,  otherwise  
correlator  

local  carrier   receiver   threshold=0   36  


cos(2πfc t)
M-­‐ary  Signalling  
A  symbol  is  a  waveform,  a  state  or  significant  condiKon  of  the  
communicaKon  channel  that  persists  for  a  fixed  period  of  Kme.    

Binary   MulKlevel  

• Two  different  signals  for  «0»   • M  different  levels  to  


bit  and  «1»  bit   represent  M  symbols  
• 1  symbol  represents  1  bit   • Usually  
• M=2L  ,  where  L  is  an  integer  

D  =  R/L   D  =  ModulaKon  rate  (baud)  


R  =  Data  rate  (bps)  
L  =  Number  of  signal  elements  (M  =  2L,  L  =  log2(M))  

Example:  For  M=16,  find  the  data  rate  when  the  signaling  speed  is  2400?   37  
M-­‐ary  Signals  
• Symbol  (with  duraKon  T)  mi      ∈    alphabet  {m1,m2,…,  
mM}      T=LTb,  L=log2(M)  
• (ex)  Quaternary  :  alphabet  {  00,  01,  10,  11}  
• -­‐  Prior  probability    values  {  P(m1),  P(m2),  …,  P(mM)  }  
1
• Equally  likely     p =
i P ( m )i=
M
for all i

• Output  of  signal  TX  encoder  


Vector si with N real elements ( N ≤ M )

• Modulator  :     Vector si → distinct signal si (t)


• Energy  of    s (t) E = ∫ s (t)dt i =1, 2,3,, M
T 2
i i 0 i

• Average  Energy:      E = M P(m )E


s ∑ i i
i=1
38  
Symbol  Errors  
• Average  probability  of  symbol  error  

M
Pe = ∑ P(mˆ ≠ mi )P(mi )
i =1

• Receiver  Types  
– Phase locked, coherent detection, coherent RX

– Phase unlocked, non-coherent detection, non-coherent


RX

39  
Binary  Phase  Shiq  Keying  
Ø phase  of  carrier  signal  is  
shiqed  to  represent  data  
Ø binary  PSK  
#% Acos(2πf t ) 0
l two  phases  represent  two   s(t) = $ c
binary  digits   %& Acos(2πf c t + π ) 1
Ø differenKal  PSK  
l phase  shiqed  relaKve  to  
previous  transmission  rather  
than  some  reference  
€ signal  
41  
Power  Spectra  

42  
DifferenKal  -­‐  PSK  

0   0   1   0   0   1   1   1   1   0   0  

 
DPSK  

DifferenKal   Transmission DifferenKal  


Encoder   Channel   Decoder  
ak   bk=bk-­‐1  XOR  ak   ak=bk-­‐1  XOR  bk  

Q1.  If  a  bit  sequence  of    0  0  0  0  0  1  1  1  0  0  0  is  received,  what  are  the  bit  esKmates?    
Q2.  What  is  the  bit  error  rate?  

44  
DPSK   NO  ERROR  
Diff.  Decoder  Input  =Diff.  Encoder  Output    

InformaKon:     0   0   1   1   0   1   0   0   0   1   0  

Diff.  Encoder  Output:     0   0   0   1   0   0   1   1   1   1   0   0  


bk=bk-­‐1  XOR  ak  

Diff.  Decoder  Output:     0   0   1   1   0   1   0   0   0   1   0  


ak=bk-­‐1  XOR  bk  

Diff.  Decoder  Input:     0   0   0   0   0   1   1   1   0   0   0  

Diff.  Decoder  Output:     0   0   0   0   0   1   0   0   1   0   0  

2  errors  @  decoder  input  -­‐-­‐>  4  errors  decoder  output    


45  
Quadrature  PSK  
Ø more  efficient  use  if  each  
signal  element  represents  
!
more  than  one  bit   #
A cos ( 2π fc t + π / 4) 00
l uses  phase  shiqs  separated   ## A cos ( 2π fc t + 3π / 4) 01
by  mulKples  of      π/2  (90 )  
o
s(t) = "
l each  element  represents  two   # A cos ( 2π fc t + 5π / 4) 11
bits   #
A cos ( 2π fc t + 7π / 4) 10
#$
l split  input  data  stream  in  two  
and  modulate  onto  carrier  
and  phase  shiqed  carrier  
Ø can  use  8  phase  angles  and  
more  than  one  amplitude  
l 9600bps  modem  uses  12  
angles,  four  of  which  have  
two  amplitudes  
QPSK  and  OQPSK  Modulators  
QPSK  
Passband  Example  

49  
Coherent  QPSK  Receiver  

50  
Decision  Boundaries  

51  
Amplitude  Shiq  Keying  
• Two  binary  values  are  represented  by  two  
different  amplitudes  of  the  carrier  frequency.  
– Commonly  one  of  the  amplitudes  is  zero.    
– The  resulKng  signal  is:  

!# A cos 2π f t 1
s(t) = "
( c)
#$ 0 0

52  
Amplitude  Shiq  Keying  
Ø suscepKble  to  sudden  gain  changes  –  WHY?  
Ø inefficient  
Ø used  for:  
l up  to  1200bps  on  voice  grade  lines  
l very  high  speeds  over  opKcal  fiber  
Binary  Frequency  Shiq  Keying  
! A cos 2π f t 1
# ( 1)
s(t) = "
#$ A cos ( 2π f2t ) 0
 
Ø less  suscepKble  to  gain  changes  than  ASK  –  WHY?  
Ø used  for:  
l up  to  1200bps  on  voice  grade  lines  
l high  frequency  radio  
l even  higher  frequency  on  LANs  using  coaxial  cable  
FSK  Transmission  
Bandwidth  Efficiency  for  Digital-­‐to-­‐
Analog  Encoding  Schemes  
⇒ R / BT
Bandwidth  efficiency  
(unit:  b/s/Hz)  

ASK ⇒ BT = (1+ r)R

1+ r
M − PSK ⇒ BT = R
log 2 M

M − FSK ⇒ BT =
(1+ r ) M
R
log 2 M
RelaKon  between  Eb/N0  and  SNR  

Noise  Power  N   N  =  N0  BT  


Signal  Power  S  
SNR  =  S/N  
Bit  Rate  R  
Total  Bandwidth  BT  

57  
EXAMPLE  

58  
Performance  of  Digital  to  Analog  
ModulaKon  Schemes  

in  
bandwidth   presence  
bit  error  rate  of  
ASK/PSK   of  noise:   PSK  and  QPSK  are  
bandwidth  directly   about  3dB  
relates  to  bit  rate   superior  to  ASK  
and  FSK  

MPSK  has  tradeoff  


mul6level  PSK   between  
gives  significant   bandwidth  
improvements   efficiency  and  
error  performance    
Quadrature  Amplitude  ModulaKon  
Ø QAM  used  on  asymmetric  digital  subscriber  line  
(ADSL)  and  some  wireless  
Ø combinaKon  of  ASK  and  PSK  
Ø logical  extension  of  QPSK  
Ø send  two  different  signals  simultaneously  on  same  
carrier  frequency  
l use  two  copies  of  carrier,  one  shiqed  90°  
l each  carrier  is  ASK  modulated  
l two  independent  signals  over  same  medium  
l demodulate  and  combine  for  original  binary  output  
QAM  Modulator  
QAM  Variants  
s(t ) = d1 (t )cos(2π fct ) + d2 (t )sin(2π fct )
Ø 2  x  two  level  ASK  
l each  of  two  streams  in  one  of  two  states  
l four  state  system  
l essenKally  QPSK  
Ø 2  x  four  level  ASK  
l combined  stream  in  one  of  16  states  
Ø have  64  and  256  state  systems    
Ø improved  data  rate  for  given  bandwidth  
l increased  potenKal  error  rate  
Signal  Encoding  Techniques  

Digital  Data   Digital  Data  


Digital  Signal   Analog  Signal  

Analog  Data   Analog  Data  


Digital  Signal   Analog  Signal  
63  
Analog  Data,  Digital  Signal  
Ø digiKzaKon  is  conversion  of  analog  data  into  
digital  data  which  can  then:  
l be  transmijed  using  NRZ-­‐L  
l be  transmijed  using  code  other  than  NRZ-­‐L  
l be  converted  to  analog  signal  
Ø analog  to  digital  conversion  done  using  a  
codec  
l pulse  code  modulaKon  
l delta  modulaKon  
DigiKzing  Analog  Data  
Sampling  Theorem  &  PCM  
• Sampling  Theorem:  If  a  funcKon  f(t)  contains  
no  frequencies  higher  than  B  Hz,  it  is  
completely  determined  by  samples  spaced  1/
(2B)  seconds  apart.  The  funcKon  f(t)  can  be  
reconstructed  from  these  samples  by  the  use  
of  a  low-­‐pass  filter  
• Example:  voice  data  ~4000  Hz,    
– Minimum  sampling  rate?  

66  
Pulse  Code  ModulaKon  (PCM)  
Ø strictly  have  analog  samples    
l Pulse  Amplitude  ModulaKon  (PAM)  
Ø assign  each  a  digital  value  
PCM  Example  

4  bits:  16  Code  Levels  


8  bits:256  Code  Levels  

For  B  Hz  signal,  Ts=1/2B  


PCM  Block  Diagram  

QuanKzaKon  error:    
SNR  (dB)  =  20log10((2n)+1.76  dB  =  6.02n+1.76  dB    
Non-­‐Linear  Coding  
Typical  Companding  FuncKons  
Efficiency  of  PCM  
• Good  voice  reproducKon  via  PCM  can  be  
achieved  with  128  quanKzaKon  levels.  
– Each  amplitude  level  is  represented  by  how  many  
bits?  
– What  is  the  minimum  sampling  rate?  
– What  is  the  data  rate?  
– What  is  the  bandwith  required  to  transmit  this  
data  rate?  
– Is  PCM  efficient?  
72  
Delta  ModulaKon  (DM)  
Ø analog  input  is  approximated  by  a  staircase  
funcKon  
l can  move  up  or  down  one  level  (δ)  at  each  sample  
interval  
Ø has  binary  behavior  
l funcKon  only  moves  up  or  down  at  each  sample  
interval  
l hence  can  encode  each  sample  as  single  bit  
l 1  for  up  or  0  for  down  
Delta  ModulaKon  Example  
Delta  ModulaKon  OperaKon  
PCM  verses  Delta  ModulaKon  
Ø DM  has  simplicity  compared  to  PCM  but  has  
worse  SNR  
Ø issue  of  bandwidth  used  
l for  good  voice  reproducKon  with  PCM:  
• want  128  levels  (7  bit)  &  voice  bandwidth  4khz  
• need  8000  x  7  =  56kbps  (Required  Bw?  Efficiency  ???)  
Ø data  compression  can  improve  on  this  
Ø sKll  growing  demand  for  digital  signals  
l use  of  repeaters,  TDM,  efficient  switching  
Ø PCM  preferred  to  DM  for  analog  signals  
Signal  Encoding  Techniques  

Digital  Data   Digital  Data  


Digital  Signal   Analog  Signal  

Analog  Data   Analog  Data  


Digital  Signal   Analog  Signal  
77  
Analog  Data,  Analog  Signals  
Ø modulate  carrier  frequency  with  analog  data  
Ø why  modulate  analog  signals?  
l higher  frequency  can  give  more  efficient  transmission  
l permits  frequency  division  mulKplexing  
Ø types  of  modulaKon:  
l Amplitude  
l Frequency  
l Phase  
Analog    
ModulaKon  
Techniques  
Ø Amplitude  ModulaKon  
Ø Phase  ModulaKon  
Ø Frequency  ModulaKon  
Amplitude  ModulaKon  
ModulaKon  index  <  1  (WHY?)  

s(t ) = [1 + na x(t )]cos(2π f c t )


Carrier  
BT = 2B
Transmijed    
power  in  carrier  

⎛ na2 ⎞
Pt = Pc ⎜1 + ⎟
⎝ 2 ⎠
Total  transmijed  power   80  
Angle  ModulaKon  Types  

  s(t ) = Ac cos(2π fc t + φ (t ))

Ø Frequency  ModulaKon   φ (t ) = n p m(t ) φ (t ) = n p m(t )

Ø Phase  ModulaKon   φ '(t ) = n f m(t )

BT = 2(β + 1) B Total  Bandwidth  

⎧ n p Am for Phase Modulation


⎪
β = ⎨ n f Am
⎪ for Frequency Modulation
⎩ 2π B 81  
Summary  
Ø Signal  encoding  techniques  
l digital  data,  digital  signal  
• NRZ,  mulKlevel  binary,  biphase,  modulaKon  rate,  
scrambling  techniques  
l analog  data,  digital  signal  
• PCM,  DM  
l digital  data,  analog  signal  
• ASK,  FSK,  BFSK,  PSK  
l analog  data,  analog  signal  
• AM,  FM,  PM  
QUESTIONS  ?  

83  

You might also like