Baseband Signaling and Modulation Part 1: Baseband Signaling Part 1 of a 2-part presentation Eric L. Michelsen Inductive Logic If You Could Tell Your Audience Only One Sentence... Transmitting data requires not only the signaling of bit values, but also bit timing. 1 or 0 time sample here & here & here ... If I could tell them a second sentence, it would be: DC is bad. 1/8/2003 Inductive Logic 2 Topics: Baseband Signaling (day 1) • • • • • • On-Off signaling Antipodal signaling Timing recovery NRZI Multilevel: 2B1Q DS1 & DS3 • • • • • Manchester encoding 4B/5B encoding 8B/10B encoding Multi-Level Transition A modern line code Topics: Modulation (day 2) • • • • • • • Cosine review Sums of cosines Spectra Fourier transforms Baseband signaling Why cosine waves? Transfer functions 1/8/2003 • • • • • Communication channels as filters Amplitude modulation Amplitude demodulation Quadrature multiplexing DMT ADSL Inductive Logic 3 Where in the Stack? • • • Signaling and modulation are ways of transmitting data They are the lowest sublayers in Layer 1 (physical layer) In this context, “signaling” means “transmitting data” (not call setup/teardown) 7. Application OSI stack 6. Presentation 5. Session 4. Transport bit serial (payload) 3. Network 2. Link 1. Physical V.35, framing framing framing framing framing HSSI, SDSL DS1 DS3 ADSL IDSL SONET electrical 1/8/2003 Inductive Logic optical bit serial (line) signaling & modulation 4 A Matter of Values • On-Off binary signaling amplitude simple indicates 1 (on) or 0 (off) by itself, does not explicitly convey timing works for electrical and optical signals Used by Ethernet 10Base5 and 10Base2 (w/ additional line coding) 1 1 0 1 1 0 0 time bit period 1/8/2003 0 Inductive Logic 5 Time Is of the Essence • • • • With separate clock and data, the transmitter gives the receiver timing on one signal, and data on another Requires two signals (clock and data): can be expensive Data values are arbitrary (no restrictions) Used by local interfaces: V.35, (synchronous) EIA-232, HSSI, etc. As distance and/or speed increase, clock/data skew destroys timing sample on rising edge of clock clock • data sample times centered in data bits 1/8/2003 time Inductive Logic 6 • • • • No Clock: Do You Know Where Your Data Is? Most long-distance or high speed signaling is self timed: it has no separate clock; the receiver recovers timing from the data itself Receiver knows the nominal data rate, but requires transitions in the signal to locate the bits, and interpolate the sample points Receiver tracks the timing continuously, to stay in synch Tracking requires sufficient transition density throughout the data stream Used in all DSLs, DS1, DS3, SONET, all Ethernets, etc. data transitions locate data interpolated sample times (bit centers) 1/8/2003 Inductive Logic time 7 Timing Recovery • All self-timed line codes provide sufficient signal transitions for timing recovery. Some methods used: 1/8/2003 Scrambling Return to zero (RTZ) Zero substitution Manchester encoding 4B/5B 8B/10B Multi-level transition Inductive Logic 8 All For One ... or Zero • amplitude • • • • • On-Off binary signaling: simple, but not energy efficient (SNR) At unit distance (A = 1), average energy = A2/2 = 0.5 For balanced data, DC (Direct Current) ~= 0.5 (bad) Also known as Non-Return to Zero (NRZ) Requires sufficient data transition density, or scrambling Works for electrical and optical signals 1 distance 1 0 1 1 0 0 time bit period 1/8/2003 0 Inductive Logic 9 Pluses and Minuses • • • • • Antipodal binary signaling: energy efficient (SNR) At unit distance (A = 0.5), average energy = A2 = 0.25 (3 dB better than on-off signaling) Requires sufficient data transition density, or scrambling For balanced (or scrambled) data, DC ~= 0 (good) For electrical signaling only (negative light?) Ethernet 10BaseT, EIA-232, V.35, V.36, HSSI amplitude +0.5 0 1 0 1 1 0 0 distance time -0.5 Can you say “tip-ring reversal?” 1/8/2003 Inductive Logic 10 NRZI (Non-Return to Zero Inverted) • • • • • Data value coded as transition = 1, no transition = 0 Used in combination with antipodal or on/off binary signaling With scrambling, DC ~= 0 Why NRZI? Can you say “tip-ring reversal?” Requires sufficient data 1s (signal transition) density, or scrambling + 0 ? 1 1 0 1 0 time Equivalent NRZI signals + 0 ? 1 1 0 0 time 1/8/2003 1 Inductive Logic 11 Multilevel Signaling: 2B1Q • A pair of bits in a single symbol is a dibit AKA 4-PAM (4-level Pulse Amplitude Modulation) Requires data transitions, or scrambling With scrambling, DC ~= 0 Used in SDSL, IDSL, ISDN BRI Other PAMs exist: 16-PAM (G.shdsl), 256-PAM, etc. +3 amplitude • • • • • 4 is better than 2: Encodes 2 Binary bits into 1 Quatenary (4-level) symbol +1 -1 -3 1/8/2003 11 10 01 00 time Usually described as “distance 2”: -3, -1, +1, +3 Inductive Logic 12 AMI: Alternate Mark Inversion • • • • mark = 1 Bipolar, tri-state (+, 0, and -) space = 0 50% duty cycle RTZ (Return To Zero) Pulses alternate polarity (DC = 0) Used by DS1 (Digital Service 1, ref. T1.107, T1.403): 2 pair (4 wire) - amplitude + 1/8/2003 Line rate = 1.544 Mbps, including 8 kbps framing/OAM Payload rate = 1.536 Mbps Generic digital service, can carry T1, PRI, GR-303, Frame Relay, etc. Timing recovery requires at least 2 pulses (ones) every 16 bits B8ZS (Binary 8-Zero Substitution) provides transparency 1 0 1 1 0 idealized pulse 0 25% 50% 25% time alternate polarity UI = Unit Interval (bit period) Inductive Logic 13 • • • • • • • AMI: DS3 Digital Service 3 (ref. T1.107, T1.404): 2 coax, 75 RTZ (Return To Zero) pulse, very similar to DS1 AMI (Alternate Mark Inversion), (DC = 0) Line rate = 44.736 Mbps, including ~530 kbps framing/OAM Payload rate = 44.736 x (84 / 85) 44.210 Mbps Generic digital service: can carry T3, Frame Relay, ATM, etc. Timing recovery requires at least one pulse every 3 bits - amplitude + 1/8/2003 B3ZS (Binary 3-Zero Substitution) provides transparency Deliberate bipolar violation, substitutes for 3 zeros 1 0 1 1 0 0 0 0 X alternate polarity 0 0 time X bits inserted as needed to make BPVs alternate polarity, to maintain DC = 0 Inductive Logic 14 Double Time: Manchester Encoding • • “Coding” in this sense is applicable to any binary (2-state) signal (on-off, antipodal, FSK, etc.) Provides a transition in the center of every bit DC = 0, exactly (with antipodal signaling) Data bit is value in last half of bit (or could be first half) Used in Ethernet 10Base5, 10Base2, 10BaseT Equivalent to 1B/2B encoding Not spectrally efficient: requires transmitting 2 signal events for each bit (100% bandwidth expansion) signal state B A • • • • • no density requirement High information content: allows rapid timing recovery 1/8/2003 1 0 1 1 0 0 time Inductive Logic 15 Enough is Enough: 4B/5B Encoding • • • • • • • Encodes 4 payload bits into 5 line bits Guarantees transitions; no user data restrictions or scrambling needed Extra codewords available for control (Idle, SSD, ESD, ...) More BW efficient than Manchester: 25% expansion Data DC >> 0 (bad), but used with NRZI or MLT, DC ~= 0 0 1 1 1 1 0 1 0 1 0 0 1 Checks line integrity by counting invalid codes 2 1 0 1 0 0 Used in Ethernet 100BaseTX, FDDI 3 1 0 1 0 1 Control 1/8/2003 1 1 1 1 1 IDLE used as inter-stream fill code 1 1 0 0 0 J 1 0 0 0 1 K 0 1 1 0 1 T 0 0 1 1 1 R Start-of-Stream Delimiter, Part 1 of 2; always used in pairs with K Start-of-Stream Delimiter, Part 2 of 2; always used in pairs with J End-of-Stream Delimiter, Part 1 of 2; always used in pairs with R End-of-Stream Delimiter, Part 2 of 2; always used in pairs with T Inductive Logic 4 5 6 7 8 9 A B C D E F 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 16 • • • • • • Twice as Good: 8B/10B Encoding Encodes 8 payload bits into 10 line bits Guarantees 3 to 8 transitions per 10-bit codeword Maximum run-length of 5 Code Group Octet Current RD – Current RD 25% BW expansion (same as Na me Value abcdei fghj abcdei fghj D0.0 00 100111 0100 011000 1011 4B/5B) D1.0 01 011101 0100 100010 1011 D2.0 02 101101 0100 010010 1011 12 control codes (start of packet, D3.0 03 110001 1011 110001 0100 D4.0 04 110101 0100 001010 1011 end of packet, error, etc.) D5.0 05 101001 1011 101001 0100 : : : : Alternately inverts non-zero-DC codewords to achieve zero DC Code Group Octet Current RD – Current RD Na me Value abcdei fghj abcdei fghj (similar to AMI) K28.0 1C 001111 0100 110000 1011 • • Worst case codeword imbalance is 6/4 Checks line integrity by counting invalid codes Used in Gigabit Ethernet, Fiber Channel (FC), some backplanes 1/8/2003 K28.1 K28.2 K28.3 K28.4 K28.5 K28.6 K28.7 : 3C 5C 7C 9C BC DC FC : 001111 1001 001111 0101 001111 0011 001111 0010 001111 1010 001111 0110 001111 1000 : 110000 0110 110000 1010 110000 1100 110000 1101 110000 0101 110000 1001 110000 0111 : Notes 1 1,2 1 1 1 2 1 1,2 NOTE 1 — Reserved . NOTE 2 — Conta ins a c omma . Inductive Logic 17 Saving Bandwidth: MLT-3 (Multi-Level Transition) Bipolar, tri-state signal (+, 0, and -) Like a combination of NRZI and AMI Transition = data 1, no transition = 0 Non-zero signals alternate polarity Cuts bandwidth in half (and SNR as well) Used by Ethernet 100BaseTX (with 4B/5B and scrambling) - amplitude + • • • • • • 1/8/2003 1 0 1 1 0 0 distance Inductive Logic 1 1 time 18 A Modern Line Code A B C D E F G H I J K L M 1/8/2003 N O P Q R S T U V W X Y Z • Binary signaling (on and off, not dits and dahs) • Pulse Width Modulated (PWM) • Return to zero coded (RTZ, vs. NRZ or NRZI) • Variable rate • Self timed • Asynchronous at word level • Variable length encoding • Data compressed • Forward error corrected (English) Interesting history of pen and paper Inductive Logic 19 Just Do It D 3 1 1 3 dah dit size size inter- intersymbol letter space space • O I T 7 minimum inter-word space Receiver recovers unit time interval from dits and intersymbol spaces; extrapolates other intervals 1/8/2003 Inductive Logic 20 Data Compression: English size A 8 B 12 C 14 D 10 E 4 F 12 G 12 H 10 I 6 J 16 K 12 L 12 M 10 frequency .082 .014 .028 .038 .131 .029 .020 .053 .063 .001 .004 .034 .025 avg. .65 .17 .39 .38 .52 .35 .24 .53 .38 .02 .05 .41 .25 size N 8 O 14 P 14 Q 16 R 10 S 8 T 6 U 10 V 12 W 12 X 14 Y 16 Z 14 frequency .071 .080 .020 .001 .068 .061 .105 .025 .009 .015 .002 .020 .001 avg. .57 1.12 .28 .02 .68 .49 .63 .25 .11 .18 .02 .32 .01 Avg letter size: 11.2 units English weighted avg letter size: 9.0 (~20% savings) Opt. Eng. weighted avg letter size: 8.6 (within 5%) 1/8/2003 Inductive Logic 21 Signaling States Transition Coding on-off Ethernet 10Base5, 10Base2 on-off + DC bias Manchester Morse Code on-off RTZ Ethernet 10BaseT antipodal EIA-232, V.35, HSSI antipodal Manchester none (NRZ, separate clock and data) optical multi-level Interface antipodal Baseband Summary 1/8/2003 Ethernet 100BaseTX, FDDI (electrical) SDSL, IDSL, ISDN BRI MLT (3-level) 4B/5B, scrambled 2B1Q (= 4-PAM) scrambled G.shdsl 16-PAM scrambled DS1, DS3 Gigabit Ethernet (optical), Fiber Channel SONET AMI (3-level) RTZ, BxZS on-off (optical) 8B/10B on-off (optical) scrambled FDDI (optical) on-off (optical) 4B/5B, NRZI Inductive Logic 22 Baseband Signaling and Modulation Part 2: Modulation Eric L. Michelsen 1/8/2003 Inductive Logic 23 Another Day, Another Sentence Modulation avoids baseband problems of signal overlap and DC error. If I could tell them a second sentence, it would be: Bandwidth is not capacity! If I could tell them a third sentence, it would be: Bandwidth is not capacity! But first, a review of Fourier analysis... 1/8/2003 Inductive Logic 24 Topics: Modulation • • • • • • • Cosine review Sums of cosines Spectra Fourier transforms Baseband signaling Why cosine waves? Transfer functions 1/8/2003 • • • • • Communication channels as filters Amplitude modulation Amplitude demodulation Quadrature multiplexing DMT ADSL Inductive Logic 25 Definitions • Baseband signaling • Communicating a signal in its original form for a given medium (e.g., audio) or Communicating a signal with components down to DC (or almost DC) Carrier modulation 1/8/2003 Communication based on modifying (modulating) a cosine wave signal Other forms of modulation exist (non-carrier modulation, e.g., PAM, PWM, PCM(?), but that’s another story) Inductive Logic 26 Cosine: A Function of Angle Basis function for frequency analysis and for modulation 0o - amplitude + • 30o o 70 90 450 540 270 360 120o 630 720 angle (degrees) one cycle y y 0o 1 unit 1/8/2003 180 x 30o x Inductive Logic y y 120o 70o x x 27 • Cosine Wave: A Function of Time Fully characterized by 3 parameters: A f Amplitude (e.g., 10 V) Frequency (e.g., 2 Hz) Phase (e.g., 60) cosine wave = A cos(f*360t + ) = A cos(360ft + ) A = 10 V 10cos(360(2)t + 60o) 60o 0.25 0.5 time (sec) 1 f = 2 Hz 60o t=0 1/8/2003 132o 204o t = 0.1 Inductive Logic 240o t = 0.2 t = 0.25 28 Sums of Cosines s(t) = A1cos(360f1t) + A2cos(360f2t) + A3cos(360f3t) + ... 1 0.8 0.6 0.4 0.2 0 -0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.5 0.6 0.7 0.8 0.9 0.8 0.9 1 -0.4 -0.6 -0.8 -1 1 0.8 0.6 0.4 0.2 0 0.0 0.1 0.2 0.3 0.4 1.0 -0.2 -0.4 -0.6 -0.8 -1 1/8/2003 Inductive Logic 29 Spectrum: A Bar Chart of Cosines A Progressively denser bar charts give way to a simple graph A • f A A f f 1/8/2003 f Inductive Logic 30 Why Cosine Waves? • Cosines are the only basis functions (aka eigenfunctions) of Time Invariant Linear Systems • • System: produces output from input Linear: if Ia Oa, then kIa kOa and if Ib Ob, then (Ia + Ib) Oa + Ob Time invariant: it does the same thing all the time If input is a cosine, then output is a cosine of same frequency, but different amplitude and phase Linear Cosine components of input don’t interact input is any cosine TILS output is cosine of exactly the same frequency... ...but different amplitude and phase time 1/8/2003 Inductive Logic time 31 Triangles Are Not Cosines • • • If input is not a cosine, output is not a multiple of the input Single triangle wave input produces complex output What a mess! input is a triangle wave TILS time 1/8/2003 Inductive Logic output is NOT a triangle wave time 32 Transfer Functions • • A TILS multiplies each input frequency amplitude (& shifts its phase) The multiplier (and phase-shift) are functions of frequency TILS Ain time H(f ) = Aout / Ain or Aout = H(f )Ain Aout at same frequency, f at frequency, f We can graph the amplitude multiplier as a function of frequency, the amplitude transfer function, H(f ): H(f ) • time f 1/8/2003 Inductive Logic We can graph the phaseshift as a function of frequency: the phase transfer function, (f ) (but we won’t) 33 Transfer Functions at Work • • • Since cosine components of the input signal do not interact, each cosine is multiplied by the transfer function at its frequency Thus, the output spectrum is the input spectrum multiplied by the transfer function, at each frequency Every TILS has a transfer function, and a transfer function defines a TILS. TILS Input signal spectrum 1/8/2003 Transfer function of linear system Inductive Logic Output signal spectrum 34 Any communication channel is imperfect A time invariant linear channel is described by its transfer function A filter is a TILS that passes some frequencies, and blocks others Transfer function for a copper loop H(f ) • • • The Communication Channel as Filter Transfer function for a copper loop with a splitter H(f ) Transfer function for a transistor amplifier H(f ) f 1/8/2003 f This is why DC is bad. Inductive Logic f 35 • • 90+% of energy is in the first lobe Part of the first, and all of the other lobes can be discarded without much degradation This is also the spectrum of 2B1Q, and all PAMs A • The Spectrum of Square Wave Antipodal Signaling time fsym 2fsym 3fsym fsym 2fsym 3fsym A square wave time filtered square wave 1/8/2003 Inductive Logic 36 Amplitude Modulation • • • Given a signal, i(t) And a carrier, cos(360ct) We modulate the signal onto the carrier by multiplying the two at each instant in time: i(t)cos(360ct) cos(360ct) i(t) x modulator i(t) cos(360ct) = i(t)cos(360ct) 1/8/2003 Inductive Logic 37 Know Your Identity 1. cos(-a) = cos(a) 2. cos(90-a) = -cos(90+a) 3. cos(a+b) = cos(a)cos(b) - cos(90-a)cos(90-b) cos(a - b) + cos(a + b) 4. cos(a)cos(b) = cos(90-a)cos(90-b) 2 Demonstration of identity #3 90-b 90-a cos(90-a) b Recall that for any right triangle: a a H•cos(a) 1/8/2003 b cos(a+b) cos(a)cos(b) Inductive Logic cos(90-a)cos(90-b) 38 Spectral View of Amplitude Modulation Modulating a baseband cosine onto a carrier i(t) = cos(360wt) A • (simple) baseband spectrum: a cosine of frequency ‘w’ f w cos(360ct) A carrier spectrum: a cosine of frequency ‘c’ f c A Modulated signal spectrum: Using identity #4: cos(360wt)cos(360ct) = cos[360(c-w)t] + cos[360(c+w)t] c-w c c+w 1/8/2003 f Pop Quiz: Is a modulator a TILS? Inductive Logic 39 Deja View of Amplitude Modulation Modulating a complicated baseband signal onto a carrier complicated baseband spectrum i(t) A • (AM radio BW = 5 kHz) f bandwidth cos(360ct) A carrier spectrum (AM radio carrier = 540 - 1600 kHz) c f A Modulated signal spectrum; using identity #4 for each frequency component c bandwidth 1/8/2003 f Notice that the modulated bandwidth is twice the baseband signal bandwidth (AM radio BW = 10 kHz) Inductive Logic 40 Demodulation: Getting It Back A • • Given a modulated signal: Multiply by the carrier again: modulated spectrum i(t)cos(360ct) i(t)cos(360ct)cos(360ct) = i(t)[cos(0) + cos(360(2ct))] = i(t) + i(t)cos[360(2ct)] f c A i(t)cos[360(2ct)] i(t) A c f filtered and fully demodulated spectrum filter transfer function c 1/8/2003 2c almost demodulated spectrum 2c Inductive Logic f 41 A All Together Now time 2fsym 3fsym 2fsym 3fsym A Energy Efficient Signaling fsym time A Filtered Baseband Signal fsym Modulated Carrier 1/8/2003 Inductive Logic c 42 - + Comparison of Modulated and Unmodulated Carrier unmodulated carrier modulated carrier 1/8/2003 Inductive Logic 43 A • Quadrature Multiplexing: Two for the Bandwidth of One Consider a signal modulated with the wrong carrier phase, off by 90. We attempt to demodulate (recall identity #4): i(t)cos(360ct + 90)cos(360ct) modulated = i(t)[cos(90) + cos(360(2ct) + 90)] spectrum = i(t)cos[360(2ct) + 90] f c A i(t)cos[360(2ct) + 90] A c 2c filter transfer function attempted demodulated spectrum f filtered signal spectrum f 1/8/2003 Inductive Logic 44 Quadrature Multiplexing: Part Deux Consider two signals, i(t) and q(t), modulated with two carriers of the same frequency, but different by 90: i(t)cos(360ct) + q(t)cos(360ct + 90) q(t) A i(t) A • baseband spectra f f A modulated signal spectrum: generally not symmetric c 1/8/2003 Inductive Logic f 45 Quadrature Demodulation • • Given a quadrature multiplexed modulated signal: i(t)cos(360ct) + q(t)cos(360ct + 90) Demodulate each channel separately, each with its own carrier: carrier for i(t) [ i(t)cos(360ct) + q(t)cos(360ct + 90) ]cos(360ct) = i(t)cos(360ct)cos(360ct) + q(t)cos(360ct+90)cos(360ct) A i(t) demodulated spectrum c 2c f carrier for q(t) A [ i(t)cos(360ct) + q(t)cos(360ct + 90) ]cos(360ct + 90) = i(t)cos(360ct)cos(360ct+90) + q(t)cos(360ct+90)cos(360ct+90) c 1/8/2003 Inductive Logic 2c q(t) demodulated spectrum f 46 • • DMT ADSL Discrete Multi-Tone Up to 255 “separate” carriers, • Each carrier is quadrature multiplexed multi-level PAM Two to 15 bits per symbol per carrier (2 - 256 PAM per I/Q axis) Optimum filling of data into the carriers for maximum total SNR All share the same time, frequency, and phase references Lower carriers omitted for baseband voice Carrier spacing is 4312.5 Hz A upstream downstream baseband voice 300 Hz 1/8/2003 3600 Hz N x 4312.5 Hz Inductive Logic f 47 DMT ADSL • Two kinds of FEC: • • • “Fast” path (low latency): Trellis Coded Modulation (TCM) “Interleaved” path (higher latency): Reed-Solomon block interleaved Framing structure built into the modulation Integral number of bytes per frame, 4000 user data frames per second = N x 32 kbps data rates G992.1 defines two services: STM and ATM The industry standard is ATM over STM (HEC delineation) No one uses G992.1’s ATM mode Superframe: 17 ms frame frame frame frame frame frame synch ... 0 1 2 3 66 67 symbol over head 1/8/2003 Fast bytes over head FEC over head Interleaved bytes Inductive Logic over head 48