Application Report SNAA079C – May 2004 – Revised May 2004 AN-236 An Introduction to the Sampling Theorem ..................................................................................................................................................... ABSTRACT With rapid advancement in data acquistion technology (i.e. analog-to-digital and digital-to-analog converters) and the explosive introduction of micro-computers, selected complex linear and nonlinear functions currently implemented with analog circuitry are being alternately implemented with sample data systems. Contents An Introduction to the Sampling Theorem ............................................................................... 3 An Intuitive Development .................................................................................................. 3 The Sampling Theorem .................................................................................................... 5 Some Observations and Definitions ...................................................................................... 8 The Sampling Theorem and Its Hardware ............................................................................... 9 5.1 IMPLICATIONS .................................................................................................... 9 6 A Final Note ................................................................................................................ 17 7 Acknowledgements ........................................................................................................ 17 8 ARTICLE REFERENCES ................................................................................................ 17 Appendix A Basic Filter Concepts ............................................................................................ 19 1 2 3 4 5 List of Figures 1 When sampling, many signals may be found to have the same set of data points. These are called aliases of each other. ....................................................................................................... 4 2 Shown in the shaded area is an ideal, low pass, anti-aliasing filter response. Signals passed through the filter are bandlimited to frequencies no greater than the cutoff frequency, fc. In accordance with the sampling theorem, to recover the bandlimited signal exactly the sampling rate must be chosen to be greater than 2fc. ............................................................................................................. 4 3 Fourier transform of a sampled signal. ................................................................................... 7 4 Recovery of a signal f(t) from sampled data information............................................................... 7 5 Spectral folding or aliasing caused by: (a) under sampling (b) exaggerated under sampling. ................... 8 6 Aliased spectral envelope (a) and (b) of a and b respectively. ....................................................... 9 7 Generalized single channel sample data system. ...................................................................... 9 8 Typical filter magnitude and phase versus frequency response..................................................... 11 9 10 11 12 13 14 15 16 17 18 19 ............................................................................................................................... .............................................................................. Quantization error.......................................................................................................... Amplitude uncertainty as a function of (a) a nonvarying aperture and(b) aperture time uncertainty. .......... The Fourier transform of the rectangular pulse (a) is shown in (b). ................................................ Sampling Pulse (a), its Magnitude (b) and Phase Response (c). ................................................... Pulse width and how it effects the sin X/X envelop spectrum (normalized amplitudes).......................... (a) Processed signal data points (b) output of D/A converter (c) output of smoothing filter. .................... Common Low Pass Filter Response .................................................................................... Common High Pass Filter Response ................................................................................... Common Band-pass Filter Response................................................................................... (c) equals the convolution of (a) with (b). 12 12 14 14 15 15 16 17 19 19 20 All trademarks are the property of their respective owners. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 1 www.ti.com 20 2 Common Band-Reject Filter Response ................................................................................. 20 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback An Introduction to the Sampling Theorem www.ti.com 1 An Introduction to the Sampling Theorem With rapid advancement in data acquistion technology (i.e. analog-to-digital and digital-to-analog converters) and the explosive introduction of micro-computers, selected complex linear and nonlinear functions currently implemented with analog circuitry are being alternately implemented with sample data systems. Though more costly than their analog counterpart, these sampled data systems feature programmability. Additionally, many of the algorithms employed are a result of developments made in the area of signal processing and are in some cases capable of functions unrealizable by current analog techniques. With increased usage a proportional demand has evolved to understand the theoretical basis required in interfacing these sampled data-systems to the analog world. This article attempts to address the demand by presenting the concepts of aliasing and the sampling theorem in a manner, hopefully, easily understood by those making their first attempt at signal processing. Additionally discussed are some of the unobvious hardware effects that one might encounter when applying the sampled theorem. With this. . . let us begin. 2 An Intuitive Development The sampling theorem by C.E. Shannon in 1949 places restrictions on the frequency content of the time function signal, f(t), and can be simply stated as follows: — In order to recover the signal function f(t) exactly, it is necessary to sample f(t) at a rate greater than twice its highest frequency component. Practically speaking for example, to sample an analog signal having a maximum frequency of 2Kc requires sampling at greater than 4Kc to preserve and recover the waveform exactly. The consequences of sampling a signal at a rate below its highest frequency component results in a phenomenon known as aliasing. This concept results in a frequency mistakenly taking on the identity of an entirely different frequency when recovered. In an attempt to clarify this, envision the ideal sampler of Figure 1(a), with a sample period of T shown in Figure 1(b), sampling the waveform f(t) as pictured in Figure 1(c). The sampled data points of f'(t) are shown in Figure 1(d) and can be defined as the sample set of the continuous function f(t). Note in Figure 1(e) that another frequency component, a'(t), can be found that has the same sample set of data points as f'(t) in Figure 1(d). Because of this it is difficult to determine which frequency a'(t), is truly being observed. This effect is similar to that observed in western movies when watching the spoked wheels of a rapidly moving stagecoach rotate backwards at a slow rate. The effect is a result of each individual frame of film resembling a discrete strobed sampling operation flashing at a rate slightly faster than that of the rotating wheel. Each observed sample point or frame catches the spoked wheel slightly displaced from its previous position giving the effective appearance of a wheel rotating backwards. Again, aliasing is evidenced and in this example it becomes difficult to determine which is the true rotational frequency being observed. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 3 An Intuitive Development www.ti.com Figure 1. When sampling, many signals may be found to have the same set of data points. These are called aliases of each other. Figure 2. Shown in the shaded area is an ideal, low pass, anti-aliasing filter response. Signals passed through the filter are bandlimited to frequencies no greater than the cutoff frequency, fc. In accordance with the sampling theorem, to recover the bandlimited signal exactly the sampling rate must be chosen to be greater than 2fc. On the surface it is easily said that anti-aliasing designs can be achieved by sampling at a rate greater than twice the maximum frequency found within the signal to be sampled. In the real world, however, most signals contain the entire spectrum of frequency components; from the desired to those present in white noise. To recover such information accurately the system would require an unrealizably high sample rate. This difficulty can be easily overcome by preconditioning the input signal, the means of which would be a band-limiting or frequency filtering function performed prior to the sample data input. The prefilter, typically called anti-aliasing filter guarantees, for example in the low pass filter case, that the sampled data system receives analog signals having a spectral content no greater than those frequencies allowed by the filter. As illustrated in Figure 2, it thus becomes a simple matter to sample at greater than twice the maximum frequency content of a given signal. 4 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem www.ti.com A parallel analog of band-limiting can be made to the world of perception when considering the spectrum of white light. It can be realized that the study of violet light wavelengths generated from a white light source would be vastly simplified if initial band-limiting were performed through the use of a prism or white light filter. 3 The Sampling Theorem To solidify some of the intuitive thoughts presented in the previous section, the sampling theorem will be presented applying the rigor of mathematics supported by an illustrative proof. This should hopefully leave the reader with a comfortable understanding of the sampling theorem. Theorem: — If the Fourier transform F(ω) of a signal function f(t) is zero for all frequencies above |ω| ≥ ωc, then f(t) can be uniquely determined from its sampled values fn = f(nT) (1) These values are a sequence of equidistant sample points spaced apart. (f)t is thus given by (2) Proof: Using the inverse Fourier transform formula: (3) the band limited function, f(t), takes the form, Figure 3a, (4) (5) (6) See Figure 3c and Figure 3e. Expressing F(ω) as a Fourier series in the interval −ωc ≤ ω ≤ ωc we have (7) Where, (8) Further manipulating Equation 8 (9) Cn can be written as (10) Substituting Equation 10 into Equation 7 gives the periodic Fourier Transform (11) of Figure 3f. Using Poisson's sum formula F(ω) can be stated more clearly as (12) SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 5 The Sampling Theorem www.ti.com Interestingly for the interval −ωc ≤ ω ≤ ωc the periodic function Fp(ω) and Figure 3f. equals F(ω) and Figure 3b. respectively. Analogously if Fp(ω) were multiplied by a rectangular pulse defined, H(ω) = 1 −ωc ≤ ω ≤ ω (13) H(ω) = 0 |ω| ≥ ωC (14) and then as pictured in Figure 4b, d, and f, (15) Solving for f(t) the inverse Fourier transform Equation 3 is applied to Equation 15 (16) (17) (1) where (18) and fs is the sampling frequency giving (19) Equation 19 is equivalent to Equation 2 as is illustrated in Figure 4e and Figure 3a respectively. As observed in Figure 3 and Figure 4, each step of the sampling theorem proof was also illustrated with its Fourier transform pair. This was done to present alternate illustrative proofs. Recalling the convolution theorem, the convolution of F(ω), Figure 3b, with a set of equidistant impulses, Figure 3d, yields the same periodic frequency function Fp(ω), Figure 3f, as did the Fourier transform of fn, Figure 3e, the product of f(t), Figure 3a, and its equidistant sample impulses, Figure 3c. In the same light the original time function f(t), Figure 4e, could have been recovered from its sampled waveform by convolving fn, Figure 4a, with h(t), Figure 4c, rather than multiplying Fp(ω), Figure 4b, by the rectangular function H(ω), Figure 4d, to get F(ω), Figure 4f, and finally inverse transforming to achieve f(t), Figure 4e, as done in the mathematic proof. (1) 6 Poisson's sum formula AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem www.ti.com (2) Figure 3. Fourier transform of a sampled signal. Figure 4. Recovery of a signal f(t) from sampled data information. (2) The convolution theorem allows one to mathematically convolve in the time domain by simply multiplying in the frequency domain. That is, if f(t) has the Fourier transform F(ω), and x(t) has the Fourier transform X(ω), then the convolution f(t)*x(t) has the Fourier transform F(ω)•X(ω).f(t) * x(t) ↔ F(ω) • X(ω)f(t) • x(t) ↔ F(ω) * X(ω) SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 7 Some Observations and Definitions 4 www.ti.com Some Observations and Definitions If Figure 3f or Figure 4b are re-examined it can be noted that the original spectrum Fp(ω), |ω| ≤ ωc, and its images Fp(ω), |ω| ≥ ωc, are non-overlapping. On the other hand Figure 5 illustrates spectral folding, overlapping or aliasing of the spectrum images into the original signal spectrum. This aliasing effect is, in fact, a result of undersampling and further causes the information of the original signal to be indistinguishable from its images (i.e. Figure 1e). From Figure 6 one can readily see that the signal is thus considered non-recoverable. The frequency |fc| of Figure 3f and Figure 4b is exactly one half the sampling frequency, fc=fs/2, and is defined as the Nyquist frequency (after Harry Nyquist of Bell Laboratories). It is also often called the aliasing frequency or folding frequency for the reasons discussed above. From this we can say that in order to prevent aliasing in a sampled-data system the sampling frequency should be chosen to be greater than twice the highest frequency component fc of the signal being sampled. By definition fs ≥ 2fc (20) Note, however, that no mention has been made to sample at precisely the Nyquist rate since in actual practice it is impossible to sample at fs = 2fc unless one can guarantee there are absolutely no signal components above fc. This can only be achieved by filtering the signal prior to sampling with a filter having infinite rolloff. . . a physical impossibility, see Figure 2. Figure 5. Spectral folding or aliasing caused by: (a) under sampling (b) exaggerated under sampling. 8 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem and Its Hardware www.ti.com Figure 6. Aliased spectral envelope (a) and (b) of Figure 5a and Figure 5b respectively. Figure 7. Generalized single channel sample data system. 5 The Sampling Theorem and Its Hardware 5.1 IMPLICATIONS Though there are numerous sophisticated techniques of implementation, it is appropriate to re-emphasize that the intent of this article is to give the first time user a basic and fundamental approach toward the design of a sampled-data system. The method with which to achieve this goal will be to introduce a few of the common perils encountered when implementing such a system. We begin by considering the generalized block diagram of Figure 7. As shown in Figure 7, prior to any signal processing manipulation the analog input signal must be preconditioned to prevent aliasing and thereafter digitized to logic signals usable by the logic function block. The antialiasing and digitizing functions are performed by an input filter and analog-to-digital converter respectively. Once digitized the signal can then be altered or processed and upon completion, reconstructed back to a continuous analog signal via a digital-to-analog converter followed by a smoothing filter. To this point no mention has been made concerning the sample and hold circuit block depicted in Figure 7. In general the analog-to-digital converter can operate as a stand alone unit. In many high speed operations however, the converter speed is insufficient and thus requires the assistance of a sample and hold circuit. This will be discussed in detail further in the article. 5.1.1 The Antialiasing Input Filter As indicated earlier in the text, the antialiasing filter should band-limit the input signal's spectrum to frequencies no greater than the Nyquist frequency. In the real world however, filters are non-ideal and have typical attenuation or band-limiting and phase characteristics as shown in Figure 8 . It must also be realized that true band-limiting of a specific frequency spectrum is not possible. In the sample data system band-limiting is achieved by attenuating those frequencies greater than the Nyquist frequency to a level undetectable or invisible to the system analog-to-digital (A/D) converter. This level would typically be less than the rms quantization noise level defined by the specific converter being used. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 9 The Sampling Theorem and Its Hardware www.ti.com (3) (4) As an example of how an antialiasing filter would be applied, assume a sample data system having within it an 8-bit A/D converter. Eight bits translates to 2n=28=256 levels of resolution. If a 2.56 volt reference were used each quantization level, q, would represent the equivalent of 2.56 volts/256=10 millivolts. Realizing this the antialiasing filter would be designed such that frequencies in the stopband were attenuated to less than the rms quantization noise level of and thus appearing invisible to the system. More specifically (21) It can be seen, for example in the Butterworth filter case (characterized as having a maximally flat passband) of Figure 9a that any order of filter may be used to achieve the −59 dB attenuation level, however, the higher the order, the faster the roll off rate and the closer the filter magnitude response will approach the ideal. Referring back to Figure 8 it is observed that those frequencies greater than ωa are not recognized by the A/D converter and thus the sampling frequency of the sample data system would be defined as ωs ≥ 2ωa. Additionally, the frequencies present within the filtered input signal would be those less than ωa. Note however, that the portion of the signal frequencies least distorted are those between ω=O and ωp and those within the transition band are distorted to a substantial degree, though it was originally desired to limit the signal to frequencies less than the cutoff ωp, because of the non-ideal frequency response the true Nyquist frequency occurred at ωa. We see then that the sampled-data system could at most be accurate for those frequencies within the antialiasing filter passband. From the above example, the design of an antialiasing filter appears to be quite straight forward. Recall however, that all waveforms are composed of the sums and differences of various frequency components and as a result, if the response of the filter passband were not flat for the desired signal frequency spectrum, the recovered signal would be an inaccurate summation of all frequency components altered by their relative attenuations in the pass-band. Additionally the antialiasing filter design should not neglect the effects of delay. As illustrated in Figure 8 and Figure 9b, delay time corresponds to a specific phase shift at a particular frequency. Similar to the flat pass-band consideration, if the phase shift of the filter is not exactly proportional to the frequency, the output of the filter will be a waveform in which the summation of all frequency components has been altered by shifts in their relative phase. Figure 9b further indicates that contrary to the roll off rate, the higher the filter order the more non-ideal the delay becomes (increased delay) and the result is a distorted output signal. A final and complex consideration to understand is the effects of sampling. When a signal is sampled the end effect is the multiplication of the signal by a unit sampling pulse train as recalled from Figure 3a, c and e. The resultant waveform has a spectrum that is the convolution of the signal spectrum and the spectrum of the unit sample pulse train, i.e. Figure 3b, d, and f. If the unit sample pulse has the classical sin X/X spectrum of a rectangular pulse, see Figure 13, then the convolution of the pulse spectrum with the signal spectrum would produce the non-ideal sampled signal spectrum shown in Figure 10a, b, and c. It should be realized that because of the band-limiting or filtering and delay response of the Sin X/X function combined with the effects of the non-ideal antialiasing filter (i.e. non-flat pass-band and phase shift) certain of the sum and difference frequency components may fall within the desired signal spectrum thereby creating aliasing errors, Figure 10c. When designing antialiasing filters it will be found that the closer the filter response approaches the ideal the more complex the filter becomes. Along with this an increase in delay and pass-band ripple combine to distort and alias the input signal. In the final analysis the design will involve trade offs made between filter complexity, sampling speed and thus system bandwidth. (3) (4) 10 In order not to disrupt the flow of the discussion a list of filter terms has been presented in Appendix A. For an explanation of quantization refer to section IV. B. of this article. AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem and Its Hardware www.ti.com (5) Figure 8. Typical filter magnitude and phase versus frequency response. a) Attenuation characteristics of a normalized Butterworth filter as a function of degree n. (5) This will be explained more clearly in Section IV. of this article. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 11 The Sampling Theorem and Its Hardware www.ti.com b) Group delay performances of normalized Butterworth lowpass filters as a function of degree n. Figure 9. Figure 10. (c) equals the convolution of (a) with (b). 5.1.2 The Analog-to-Digital Converter Following the antialiasing filter is the A/D converter which performs the operations of quantizing and coding the input signal in some finite amount of time. Figure 11 shows the quantization process of converting a continuous analog input signal into a set of discrete output levels. A quantization, q, is thus defined as the smallest step used in the digital 12 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem and Its Hardware www.ti.com representation of fq(n) where f(n) is the sample set of an input signal f(t) and is expressed by a finite number of bits giving the sequence fq(n). Digitally speaking q is the value of the least significant code bit. The difference signal ε(n) shown in Figure 11 is called quantization noise or error and can be defined as ε(n) = f(n) − fq(n). This error is an irreducible one and is a function of the quantizing process. Its error amplitude is dependent on the number of quantization levels or quantizer resolution and as shown, the maximum quantization error is |q/2|. Generally ε(n) is treated as a random error when described in terms of its probability density function, that is, all values of ε(n) between q/2 and −q/2 are equally probable, then for the average value ε(n)avg=0 and for the rms value As a side note it is appropriate at this point to emphasize that all analog signals have some form of noise corruption. If for example an input signal has a finite signal-to-noise ratio of 40dB it would be superfluous to select an A/D converter with a high number of bits. It may be realized that the use of a large number of bits does not give the digitized signal a higher signal-to-noise ratio than that of the original analog input signal. As a supportive argument one may say that though the quantization steps q are very small with respect to the peak input signal the lower order bits of the A/D converter merely provide a more accurate representation of the noise inherent in the analog input signal. Returning to our discussion, we define the conversion time as the time taken by the A/D converter to convert the analog input signal to its equivalent quantization or digital code. The conversion speed required in any particular application depends upon the time variation of the signal to be converted and the amount of resolution or bits, n, required. Though the antialiasing filter helps to control the input signal time rate of change by band-limiting its frequency spectrum, a finite amount of time is still required to make a measurement or conversion. This time is generally called the aperture time and as illustrated in Figure 12 produces amplitude measurement uncertainty errors. The maximum rate of change detectable by an A/D converter can simply be stated as (22) If for example V full scale = 10.24 volts, T conversion time = 10 ms, and n = 10 or 1024 bits of resolution then the maximum rate of change resolvable by the A/D converter would be 1 volt/sec. If the input signal has a faster rate of change than 1 volt/sec, 1 LSB changes cannot be resolved within the sampling period. In many instances a sample-and-hold circuit may be used to reduce the amplitude uncertainty error by measuring the input signal with a smaller aperture time than the conversion time aperture of the A/D converter. In this case the maximum rate of change resolvable by the sample-and-hold would be (23) Note also that the actual calculated rate of change may be limited by the slew rate specification fo the sample-and-hold in the track mode. Additionally it is very important to clarify that this does not imply violating the sampling theorem in lieu of the increased ability to more accurately sample signals having a fast time rate of change. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 13 The Sampling Theorem and Its Hardware www.ti.com Figure 11. Quantization error. ΔV: AMPLITUDE UNCERTAINTY ERROR ta: APERTURE TIME Δta: APERTURE TIME UNCERTAINTY Figure 12. Amplitude uncertainty as a function of (a) a nonvarying aperture and(b) aperture time uncertainty. An ideal sample-and-hold effectively takes a sample in zero time and with perfect accuracy holds the value of the sample indefinitely. This type of sampler is also known as a zero order hold circuit and its effect on a sample data system warrants some discussion. It is appropriate to recall the earlier discussion that the spectrum of a sampled signal is one in which the resultant spectrum is the product obtain by convolving the input signal spectrum with the sin X/X spectrum of the sampling waveform. Figure 13 illustrates the frequency spectrum plotted from the Fourier transform (24) of a rectangular pulse. The sin X/X form occurs frequently in modern communication theory and is commonly called the sampling function. The magnitude and phase of a typical zero order hold sampler spectrum (25) is shown in Figure 14 and Figure 15 illustrates the spectra of various sampler pulse-widths. The purpose of presenting this illustrative information is to give insight at to what effects cause the aliasing described in Figure 10. From Figure 15 it is realized that the main lobe of the sin X/X function varies inversely proportional with the sampler pulse-width. In other words a wide pulse-width, or in this case the aperture window, acts as a low pass filtering function and limits the amount of information resolvable by the sample 14 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback The Sampling Theorem and Its Hardware www.ti.com data system. On the other hand a narrow sampler pulse-width or aperture window has a broader main lobe or band-width and thus when convolved with the analog input signal produces the least amount of distortion. Understandably then the effect of the sampler's spectral phase and main lobe width must be considered when developing a sampling system so that no unexpected aliasing occurs from its convolution with the input signal spectrum. Figure 13. The Fourier transform of the rectangular pulse (a) is shown in (b). Figure 14. Sampling Pulse (a), its Magnitude (b) and Phase Response (c). SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 15 The Sampling Theorem and Its Hardware www.ti.com Figure 15. Pulse width and how it effects the sin X/X envelop spectrum (normalized amplitudes). 5.1.3 The Digital-to-Analog Converter and Smoothing Filter After a signal has been digitally conditioned by the signal processing unit of Figure 7, a D/A converter is used to convert the sampled binary information back in to an analog signal. The conversion is called a zero order hold type where each output sample level is a function of its binary weight value and is held until the next sample arrives, see Figure 16. As a result of the D/A converter step function response it is apparent that a large amount of undesirable high frequency energy is present. To eliminate this the D/A converter is usually followed by a smoothing filter, having a cutoff frequency no greater than half the sampling frequency. As its name suggests the filter output produces a smoothed version of the D/A converter output which in fact is a convolved function. More simply said, the spectrum of the resulting signal is the product of a step function sin X/X spectrum and the band-limited analog filter spectrum. Analogous to the input sampling problem, the smoothed output may have aliasing effects resulting from the phase and attenuation relations of the signal recovery system (defined as the D/A converter and smoothing filter combination). As a final note, the attenuation due to the D/A converter sin X/X spectrum shape may in some cases be compensated for in the signal processing unit by pre-processing using a digital filter with an inverse response X/sin X prior to D/A conversion. This allows an overall flat magnitude signal response to be smoothed by the final filter. 16 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback A Final Note www.ti.com Figure 16. (a) Processed signal data points (b) output of D/A converter (c) output of smoothing filter. 6 A Final Note This article began by presenting an intuitive development of the sampling theorem supported by a mathematical and illustrative proof. Following the theoretical development were a few of the unobvious and troublesome results that develop when trying to put the sampling theorem into practice. The purpose of presenting these thought provoking perils was to perhaps give the beginning designer some insight or guidelines for consideration when developing a sample data system's interface. 7 Acknowledgements The author wishes to thank James Moyer and Barry Siegel for their encouragement and the time they allocated for the writing of this article. 8 ARTICLE REFERENCES • • • • • • • • • • • • S.D. Stearns, Digital Signal Analysis, Hayden, 1975 S.A. Tretter, Introduction to Discrete-Time Signal Processing, Wiley, 1976 W.D. Stanley, Digital Signal Processing, Reston, 1975 A. Papoulis, The Fourier Integral and its Applications, Mc-Graw-Hill, 1962 E.A. Robinson, M. T. Silvia, Digital Signal Processing and Time Series Analysis, Holden-Day, 1978 C.E. Shannon, “Communication in the Presence of Noise,” Proceedings IRE, Vol. 37, pp. 10–21, Jan. 1949 M. Schwartz, L. Shaw, Signal Processing: Discrete Spectral Analysis, Detection and Estimation, McGraw-Hill, 1975 L.R. Rabiner, B. Gold, Theory and Application of Digital Signal Processing, Prentice-Hall, 1975 W.H. Hayt, J.E. Kemmerly, Engineering Circuit Analysis, McGraw-Hill, 3rd edition, 1978 E.O. Brigham, The Fast Fourier Transform, Prentice-Hall, 1974 J. Sherwin, Specifying A/D and D/A converters, National Semiconductor Corp., Application Note AN156 Analog-Digital Conversion Notes, Analog Devices Inc., 1974 SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 17 ARTICLE REFERENCES • 18 www.ti.com A.I. Zverev, Handbook of Filter Synthesis, Wiley, 1967 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback www.ti.com Appendix A Basic Filter Concepts A filter is a network used for separating signal waves on the basis of their frequency and is usually composed of passive, reactive and active elements such as resistors, capacitors, inductors, and amplifiers, or combinations thereof. There are basically five types of filters used to pass or reject such signals and they are defined as follows: 1. A low-pass filter passes a band of frequencies called the passband, ranging from zero frequency or DC to a certain cutoff frequency, ωc, and in addition has a maximum attenuation or ripple level of AMAX within the passband. See Figure 17. • Frequencies beyond the ωc may have an attenuation greater than AMAX but beyond a specific frequency ωs defined as the stopband frequency, a minimum attenuation of AMIN must prevail. The band of frequencies higher than ωs and maintaining attenuation greater than or equal to AMIN is called the stopband. The transition region or transition band is that band of frequencies between ωc and ωs. (6) Figure 17. Common Low Pass Filter Response A high-pass filter allows frequencies above the passband frequency, ωc, to pass and rejects frequencies below this point. AMAX must be maintained in the passband and frequencies equal to and below the stopband frequency, ωs, must have a minimum attenuation of AMIN. See Figure 18. Figure 18. Common High Pass Filter Response A bandpass filter performs the function of passing a specific band of frequencies while rejecting those frequencies above and below ωc2 and lower, ωc1 cutoff frequency limits. See Figure 19. As in the previous two cases the passband is required to sustain an attenuation of AMAX, and the stopband of frequencies above and below ωs2 and ωs2 respectively, must have a minimum attenuation of AMIN. (6) Recall that the radian frequency ω=2πf. SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated 19 Appendix A www.ti.com Figure 19. Common Band-pass Filter Response A band-reject filter or notch filter allows all but a specific band of frequencies to pass. As shown in Figure 4, those frequencies between ωs1 and ωs2 are filtered out and those frequencies above and below ωc2 and ωc1 respectively are passed. The attenuation requirements of the stopband AMIN and passband AMAX must still hold. Figure 20. Common Band-Reject Filter Response An all-pass or phase shift filter allows all frequencies to pass without any appreciable attenuation. It further introduces a predictable phase shift to all frequencies passed, though not restricting the entire range of frequencies to a specific phase shift (i.e., a phase shift may be imposed upon a selected band of frequencies and appear invisible to all others). 20 AN-236 An Introduction to the Sampling Theorem Copyright © 2004, Texas Instruments Incorporated SNAA079C – May 2004 – Revised May 2004 Submit Documentation Feedback IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed. TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in safety-critical applications. In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. Nonetheless, such components are subject to these terms. No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties have executed a special agreement specifically governing such use. Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of non-designated products, TI will not be responsible for any failure to meet ISO/TS16949. Products Applications Audio www.ti.com/audio Automotive and Transportation www.ti.com/automotive Amplifiers amplifier.ti.com Communications and Telecom www.ti.com/communications Data Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computers DLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-apps DSP dsp.ti.com Energy and Lighting www.ti.com/energy Clocks and Timers www.ti.com/clocks Industrial www.ti.com/industrial Interface interface.ti.com Medical www.ti.com/medical Logic logic.ti.com Security www.ti.com/security Power Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defense Microcontrollers microcontroller.ti.com Video and Imaging www.ti.com/video RFID www.ti-rfid.com OMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.com Wireless Connectivity www.ti.com/wirelessconnectivity Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2012, Texas Instruments Incorporated

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising