Lecture #2 EE 471C / EE 381K-17 Wireless Communication Lab Professor Robert W. Heath Jr.
Preview of today s lecture u Introduction to digital communication u Components of a digital communication system ª Source coding ª Encryption ª Channel coding ª Modulation/demodulation ª Channel impairments ª Practical transmitters and receivers u NOTE: USRP overview will be your lab assignment this week Lecture 2 EE 471C / EE 381K-17 2
Introduction to Digital Communication Learning objective: o Explain why digital communication is relevant
The fundamental problem of communication is that of reproducing at one point, either exactly or approximately, a message selected at another point. Claude Shannon A Mathematical Theory of Communication, The Bell System Technical Journal, 1948 Taken from http://owpdb.mfo.de/
Principles of communication Transmitter (Source) Receiver (Sink) Channel Transmitted signal Received signal Communication system u Transmitter: transmits information signal derived from source u Channel: transfers signal from transmitter to receiver ª Includes analog circuitry ª Includes propagation medium ª Includes noise and distortions * u Receiver: processes received signal to extract the information that was sent * For the most part in this class, we use the term channel to Lecture 2 EE 471C / EE 381K-17 refer to the distortions due to filtering and multi-path 5
Analog vs. digital communication (1) 0 1 0 1 1 0 0 0 1 n u Analog: source is a continuous-time waveform u Digital: source is a digital (binary) sequence u Both systems actually send a continuous-time wave Lecture 2 EE 471C / EE 381K-17 6
Analog vs. digital communication (2) m(t) Analog The difference is the source b[n] 01011 0 0 0 1 Digital n Lecture 2 EE 471C / EE 381K-17 7
Analog vs. digital communication (3) s(t) BPSK 0 1 +1 0 0 1 1 t t 1 t -1-1 u Digital communication uses a finite number of possible waveforms u Example: BPSK modulation with a rectangular pulse shape Lecture 2 EE 471C / EE 381K-17 8
Why digital communications (1)? u Analog communication is effectively dead ª No new innovations, jobs, etc u Suitable for digital data ª Use high-quality reproducible digital components ª Analog components have variable specs, effects continuous outputs while digital components are more robust due to discrete levels u Easier to implement security u More robust to noise u Easier to support multiple rates Lecture 2 EE 471C / EE 381K-17 9
Why digital communications (2)? u Easy to share the system with multiple users u Easy to change + reconfigure (e.g., SDR : software defined radio) u Compression of the source data is simpler ª Makes the system more efficient u Uses DSP to take advantage of Moore s law ª The number of transistors per unit area doubles every 18 months ª Reduces power consumption and cost ª Analog components are not advancing as quickly as digital Lecture 2 EE 471C / EE 381K-17 10
Components of a Digital Communication System Learning objective: o o Explain the components of a digital communication system Define relevant terminology
Components of a digital communication system Source Source coding Encryption Channel coding Modulation Analog Processing Transmitter Channel Propagation Medium Receiver Sink Source decoding Decryption Channel decoding Demodulation Analog Processing u More details will be added throughout the course u Just a reference design, some blocks may be merged or swapped EE471C Lecture 2 EE 471C / EE 381K-17 12
Source encoder and decoder (1) u Source: origin of information u Source encoder: purpose is to perform compression ª Lossless(e.g. zip encoding) ª Lossy (e.g. jpeg) u Source decoder: uncompress/reconstruct the original source ª Perfect reconstruction for lossless codes ª Perfect reconstruction for lossy codes Lecture 2 EE 471C / EE 381K-17 13
Source encoder and decoder (2) Source Image Data 8x8 Blocks DCT Quantizer Entropy Encoder Compressed Image Data Encoder Table Specifications Table Specifications Compressed Image Data Entropy Decoder Source decoding Channel decoding Demodulation Reconstructed Image Data Table Specifications Table Specifications Decoder u Example: JPEG encoding and decoding processes Lecture 2 EE 471C / EE 381K-17 14
Source encoder and decoder (3) Entropy for a binary source Probability for symbol 1 Probability for symbol 2 H=-p 1 log 2 (p 1 )-p 2 log 2 (p 2 ) u Entropy for a discrete source ª Measures the amount of information contained in a given message ª Average length of the codewords in the best possible lossless data compression algorithm ª Shannon entropy (not Clausius entropy used in thermodynamics) u Measures the efficiency of a source coding algorithm Lecture 2 EE 471C / EE 381K-17 15
Encryption/decryption (1) The important thing is to never stop questioning Encryption Kv5zlg8/aGb9?8jT l&ma3o fbxirynm tbzl7jdzav3 u Encryption: convert information into something that is hard to understand by an unintended recipient ª Component of a security protocol ª Typical requires exchange of a key u Decryption: remove encryption, make the decoded signal readable Lecture 2 EE 471C / EE 381K-17 16
Encryption/decryption (2) u Secret Key Encryption ª A single secret key is used by encryption and decryption ª Block ciphers use the key to encrypt data block by block Used in 3G and 4G ª Stream ciphers generate a stream of pseudorandom keys which are bitwise XORed with the data Used in IEEE 802.11 and Bluetooth Lecture 2 EE 471C / EE 381K-17 17
Encryption/decryption (3) Original Data Public Key Scrambled Data Secret Key Original Data u Public Key encryption ª Involves a pair of keys: public key and private key ª Public keys are freely distributed while private keys are secret ª Data encrypted with a public key can be decrypted only with the corresponding private key ª Data encrypted with a private key can be only be decrypted with a public key (called signing, ensure sender is who they claim to be) Lecture 2 EE 471C / EE 381K-17 18
Channel code u Basic idea: add known redundancy to correct channel errors u Error correction: repair received signal Example: Repetition code Rate 1/3 0110 000 111 111 000 u Error detection: determine if there was an error Example: CRC (Cyclic Redundacy Check) u Code rate = # "# $%&"'(' )*+, # "# &"'(' )*+, Lecture 2 EE 471C / EE 381K-17 19
Forward Error Correction (FEC) codes (I) u Also known as Error Controls Codes (ECCs) u Block Codes: developed in 50 s 1 2 k bits Block Code 1 2 k k+1 n bits ª Example: Rate ½ Block Code, Length 5 Block code takes 5 bits in and produces 10 bits out ª Some block codes: CRC code, used in nearly every digital communication protocol Reed-Solomon code, used in xdsl, DVB-S & DVB-S2, IEEE 802.11ad Lecture 2 EE 471C / EE 381K-17 20
Forward Error Correction (FEC) codes (2) u Convolutional Codes: developed in 60 s-70 s ª Convolve data with multiple impulse responses in binary field bits b[n] g 1 [k] g 2 [k] c[n] Interleave g 1 [k] and g 2 [k] FIR filters, length v+1; v: constraint length ª Used in GSM, WCDMA, IEEE 802.11a/b/g/n/ac/ad Lecture 2 EE 471C / EE 381K-17 21
Forward Error Correction (FEC) codes (3) u Example: (5,7) rate 1/2 convolutional code c[2n] = i[n] Å i[n-1] c[2n+1] = i[n] Å i[n-2] ª Constraint length of 2 (memory 2 bits) ª More than 2 bits errors is a problem u Decoding is important and complex ª Viterbi decoder: finds the data sequence which is closet to the observation according to some distance metric Lecture 2 EE 471C / EE 381K-17 22
Forward Error Correction (FEC) codes (4) u Trellis Codes: developed in 80 s ª Generalization of convolutional codes w/ explicit symbol mapping ª Combine modulation and coding ª Used in ATSC HDTV ª Viterbi decoder b[2n] b[2n+1] b[2n] b[2n+1] b[2n] b[2n+1] 2 bits 3 bits 1 symbol G 1 [k] G 2 [k] G 2 [k] Symbol mapping s[n] Lecture 2 EE 471C / EE 381K-17 23
Forward Error Correction (FEC) codes (5) u Turbo Code: invented in 93, developed in the 90 s - 00 s ª Tricky extension of convolution coding ª Uses convolutional code with specially designed IIR filters ª Uses a deep random interleaver between inputs b[k] g 1 [k] Interleave Interleaving g 2 [k] ª Use special iterative maximum a posteriori decoder ª Very good error protection, but need large block length (e.g., 10,000) ª Used in the 3G WCDMA and 4G LTE systems
Forward Error Correction (FEC) codes (6) u LDPC (low density parity check) code: developed in the 60 s, rediscovered in 00s ª Block code with large block length and smart decoder ª Carefully designed combined with special iterative MAP decoder ª Works with smaller block lengths (e.g., ~ 1,000 bits) ª Decoding is complicated, needs soft inputs and several iterations ª Used in IEEE 802.11ad, for data channels in 5G, optional in some standards Lecture 2 EE 471C / EE 381K-17 25
Forward Error Correction (FEC) codes (7) u Polar codes developed in 2010 s (starting in 2009) ª Linear block error correcting code ª Modest decoding complexity ª Has certain information theoretic optimality ª Good for small block lengths ª Used in 5G for certain control channels Lecture 2 EE 471C / EE 381K-17 26
Modulation 3A c[n] Modulator x(t) Output of channel code 0 1 0 1 1 0 0 0 1 Voltage or current A n 0 T t -A u Maps bits to analog waveforms ª Linear or not linear ª Memoryless or with memory Note that the square wave for illustration but are not common in wireless systems Lecture 2 EE 471C / EE 381K-17 27
Baseband modulation bits Symbol mapping Constellation mapping Create pulse train Pulse shaping filter x(t) Bits Symbol 00 c 1 10 4-QAM 00 1 t 01 c 2 1 10 c 3 11 01 11 c 4 u Symbols are mapped to points in constellation ª Cardinality: # of bits/symbol Lecture 2 EE 471C / EE 381K-17 28
Passband modulation Time varying amplitude Carrier frequency Time varying phase u Amplitude, phase or frequency of RF carrier varies w/ information u Most common digital passband modulation types: ASK, PSK, FSK M-QAM Example: ASK modulator: Lecture 2 EE 471C / EE 381K-17 29
Demodulation u Use received samples to detect transmitted sequence 0 1 0 1 1 0 0 0 1 Demodulator t n ª May use an estimate of the channel ª May include equalization ª May include detection ª May operate with memory Note that demodulation has many different meanings in the context of communications
Basic demodulation y(t) Matched filter t=kt Detector ^ s[n] Detected symbols can then be mapped back to bits collects energy of entire symbol in a way that minimizes noise makes an educated guess about what was sent Lecture 2 EE 471C / EE 381K-17 31
Detection methods (1) u Hard decision: each coded bit is demodulated as 0 or 1 ª Only received symbol is used to decide ª Example: Bits Symbol Received samples Slicer output (in bits) 0 1-0.2 1 1-1 0.2 0 0 1 0.5 0 Lecture 2 EE 471C / EE 381K-17 32
Detection methods (2) u Soft decision: made corresponding to distance between received sequence and sequence corresponding to 0 or 1 bit transmission ª Example: Bits Symbol Received samples (RX) d(rx,(1,1,1)) d(rx,(-1,-1,-1)) Decision 0 (1,1,1) (1,0.5,-0.5) 0 2 +(1/2) 2 +(3/2) 2 =2.5 2 2 +(3/2) 2 +(1/2) 2 =6.5 0 ª Soft decision is used for sequence detection, combined with FEC Lecture 2 EE 471C / EE 381K-17 33
Analog front end Superheterodyne receiver cos(2pf LO t) X LPF I Band selection Desired channel (f c ) LNA X Channel selection cos(2pf IF t) sin(2pf IF t) 0 f f IF f f X LPF Q Band of interest f 0 f u Includes all processing done in the analog and mixed signal
Propagation effects ACCESS POINT Reflection Scattering Diffraction LoS CLIENT 2 CLIENT 1 Lecture 2 EE 471C / EE 381K-17 35
Modeling channel impairments Analog Processing Combined channel Analog Processing Propagation Medium u Combined channel is a model for the combined effects of all the distortions ª Often called the channel u The term channel may also refer to a model for just part of the combined channel
Channel impairments (1) u Additive noise, normally due to thermal motion of electrons SNR is signal power/noise power High SNR Low SNR Lecture 2 EE 471C / EE 381K-17 37
Channel impairments (2) u Path loss models the degredation of the received signal w/ distance creates an attenuation of the desired signal noise is added in the AFE, is quite small but not relative to the attenuated signal f= 2.4 GHz f= 5 GHz Lecture 2 EE 471C / EE 381K-17 38
Channel impaiments (3) u Multiple propagation paths between the transmitter and receiver y(t) = h 0 x(t d 0 /c)+h 1 x(t d 1 /c)+h 2 x(t d 2 /c)+v(t) d 0, h 0 d 2, h 2 d 1, h 1 h0, h1, h2: gains for the existing paths d0, d1, d2: distances travelled by the wave from Tx to Rx c: speed of light v(t): noise modeled in general as an LTI system Lecture 2 EE 471C / EE 381K-17 39
Channel impairments (4) u Cochannel interference, due to frequency reuse Spectrum signal A (desired) Spectrum signal B (undesired) f ª Adjacent channel interference from spectral leakage Spectrum signal A (desired) Filter High level of adjacent channel interference Lower level of adjacent channel interference Lecture 2 EE 471C / EE 381K-17 40
Practical transmitter and receiver block diagram Digital modulation Analog processing Channel Digital demodulation Analog processing u Image of the OFDM PHY, taken from the IEEE 802.11a standard Lecture 2 EE 471C / EE 381K-17 41
Conclusions
Conclusions u Digital communication is widely used in wireless systems ª It has many features that make it more attractive than analog ª Still involves analog processing u There are many critical components in digital communication ª Source encoding / decoding ª Encryption / decryption ª Channel encoding / decoding ª Modulation / demodulation ª Analog-front-end and the propagation channel Lecture 2 EE 471C / EE 381K-17 43