Upsampling

Last updated

In digital signal processing, upsampling, expansion, and interpolation are terms associated with the process of resampling in a multi-rate digital signal processing system. Upsampling can be synonymous with expansion, or it can describe an entire process of expansion and filtering (interpolation). [1] [2] [3] When upsampling is performed on a sequence of samples of a signal or other continuous function, it produces an approximation of the sequence that would have been obtained by sampling the signal at a higher rate (or density, as in the case of a photograph). For example, if compact disc audio at 44,100 samples/second is upsampled by a factor of 5/4, the resulting sample-rate is 55,125.

Contents

Fig 1: Depiction of one dot product, resulting in one output sample (in green), for the case L=4, n=9, j=3. Three conceptual "inserted zeros" are depicted between each pair of input samples. Omitting them from the calculation is what distinguishes a multirate filter from a monorate filter. Multirate upsampling (interpolation) filter.svg
Fig 1: Depiction of one dot product, resulting in one output sample (in green), for the case L=4, n=9, j=3. Three conceptual "inserted zeros" are depicted between each pair of input samples. Omitting them from the calculation is what distinguishes a multirate filter from a monorate filter.

Upsampling by an integer factor

Rate increase by an integer factor can be explained as a 2-step process, with an equivalent implementation that is more efficient: [4]

  1. Expansion: Create a sequence, comprising the original samples, separated by zeros.  A notation for this operation is: 
  2. Interpolation: Smooth out the discontinuities using a lowpass filter, which replaces the zeros.

In this application, the filter is called an interpolation filter, and its design is discussed below. When the interpolation filter is an FIR type, its efficiency can be improved, because the zeros contribute nothing to its dot product calculations. It is an easy matter to omit them from both the data stream and the calculations. The calculation performed by a multirate interpolating FIR filter for each output sample is a dot product: [lower-alpha 1]

  and for any

 

 

 

 

(Eq.1)

where the sequence is the impulse response of the interpolation filter, and is the largest value of for which is non-zero.

Derivation of Eq.1

The interpolation filter output sequence is defined by a convolution:

The only terms for which can be non-zero are those for which is an integer multiple of   Thus:  for integer values of   and the convolution can be rewritten as:


In the case   function can be designed as a half-band filter, where almost half of the coefficients are zero and need not be included in the dot products. Impulse response coefficients taken at intervals of form a subsequence, and there are such subsequences (called phases) multiplexed together. Each of phases of the impulse response is filtering the same sequential values of the data stream and producing one of sequential output values. In some multi-processor architectures, these dot products are performed simultaneously, in which case it is called a polyphase filter.

For completeness, we now mention that a possible, but unlikely, implementation of each phase is to replace the coefficients of the other phases with zeros in a copy of the array, and process the   sequence at times faster than the original input rate. Then of every outputs are zero. The desired sequence is the sum of the phases, where terms of the each sum are identically zero.  Computing zeros between the useful outputs of a phase and adding them to a sum is effectively decimation. It's the same result as not computing them at all. That equivalence is known as the second Noble identity. [5] It is sometimes used in derivations of the polyphase method.

Interpolation filter design

Fig 2: The first triangle of the first graph represents the Fourier transform X(f) of a continuous function x(t). The entirety of the first graph depicts the discrete-time Fourier transform of a sequence x[n] formed by sampling the continuous function x(t) at a low-rate of 1/T. The second graph depicts the application of a lowpass filter at a higher data-rate, implemented by inserting zero-valued samples between the original ones. And the third graph is the DTFT of the filter output. The bottom table expresses the maximum filter bandwidth in various frequency units used by filter design tools. Spectral views of zero-fill and interpolation by lowpass filtering.pdf
Fig 2: The first triangle of the first graph represents the Fourier transform X(f) of a continuous function x(t). The entirety of the first graph depicts the discrete-time Fourier transform of a sequence x[n] formed by sampling the continuous function x(t) at a low-rate of 1/T. The second graph depicts the application of a lowpass filter at a higher data-rate, implemented by inserting zero-valued samples between the original ones. And the third graph is the DTFT of the filter output. The bottom table expresses the maximum filter bandwidth in various frequency units used by filter design tools.

Let be the Fourier transform of any function, whose samples at some interval, equal the sequence. Then the discrete-time Fourier transform (DTFT) of the sequence is the Fourier series representation of a periodic summation of [lower-alpha 2]

 

 

 

 

(Eq.2)

When has units of seconds, has units of hertz (Hz). Sampling times faster (at interval ) increases the periodicity by a factor of [lower-alpha 3]

 

 

 

 

(Eq.3)

which is also the desired result of interpolation. An example of both these distributions is depicted in the first and third graphs of Fig 2. [lower-alpha 4]

When the additional samples are inserted zeros, they decrease the sample-interval to Omitting the zero-valued terms of the Fourier series, it can be written as:

which is equivalent to Eq.2, regardless of the value of That equivalence is depicted in the second graph of Fig.2. The only difference is that the available digital bandwidth is expanded to , which increases the number of periodic spectral images within the new bandwidth. Some authors describe that as new frequency components. [6]   The second graph also depicts a lowpass filter and resulting in the desired spectral distribution (third graph). The filter's bandwidth is the Nyquist frequency of the original sequence. [upper-alpha 1]   In units of Hz that value is   but filter design applications usually require normalized units. (see Fig 2, table)

Upsampling by a fractional factor

Let L/M denote the upsampling factor, where L > M.

  1. Upsample by a factor of L
  2. Downsample by a factor of M

Upsampling requires a lowpass filter after increasing the data rate, and downsampling requires a lowpass filter before decimation. Therefore, both operations can be accomplished by a single filter with the lower of the two cutoff frequencies. For the L > M case, the interpolation filter cutoff,  cycles per intermediate sample, is the lower frequency.

See also

Notes

  1. Realizable low-pass filters have a transition band where the response diminishes from near unity to near zero. So in practice the cutoff frequency is placed far enough below the theoretical cutoff that the filter's transition band is contained below the theoretical cutoff.

Page citations

  1. Crochiere and Rabiner "2.3". p 38. eq 2.80, where    which also requires    and  
  2. f.harris 2004. "2.2". p 23. fig 2.12 (top).
  3. f.harris 2004. "2.2". p 23. fig 2.12 (bottom).
  4. Li Tan 2008. "12.1.2". fig 12-5B.

Related Research Articles

<span class="mw-page-title-main">Nyquist–Shannon sampling theorem</span> Sufficiency theorem for reconstructing signals from samples

The Nyquist–Shannon sampling theorem is an essential principle for digital signal processing linking the frequency range of a signal and the sample rate required to avoid a type of distortion called aliasing. The theorem states that the sample rate must be at least twice the bandwidth of the signal to avoid aliasing. In practice, it is used to select band-limiting filters to keep aliasing below an acceptable amount when an analog signal is sampled or when sample rates are changed within a digital signal processing function.

A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filter design. The filter is sometimes called a high-cut filter, or treble-cut filter in audio applications. A low-pass filter is the complement of a high-pass filter.

The Whittaker–Shannon interpolation formula or sinc interpolation is a method to construct a continuous-time bandlimited function from a sequence of real numbers. The formula dates back to the works of E. Borel in 1898, and E. T. Whittaker in 1915, and was cited from works of J. M. Whittaker in 1935, and in the formulation of the Nyquist–Shannon sampling theorem by Claude Shannon in 1949. It is also commonly called Shannon's interpolation formula and Whittaker's interpolation formula. E. T. Whittaker, who published it in 1915, called it the Cardinal series.

<span class="mw-page-title-main">Aliasing</span> Signal processing effect

In signal processing and related disciplines, aliasing is the overlapping of frequency components resulting from a sample rate below the Nyquist rate. This overlap results in distortion or artifacts when the signal is reconstructed from samples which causes the reconstructed signal to differ from the original continuous signal. Aliasing that occurs in signals sampled in time, for instance in digital audio or the stroboscopic effect, is referred to as temporal aliasing. Aliasing in spatially sampled signals is referred to as spatial aliasing.

<span class="mw-page-title-main">Sampling (signal processing)</span> Measurement of a signal at discrete time intervals

In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or space; this definition differs from the term's usage in statistics, which refers to a set of such values.

<span class="mw-page-title-main">Sinc filter</span> Ideal low-pass filter or averaging filter

In signal processing, a sinc filter can refer to either a sinc-in-time filter whose impulse response is a sinc function and whose frequency response is rectangular, or to a sinc-in-frequency filter whose impulse response is rectangular and whose frequency response is a sinc function. Calling them according to which domain the filter resembles a sinc avoids confusion. If the domain is unspecified, sinc-in-time is often assumed, or context hopefully can infer the correct domain.

<span class="mw-page-title-main">Undersampling</span> Signal processing sample technique

In signal processing, undersampling or bandpass sampling is a technique where one samples a bandpass-filtered signal at a sample rate below its Nyquist rate, but is still able to reconstruct the signal.

<span class="mw-page-title-main">Bandlimiting</span> Limiting a signal to contain only low-frequency components

Bandlimiting refers to a process which reduces the energy of a signal to an acceptably low level outside of a desired frequency range.

In mathematics, the discrete-time Fourier transform (DTFT) is a form of Fourier analysis that is applicable to a sequence of discrete values.

In digital signal processing, downsampling, compression, and decimation are terms associated with the process of resampling in a multi-rate digital signal processing system. Both downsampling and decimation can be synonymous with compression, or they can describe an entire process of bandwidth reduction (filtering) and sample-rate reduction. When the process is performed on a sequence of samples of a signal or a continuous function, it produces an approximation of the sequence that would have been obtained by sampling the signal at a lower rate.

In signal processing, oversampling is the process of sampling a signal at a sampling frequency significantly higher than the Nyquist rate. Theoretically, a bandwidth-limited signal can be perfectly reconstructed if sampled at the Nyquist rate or above it. The Nyquist rate is defined as twice the bandwidth of the signal. Oversampling is capable of improving resolution and signal-to-noise ratio, and can be helpful in avoiding aliasing and phase distortion by relaxing anti-aliasing filter performance requirements.

<span class="mw-page-title-main">Filter bank</span> Tool for Digital Signal Processing

In signal processing, a filter bank is an array of bandpass filters that separates the input signal into multiple components, each one carrying a sub-band of the original signal. One application of a filter bank is a graphic equalizer, which can attenuate the components differently and recombine them into a modified version of the original signal. The process of decomposition performed by the filter bank is called analysis ; the output of analysis is referred to as a subband signal with as many subbands as there are filters in the filter bank. The reconstruction process is called synthesis, meaning reconstitution of a complete signal resulting from the filtering process.

The fast wavelet transform is a mathematical algorithm designed to turn a waveform or signal in the time domain into a sequence of coefficients based on an orthogonal basis of small finite waves, or wavelets. The transform can be easily extended to multidimensional signals, such as images, where the time domain is replaced with the space domain. This algorithm was introduced in 1989 by Stéphane Mallat.

In a mixed-signal system, a reconstruction filter, sometimes called an anti-imaging filter, is used to construct a smooth analog signal from a digital input, as in the case of a digital to analog converter (DAC) or other sampled data output device.

<span class="mw-page-title-main">Lanczos resampling</span> Application of a mathematical formula

Lanczos filtering and Lanczos resampling are two applications of a mathematical formula. It can be used as a low-pass filter or used to smoothly interpolate the value of a digital signal between its samples. In the latter case, it maps each sample of the given signal to a translated and scaled copy of the Lanczos kernel, which is a sinc function windowed by the central lobe of a second, longer, sinc function. The sum of these translated and scaled kernels is then evaluated at the desired points.

Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate or sampling frequency of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application areas include image scaling and audio/visual systems, where different sampling rates may be used for engineering, economic, or historical reasons.

The zero-order hold (ZOH) is a mathematical model of the practical signal reconstruction done by a conventional digital-to-analog converter (DAC). That is, it describes the effect of converting a discrete-time signal to a continuous-time signal by holding each sample value for one sample interval. It has several applications in electrical communication.

In rotordynamics, order tracking is a family of signal processing tools aimed at transforming a measured signal from time domain to angular domain. These techniques are applied to asynchronously sampled signals to obtain the same signal sampled at constant angular increments of a reference shaft. In some cases the outcome of the Order Tracking is directly the Fourier transform of such angular domain signal, whose frequency counterpart is defined as "order". Each order represents a fraction of the angular velocity of the reference shaft.

Multidimensional Multirate systems find applications in image compression and coding. Several applications such as conversion between progressive video signals require usage of multidimensional multirate systems. In multidimensional multirate systems, the basic building blocks are decimation matrix (M), expansion matrix(L) and Multidimensional digital filters. The decimation and expansion matrices have dimension of D x D, where D represents the dimension. To extend the one dimensional (1-D) multirate results, there are two different ways which are based on the structure of decimation and expansion matrices. If these matrices are diagonal, separable approaches can be used, which are separable operations in each dimension. Although separable approaches might serve less complexity, non-separable methods, with non-diagonal expansion and decimation matrices, provide much better performance. The difficult part in non-separable methods is to create results in MD case by extend the 1-D case. Polyphase decomposition and maximally decimated reconstruction systems are already carried out.

This article provides a short survey of the concepts, principles and applications of Multirate Filter Banks and Multidimensional Directional Filter Banks.

References

  1. Oppenheim, Alan V.; Schafer, Ronald W.; Buck, John R. (1999). "4.6.2" . Discrete-Time Signal Processing (2nd ed.). Upper Saddle River, N.J.: Prentice Hall. p. 172. ISBN   0-13-754920-2.
  2. Crochiere, R.E.; Rabiner, L.R. (1983). "2.3". Multirate Digital Signal Processing. Englewood Cliffs, NJ: Prentice-Hall. pp. 35–36. ISBN   0136051626.
  3. Poularikas, Alexander D. (September 1998). Handbook of Formulas and Tables for Signal Processing (1 ed.). CRC Press. pp. 42–48. ISBN   0849385792.
  4. Harris, Frederic J. (2004-05-24). "2.2". Multirate Signal Processing for Communication Systems. Upper Saddle River, NJ: Prentice Hall PTR. pp. 20–21. ISBN   0131465112. The process of up sampling can be visualized as a two-step progression. The process starts by increasing the sample-rate of an input series x(n) by resampling [expansion]. The zero-packed time series is processed by a filter h(n). In reality the processes of sample-rate increase and bandwidth reduction are merged in a single process called a multirate filter.
  5. Strang, Gilbert; Nguyen, Truong (1996-10-01). Wavelets and Filter Banks (2 ed.). Wellesley, MA: Wellesley-Cambridge Press. p.  101. ISBN   0961408871. the Noble Identities apply to each polyphase component ... they don't apply to the whole filter.
  6. Lyons, Rick (2015-03-23). "Why Time-Domain Zero Stuffing Produces Multiple Frequency-Domain Spectral Images". dsprelated.com. Archived from the original on 2023-09-30. Retrieved 2024-01-31.
  1. Tan, Li (2008-04-21). "Upsampling and downsampling". eetimes.com. EE Times. Retrieved 2024-03-22.

Further reading