Husheng Li, UTK-EECS, Fall 2012 DISCRETE-TIME SIGNAL PROCESSING LECTURE 4 (SAMPLING) PERIODIC SAMPLING ๏ Sampling: ๐ฅ ๐ = ๐ฅ๐ (๐๐), where T is the sampling period. In practice, it is done by A/D converter. The sampling operation is generally invertible. TWO STAGE REPRESENTATION We represent the sampling procedure in two stages: • Multiplication with an impulse train ๐ = ∞ −∞ ๐ฟ(๐ก − ๐๐) with output ๐ฅ๐ ๐ก = ๐ฅ๐ ๐ก ๐ ๐ก . • Conversion from impulse train to discrete time sequence Note: this is a mathematical formulation, not a physical circuit implementation FREQUENCY-DOMAIN REPRESENTATION ๏ The frequency domain of the post-sampling signal is given by ๐๐ ๐๐ค ∞ 1 = ๐๐ (๐(๐ค − ๐๐ค๐ )) ๐ ๐=−∞ ๏ ๏ Assume that the signal has a limited band −๐ค๐ , ๐ค๐ . If the sampling frequency satisfies ๐ค๐ ≥ 2๐ค๐ , there will be no overlap. EXACT RECOVERY ๏ An ideal low pass filter can be used to obtain the exact original signal. ALIASING If the inequality ๐ค๐ ≥ 2๐ค๐ is not valid, the frequency copies of signal will overlap, which incurs a distortion called aliasing. ๏ See the example of cosine function. ๏ NYQUIST-SHANNON THEOREM ๏ Theorem: For a band limited signal within band −๐ค๐ , ๐ค๐ , it is uniquely determined by its samples ๐ฅ๐ (๐๐), if ๐ค๐ ≥ 2๐ค๐ . EXAMPLE OF SINUSOIDAL SIGNAL RECONSTRUCTION OF A BANDLIMITED SIGNAL ๏ The reconstruction is given by ๐ฅ๐ ๐ก ∞ = ๐=−∞ sin(๐ ๐ก − ๐๐ /๐) ๐ฅ(๐) ๐ ๐ก − ๐๐ /๐ INTUITIVE EXPLANATION It can be used for D/C converter: ๐๐ ๐๐ค = ๐ป๐ ๐๐ค ๐(๐๐ค) ๏ DISCRETE-TIME PROCESSING ๏ We can use C/D converter to convert a continuous-time signal to a discrete-time one, process it in a discrete-time system, and then convert it back to continuous time domain. EXAMPLE: LTI AND LPF ๏ We can use a discrete-time low pass filter (LPF) to do the low pass filtering for continuous time signal. EXAMPLE: LTI AND LPF ๏ The ideal low pass discrete-time filter with discrete-time cutoff frequency w has the effect of an ideal low pass filter with cutoff frequency w/T. CONTINUOUS-TIME PROCESSING OF DISCRETETIME SIGNALS ๏ We can also use continuous-time system to process discrete-time signals. RESAMPLING: DOWNSAMPLING ๏ The downsampling ๐ฅ๐ ๐ = ๐ฅ(๐๐) implies 1 ๐๐ ๐๐ค = ๐ ๐−1 ๐=0 ๐ค ๐(๐( − 2๐๐/๐)) ๐ INTUITION IN THE FREQUENCY DOMAIN With aliasing Without aliasing DECIMATOR ๏ A general system for downsampling by a factor of M is the one shown above, which is called a decimator. UPSAMPLING ๏ The upsampling is given by ๐ฅ๐ ๐ = ๐ฅ(๐/๐ฟ), where L is the integer factor. EXPANDER The output of expander is given by ๐ฅ๐ ๐ = ∞ −∞ ๐ฅ(๐)๐ฟ(๐ − ๐๐ฟ . ๏ In the frequency, we have ๐๐ ๐ค = ๐ ๐ค๐ฟ . ๏ INTERPOLATOR ๏ It can be shown that the above structure realizes the upsampling and interpolates the signals between samples: ∞ sin(๐(๐ − ๐๐ฟ)/๐ฟ) ๐ฅ๐ ๐ = ๐ฅ(๐) ๐(๐ − ๐๐ฟ)/๐ฟ −∞ SIMPLE AND PRACTICAL INTERPOLATION ๏ The ideal interpolator is impossible to implement. In practice, we can use a linear interpolator: ๐ โ ๐ = 1 − ๐ฟ , |๐| ≤ ๐ฟ 0, ๐๐กโ๐๐๐ค๐๐ ๐ TIME AND FREQUENCY OF LINEAR INTERPOLATOR CHANGING SAMPLING RATE BY A NON-INTEGER FACTOR ๏ The change of sampling rate by a non-integer factor can be realized by the cascade of interpolator and decimator. THE FREQUENCY INTUITION MULTIRATE SIGNAL PROCESSING ๏ Multirate techniques refer in general to utilizing upsampling, downsampling, compressors and expanders in a variety of ways to improve the efficiency of signal processing systems. INTERCHANGE OF FILTERING WITH COMPRESSOR / EXPANDER ๏ The operations of linear filtering and downsampling / upsampling can be exchanged if we modify the linear filter. MULTISTAGE DECIMATION ๏ ๏ The two stage implementation is often much more efficient than a single-stage implementation. The same multistage principles can also be applied to interpolation DIGITAL PROCESSING OF ANALOG SIGNALS ๏ In practice, continuous time signals are not precisely band limited, ideal filters cannot be realized, ideal C/D and D/C converters can only be approximated by A/D and D/A converters. PREFILTERING TO AVOID ALIASING ๏ We can use oversampled A/D to simplify the continuous-time antialiasing filter. FREQUENCY DOMAIN INTUITION ๏ Key point: the noise is aliased; but the signal is not. Then, the noise can be removed using a sharp-cutoff decimation filter. A/D CONVERSION SAMPLE-AND-HOLD The zero-order-hold system has the impulse response given by 1, 0 < ๐ก < ๐ โ0 ๐ก = 0, ๐๐กโ๐๐๐ค๐๐ ๐ ๏ QUANTIZATION This quantizer is suitable for bipolar signals. ๏ Generally, the number of quantization levels should be a power of tow, but the number is usually much larger than 8. ๏ ILLUSTATION D/A CONVERSION ๏ The ideal D/A is given by ∞ sin(๐ ๐ก − ๐๐ /๐) ๐ฅ๐ ๐ก = ๐ฅ(๐) ๐ ๐ก − ๐๐ /๐ ๐=−∞ In practice, we need to use the above structure. OVERSAMPLING ๏ ๏ Oversampling can make it possible to implement sharp cutoff antialiasing filtering by incorporating digital filtering and decimation. Oversampling and subsequent discrete-time filtering and downsampling also permit an increase in the step size of the quantizer, or equivalently, a reduction in the number of bits required in the A/D conversion.