Sistemas de Aquisição de Dados Mestrado Integrado em Eng. Física Tecnológica 2015/16 Aula 3-29 de Setembro
Aliasing Example fsig=101khz fsig=899 khz All sampled signals are equal! fsig=1101 khz 2
How to describe time sampling using Math? -> Dirac Pulses Amostragem de sinais: X = Signal f(t) T = Dirac Comb n= X = n= Sampled Signal (t n T ) f a (t) By definition of Delta function f(t 0 ) = f(t) (t t 0 )dt Sampled signal (continuous time) f a (t) = T f(t) 3
The Reconstruction Problem: The sampled signal f a (t) information about the original? (i.e. Is it possible to recover from the sampled version?) carries ALL the f(t) f a (t) Rephrasing the question in the Frequency Domain: Is it possible to recover the original signal s Spectrum??? 4
Fourier Transform F (w) = f(t)e iwt dt f(t) = 1 2 F (w)e iwt dw FT Properties: 1) If f(t) is Real 2) Convolution FT g(t) = f 1 (t) f 2 (t) F ( w) = F (w) (Symmetry of FT) f 1 (t) f 2 (t) T F F 1 (w) F 2 (w) (Inverse) f 1 (t) f 2 (t) T F 1 2 F 1(w) F 2 (w) f 1 ( )f 1 (t )d 5
Fourier Transform of the Sampled Signal F a (w) = n= n= f a (t) = T f(t) T F (w n ) F (w) = F a (w) = 1 2 T F { T }(w) F (w) n= n= n= n= ( n ) F (w )d F (w n ) F (w) F a (W ) w * =... 2 w... 6
Can we recover the original F(w) Spectrum from Fa(w)? F (w) Low Pass Filter F a (W ) w =... 2 w... YES! Sampling Freq F (w) w =... F a (W ) 2 w... NO! In the last case it is impossible to recover the original spectrum 7
Frequency Aliasing The frequencies fsig and N fs ± fsig (N integer), are indistinguishable in the discrete time domain 8
Nyquist Shannon sampling theorem The frequency spectrum is periodized by the sampling process, and it can overlap: (period WT=2π/Ta) - ALIASING A real signal with a frequency range DC -> Fmax must be sampled at a minimum frequency Fa 2 Fmax To avoid ALIASING for signals with an unknown frequency spectrum we need to eliminate frequency components Fa / 2 by Analog Filters before sampling In a more general way, for real signals with frequency spectrum limited to an bandwidth F= Fmax - Fmin, the minimum sampling frequency, is n: Fa 2 F 9
Sampling Limited Bandwidth Signals When fmax M Δf Example: 3 Δ fext = fmax F a (W ) f sam =2 Δf = 2 f max /M When fmax = M Δf ( M integer) F a (W ) Example M= 4 3 f 4 Δf = f max samp = 2 Δf = f max /2 f sam =2 Δ f ext = 2/3 f max 3 Δf ext = f max w -f samp f samp = 2 Δf ext = 2 f max /3 w 3 10
Sampling Theorem DC->f max Signals In order to prevent aliasing, we need f sig,max < f s /2 The sampling rate fs=2*f sig,max is called the Nyquist rate Two possibilities: Sample fast enough to cover all spectral components,including "parasitic" ones outside band of interest Limit f sig,max through filtering 11
Ideal Brick Wall Anti-Alias Filter There is no Ideal Filters 12
Practical Anti-Alias Filters 13
Anti-Aliasing Analog Filters Ideal Filter A=1 A=0 Signal with unknown Spectrum Bandwidth LP Filter ADC F (w) Correctly Sampled signal PRATICAL ANALOG! Filter 14
Anti-Aliasing Filters For a correct sampling we need to be sure that the image spectrum overlaps only at amplitudes lower than the ADC resolution log( F(w) ) Cutoff of Filter The Bandwidth of the LPF + ADC system will always be inferior to the Nyquist Limit Fsamp /2 Nth-Order LPF Slope = 6 N db/oct = 20 N db/dec Dynamic range of ADC (db) Banda Passante log(w) 15
Anti-Aliasing Filter Examples ADC with fsamp= 1 MHz @10 bit Resolution: 60dB (see table in lesson 2) 3rd Order Low Pass Filter: 18 db/oct, 60 db/dec fsamp/2=500 khz System s Analog Bandwidth BW= 50 khz 16
Reconstruction of the analog signal from the samples ADC t t t Filter Low-Pass 17
How to reconstruct the analog signal from its samples? Frequency Domain: F a (W ) F a (W ) F a (W )... 2 w... LP Filter w = w x a (t) = T f(t) = x[n] (t nt ) n= O Time Domain: To reconstruct the Original Signal we require ALL samples x[n], past and future... x r (t) = x a (t) h P B = n= = x[n] (t nt ) h P B (t) n= x[n] h P B (t nt ) t Filter LP 18
Impulse Response of the Ideal L.P. Filter -WT/2 T H(w) WT/2 H P B (w) = T u(w + 2 ) u( 2 w T 2 1 it (ei 2 t T 2 h P B (t) = T 2 2 2 e iwt dw = T 2 e i 2 t ) = T 2 w) 1 it 2i sin( 2 H P B (w)e iwt dw = 1 e iwt 2 WT it 2 = t) = sin( t T ) t T 5-4T -3T -2T -1T 0 T 1T 2T 3T 4T 5 t Ideal LPF is NON- CAUSAL!!! It is Not physically possible to build as a LTI 19
Causal Reconstruction Filter Translate & Truncate the Impulse Response (Introduce a Delay in Time) 0.8 0.4 T ) (t t 0 ) T h c P B(t) = sin( (t t 0), para t > 0 T1 2T 3T 4T 5T 6T 7T 8T 9T 10-0.4-0.8 NOTE: Translation in time t t t 0 is equivalent of multiplying the FT by e iwt 0 20
D-to-A Conversion (DAC) Ideal DAC Zero hold DAC 21
Zero-Hold Equalisation Problem Solutions a) b) 22
DAC Conversion Unary conversion Resistor Ladders 23
DAC Conversion R-2R Ladders 24
DAC Conversion Binary conversion Voltage Converters 25
Digital-to-Analog Conversion in the Charge Domain Unary Conversion Binary Conversion 26
Digital-to-Analog Conversion in the Time Domain 27
Bibliografia Data Conversion Handbook, Chapter 2 Analog Devices Inc., 2004 http://www.analog.com/library/analogdialogue/archives/39-06/ data_conversion_handbook.html Analog-to-Digital Conversion, Second Edition, Marcel J.M. Pelgrom, Springer 2013, Chapter 3 Data Acquisition and Control Handbook, A Guide to Hardware and Software for Computer-Based Measurement and Control, Keithley http://tinyurl.com/q6okgxs 28