You are on page 1of 5

K. J.

Somaiya College of Engineering, Mumbai-77


(Autonomous College Affiliated to University of Mumbai)
Batch: B2 Roll No.: 1813086
Experiment / assignment / tutorial No.__4____
Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title: Multirate Signal Processing


AIM : Analysis of the spectrum of the up sampled version of the DT sequence
and retrieving new higher rate sequence by filtering process called Interpolation.
OUTCOME: Students will be able to Analyze and Realization of the LTI Discrete time
systems using Z transform and Use software tools for processing and analysis of discrete
time signals.

Theory: Following points should be included.


i) Purpose of having different sampling rate signals.
Since not all signals have same frequency, a frequent task in digital signal
processing is to adjust the sampling rate according to the signal of interest. Hence,
the sampling rate for different signals need to be different.
ii) How to obtain different sampling rate signals
We can obtain a discrete-time signal by sampling a continuous-time signal at equally
spaced time instants, tn = nTs x[n] = x(nTs) -∞ < n < ∞ • The individual values x[n]
are called the samples of the continuous time signal, x(t). • The fixed time interval
between samples, Ts, is also expressed in terms of a sampling rate fs (in samples per
second) such that: fs = 1/ Ts samples/sec.

iii) What is up sampling and down sampling in time domain and frequency
domain?
The process of converting the sampling rate of a digital signal from one rate to
another is Sampling Rate Conversion. Increasing the rate of already sampled signal
is Up sampling, whereas decreasing the rate is called down sampling.

iv) What is interpolation and decimation?


Interpolation. – Increase the sampling rate of a discrete-time signal
Decimation. – Reduce the sampling rate of a discrete-time signal. – Low sampling
rate reduces storage and computation requirements.

Method: Write a MATLAB program

Department of Electronics and Telecommunication Engineering

DSP/Aug-Dec 2020 Page No


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)
Part A) To analyze spectrum of up sampled version of DT signal.
1. Generate a sinusoidal signal X(n) = sin(2 *pi*Fo*n) for n= 0:N-1.(say
N=512)
2. Generate up sampled signal Y(n) by up sampling factor L (say L= 3)
3. Plot X(n) and Y(n) .
4. Find spectrum of x(n)
5. Find spectrum of Y(n)
1. Generate interpolated sequence Y (n) of signal X(n) in Part A) 1.
(Use command interp(X,L).)
2. Plot X(n) and Y(n).
Observations: Part A:
1. spectrum of x(n)
2. spectrum of Y(n)
Part B:
1. Plot Y(n) and X(n)
Attach printout of code & output

Interpolation:

clc;
clear all;
n=0:1:512;

x=sin(2*3.14*250*n);
subplot(3,1,1)
stem(0:50,x(1:51))
title("original samples")
xlabel("samples")
ylabel("magnitude")

x1=upsample(x,3)
subplot(3,1,2)
stem(0:150,x1(1:151))
title("up sampled by factor of 3")
xlabel("samples")
ylabel("magnitude")

x2=interp(x,3)
subplot(3,1,3)
stem(0:150,x2(1:151))
title("interpolation by factor of 3")
xlabel("samples")
ylabel("magnitude")

fvtool(x)
fvtool(x1)
fvtool(x2)

Department of Electronics and Telecommunication Engineering

DSP/Aug-Dec 2020 Page No


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

Department of Electronics and Telecommunication Engineering

DSP/Aug-Dec 2020 Page No


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

Important MATLAB functions Used with brief description:

interp(X,L)
y = interp(x,r) increases the sample rate of x, the input signal, by a factor of r.
Interpolated signal, returned as a vector. y is r times as long as the original input, x.

Observation:
The original signal has a frequency or is sampled at a frequency of 250 Hz. The
original signal is then up-sampled, and interpolated. All the processes are performed by
a factor of 3. In case of the up-sampling, extra samples are added between the original
signal. The value of these samples is zero. The number of samples added between two
original samples is one less than the sampling rate. This in a way is an expansion of the
signal. In interpolation, it is very similar to up-sampling, the only difference is that the
samples added are not zero, but they have a certain value. These values are usually
lying between the two-original sample. This too results in expansion of the signal.

Department of Electronics and Telecommunication Engineering

DSP/Aug-Dec 2020 Page No


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)
Conclusion:
We took a discrete time signal initially and then performed various sampling condition
on them. We observed the three up sampled, and interpolated signals. We also plotted
the frequency response of all the plots and then compared them. We learnt about
various sampling condition and learnt their uses.

Signature of faculty in-charge

Department of Electronics and Telecommunication Engineering

DSP/Aug-Dec 2020 Page No

You might also like