In
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner ar ...
, 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'').
[ 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
Density (volumetric mass density or specific mass) is the substance's mass per unit of volume. The symbol most often used for density is ''ρ'' (the lower case Greek letter rho), although the Latin letter ''D'' can also be used. Mathematicall ...
, as in the case of a photograph). For example, if compact disc
The compact disc (CD) is a digital optical disc data storage format that was co-developed by Philips and Sony to store and play digital audio recordings. In August 1982, the first compact disc was manufactured. It was then released in Octo ...
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 ''L'' 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 ''L'' − 1 zeros. A notation for this operation is:
#Interpolation: Smooth out the discontinuities with 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
Firs (''Abies'') are a genus of 48–56 species of evergreen coniferous trees in the family (biology), family Pinaceae. They are found on mountains throughout much of North America, North and Central America, Europe, Asia, and North Africa. The ...
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:
where the ''h'' sequence is the impulse response of the interpolation filter, and ''K'' is the largest value of ''k'' for which ''h'' 'j'' + ''kL''is non-zero. In the case ''L'' = 2, ''h'' 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 ''L'' form a subsequence, and there are ''L'' such subsequences (called phases) multiplexed together. Each of ''L'' phases of the impulse response is filtering the same sequential values of the ''x'' data stream and producing one of ''L'' 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 ''h'' array, and process the