Skip to content Skip to navigation

Connexions

You are here: Home » Content » Sampling, Up--Sampling, Down--Sampling, and Multi--Rate

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

Sampling, Up--Sampling, Down--Sampling, and Multi--Rate

Module by: C. Sidney Burrus

A very important and fundamental operation in discrete-time signal processing is that of sampling. Discrete-time signals are often obtained from continuous-time signal by simple sampling. This is mathematically modeled as the evaluation of a function of a real variable at discrete values of time Entry 16. Physically, it is a more complicated and varied process which might be modeled as convolution of the sampled signal by a narrow pulse or an inner product with a basis function or, perhaps, by some nonlinear process.

The sampling of continuous-time signals is reviewed in the recent books by Marks Entry 10 which is a bit casual with mathematical details, but gives a good overview and list of references. He gives a more advanced treatment in Entry 11. Some of these references are Entry 13, Entry 17, Entry 9, Entry 8, Entry 7, Entry 16, Entry 15. These will discuss the usual sampling theorem but also interpretations and extensions such as sampling the value and one derivative at each point, or of non uniform sampling.

Multirate discrete-time systems use sampling and sub sampling for a variety of reasons Entry 4, Entry 18. A very general definition of sampling might be any mapping of a signal into a sequence of numbers. It might be the process of calculating coefficients of an expansion using inner products. A powerful tool is the use of periodically time varying theory, particularly the bifrequency map, block formulation, commutators, filter banks, and multidimensional formulations. One current interest follows from the study of wavelet basis functions. What kind of sampling theory can be developed for signals described in terms of wavelets? Some of the literature can be found in Entry 1, Entry 6, Entry 12, Entry 5, Entry 2.

Another relatively new framework is the idea of tight frames Entry 5, Entry 19, Entry 2. Here signals are expanded in terms of an over determined set of expansion functions or vectors. If these expansions are what is called a tight frame, the mathematics of calculating the expansion coefficients with inner products works just as if the expansion functions were an orthonormal basis set. The redundancy of tight frames offers interesting possibilities. One example of a tight frame is an over sampled band limited function expansion.

Fourier Techniques

We first start with the most basic sampling ideas based on various forms of Fourier transforms Entry 14, Entry 3, Entry 19.

The Spectrum of a Continuous-Time Signal and the Fourier Transform

Although in many cases digital signal processing views the signal as simple sequence of numbers, here we are going to pose the problem as originating with a function of continuous time. The fundamental tool is the classical Fourier transform defined by

F ( ω ) = f ( t ) e - j ω t d t F ( ω ) = f ( t ) e - j ω t d t (1)

and its inverse

f ( t ) = 1 2 π F ( ω ) e j ω t d ω . f ( t ) = 1 2 π F ( ω ) e j ω t d ω . (2)

where j=-1j=-1. The Fourier transform of a signal is called its spectrum and it is complex valued with a magnitude and phase.

If the signal is periodic with period f(t)=f(t+P)f(t)=f(t+P), the Fourier transform does not exist as a function (it may as a distribution) therefore the spectrum is defined as the set of Fourier series coefficients

C ( k ) = 1 P 0 P f ( t ) e - j 2 π k t / P d t C ( k ) = 1 P 0 P f ( t ) e - j 2 π k t / P d t (3)

with the expansion having the form

f ( t ) = k C ( k ) e j 2 π k t / P . f ( t ) = k C ( k ) e j 2 π k t / P . (4)

The functions gk(t)=ej2πkt/Pgk(t)=ej2πkt/P form an orthogonal basis for periodic functions and (Equation 3) is the inner product C(k)=f(t),gk(t)C(k)=f(t),gk(t).

For the non-periodic case in (Equation 1) the spectrum is a function of continuous frequency and for the periodic case in (Equation 3), the spectrum is a number sequence (a function of discrete frequency).

The Spectrum of a Sampled Signal and the DTFT

The discrete-time Fourier transform (DTFT) as defined in terms samples of a continuous function is

F d ( ω ) = n f ( T n ) e - j ω T n F d ( ω ) = n f ( T n ) e - j ω T n (5)

and its inverse

f ( T n ) = T 2 π - π / T π / T F d ( ω ) e j ω T n d ω f ( T n ) = T 2 π - π / T π / T F d ( ω ) e j ω T n d ω (6)

can be derived by noting that Fd(ω)Fd(ω) is periodic with period P=2π/TP=2π/T and, therefore, it can be expanded in a Fourier series with (Equation 6) resulting from calculating the series coefficients using (Equation 3).

The spectrum of a discrete-time signal is defined as the DTFT of the samples of a continuous-time signal given in (Equation 5). Samples of the signal are given by the inverse DTFT in (Equation 6) but they can also be obtained by directly sampling f(t)f(t) in (Equation 2) giving

f ( T n ) = 1 2 π - F ( ω ) e j ω T n d ω f ( T n ) = 1 2 π - F ( ω ) e j ω T n d ω (7)

which can be rewritten as an infinite sum of finite integrals in the form

f ( T n ) = 1 2 π 0 2 π / T F ( ω + 2 π / T ) e j ( ω + 2 π / T ) T n d ω f ( T n ) = 1 2 π 0 2 π / T F ( ω + 2 π / T ) e j ( ω + 2 π / T ) T n d ω (8)
= 1 2 π 0 2 π / T F ( ω + 2 π / T ) e j ( ω + 2 π / T ) T n d ω = 1 2 π 0 2 π / T F ( ω + 2 π / T ) e j ( ω + 2 π / T ) T n d ω (9)

where Fp(ω)Fp(ω) is a periodic function made up of shifted versions of F(ω)F(ω) (aliased) defined in (Equation 10) Because (Equation 9) and (Equation 6) are equal for all TnTn and because the limits can be shifted by π/Tπ/T without changing the equality, the integrands are equal and we have

F d ( ω ) = 1 T F ( ω + 2 π / T ) = 1 T F p ( ω ) . F d ( ω ) = 1 T F ( ω + 2 π / T ) = 1 T F p ( ω ) . (10)

where Fp(ω)Fp(ω) is a periodic function made up of shifted versions of F(ω)F(ω) as in (Equation 9). The spectrum of the samples of f(t)f(t) is an aliased version of the spectrum of f(t)f(t) itself. The closer together the samples are taken, the further apart the centers of the aliased spectra are.

This result is very important in determining the frequency domain effects of sampling. It shows what the sampling rate should be and it is the basis for deriving the sampling theorem.

Samples of the Spectrum of a Sampled Signal and the DFT

Samples of the spectrum can be calculated from a finite number of samples of the original continuous-time signal using the DFT. If we let the length of the DFT be NN and separation of the samples in the frequency domain be ΔΔ and define the periodic functions

F p ( ω ) = F ( ω + N Δ ) F p ( ω ) = F ( ω + N Δ ) (11)

and

f p ( t ) = m f ( t + N T m ) f p ( t ) = m f ( t + N T m ) (12)

then from (Equation 62) and (Equation 10) samples of the DTFT of f(Tn)f(Tn) are

F p ( Δ k ) = T n f ( T n ) e - j T Δ n k F p ( Δ k ) = T n f ( T n ) e - j T Δ n k (13)
= T m n = 0 N - 1 f ( T n + T N m ) e - j Δ ( T n + T N m ) k = T m n = 0 N - 1 f ( T n + T N m ) e - j Δ ( T n + T N m ) k (14)
= T n = 0 N - 1 m f ( T n + T N m ) e - j Δ ( T n + T N m ) k , = T n = 0 N - 1 m f ( T n + T N m ) e - j Δ ( T n + T N m ) k , (15)

therefore,

F p ( Δ k ) = DFT { f p ( T n ) } F p ( Δ k ) = DFT { f p ( T n ) } (16)

if ΔTN=2πΔTN=2π. This formula gives a method for approximately calculating values of the Fourier transform of a function by taking the DFT (usually with the FFT) of samples of the function. This formula can easily be verified by forming the Riemann sum to approximate the integrals in (Equation 1) or (Equation 2).

Samples of the DTFT of a Sequence

If the signal is discrete in origin and is not a sampled function of a continuous variable, the DTFT is defined with T=1T=1 as

H ( ω ) = n h ( n ) e - j ω n H ( ω ) = n h ( n ) e - j ω n (17)

with an inverse

h ( n ) = 1 2 π - π π H ( ω ) e j ω n d ω . h ( n ) = 1 2 π - π π H ( ω ) e j ω n d ω . (18)

If we want to calculate H(ω)H(ω), we must sample it and that is written as

H ( Δ k ) = n h ( n ) e - j Δ k n H ( Δ k ) = n h ( n ) e - j Δ k n (19)

which after breaking the sum into an infinite sum of length-NN sums as was done in (Equation 15) becomes

H ( Δ k ) = m n = 0 N - 1 h ( n + N m ) e - j Δ k n H ( Δ k ) = m n = 0 N - 1 h ( n + N m ) e - j Δ k n (20)

if Δ=2π/NΔ=2π/N. This allows us to calculate samples of the DTFT by taking the DFT of samples of a periodized h(n)h(n).

H ( Δ k ) = DFT { h p ( n ) } . H ( Δ k ) = DFT { h p ( n ) } . (21)

This a combination of the results in (Equation 10) and in (Equation 16).

Fourier Series Coefficients from the DFT

If the signal to be analyzed is periodic, the Fourier integral in (Equation 1) does not converge to a function (it may to a distribution). This function is usually expanded in a Fourier series to define its spectrum or a frequency description. We will sample this function and show how to approximately calculate the Fourier series coefficients using the DFT of the samples.

Consider a periodic signal f˜(t)=f˜(t+P)f˜(t)=f˜(t+P) with NN samples taken every TT seconds to give Tn˜(t)Tn˜(t) for integer nn such that NT=PNT=P. The Fourier series expansion of f˜(t)f˜(t) is

f ˜ ( t ) = k = - C ( k ) e 2 π k t / P f ˜ ( t ) = k = - C ( k ) e 2 π k t / P (22)

with the coefficients given in (Equation 3). Samples of this are

f ˜ ( T n ) = k = - C ( k ) e 2 π k T n / P = k = - C ( k ) e 2 π k n / N f ˜ ( T n ) = k = - C ( k ) e 2 π k T n / P = k = - C ( k ) e 2 π k n / N (23)

which is broken into a sum of sums as

f ˜ ( T n ) = - k = 0 N - 1 C ( k + N ) e 2 π ( k + N ) n / N = k = 0 N - 1 - C ( k + N ) e 2 π k n / N . f ˜ ( T n ) = - k = 0 N - 1 C ( k + N ) e 2 π ( k + N ) n / N = k = 0 N - 1 - C ( k + N ) e 2 π k n / N . (24)

But the inverse DFT is of the form

f ˜ ( T n ) = 1 N k = 0 N - 1 F ( k ) e j 2 π n k / N f ˜ ( T n ) = 1 N k = 0 N - 1 F ( k ) e j 2 π n k / N (25)

therefore,

DFT { f ˜ ( T n ) } = N C ( k + N ) = N C p ( k ) . DFT { f ˜ ( T n ) } = N C ( k + N ) = N C p ( k ) . (26)

and we have our result of the relation of the Fourier coefficients to the DFT of a sampled periodic signal. Once again aliasing is a result of sampling.

Shannon's Sampling Theorem

Given a signal modeled as a real (sometimes complex) valued function of a real variable (usually time here), we define a bandlimited function as any function whose Fourier transform or spectrum is zero outside of some finite domain

| F ( ω ) | = 0 for | ω | > W | F ( ω ) | = 0 for | ω | > W (27)

for some W<W<. The sampling theorem states that if f(t)f(t) is sampled

f s ( n ) = f ( T n ) f s ( n ) = f ( T n ) (28)

such that T<2π/WT<2π/W, then f(t)f(t) can be exactly reconstructed (interpolated) from its samples fs(n)fs(n) using

f ( t ) = n = - f s ( n ) sin ( π t / T - π n ) π t / T - π n . f ( t ) = n = - f s ( n ) sin ( π t / T - π n ) π t / T - π n . (29)

This is more compactly written by defining the sinc function as

sinc ( x ) = sin ( x ) x sinc ( x ) = sin ( x ) x (30)

which gives the sampling formula ((Reference)) the form

f ( t ) = n f s ( n ) sinc ( π t / T - π n ) . f ( t ) = n f s ( n ) sinc ( π t / T - π n ) . (31)

The derivation of ((Reference)) or ((Reference)) can be done a number of ways. One of the quickest uses infinite sequences of delta functions and will be developed later in these notes. We will use a more direct method now to better see the assumptions and restrictions.

We first note that if f(t)f(t) is bandlimited and if T<2π/WT<2π/W then there is no overlap or aliasing in Fp(ω)Fp(ω). In other words, we can write (Equation 2) as

f ( t ) = 1 2 π - F ( ω ) e j ω t d ω = 1 2 π - π / T π / T F p ( ω ) e j ω t d ω f ( t ) = 1 2 π - F ( ω ) e j ω t d ω = 1 2 π - π / T π / T F p ( ω ) e j ω t d ω (32)

but

F p ( ω ) = F ( ω + 2 π / T ) = T n f ( T n ) e - j ω T n F p ( ω ) = F ( ω + 2 π / T ) = T n f ( T n ) e - j ω T n (33)

therefore,

f ( t ) = 1 2 π - π / T π / T T n f ( T n ) e - j ω T n e j ω t d ω f ( t ) = 1 2 π - π / T π / T T n f ( T n ) e - j ω T n e j ω t d ω (34)
= T 2 π n f