Acessibilidade / Reportar erro

The linear interpolation method: a sampling theorem approach

Abstracts

A lecture note introducing the sampling theorem as an interpolation method is presented. The relationship between piecewise linear approximation and the sampling theorem is highlighted by the use of triangular pulses instead of sampling functions. Furthermore, a comparison of the linear interpolation with a series on a nonorthogonal basis composed of equally spaced triangular pulses is provided. The interpolation uses the sample values of the function whereas the series coefficients are obtained by minimizing the quadratic error between the original function and the series.

Sampling theorem; interpolation; Fourier series; nonorthonormal basis


Uma aula sobre o teorema da amostragem como um método de interpolação é apresentada neste trabalho. A relação entre a interpolação linear e o teorema da amostragem é realçada pelo uso de pulsos triangulares aproximando funções sampling. Além disso, é feita uma comparação entre a interpolação linear e a série em uma base não ortogonal composta de pulsos triangulares igualmente espaçados. A interpolação usa os valores das amostras da função e os coeficientes da série são obtidos minimizando o erro quadrático entre a função original e a série.

Teorema da amostragem; interpolação; série de Fourier; bases não-ortonormais


The linear interpolation method: a sampling theorem approach

Pedro L. D. Peres; Ivanil S. Bonatti; Walter C. Borelli

Faculdade de Engenharia Elétrica e de Computação, Universidade Estadual de Campinas, CP 6101 13081-970, Campinas - SP - Brasil. peres@dt.fee.unicamp.br, ivanil@dt.fee.unicamp.br, borelli@dt.fee.unicamp.br

ABSTRACT

A lecture note introducing the sampling theorem as an interpolation method is presented. The relationship between piecewise linear approximation and the sampling theorem is highlighted by the use of triangular pulses instead of sampling functions. Furthermore, a comparison of the linear interpolation with a series on a nonorthogonal basis composed of equally spaced triangular pulses is provided. The interpolation uses the sample values of the function whereas the series coefficients are obtained by minimizing the quadratic error between the original function and the series.

Keywords: Sampling theorem, interpolation, Fourier series, nonorthonormal basis.

RESUMO

Uma aula sobre o teorema da amostragem como um método de interpolação é apresentada neste trabalho. A relação entre a interpolação linear e o teorema da amostragem é realçada pelo uso de pulsos triangulares aproximando funções sampling. Além disso, é feita uma comparação entre a interpolação linear e a série em uma base não ortogonal composta de pulsos triangulares igualmente espaçados. A interpolação usa os valores das amostras da função e os coeficientes da série são obtidos minimizando o erro quadrático entre a função original e a série.

Palavras-chave: Teorema da amostragem, interpolação, série de Fourier, bases não-ortonormais.

1 INTRODUCTION

The sampling theorem is usually interpreted as the result of an ideal filtering applied to a sequence of impulses modulated by the original signal values at specific instants of time (Burrus et al., 1998), (Carlson, 1975), (Chen, 1989), (Chui, 1997), (Kwakernaak and Sivan, 1991), (Lathi, 1965), (Rabiner and schafer, 1978), (Sinha, 1991), (Therrien, 1992).

As an alternative way to introduce the sampling theorem, consider the following classroom problem: a sequence of equally spaced points of an unknown function is given in a Cartesian plot and the students are required to draw the best approximation to the function. Since the function is not known, this problem has not a closed solution but a good result could be obtained if the interpolation via the sampling theorem was used (see equation (14)).

To overcome the difficulties of drawing the sampling function (defined as Sa(t) sin(t)/t), the students are instructed to use a triangular approximation given in figure 1. Following this strategy, the students can easily solve the problem by summing weighted equally spaced triangles (the result can be seen in figure 2). Surprised by this result, the students realized that this procedure is equivalent to simply joining adjacent points by line-segments.



Motivated by this classroom experiment, this paper is devoted to analyze the interpolation aspects of the sampling theorem in the context of Fourier series. In this sense, an alternative proof of the sampling theorem is provided, resulting from the projection of the signal on an orthogonal basis of sampling functions. It is important to emphasize that this proof is not usual in undergraduate textbooks, which in general prefer an interpretation coming from ideal filtering.

The paper is organized as follows: at first, the concept of orthogonal functions is presented and the proof of the sampling theorem is given. Next, using a triangular pulse as a convenient approximation of the sampling function, it is shown that the signal recovering is in fact the same as a linear interpolation. Furthermore, the coefficients of the actual orthogonal projection on a basis formed up by these triangular pulses are evaluated, in order to distinguish them from the sample values of the function (both approximations are linear, but only the former one minimizes the quadratic error).

2 PRELIMENARIES

An important problem in signal theory concerns the reconstruction of a signal from a given set of parameters, as for instance, the Fourier series coefficients or the samples of the signal equally spaced in time.

In order to construct a good series approximation for a class of signals, some error criterion must be assumed. Any positive decreasing monotonic function could be used, but an interesting one is the quadratic error measurement, which provides the orthogonal projection as the solution of a set of linear equations, as shown:

Consider {gk(t), k Î } an infinite dimensional set of real orthogonal signals, i.e.

where

{ 0, ±1, ±2, ...} and

The problem of reconstructing a given real signal f(t) can be formulated as

where

Note that á e2 (t) ñ is a quadratic function with respect to ck, thus a strictly convex function with a global minimum. The optimal solution is then

Observe that e(t) is orthogonal to all gk(t) elements of the basis.

3 INTERPOLATION METHD

Consider the set of orthogonal (with norm T) sampling functions

The projection of a signal f(t) on this set of functions can be done by determining the coefficients ck, that is

with

Since the integral of a function (from -¥ to ¥) can be computed as its Fourier transform at w = 0, one gets

where [·] is the Fourier transform of [·], G (w) is given by

and * denotes the convolution operator.

Then

If f(t) is band-limited, i.e. F(w) = 0 for ½ w ½> 2pB, B being the maximum frequency of the signal f(t), and also if T < 1/2B, i.e. the sampling rate is greater than the double of the maximum frequency of f(t), ck is given by

Note that equation (13) simply states that coefficients of the series in the sampling basis are the sample function values.

Finally,

proving the well known sampling theorem:

"A band-limited signal (with B Hz as maximum frequency) can be entirely recovered from its equally spaced samples whenever the sample period T is less than 1/2B".

It is worthwhile remarking that equation (14) is exactly the interpolation of f(t) obtained from the known values f(kT).

3.1 Linear Interpolation

In order to emphasize the interpolation aspects of the sampling theorem, the sampling function given in (7) might be approximated by a triangular pulse, that is

as shown in figure 1.

In this sense, to calculate

it suffices to draw straight lines connecting each pair of consecutive sample values of the function, as illustrated in the following example. Consider

yielding B = 1 Hz, and from the sampling theorem, T < 0.5 seconds. Figure 2 shows the resulting interpolation for a sample period fixed as T = 0.25 s.

Note that the linear interpolation with sample period T = 0.25 s. (satisfying the sampling theorem) produces a good approximation to f(t). Of course, the quality improves as T decreases. Figure 3 shows the interpolation when the sampling function is used. The quality of the sampling reconstruction decreases near to the edges of the interval due to the non computation of the contribution of the samples outside of the interval.


4 TRIANGULAR SERIES

The aim of this section is to determine the coefficients resulting from the orthogonal projection of a function f(t) on a set of triangular pulses, and to compare them with the actual sample values f(kT). Note that the set of triangular pulses is not an orthogonal basis. Indeed, defining for k, l Î

from the definition of Tri[·] (see equation (15)), one gets

The determination of the projection coefficients on a nonorthogonal basis is more involved than in the orthogonal case. To evaluate the coefficients, consider the problem of representing f(t) with a finite 2N+1 dimensional basis. The quadratic error is given by

where c is the vector of coefficients and g(t) is the vector of the basis functions (all vectors are column vectors, and x¢ is the transpose of x). Then, the minimization of the quadratic error yields

where RN g(t) g¢(t) ñ]. Note that, in the orthogonal case, RN is a diagonal matrix, implying that the coefficients calculation is completely decoupled (see equation (6)). For the triangular pulses series, RN always has three nonzero diagonal elements, since the triangular pulse overlaps only its adjacent pulses (see equation (19)). For example, R1 (a basis with 3 elements) is given by

The inverse matrix QN does not have the same structure, but (as it can be intuitively expected) its elements vanish as they become far apart from the main diagonal. It is possible to prove (see the appendix) that, as N ® +¥, the central row of QN converges.

For instance, c0 (the coefficient of g0(t)) is given by

where is the central row of matrix QN and a á f(t) g(t) á . When N ® +¥, qk can be obtained shifting q0 by k positions.

Consider again the problem of approximating f(t) given in equation (17) inside the interval [0,3], using the set of functions gk(t) as a nonorthogonal basis and T = 0.25. In order to obtain the coefficients ck, it suffices to determine the central row and to evaluate vector a inside an interval containing [0,3]. In fact, an edge effect always occurs, since the coefficients near the borders have been calculated without considering the contributions of the components of vector a outside the interval. Table 1 shows vectors , a and c for the example (only 13 nonzero elements were retained in row , discarding values lower than 10-3). The coefficients were computed by numerical integration using the trapezoidal method. Since the aim here is only to have a pictorial representation of the interpolation, values lower than 10-3 were neglected. Note that q0 is symmetric around the central value 6.928.

Figure 4 shows the signal recovered using the triangular basis. Note that the signal recovered does not necessarily fit exactly the sample values f(kT) and, moreover, the area between the actual function f(t) and its reconstruction is smaller than the corresponding area in figure 2.


It is clear that the reconstruction of f(t) (band-limited) on the basis composed of sampling functions is better than the recovering of f(t) using the triangular pulses basis. Although the coefficients of both series have been obtained by minimizing the quadratic error, the sampling functions define a complete set for band-limited signals, which is not the case for the basis composed of triangular pulses. However, a different class of signals, like piecewise linear functions with break-points occurring at kT instants of time can be completely represented by the triangular pulses basis.

5 CONCLUSION

The main point in this paper was to highlight the relationship between the sampling theorem and the linear interpolation process, using a convenient triangular pulse approximation for the sampling function.

The sample values f(kT) can be viewed as series coefficients on a basis of sampling functions. However, for the triangular series, the coefficients that minimize the quadratic error are not the sample values f(kT).

The calculation of the coefficients in the triangular basis is numerically involving, due to the nonorthogonality of the triangular pulses. The quadratic error is minimized, but the reconstruction of the function does not necessarily fit the signal at f(kT).

ACKNOWLEDGEMENT

This work was supported in part by "Conselho Nacional de Desenvolvimento Científico e Tecnológico" - CNPq, Brazil. The authors wish to thank the anonymous reviewers for their valuable suggestions.

Artigo submetido em 24/05/2001

1a. Revisão em 8/10/2002

2a. Revisão 21/10/2002

Aceito sob recomendação do Ed. Assoc. Prof. José R. C. Piqueira

APPENDIX: PROPERTY OF TRI-DIAGONAL MATRIX

Lemma: Consider the tri-diagonal matrix of dimension M given by

with b > 2. As N ® +¥, the central element aN of matrix converges to

Proof: The central element aN is given by

where dN is the determinant of matrix BN. Moreover,

with d1 = b and d2 = b2-1. The eigenvalues of equation (27) are

The solution of equation (27) is given by

Since

1 > 1 and 0 < 2 < 1, for N sufficiently large

implying that

  • Burrus, C. S., Gopinath, R. A. Guo, H. 1998 . Introduction to Wavelets and Wavelet Transformers: A Primer, Prentice-Hall, Englewood Cliffs, NJ.
  • Carlson, A. B. 1975 . Communication Systems, 2nd edn, McGraw-Hill, Tokyo, Japan.
  • Chen, C. T. 1989 . System and Signal Analysis, Saunders College Publishing, Orlando, FL.
  • Chui, C. K. 1997 . Wavelets: A Mathematical Tool for Signal Analysis, Society for Industrial and Applied Mathematics, Philadelphia, PA.
  • Kwakernaak, H. Sivan, R. 1991 . Modern Signals and Systems, Prentice-Hall, Englewood Cliffs, NJ.
  • Lathi, B. P. 1965 . Signals, Systems and Communication, John Wiley & Sons, New York, NY.
  • Oppenheim, A. V., Willsky, A. S. Young, I. T. 1983 . Signals and Systems, Prentice-Hall, Englewood Cliffs, NJ.
  • Rabiner, L. R. Schafer, R. W. 1978 . Digital Processing of Speech Signals, Prentice-Hall, Englewood Cliffs, NJ.
  • Sinha, N. K. 1991 . Linear Systems, John Wiley & Sons, New York, NY.
  • Therrien, C. W. 1992 . Discrete Random Signals and Statistical Signal Processing, Prentice-Hall, Englewood Cliffs, NJ.

Publication Dates

  • Publication in this collection
    15 Apr 2004
  • Date of issue
    Dec 2003

History

  • Accepted
    21 Oct 2002
  • Received
    24 May 2001
  • Reviewed
    08 Oct 2002
Sociedade Brasileira de Automática Secretaria da SBA, FEEC - Unicamp, BLOCO B - LE51, Av. Albert Einstein, 400, Cidade Universitária Zeferino Vaz, Distrito de Barão Geraldo, 13083-852 - Campinas - SP - Brasil, Tel.: (55 19) 3521 3824, Fax: (55 19) 3521 3866 - Campinas - SP - Brazil
E-mail: revista_sba@fee.unicamp.br