Professional Documents
Culture Documents
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.
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)
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.