The material in this chapter is the bridge between analog and digital signal processing. The sampling theory provides the necessary information to convert a continuous-time signal into a discrete-time signal and then into a digital signal with minimum error. It is the frequency representation of an analog signal that determines the way in which it can be sampled and reconstructed. Analog-to- digital and digital-to-analog converters are the devices that in practice convert an analog signal into a digital signal and back. Two parameters characterizing these devices are the sampling rate and the number of bits each sample is coded into. The rate of change of a signal determines the sampling rate, while the precision in representing the samples determines the number of levels of the quantizer and the number of bits assigned to each sample.
In the following chapters we will consider the analysis of discrete-time signals, as well as the analysis and synthesis of discrete systems. The effect of quantization in the processing and design of systems
Problems 447
is an important problem that is left for texts in digital signal processing. We will, however, develop the theory of discrete-time signals.
PROBLEMS
7.1. Sampling actual signals
Consider the sampling of real signals.
(a) Typically, a speech signal that can be understood over a telephone shows frequencies from about 100 Hzto about5 KHz. What would be the sampling frequencyfs(samples/sec) that would be used to sample speech without aliasing? How many samples would you need to save when storing an hour of speech? If each sample is represented by8bits, how many bits would you have to save for the hour of speech?
(b) A music signal typically displays frequencies from0up to22 KHz. What would be the sampling frequencyfsthat would be used in a CD player?
(c) If you have a signal that combines voice and musical instruments, what sampling frequency would you use to sample this signal? How would the signal sound if played at a frequency lower than the Nyquist sampling frequency?
7.2. Sampling of band-limited signals
Consider the sampling of a sinc signal and related signals.
(a) For the signalx(t)=sin(t)/t, find its magnitude spectrum|X()|and determine if this signal is band limited or not.
(b) Suppose you want to samplex(t)). What would be the sampling period Ts you would use for the sampling without aliasing?
(c) For a signaly(t)=x2(t), what sampling frequencyfs would you use to sample it without aliasing?
How does this frequency relate to the sampling frequency used to samplex(t)?
(d) Find the sampling periodTsto samplex(t)so that the sampled signalxs(0)=1, otherwisexs(nTs)=0 forn6=0.
7.3. Sampling of time-limited signals—MATLAB
Consider the signalsx(t)=u(t)−u(t−1)andy(t)=r(t)−2r(t−1)+r(t−2).
(a) Are either of these signals band limited? Explain.
(b) Use Parseval’s theorem to determine a reasonable value for a maximum frequency for these signals (choose a frequency that would give90%of the energy of the signals). Use MATLAB.
(c) If we use the sampling period corresponding toy(t)to samplex(t), would aliasing occur? Explain.
(d) Determine a sampling period that can be used to sample bothx(t)andy(t)without causing aliasing in either signal.
7.4. Uncertainty in time and frequency—MATLAB
Signals of finite time support have infinite support in the frequency domain, and a band-limited signal has infinite time support. A signal cannot have finite support in both domains.
(a) Considerx(t)=(u(t+0.5)−u(t−0.5))(1+cos(2πt)). Find its Fourier transformX(). Compute the energy of the signal, and determine the maximum frequency of a band-limited approximation signal ˆx(t)that would give95%of the energy of the original signal.
(b) The fact that a signal cannot be of finite support in both domains is expressed well by theuncertainty principle, which says that
1(t)1()≥ 1 4π
where
1(t)=
∞R
−∞
t2|x(t)|2dt Ex
0.5
measures the duration of the signal for which the signal is significant in time, and
1()=
∞R
−∞
2|X()|2d
Ex
0.5
measures the frequency support for which the Fourier representation is significant. The energy of the signal is represented byEx. Compute1(t)and1()for the given signalx(t)and verify that the uncertainty principle is satisfied.
7.5. Nyquist sampling rate condition and aliasing Consider the signal
x(t)= sin(0.5t) 0.5t (a) Find the Fourier transformX()ofx(t).
(b) Isx(t)band limited? If so, find its maximum frequencymax.
(c) Suppose thatTs=2π. How doessrelate to the Nyquist frequency2max? Explain.
(d) What is the sampled signalx(nTs)equal to? Carefully plot it and explain ifx(t)can be reconstructed.
7.6. Anti-aliasing
Suppose you want to find a reasonable sampling periodTsfor the noncausal exponential x(t)=e−|t|
(a) Find the Fourier transform ofx(t), and plot|X()|. Isx(t)band limited?
(b) Find a frequency0so that99%of the energy of the signal is in−o≤≤o. (c) If we lets=2π/Ts=50, what would beTs?
(d) Determine the magnitude and bandwidth of an anti-aliasing filter that would change the original signal into the band-limited signal with99%of the signal energy.
7.7. Sampling of modulated signals
Assume you wish to sample an amplitude modulated signal x(t)=m(t)cos(ct)
wherem(t)is the message signal andc=2π104rad/sec is the carrier frequency.
(a) If the message is an acoustic signal with frequencies in a band of[0, 22] KHz, what would be the maximum frequency present inx(t)?
(b) Determine the range of possible values of the sampling periodTsthat would allow us to samplex(t) satisfying the Nyquist sampling rate condition.
(c) Given thatx(t)is a band-pass signal, compare the above sampling period with the one that can be used to sample band-pass signals.
Problems 449
7.8. Sampling output of nonlinear system The input–output relation of a nonlinear system is
y(t)=x2(t) wherex(t)is the input andy(t)is the output.
(a) The signalx(t)is band limited with a maximum frequencyM=2000πrad/sec. Determine ify(t)is also band limited, and if so, what is its maximum frequencymax?
(b) Suppose that the signaly(t)is low-pass filtered. The magnitude of the low-pass filter is unity and the cut-off frequency isc=5000πrad/sec. Determine the value of the sampling periodTsaccording to the given information.
(c) Is there a different value forTsthat would satisfy the Nyquist sampling rate condition for bothx(t) andy(t)and that is larger than the one obtained above? Explain.
7.9. Signal reconstruction
You wish to recover the original analog signalx(t)from its sampled formx(nTs).
(a) If the sampling period is chosen to beTs=1so that the Nyquist sampling rate condition is satis- fied, determine the magnitude and cut-off frequency of an ideal low-pass filterH(j)to recover the original signal and plot them.
(b) What would be a possible maximum frequency of the signal? Consider an ideal and a nonideal low- pass filter to reconstructx(t). Explain.
7.10. CD player versus record player
Explain why a CD player cannot produce the same fidelity of music signals as a conventional record player.
(If you do not know what these are, ignore this problem, or get one to find out what they do or ask your grandparents about LPs and record players!)
7.11. Two-bit analog-to-digital converter—MATLAB
Letx(t)=0.8 cos(2πt)+0.15, 0≤t≤1, and zero otherwise, be the input to a 2-bit analog-to-digital converter.
(a) For a sampling periodTs=0.025sec determine and plot using MATLAB the sampled signal, x(nTs)=x(t)|t=nTS
(b) The four-level quantizer (see Figure 1.2) corresponding to the 2-bit ADC is defined as
k1≤x(nTs) < (k+1)1 → x(nTˆ s)=k1 k= −2,−1, 0, 1 (7.26) wherex(nTs), found above, is the input andx(nTˆ s)is the output of the quantizer. Let the quantization step be1=0.5. Plot the input–output characterization of the quantizer, and find the quantized output for each of the sample values of the sampled signalx(nTs).
(c) To transform the quantized values into unique binary 2-bit values, consider the following code:
x(nTˆ s)= −21 → 10 x(nTˆ s)= −1 → 11 x(nTˆ s)=01 → 00 x(nTˆ s)=1 → 01 Obtain the digital signal corresponding tox(t).