• No results found

Time sampling transforms a continuous analog signal into a discrete time signal, a sequence of numbers denoted as x(n)= [x1, x2, x3, . . . xN],* Figure 1.16 (lower trace). Such a representation can be thought of as an array in computer memory.

(It can also be viewed as a vector as shown in the next chapter.) Note that the array position indicates a relative position in time, but to relate this number sequence back to an absolute time both the sampling interval and sampling onset time must be known. However, if only the time relative to conversion onset is important, as is frequently the case, then only the sampling interval needs to be

*In many textbooks brackets, [ ], are used to denote digitized variables; i.e., x[n]. Throughout this text we reserve brackets to indicate a series of numbers, or vector, following the MATLAB format.

Introduction 25

FIGURE1.16 A continuous signal (upper trace) is sampled at discrete points in time and stored in memory as an array of proportional numbers (lower trace).

known. Converting back to relative time is then achieved by multiplying the sequence number, n, by the sampling interval, Ts: x(t)= x(nTs).

Sampling theory is discussed in the next chapter and states that a sinusoid can be uniquely reconstructed providing it has been sampled by at least two equally spaced points over a cycle. Since Fourier series analysis implies that any signal can be represented is a series of sin waves (see Chapter 3), then by extension, a signal can be uniquely reconstructed providing the sampling fre-quency is twice that of the highest frefre-quency in the signal. Note that this highest frequency component may come from a noise source and could be well above the frequencies of interest. The inverse of this rule is that any signal that con-tains frequency components greater than twice the sampling frequency cannot be reconstructed, and, hence, its digital representation is in error. Since this error is introduced by undersampling, it is inherent in the digital representation and no amount of digital signal processing can correct this error. The specific nature of this under-sampling error is termed aliasing and is described in a discussion of the consequences of sampling in Chapter 2.

From a practical standpoint, aliasing must be avoided either by the use of very high sampling rates—rates that are well above the bandwidth of the analog system—or by filtering the analog signal before analog-to-digital conversion.

Since extensive sampling rates have an associated cost, both in terms of the

ADC required and memory costs, the latter approach is generally preferable.

Also note that the sampling frequency must be twice the highest frequency present in the input signal, not to be confused with the bandwidth of the analog signal. All frequencies in the sampled waveform greater than one half the sam-pling frequency (one-half the samsam-pling frequency is sometimes referred to as the Nyquist frequency) must be essentially zero, not merely attenuated. Recall that the bandwidth is defined as the frequency for which the amplitude is re-duced by only 3 db from the nominal value of the signal, while the sampling criterion requires that the value be reduced to zero. Practically, it is sufficient to reduce the signal to be less than quantization noise level or other acceptable noise level. The relationship between the sampling frequency, the order of the anti-aliasing filter, and the system bandwidth is explored in a problem at the end of this chapter.

Example 1.1. An ECG signal of 1 volt peak-to-peak has a bandwidth of 0.01 to 100 Hz. (Note this frequency range has been established by an official standard and is meant to be conservative.) Assume that broadband noise may be present in the signal at about 0.1 volts (i.e.,−20 db below the nominal signal level). This signal is filtered using a four-pole lowpass filter. What sampling frequency is required to insure that the error due to aliasing is less than−60 db (0.001 volts)?

Solution. The noise at the sampling frequency must be reduced another 40 db (20 * log (0.1/0.001)) by the four-pole filter. A four-pole filter with a cutoff of 100 Hz (required to meet the fidelity requirements of the ECG signal) would attenuate the waveform at a rate of 80 db per decade. For a four-pole filter the asymptotic attenuation is given as:

Attenuation= 80 log(f2/fc) db

To achieve the required additional 40 db of attenuation required by the problem from a four-pole filter:

80 log( f2/fc)= 40 log( f2/fc)= 40/80 = 0.5 f2/fc= 10.5 =; f2= 3.16 × 100 = 316 Hz

Thus to meet the sampling criterion, the sampling frequency must be at least 632 Hz, twice the frequency at which the noise is adequately attenuated.

The solution is approximate and ignores the fact that the initial attenuation of the filter will be gradual. Figure 1.17 shows the frequency response characteris-tics of an actual 4-pole analog filter with a cutoff frequency of 100 Hz. This figure shows that the attenuation is 40 db at approximately 320 Hz. Note the high sampling frequency that is required for what is basically a relatively low frequency signal (the ECG). In practice, a filter with a sharper cutoff, perhaps

Introduction 27

FIGURE1.17 Detailed frequency plot (on a log-log scale) of a 4-pole and 8-pole filter, both having a cutoff frequency of 100 Hz.

an 8-pole filter, would be a better choice in this situation. Figure 1.17 shows that the frequency response of an 8-pole filter with the same 100 Hz frequency provides the necessary attenuation at less than 200 Hz. Using this filter, the sampling frequency could be lowered to under 400 Hz.

FURTHER STUDY: BUFFERING