Lab 4 Sampling and Rate Conversion Sampling xt
Lab. 4 Sampling and Rate Conversion § Sampling: x(t) x xs (t) x(n. T) * An impulse is an analog signal. § The Fourier transform of an impulse train is still an impulse train. § Then, 1
§ Spectrum: Sampling § Reconstruction: x(n. T) x xs (t) Ideal LPF x(n. T) 2
§ Practical reconstruction device (DAC): 3
§ Practical sampling device (ADC): * FLASH ADC 4
§ Ramp counter ADC: 5
§ Successive approximation ADC: * Tree search 6
§ Downsampling: Xd(n)= x(Mn) x(n) § Let m=i+k. M and we have 7
§ Spectrum: i=0 i=1 i=0 § To avoid aliasing, a filter is generally applied before the downsampling operation. x(n) § Upsampling: LPF Cutoff= /M Xd(n)= x(Mn) Gain=1 Xu(n)= x(n/L) x(n) 8
§ The spectrum: Ideal LPF 9
§ The upsampling process is then equivalent to increase the sampling rate by a factor of L. Gain=L x(n) LPF Cutoff= /L Xu(n) § The filtering operation is also known as interpolation. 10
§ Practice 1: – Generate a sinusoidal signal, downsample the signal, and observe the its spectrum. – Determine the maximum downsampling rate such that the aliasing will not occur. – Then upsample the downsampled signal, and observe its spectrum. 11
§ General filter design: – – Pass band Stop band Transition band Passband ripple/stopband ripple A lowpass filter 12
§ The analog filter design (IIR): – 1. Butterworth, 2. Chebychev I, 3. Chebychev II, 4. Ellipic 13
§ Fdatool in Matlab: 14
§ Practice 2: – Generate a sinusoidal signal, downsample the signal (no aliasing), and then upsample the downsampled signal. – Design an FIR LPF and let the upsampled signal pass the filter such that the upsampled signal is similar to the original signal. – Calculate the MSE of these two interpolation schemes. 15
§ Practice 3: – Create an random digital signal and upsampled it with a selected factor. – Observe the spectrum of the upsampled signal. § Reading assigment: – Pulse shaping (CS: 4. 5) – RC, SRRC 16
§ Filter design(FDA tool) – Key “fdatool” in the console of MATLAB – Adjust parameters for your requirement – Press “Filter coefficients” to get filter time-domain response h[n] – Convolve h[n] in your C program to implement lowpass filtering § Plot spectrum in MATLAB – Plot( abs( fft( x ) ) ) • fft(): Fast Fourier Transform, frequency interval is [0 fs] • abs(): get magnitude 17
- Slides: 17