You are on page 1of 5

Center of Advanced Studies in

Engineering, Islamabad

Lab # 10
Decimation & Interpolation

Name of student: __________________________________________________________

Roll No.: ________________________________________________________________

Date of Experiment: _______________________________________________________

Report submitted on: _______________________________________________________

Marks obtained: ______________________

Instructor Signature: ______________________


Digital Signal Processing Lab

Decimation & Interpolation


1. Objective
1.1 Speech signal decimation with and without Aliasing filter.
1.2 Speech signal interpolation using Ideal Low pass filter.
2. Overview
2.1 Decimation
The process of decreasing the sampling rate is called decimation. Decimation is down
sampling with appropriate filtering. To decimate (downsample) a signal x[n] by a factor of M
implies collecting every Mth value of x[n] to a new signal. This is given by y[n]=x[Mn].
Downsampling by an integer factor M implies retaining one sample and discarding the
remaining M-1 samples and this is done for every M samples.
By downsampling, the sampling rate is also reduced so the Shannon-Nyquist sampling
theorem criterion is maintained. If the sampling theorem is not satisfied then the resulting digital
signal will have aliasing and to ensure that the sampling theorem is satisfied a low-pass filter is
used as an anti-aliasing filter to reduce the bandwidth of the signal before the signal is
downsampled.
Note that the anti-aliasing filter must be a low-pass filter in downsampling. This is
different from sampling a continuous signal, where either a low-pass filter or a band-pass filter
may be used. A bandpass signal, i.e. a band-limited signal whose minimum frequency is
different from zero, can be downsampled avoiding superposition of the spectra if we satisfy
certain conditions.

Let M denote the downsampling factor.


1. Filter the signal to ensure that the sampling theorem is satisfied. This filter should,
π
theoretically, be the sinc filter with frequency cutoff at . Let the filtered signal be
M
denoted g(k).
2. Reduce the data by picking out every Mth sample: h(k) = g(Mk). Data rate reduction
occurs in this step.

C@SE 2
Digital Signal Processing Lab

2.2 Interpolation
The process of increasing the sampling rate is called interpolation. Interpolation is
upsampling followed by appropriate filtering. y[n] obtained by interpolating x[n], is generally
represented as:

n
y[n] = x[ ]
L
The simplest method to interpolate by a factor of L is to add L-1 zeros in between the
samples, multiply the amplitude by L and filter the generated signal, with a so-called anti-
imaging low pass filter at the high sampling frequency.

The upsampled signal satisfies the Nyquist-Shannon sampling theorem if the original
signal does. Unlike in downsampling, which uses a low-pass filter as an anti-aliasing filter,
upsampling uses an interpolation filter, which also is a low-pass filter.

Let L denote the upsampling factor.


1. Add L-1 zeros between each sample in f(k). Or, equivalently define

 k k
 f   if is an integer
g ( x) =   L  L
0 otherwise

2. Filter with a low-pass filter, which, theoretically, should be the sinc

π
filter with frequency cut off at .The second step calls for the use of a
L
perfect low-pass filter, which is not implementable. When choosing a realizable low-
pass filter this will have to be considered and it will have aliasing effects.

Interpolator Block Diagram

3.

C@SE 3
Digital Signal Processing Lab

4. MATLAB Simulation
• Generate a sinusoid of 3 KHz at a sampling Frequency of 12 KHz.
• Write a MATLAB function that performs Interpolation.
• Write a MATLAB function that performs Decimation.
• Plot the original and decimated signal in both Time & Frequency Domain.

C@SE 4
Digital Signal Processing Lab

Center for Advance Studies in Engineering,


Islamabad
Digital Signal Processing
Lab 6

INSTRUCTOR VERIFICATION SHEET

Name: _____________________________ Roll No & Section.:


____________________

• Signal Generation

• Interpolation Fuction

• Decimation Function

Marks obtained: ______________________


Instructor Signature: ______________________
Date: ______________________

C@SE 5

You might also like