ETSF15 Analog/Digital Stefan Höst
Physical layer Analog vs digital Sampling, quantisation, reconstruction Modulation Represent digital data in a continuous world Disturbances Noise and distortion Synchronization Synchronization to signal or between nodes Digital data processing Information
Data vs Signal vs Information Data: Static representation of information Signal: Dynamic representation of information Information: Information content in data or signal 3
Analog vs Digital Analog Continuous time and amplitude signal Electrical/optical domain Digital Discrete time and amplitude Often binary representation s(t) t s[n] n 10101010111101000100111010 01010101001111010010001001 01101000100011101100010010 11100010101000001000101111 11010010101001001001000101 00101010010010010001010101 00101010101010010100001010 01011111001011010100101001 01101010100101110110011010 4
Digitalization of analog signals Performed in three steps: 1. Sampling: Discretization in time. Quantization: Discretization in amplitude 3. Encoding: Binary representation of amplitude levels In practice: ADC: Analog to Digital Converter DAC: Digital to Analog Converter 5
Sampling The process of discretizing time of a continuous signal. s n = s(nt & ) Sample time: T & Sample frequnecy: F & = 1/T & Loose information about time s(t) s(t) s[n] 4 0 4 0 0.1 0. 0.3 0.4 0.5 0.6 0.7 4 t 0 4 0 0.1 0. 0.3 0.4 0.5 0.6 0.7 4 t 0 4 0 5 10 15 0 5 30 35 40 45 n 6
Shannon-Nyquist Sampling Theorem If s(t) is a band limited signal with highest frequency component F,-., then s(t) is uniquely determined by the samples s n = s(nt & ) if and only if F & = 1 T & F,-. The signal can be (perfectly) reconstructed with 5 s t = 1 s n sinc t nt & 6785 Fs/ is the Nyquist frequency and F,-. the Nyquist rate T & 7
Reconstruction Example y t = sin π >? t, Fs = 1 Hz 1 0.5 0 0.5 1 0 4 6 8 10 1 1 0.5 0 0.5 1 0 4 6 8 10 1 8
Aliasing y(t) = cos (π7t) F s = 10 Hz 1 0.5 0 0.5 T 1 0 0.1 0. 0.3 0.4 0.5 0.6 0.7 Reconstruction to lowest possiblefrequency Reconstruct freq: f IJK = f + kf & s.t. F & / f IJK F & / y t = cos π3t 1 0.5 0 0.5 1 0 0.1 0. 0.3 0.4 0.5 0.6 0.7 9
Sampling theorem proof Two important transforms + sinc(t) p(f) F -1 1 3 t -1/ 1/ f x(t) = P n (t n) F x(f) = P n (f n) t -1 1 3-1 1 3 f + 10
Sampling theorem proof Mathematical description of sampling + s(t) 1 T x( t T )=P n (t nt ) s s (t) =s(t) 1 T x( t T ) = = P n s[n] (t nt ) t t t -T T T 3T -T T T 3T F S(f) x(tf)= 1 T Pn (f n T ) = S s (f) =S(f) x(tf) = 1 T Pn S(f n ) T f f f -1/T 1/T /T -1/T 1/T /T + 11
Sampling theorem proof Reconstruction + S s (f) = 1 T Pn S(f n T ) T p(ft) T = S(f) -1/T 1/T /T -1/T 1/T f f f F 1 s s (t) = P n s[n] (t nt ) s(t) =s s (t) sinc( t ) sinc( t ) T T = P t nt n s[n]sinc( ) T = t t t + -T T T 3T -T T T 3T 1
Sampling theorem Aliasing Let F s <F max + S(f) S s (f) Ŝ(f) Sampling Reconstruction f -F F F f -F/ F/ f 13
Example y(t) = cos(π 7t) Y ( f ) = 1 ( δ ( f + 7) + δ ( f 7) ) Sampling with F s =10 Hz -7 7 f -0-17 -13-10 -7-3 3 7 10 13 17 0 3 7 30 f -5 5 Reconstruct in [-F s /, F s /]: Y ˆ 1 ( f ) = ( δ ( f + 3) + δ ( f 3) ) ŷ(t) = cos(π 3t) -3 3 f 14
Quantization Uniform quantization for k bits M 1 D x Q M= k equidistant levels M D D D M D x Represent sample with k bits M 1 D 15
Encoding Representation of quantized samples in bits 1.5 1 0.5 0 0.5 1 1.5 111 110 011 101 010 100 001 000 x(t) x[n] Quant level 0 1 x=011100100101101101111111111 16
Quantisation distortion Distortion (noise): d(x, x Q ) = (x x Q ) Average distortion for uniform input: E ( X X ) Q = Δ/ 1 x Δ dx = Δ/ Δ 1 M D M D Signal to quantisation noise ratio x x Q d(x, x Q ) M D M D x x SQNR = E X E ( X X ) Q = (M Δ) /1 Δ /1 = M = k SQNR db = 10log k = k 6dB 17
Delta modulation Represent change in amplitude with 1 bit 1: +1 0: 1 Must use higher sampling rate s(n) 5 10 15 n 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 18
Examples Telephony F max = 4 khz F s = 8 khz (samples per sec) 8 bit/sample => 64 kb/s CD F max = 0 khz F s = 44.1 khz (samples per sec) 16 bit/sample => 705.6 kb/s channels (stereo) => 1.4 Mb/s 19
Principles of circuits Sample and hold (sampling) ADC (quantisation) DAC (reconstruction) 0
Sample and hold 1
ADC Analog to Digital Converter Sample and hold circuit freeze the analog value during conversion ADC methods Direct conversion (flash ADC) Integrating Wilkinson Sigma-delta Etc (see e.g. https://en.wikipedia.org/wiki/analog-to-digital_converter)
ADC Direct conversion example (3 bit) 3
DAC Digital to Analog Converter Pulse width modulator R-R ladder Interpolating Binary weighting See more on https://en.wikipedia.org/wiki/digital-to-analog_converter 4
DAC Example Weighted resistor R-R ladder 5