Encoding and Framing

Packet Switching

  • Last Class:
    • Layering structure of protocol stack
    • Performance metrics and calculation

This Class

  • Physical limit of PHY medium
  • Engineering implementation of transmission
    • At bit level
    • At frame level

Focusing on a Link (Point-to-Point Channel)

  • Simplest topology, consisting of two hosts and one link.
  • Functions at the link level are examined.

Problems Addressed

  • How fast can the data be transmitted? (scientific)
  • In what form can the data be transmitted? (engineering)
  • What if error happens? (very critical, both scientific and engineering)

Typical Communication System

  • Compresses a stream of bits: use as little number of bits as possible to represent events
  • Adds redundancy to detect/correct errors at the receiver (bits are mapped to codewords)
  • Scrambles the bits of consecutive codewords to spread burst errors
  • Converts a stream of bits to analog signals modulated for transmission over a medium

Generation of Data: Source Coding

  • Use binary bits (the code) to represent a physical phenomenon (outcomes).

  • Example: event x with 4 values: a (0.4), b (0.35), c (0.2), d (0.05)

  • The problem: coding efficiency!!!

    • Equal possibility case: fixed-length coding log2M\log_2M
    • Non-equal possibility case: variable-length coding e.g., Huffman coding (David Huffman, 1952 at MIT)
      • Average code length: 1.85 bits/symbol
      • The limit? (1.74 bits/symbol, the entropy of the symbol)
  • Entropy Formula: H(X)=<em>i=1np</em>ilog<em>2p</em>iH(X) = - \sum<em>{i=1}^{n} p</em>i \log<em>2 p</em>i

    • Where x is an arbitrary symbol from the source, and pip_i is the probability that x takes the value of i.
    • Physical meaning of the entropy: the amount of uncertainty carried by x before its realization is revealed!
    • Huffman code example:
      • a: 0
      • b: 10
      • c: 110
      • d: 111
  • All practical links rely on some sort of radiation of energy propagating through a medium or, in some cases, through free space.
  • Characterization of links by the medium they use:
    • Typically copper wire in some form (as in Digital Subscriber Line (DSL) and coaxial cable)
    • Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone)
    • Air/free space (for wireless links)

Important Radio Characteristics

  • Another important link characteristic is the frequency
    • Measured in hertz, with which the electromagnetic waves oscillate
  • Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength
    • Speed of light divided by frequency gives the wavelength.
    • Frequency on a copper cable range from 300Hz to 3300Hz; Wavelength for 300Hz wave through copper is speed of light on a copper / frequency
    • 2/3 x 3 x 10810^8 /300 = 667 x 10310^3 meters. wavelength

The EM Spectrum

  • Covers a wide range of frequencies from VLF (Very Low Frequency) at 10 Hz to Cosmic Rays at 102410^{24} Hz.
  • Includes:
    • Radio Spectrum (3 kHz - 300 GHz)
    • Optical Spectrum
      • Infrared
      • UV
    • X-ray
    • Gamma ray
    • Cosmic-ray
  • Different frequency bands are used for various applications like AM, FM, TV, Satellite communication, etc.

Frequency Allocation in U.S.

  • Radio spectrum allocation chart showing different frequency bands and their designated uses in the United States.
  • Various services are allocated different frequency ranges, including:
    • Fixed
    • Mobile
    • Radiolocation
    • Amateur
    • Space operation
    • Aeronautical

Bandwidth of a Channel

  • A signal consists of components at a range of different frequencies
  • Bandwidth of the channel (Hz): the range of frequencies that can pass the channel without being severely attenuated
  • B=f<em>2f</em>1B = f<em>2 - f</em>1

Link Capacity

  • Nyquist rate: Given an error-free medium of bandwidth B, the highest signal (symbol) rate (bauds) that can be carried is 2B.
  • Bauds to bit/s: 1 baud = 1 symbol/s= log2M bit/s, M: signal levels (# of different symbols)
  • Shannon’s Capacity Theorem C=Blog2(1+S/N)C = B \log_2(1+S/N)
    • C: capacity (maximum error-free bit transmission rate), unit in bit/s
    • B: bandwidth of the link, unit in Hz
    • S/N: received signal to noise ratio (ratio and db conversion)
    • Can be used to evaluate the “error-free” bandwidth of a line