Upsampling
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. 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. 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.
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:- Expansion: Create a sequence, comprising the original samples, separated by zeros. A notation for this operation is:
- Interpolation: Smooth out the discontinuities using a lowpass filter, which replaces the zeros.
where the sequence is the impulse response of the interpolation filter, and is the largest value of for which is non-zero.
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 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. It is sometimes used in derivations of the polyphase method.
Interpolation filter design
Let be the continuous [Fourier transform|Fourier transform] of any function, whose samples at some interval, equal the sequence. Then the discrete-time Fourier transform of the sequence is the Fourier series representation of a periodic summation ofWhen has units of seconds, has units of hertz (Hz). Sampling times faster increases the periodicity by a factor of
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.
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 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. The second graph also depicts a lowpass filter and resulting in the desired spectral distribution. The filter's bandwidth is the Nyquist frequency of the original sequence. In units of Hz that value is but filter design applications usually require normalized units.
Upsampling by a fractional factor
Let L/''M denote the upsampling factor, where L'' > M.- Upsample by a factor of L
- Downsample by a factor of M