• Tidak ada hasil yang ditemukan

Sampling theorem

Dalam dokumen Embedded Systems (Halaman 185-190)

Sample-and-hold circuits

3.6 Output

3.6.2 Sampling theorem

Figure 3.45. Step function y(t)generated from signal e3(t)(eq.3.3) sampled at integer times

D/A-converters enable a conversion from time- and value-discrete signals to signals in the continuous time and value domain. However, neither y(t) nor y(t)reflect the values of the input signal in-between the sampling instances.

However, there could be some kind of smart interpolation computing values in-between the sampling instances from the values at sampling instances. And indeed, sampling theory [Oppenheim et al., 2009] tells us that a correspond- ing time-continuous signal z(t)can be constructed from the sequence y(t)of analog values.

Let{ts},s=...,−1,0,1,2, ...be the times at which we sample our input signal.

Let us assume a constant sampling rate of fs= p1

s (∀s : ps=ts+1−ts). Then, sampling theory tells us that we can approximate e(t)from y(t)as follows:

z(t) =

s=

y(ts)sinpπ

s(t−ts)

π

ps(t−ts) (3.24)

This equation is known as the Shannon-Whittaker interpolation. y(ts)is the contribution of signal y at sampling instance ts. The influence of this contribu- tion decreases the further t is away from ts. The decrease follows a weighting factor, also known as the sinc function:

sinc(t−ts) = sin(pπ

s(t−ts))

π

ps(t−ts) (3.25)

which decreases non-monotonically as a function of|t−ts|. This weighting factor is used to compute values in-between the sampling instances. Fig.3.46 shows the weighting factor for the case ps=1.

Figure 3.46. Visualization of eq.3.25used for interpolation

Using the sinc function, we can compute the terms of the sum in eq. 3.24.

Fig.3.47and fig.3.48show the resulting terms if e(t) =e3(t)and processing performs the identify function (x(t) =w(t)).

Figure 3.47. y(t)(solid line) and the first three terms of eq.3.24

Figure 3.48. y(t)(solid line) and the last three non-zero terms of eq.3.24

At each of the sampling instances ts(integer times in our case), z(ts) is com- puted just from the corresponding value y(ts), since the sinc function is zero in this case for all other sampled values. In between the sampling instances, all of the adjacent discrete values contribute to the resulting value of z(t). Fig.3.49 shows the resulting z(t) if e(t) =e3(t) and processing performs the identify function (x(t) =w(t)).

Figure 3.49. e3(t)(solid), z(t)(dotted), y(t)(dashed)

The figure includes signals e3(t)(solid line), z(t)(dotted line), and y(t)(dashed line). z(t)is based on summing up the contributions of all sampling instances shown in the diagrams3.47and3.48. e3(t)and z(t)are very similar.

How close could we get to the original input signal by implementing equation 3.24? Sampling theory tells us (see, for example, [Oppenheim et al., 2009]), that equation3.24computes an exact approximation, if the sampling crite- rion (equation3.8) is met. Therefore, let us see how we can implement equa- tion3.24.

How do we compute equation3.24in an electronic system? We cannot com- pute this equation in the discrete time domain using a digital signal processor for this, since this computation has to generate a time-continuous signal. Com- puting such a complex equation with analog circuits seems to be difficult at first sight.

Fortunately, the required computation is a so-called folding operation between signal y(t)and the sinc-function. According to the classical theory of Fourier transforms, a folding operation in the time domain is equivalent to a multipli- cation with frequency-dependent filter function in the frequency domain. This filter function is the Fourier transform of the corresponding function in the time domain. Therefore, equation3.24can be computed with some appropriate fil- ter. Fig.3.50shows the corresponding placement of the filter.

The remaining question is: which frequency-dependent filter function is the Fourier transform of the sinc-function? Computing the Fourier transform of the sinc-function yields a low-pass filter function [Oppenheim et al., 2009].

So, “all” we must do to compute equation3.24is to pass signal y(t)through

Figure 3.50. Converting signals e(t)from the analog time and value domain to the digital domain and back

a low-pass filter, filtering frequencies as shown for the “ideal filter” in fig.

3.51. Note that the representation of function y(t) as a sum of sine waves would require very high frequency components, making such a filtering non- redundant, even though we have already assumed an anti-aliasing filter to be present at the input.

Figure 3.51. Low-pass filter: ideal (dashed) and realistic (solid)

There is still one problem, though: ideal low-pass filters do not exist. There- fore, we must live with compromises and design filters approximating the low pass filter characteristics. Actually, we must live with several imperfections preventing a precise reconstruction of the input signals:

Ideal low pass filters cannot be designed. Therefore, we must use approxi- mations of such filters. Designing good compromises is an art (performed extensively, for example, for audio equipment).

For the same reason, we cannot completely remove input frequencies be- yond the Nyquist frequency.

The impact of value quantization is visible in fig.3.49. Due to value quan- tization, e3(t)is sometimes different from z(t). Quantization noise, as in- troduced by A/D-converters, cannot be removed during output generation.

Signal w(t)from the output of the A/D-converter will remain distorted by the quantization noise. However, this effect does not affect the signal h(t) from the output of sample-and-hold circuits.

Equation 3.24is based on an infinite sum, involving also values at future instances in time. In practice, we can delay signals by some finite amount

to know a finite number of “future” samples. Infinite delays are impossible.

In fig.3.49, we did not consider contributions of sampling instances outside the diagram.

The functionality provided by low-pass filters demonstrates the power of ana- log circuits: there would be no way of implementing the behavior of analog filters in the digital domain, due to the inherent restriction to discretized time and values.

Many authors have contributed to sampling theory. Therefore, many names can be associated with the sampling theorem. Contributors include Shannon, Whit- taker, Kotelnikov, Nyquist, K¨upfm¨uller, and others. Therefore, the fact that the original signal can be reconstructed should simply be called the sampling the- orem, since there is no way of attaching all names of relevant contributors to the theorem.

Dalam dokumen Embedded Systems (Halaman 185-190)