ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals Sampling and Reconstruction Quantization Dan Ellis 2003-12-09
1. Sampling & Reconstruction DSP must interact with an analog world: A to D D to A x(t) x[n] y[n] y(t) DSP ADC DAC Anti- alias filter Sample and hold Reconstruction filter WORLD Sensor Actuator Dan Ellis 2003-12-09
Sampling: Frequency Domain Sampling: CT signal DT signal by recording values at ‘sampling instants’: What is the relationship of the spectra? i.e. relate and Discrete Continuous Sampling period T samp.freq. WT = 2p/T rad/sec W in rad/second CTFT DTFT w in rad/sample Dan Ellis 2003-12-09
‘sampled’ signal: still continuous Sampling DT signals have same ‘content’ as CT signals gated by an impulse train: gp(t) = ga(t)·p(t) is a CT signal with the same information as DT sequence g[n] gp(t) ga(t) t t ‘sampled’ signal: still continuous - but discrete values t CT delta fn p(t) T 3T Dan Ellis 2003-12-09
Spectra of sampled signals Given CT Spectrum Compare to DTFT i.e. by linearity W p/T = WT/2 w p Dan Ellis 2003-12-09
Spectra of sampled signals Also, note that is periodic, thus has Fourier Series: But so shift in frequency - scaled sum of shifted replicas of Ga(jW) by multiples of sampling frequency WT Dan Ellis 2003-12-09
shifted/scaled copies CT and DT Spectra So: or DTFT CTFT ga(t) is bandlimited @ WM M W -WM WM W -2WT -WT WT 2WT = shifted/scaled copies M/T W w -4p -2p 2p 4p Dan Ellis 2003-12-09
Aliasing Sampled analog signal has spectrum: Gp(jW) ga(t) is bandlimited to ± WM rad/sec When sampling frequency WT is large... no overlap between aliases can recover ga(t) from gp(t) by low-pass filtering Ga(jW) “alias” of “baseband” signal Gp(jW) W -WT -WM WM WT WT - WM -WT + WM Dan Ellis 2003-12-09
The Nyquist Limit If bandlimit WM is too large, or sampling rate WT is too small, aliases will overlap: Spectral effect cannot be filtered out cannot recover ga(t) Avoid by: i.e. bandlimit ga(t) at ≤ Gp(jW) W -WT -WM WM WT WT - WM Sampling theorum Nyquist frequency Dan Ellis 2003-12-09
‘space’ for filter rolloff Anti-Alias Filter To understand speech, need ~ 3.4 kHz 8 kHz sampling rate (i.e. up to 4 kHz) Limit of hearing ~20 kHz 44.1 kHz sampling rate for CDs Must remove energy above Nyquist with LPF before sampling: “Anti-alias” filter ‘space’ for filter rolloff A to D ADC Anti-alias filter Sample & hold M Dan Ellis 2003-12-09
Sampling Bandpass Signals Signal is not always in ‘baseband’ around W = 0 ... may be some higher W: If aliases from sampling don’t overlap, no aliasing distortion, can still recover Basic limit: WT/2 ≥ bandwidth DW M W -WH -WL WL WH Bandwidth DW = WH - WL M/T W -WT WT/2 WT 2WT Dan Ellis 2003-12-09
Reconstruction To turn g[n] back to ga(t): make a continuous impulse train gp(t) lowpass filter to extract baseband ga(t) Ga(ejw) To turn g[n] back to ga(t): Ideal reconstruction filter is brickwall i.e. sinc - not realizable (especially analog!) use something with finite transition band... g[n] ^ n w p ^ gp(t) ^ Gp(jW) ^ t W WT/2 ^ Ga(jW) ga(t) ^ ^ t W Dan Ellis 2003-12-09
2. Quantization Course so far has been about discrete-time i.e. quantization of time Computer representation of signals also quantizes level (e.g. 16 bit integer word) Level quantization introduces an error between ideal & actual signal noise Resolution (# bits) affects data size quantization critical for compression smallest data coarsest quantization Dan Ellis 2003-12-09
Quantization Quantization is performed in A-to-D: Quantization has simple transfer curve: Quantized signal Quantization error Dan Ellis 2003-12-09
i.e. uncorrelated with self or signal x Quantization noise Can usually model quantization as additive white noise: i.e. uncorrelated with self or signal x x[n] + x[n] ^ - e[n] bits ‘cut off’ by quantization; hard amplitude limit Dan Ellis 2003-12-09
Quantization SNR Common measure of noise is Signal-to-Noise ratio (SNR) in dB: When |x| >> 1 LSB, quantization noise has ~ uniform distribution: signal power noise power (quantizer step = e) Dan Ellis 2003-12-09
Quantization SNR Now, sx2 is limited by dynamic range of converter (to avoid clipping) e.g. b+1 bit resolution (including sign) output levels vary -2b·e .. (2b-1)e where full-scale range depends on signal i.e. ~ 6 dB SNR per bit Dan Ellis 2003-12-09
Coefficient Quantization Quantization affects not just signal but filter constants too .. depending on implementation .. may have different resolution Some coefficients are very sensitive to small changes e.g. poles near unit circle high-Q pole becomes unstable Dan Ellis 2003-12-09