1. Trang chủ
  2. » Giáo án - Bài giảng

Ebook signals and systems using MATLAB part 2

336 369 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 336
Dung lượng 7,07 MB

Nội dung

3 PART Theory and Application of Discrete-Time Signals and Systems This page intentionally left blank CHAPTER Sampling Theory The pure and simple truth is rarely pure and never simple Oscar Wilde (1854–1900) Irish writer and poet 7.1 INTRODUCTION Since many of the signals found in applications such as communications and control are analog, if we wish to process these signals with a computer it is necessary to sample, quantize, and code them to obtain digital signals Once the analog signal is sampled in time, the amplitude of the obtained discrete-time signal is quantized and coded to give a binary sequence that can be either stored or processed with a computer The main issues considered in this chapter are: ■ How to sample—As we will see, it is the inverse relation between time and frequency that provides the solution to the problem of preserving the information of an analog signal when it is sampled When sampling an analog signal one could choose an extremely small value for the sampling period so that there is no significant difference between the analog and the discrete signals— visually as well as from the information content point of view Such a representation would, however, give redundant values that could be spared without losing the information provided by the analog signal If, on the other hand, we choose a large value for the sampling period, we achieve data compression but at the risk of losing some of the information provided by the analog signal So how we choose an appropriate value for the sampling period? The answer is not clear in the time domain It does become clear when considering the effects of sampling in the frequency domain: The sampling period depends on the maximum frequency present in the analog signal Furthermore, when using the correct sampling period the information in the analog signal will remain in the discrete signal after sampling, thus allowing the reconstruction of the original signal from the samples These results, introduced by Nyquist and Shannon, constitute Signals and Systems Using MATLAB® DOI: 10.1016/B978-0-12-374716-7.00011-9 c 2011, Elsevier Inc All rights reserved 419 420 CH A P T E R 7: Sampling Theory ■ the bridge between analog and discrete signals and systems and were the starting point for digital signal processing as a technical area Practical aspects of sampling—The device that samples, quantizes, and codes an analog signal is called an analog-to-digital converter (ADC), while the device that converts digital signals into analog signals is called a digital-to-analog converter (DAC) These devices are far from ideal and thus some practical aspects of sampling and reconstruction need to be considered Besides the possibility of losing information by choosing too large of a sampling period, the ADC also loses information in the quantization process The quantization error is, however, made less significant by increasing the number of bits used to represent each sample The DAC interpolates and smooths out the digital signal, converting it back into an analog signal These two devices are essential in the processing of continuous-time signals with computers 7.2 UNIFORM SAMPLING The first step in converting a continuous-time signal x(t) into a digital signal is to discretize the time variable—that is, to consider samples of x(t) at uniform times t = nTs , or x(nTs ) = x(t)|t=nTs n integer (7.1) where Ts is the sampling period The sampling process can be thought of as a modulation process, in particular connected with pulse amplitude modulation (PAM), a basic approach in digital communications A pulse amplitude modulated signal consists of a sequence of narrow pulses with amplitudes the values of the continuous-time signal within the pulse Assuming that the width of the pulses is much narrower than the sampling period Ts permits a simpler analysis based on impulse sampling 7.2.1 Pulse Amplitude Modulation A PAM system can be visualized as a switch that closes every Ts seconds for seconds, and remains open otherwise The PAM signal is thus the multiplication of the continuous-time signal x(t) by a periodic signal p(t) consisting of pulses of width , amplitude 1/ , and period Ts Thus, xPAM (t) consists of narrow pulses with the amplitudes of the signal within the pulse width For a small pulse width , the PAM signal is approximately a train of pulses with amplitudes x(mTs )—that is, xPAM (t) = x(t)p(t) ≈ x(mTs )[u(t − mTs ) − u(t − mTs − )] m Now, as a periodic signal we represent p(t) by its Fourier series Pk ejk p(t) = 0t = k 2π Ts where Pk are the Fourier series coefficients Thus, the PAM signal can be expressed as Pk x(t) ejk xPAM (t) = k 0t (7.2) 7.2 Uniform Sampling and its Fourier transform is XPAM ( ) = Pk X( 0) −k k showing that PAM is a modulation of the train of pulses p(t) by the signal x(t) The spectrum of xPAM (t) is the spectrum of x(t) shifted in frequency by {k }, weighted by Pk , and superposed 7.2.2 Ideal Impulse Sampling Given that the pulse width is much smaller than Ts , p(t) can be replaced by a periodic sequence of impulses of period Ts (see Figure 7.1) or δTs (t) This simplifies considerably the analysis and makes the results easier to grasp Later in the chapter we consider the effects of having pulses instead of impulses, a more realistic assumption The sampling function δTs (t), or a periodic sequence of impulses of period Ts , is δTs (t) = δ(t − nTs ) (7.3) n where δ(t − nTs ) is an approximation of the normalized pulse [u(t − nTs ) − u(t − nTs − max (see Figure 7.2(a)) where max is the maximum frequency present in the signal—such a signal is called band limited As shown in Figure 7.2(b), for band-limited signals it is possible to choose s so that the spectrum of the sampled signal consists of shifted nonoverlapping versions of (1/Ts)X( ) Graphically (see Figure 7.2(b)), this can be accomplished by letting s − max ≥ max , or s ■ To ≥2 max which is called the Nyquist sampling rate condition As we will see later, in this case we are able to recover X( ), or x(t), from Xs ( ) or from the sampled signal xs (t) Thus, the information in x(t) is preserved in the sampled signal xs (t) On the other hand, if the signal x(t) is band limited but we let s < max , then when creating Xs ( ) the shifted spectra of x(t) overlap (see Figure 7.2(c)) In this case, due to the overlap it will not be help the reader visualize the difference between a continuous-time signal, which depends on a continuous variable t, or a real number, and a discrete-time signal, which depends on the integer variable n, we will use square brackets for these Thus, η(t) is a continuous-time signal, while ρ[n] is a discrete-time signal 423 424 CH A P T E R 7: Sampling Theory X(Ω) −Ω max Ω Ω max (a) Xs (Ω) 1/Ts Ωs ≥ Ω max ··· ··· No aliasing Ω max (b) Xs (Ω) Ωs − Ω max Ωs Ω 1/Ts Ωs < Ω max ··· ··· Aliasing Ω Ωs = Ω max (c) FIGURE 7.2 (a) Spectrum of band-limited signal, (b) spectrum of sampled signal when satisfying the Nyquist sampling rate condition, and (c) spectrum of sampled signal with aliasing (superposition of spectra, shown in dashed lines, gives a constant shown by continuous line) ■ possible to recover the original continuous-time signal from the sampled signal, and thus the sampled signal does not share the same information with the original continuous-time signal This phenomenon is called frequency aliasing since due to the overlapping of the spectra some frequency components of the original continuous-time signal acquire a different frequency value or an “alias.” When the spectrum of x(t) does not have a finite support (i.e., the signal is not band limited) sampling using any sampling period Ts generates a spectrum of the sampled signal consisting of overlapped shifted spectra of x(t) Thus, when sampling non-band-limited signals frequency aliasing is always present The only way to sample a non-band-limited signal x(t) without aliasing—at the cost of losing information provided by the high-frequency components of x(t) — is by obtaining an approximate signal xa (t) that lacks the high-frequency components of x(t), thus permitting us to determine a maximum frequency for it This is accomplished by antialiasing filtering commonly used in samplers A band-limited signal x(t)—that is, its low-pass spectrum X( ) is such that |X( )| = for | | > max (7.11) 7.2 Uniform Sampling where max is the maximum frequency in x(t)—can be sampled uniformly and without frequency aliasing using a sampling frequency s= 2π ≥ max Ts (7.12) This is called the Nyquist sampling rate condition ■ Example 7.1 Consider the signal x(t) = cos(2πt + π/4), −∞ < t < ∞ Determine if it is band limited or not Use Ts = 0.4, 0.5, and sec/sample as sampling periods, and for each of these find out whether the Nyquist sampling rate condition is satisfied and if the sampled signal looks like the original signal or not Solution Since x(t) only has the frequency 2π, it is band limited with sampled signal is given as max = 2π rad/sec For any Ts the ∞ xs (t) = x(nTs )δ(t − nTs ) Ts sec/sample (7.13) n=−∞ with x(nTs ) = x(t)|t=nTs Using Ts = 0.4 sec/sample the sampling frequency in rad/sec is s = 2π/Ts = 5π > max = 4π, satisfying the Nyquist sampling rate condition The samples in Equation (7.13) are then x(nTs ) = cos(2π 0.4n + π/4) = cos 4π π n+ −∞

Ngày đăng: 03/08/2017, 17:38

TỪ KHÓA LIÊN QUAN

w