Wireless Communications Lecture 5: Coding / Decoding and Modulation / Demodulation Module Representive: Prof. Dr.-Ing. Hans D. Schotten schotten@eit.uni-kl.de Lecturer: Dr.-Ing. Bin Han binhan@eit.uni-kl.de Institute of Wireless Communication (WiCon) Department of Electrical and Computer Engineering TU Kaiserslautern SS 2018
Outline 1 Overview of Coding and Modulation 2 Speech Coding 3 Channel Coding 4 Modulation Schemes H. D. Schotten & B. Han Wireless Communications 2/ 33
Overview of Coding and Modulation Why Coding / Decoding Speech coding : lower bit rate, better speech quality (compression) Channel coding: error control Why Modulation / Demodulation Analog to digital Spectral efficiency Robustness to noise & interference H. D. Schotten & B. Han Wireless Communications 3/ 33
Speech Coding Methods & Attributes Methods Vocoders Waveform coding Hybrid coding Attributes Trans. bit rate Delay Complexity Quality QoS vs. bit rate Source: V. K. Garg, Wireless Communications and Networking H. D. Schotten & B. Han Wireless Communications 4/ 33
Speech Coding Vocoders: Parametric Digitizers Specified for Human Speech Using certain properties of the human speech production Excitation signals as source: vocal cord vibrates for voice sounds (quasi-periodic harmonics) no participation of vocal cord in unvoiced sound production (noise) Spectral shaping filter as vocal apparatus system: vocal tract, lip radian characteristics, etc. Parametric representation of speech signals 1 Partitioning the speech signal into segments of 5 to 20 ms. 2 Spectral analysis on speech segments to produce filter coefficients that minimize the prediction error, specifying the excitation parameters. 3 Quantizing and transmitting parameters for the decoder s synthesis. H. D. Schotten & B. Han Wireless Communications 5/ 33
Speech Coding Waveform Coding: General (Non-Parametric) Coding Independent of Signals Concept Consider the speech signal as a general waveform Map the input signal to a facsimile-like replica at the decoder s output Pros and Cons No understanding about the speech characteristic necessary Fine quality Poor coding efficiency Classification Time domain waveform coding Frequency domain waveform coding H. D. Schotten & B. Han Wireless Communications 6/ 33
Speech Coding Time Domain Waveform Codecs Nonlinear PCM Europe : A-law North America : µ-law Some ITU Codecs G.721: 32 kbps adaptive differential PCM (ADPCM) G.726: Variable-rate between 16 and 40 kbps G.727: Core bits and droppable enhancement bits Source: Wikipedia H. D. Schotten & B. Han Wireless Communications 7/ 33
Speech Coding Frequency Domain Waveform Codecs Concept Short-term spectral analysis on input signal Each time frame into several frequency-domain subbands Each subband encoded with some bits to fulfill quality requirements Scheme Specification Spectral analysis accuracy Bit allocation principle (fixed / adaptive / semi-adaptive) Well-Known Examples Sub-band coding (SBC) Adaptive transform coding (ATC) H. D. Schotten & B. Han Wireless Communications 8/ 33
Speech Coding Hybrid Coding: Combining Vocoder and Waveform Coding Pros and Cons Good speech quality Satisfying bit rate Higher complexity Linear-Prediction-Based Analysis-by-Synthesis (LPAS) codecs Most recent standardized speech codecs are LPAS codecs, including: ITU G723.1, G728 and G.729 GSM full-rate, half-rate, enhanced full-rate (EFR) and adaptive multiple rate (AMR) codec North America full-rate, half-rate and EFR for TDMA IS-136 and CDMA IS-95 systems Japanese PDC full-rate and half-rate H. D. Schotten & B. Han Wireless Communications 9/ 33
Speech Coding Linear-Prediction-Based Analysis-by-Sythesis (LPAS) Specifications Both analog and time domain waveform coded speech inputs An efficient vocoder for speech coding at rates between 4 and 16 kbps About 20 ms frame length Synthesize each frame with linear predictor (LP) A short-term (ST) filter for spectral envelope (vocal apparatus) and a long-term (LT) filter for fine spectral structure (excitation signal) Code-Excited Linear Predictive (CELP) Codecs A codebook instead of LT filter Pitch-based filter period contour matching as a challenge Relaxed CELP (RCELP): time wrapping to match pitch-period contours Algebraic CELP (ACELP): efficient codebook design to boost the search H. D. Schotten & B. Han Wireless Communications 10/ 33
Channel Coding Error Control Coding: ARQ vs. FEC Automatic repeat request (ARQ) Detection-only Retransmit if any error detected Typical detection codes: parity bits, CRCs, cryptographic hash functions Three types of ARQ protocols: stop-and-wait, go-back-n, selective repeat Forward Error Correction Detection and correction Automatically repairing the corrupted bits Convolutional codes (bit-by-bit): Viterbi codes Block codes (block-by-block): Reed-Solomon (RS) codes, Turbo codes H. D. Schotten & B. Han Wireless Communications 11/ 33
Channel Coding Reed-Solomon (RS) Codes: Construction Overview Speech Coding Channel Coding Modulation n: symbol length of a codeword k: symbol length of a message Message as polynomial coefficients: m(x) = n 1 Design a generator polynomial: g(x) = n k i=0 i=n k g i x i m i x i Compute the remainder: r(x) = mod(m(x), g(x)) = n k 1 r i x i Codeword: c(x) = m(x) + r(x) Can detect up to n k symbol errors correct up to n k 2 i=0 H. D. Schotten & B. Han Wireless Communications 12/ 33
Channel Coding Reed-Solomon (RS) Codes: Codec Overview Speech Coding Channel Coding Modulation Systematic Encoder Decoder: Block Diagram H. D. Schotten & B. Han Wireless Communications 13/ 33
Channel Coding Convolutional Codes: Encoder Message shifts through a L-bit FIFO (shift register) bit-by-bit K=L+1 is called the constraint length Convolving the FIFO with different coefficients to generate parity bits Every message bit generates n parity bits, code rate r = 1 n Convolutional Encoder H. D. Schotten & B. Han Wireless Communications 14/ 33
Channel Coding Convolutional Codes: Decoder Task: to select the codeword from codebook with minimal distance to the received code Fast solution: Viterbi algorithm Advantage: soft decoding with low complexity (to be discussed later) Drawback: decoder complexity increases exponentially w.r.t. K H. D. Schotten & B. Han Wireless Communications 15/ 33
Channel Coding Turbo Codes: Encoder Consists of two parallel constituent encoders Encoder 1 encodes original message bits Encoder 2 encodes interleaved message bits Message bits and both parity bits transmitted together H. D. Schotten & B. Han Wireless Communications 16/ 33
Channel Coding Turbo Codes: Decoder Consists of two concatenated constituent decoders Makes use of the soft-information Feed-back architecture to iteratively improve both decoders H. D. Schotten & B. Han Wireless Communications 17/ 33
Channel Coding Turbo Codes: Performance Performance increases with the number of iterations Performance increases with the frame length Approaches the Shannon limit H. D. Schotten & B. Han Wireless Communications 18/ 33
Channel Coding Soft and Hard Decision Decoding Concept Hard Decision : binary ( 1 or 0 ) Soft Decision : confidence value for likelihood Input or output, e.g. soft-decision-input-soft-decision-output (SISO) Examples RS codes: hard decision code Turbo codes: soft decision code H. D. Schotten & B. Han Wireless Communications 19/ 33
Channel Coding Bit-Interleaving and De-Interleaving Overview Speech Coding Channel Coding Modulation Review: to convert burst error into bit errors Different implementations: algebraic, matrix, helical, random, etc. Example: 4 4 block interleaving 1 0 0 0 Input: 0000 0111 0001 0001 1 0 0 0 1 1 1 0 (row-by-row) 0 0 0 0 1 0 0 0 Output: 1 0 0 0 1 1 1 0 0000 0100 0100 0111(column-by-column) 0 0 0 0 Try with a 4-bit burst error? H. D. Schotten & B. Han Wireless Communications 20/ 33
Modulation Schemes Basics of Digital Modulation Overview Digital bits to analog symbols with better frequency efficiency s(t) = a e jϕ = a e jωt+θ0 Three basic forms: ASK, PSK, FSK ASK + PSK QAM Error rate depends on average SNR and constellation BPSK as Example s(t) = { A e jωct+θ0 = A e jϕ(t) nt t < (n + 1)T, n : b n = 0 A e jωct+θ0 = A e j(ϕ(t)+π) nt t < (n + 1)T, n : b n = 1 Difference BASK / BPSK? H. D. Schotten & B. Han Wireless Communications 21/ 33
Modulation Schemes BER vs. SNR BPSK as Example Overview Speech Coding Channel Coding Modulation r(t) = s(t) + n(t), n N (0, σ 2 ) Demodulator synchronized so that s 0 = A, s 1 = A upon b: f (r s 0 ) = 1 (r A)2 e 2σ 2 2πσ 2 f (r s 1 ) = 1 (r+a)2 e 2σ 2 2πσ 2 Source: gaussianwaves.com H. D. Schotten & B. Han Wireless Communications 22/ 33
Modulation Schemes BER vs. SNR BPSK as Example Overview Speech Coding Channel Coding Modulation { Thresholding decision at B: p(e s 0 ) = + p(r s B 0 )dr p(e s 1 ) = B p(r s 1)dr p(e) = p(e s 0 )p(s 0 ) + p(e s 1 )p(s 1 ) When p(e s 0 ) = p(e s 1 ) = 0.5, p(e) is minimized at B = 0 Proof: solve dp(e) db = p(r s 1)p(s 1 ) p(r s 0 )p(s 0 ) = 0 The minimized error probability (BER) is p min (e) = 1 2 erfc ( A ( A) 2 2σ ) = 12 erfc ( ) A 2 2σ 2 H. D. Schotten & B. Han Wireless Communications 23/ 33
Modulation Schemes BER vs. SNR Higher Modulation Order Overview Speech Coding Channel Coding Modulation Power efficiency: γ = d 2 min 4E b ( ) BER: P b M 1 2 erfc γ E b N 0 (closely approx. for high SNR) Modulation Spectral efficiency (η) Power Efficiency (γ) 3 log PAM 2 log 2 M 2 M M 2 1 PSK log 2 M sin 2 ( ) π M log2 M 3 log QAM log 2 M 2 M FSK 2 log 2 M M 2M 1 1 2 log 2 M H. D. Schotten & B. Han Wireless Communications 24/ 33
Modulation Schemes Phase Shift Keying: QPSK Overview Speech Coding Channel Coding Modulation Q 01 11 I 00 10 ±π phase change possible (zero-crossing / out-of-band error) H. D. Schotten & B. Han Wireless Communications 25/ 33
Modulation Schemes Phase Shift Keying: OQPSK Overview Speech Coding Channel Coding Modulation Q 01 11 I 00 10 Coherent receiver needed (detection error under fading) H. D. Schotten & B. Han Wireless Communications 26/ 33
Modulation Schemes Phase Shift Keying: π/4-dqpsk Overview Speech Coding Channel Coding Modulation Input Bits Phase Change 00 π/4 01 3π/4 10 π/4 11 3π/4 ±π/4 and ±3π/4 phase changes possible Coherent or incoherent (benefit under multi-path fading) H. D. Schotten & B. Han Wireless Communications 27/ 33
Modulation Schemes Phase Shift Keying: MSK & GMSK (a): QPSK; (b) OQPSK; (e) MSK Source:The Infinite Bit MSK: Half-sinusoid instead of rectangular bit-window Lower side lobe level Not enough yet Any post-modulation filtering leads to envelope variations GMSK: pre-modulation filtering with Gaussian filter H. D. Schotten & B. Han Wireless Communications 28/ 33
Modulation Schemes Quadrature Amplitude Modulation Overview Speech Coding Channel Coding Modulation Q 0000 0100 1100 1000 0001 0101 1101 1001 I 0011 0111 1111 1011 0010 0110 1110 1010 Commonly rectangular, non-rectangular also available Better error rate performance than PSK Amplitude variation regardless of filtering problems in nonlinear amplifiers and on fading channels Rectangular 16-QAM Q I Circular 16-QAM H. D. Schotten & B. Han Wireless Communications 29/ 33
Modulation Schemes M-ary Frequency Shift Keying Signal 2Es s i (t) = cos(2πf i t) 1 i M T s f i = f c + (2i 1 M) f f c = carrier frequency f = frequency step M = number of different symbols E s = symbol energy T s = symbolduration Pros & Cons Constant envelope (for low-cost nonlinear amplifiers) Coherent or incoherent detection lower bandwidth efficiency Question How to visualize the constellation? H. D. Schotten & B. Han Wireless Communications 30/ 33
Modulation Schemes Modulation Selection Spectral efficiency (bps/hz) Transmission quality Good BER performance Low adjacent-channel interference Applicability in different environments (urban, suburban, rural) Phase noise (jitter) / amplitude noise Linear / nonlinear amplifiers Fading Doppler effect etc. Simple implementation H. D. Schotten & B. Han Wireless Communications 31/ 33
Modulation Schemes Synchronization What Carrier synchronization Bit synchronization Word synchronization How Phase-Locked Loop (PLL) Matched filter + PLL Shift register + auto-correlator H. D. Schotten & B. Han Wireless Communications 32/ 33
Modulation Schemes Equalization Slow fading: a linear time-invariant (LTI) system h(t) where r(t) = + Resulting in: Compensable symbol distortion Inter-symbol interference (ISI) s(t)h(t τ)dτ Compensation: with an inverse system h 1 (t) Adaptive implementation: adjustable FIR filter to minimize the measure Mean square error (MSE) etc. LTI equalizers cannot fully compensate distortions caused by fast fading H. D. Schotten & B. Han Wireless Communications 33/ 33