You are on page 1of 4

Experiment No.

Aim: To study the effect of down sampling in the frequency domain & perform it susing
‘SCILAB’ software.
Software: - SCILAB
Theory:
In digital signal processing, decimation is the process of reducing the sampling rate of
a signal. The term downsampling usually refers to one step of the process, but sometimes the
terms are used interchangeably. Complementary to upsampling, which increases sampling
rate, decimation is a specific case of sample rate conversion in a multi-rate digital signal
processing system. A system component that performs decimation is called a decimator.

When decimation 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 lower rate (or density, as in the case of a photograph).
The decimation factor is usually an integer or a rational fraction greater than one. This factor
multiplies the sampling interval or, equivalently, divides the sampling rate. For example,
if compact disc audio at 44,100 samples/second is decimated by a factor of 5/4, the resulting
sample rate is 35,280.

Downsampling by an integer factor:

Decimation by an integer factor, M, can be explained as a 2-step process, with an equivalent


implementation that is more efficient:

1. Reduce high-frequency signal components with a digital lowpass filter.


2. Downsample the filtered signal by M; that is, keep only every Mth sample.
Code for SCILAB:

clc
clear
fs=4800
t=0:1/fs:0.1
L=6
t1=0:1/(fs/L):0.1

x=3*sin(100*%pi*t)+5*sin(200*%pi*t)
subplot(3,1,1)
plot(t,x,"bo")

x2=3*sin(100*%pi*t1)+5*sin(200*%pi*t1)
subplot(3,1,1)
plot(t1,x2,"ro")

x1=3*sin(100*%pi*t1)+5*sin(200*%pi*t1)
subplot(3,1,1)
plot2d3(t1,x1,style=5)

xf=abs(fft(x))
n=length(x)
f=0:fs/n:fs

subplot(3,1,2)
plot(f(1:length(xf)),xf)

xf1=abs(fft(x1))
n1=length(x1)
f1=0:(fs/L)/n1:(fs/L)

subplot(3,1,3)
plot(f1(1:length(xf1)),xf1)
Output Window: (1)
Output Window : (2)

Conclusion:

You might also like