DSP Manual
DSP Manual
DSP Manual
REGULATION 2018
CERTIFICATE
Register Number:
Certified that this is the Bonafide record of work done by Selvan / Selvi
Communication Engineering branch during the year 2023 - 2024 in the 18ECC301JL-Digital
Contents
Page No.
S.No Name of the Experiment
2 Instructions to Students
3 List of Experiments
5 S Syllabus
Experiments
Ex. Faculty
Date Name of the Experiment Page.no Mark
No. Sign
SCILAB PROGRAMS
Computation of DFT of a signal using basic
1 equation and FFT & powerspectrum estimation using
DFT.
2 Spectral analysis using DFT
TMS PROGRAMS
8 Arithmetic operations using processor
Generation of Square and saw tooth waveforms using
9
processor
CONTENT BEYOND THE SYLLABUS
10 Output quantization noise for Cascade realization
Instructions to Students
DO’S
DONT’S
List of Experiments
Computation of DFT of a signal using basic equation and FFT & powerspectrum estimation using
1 CO1
DFT.
6 Compute and calculate the dead band for a second order system CO3
Mapping of course outcomes with program outcomes and program specific outcomes
CO-PO Mapping
Pos PSOs
Cos
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
SCILAB PROGRAMS
Computation
of DFT of a
signal using
basic equation
and FFT & 3 3 3 3 3 - - - 3 - - - 3 2
powerspectrum
estimation
using DFT.
Spectral analysis
3 3 3 3 3 - - - 3 - - - 3 2
using DFT
Compute
Convolution for 3 3 3 3 3 - - - 3 - - - 3 2
longer sequence
Design of IIR
filters using
3 3 3 3 3 - - - 3 - - - 3 2
Bilinear
Transformation
Design of FIR
filter using
3 3 3 3 3 - - - 3 - - - 3 2
windowing
method
Compute and
calculate the dead
3 3 3 3 3 - - - 3 - - - 3 2
band for a second
order system
Design and
compute the
3 3 3 2 3 1 - 1 3 1 - 1 3 2
upsampling and
downsampling
TMS PROGRAMS
Arithmetic
operations using
3 3 3 3 3 1 - 1 3 1 - 1 3 2
processor
Generation of
Square and saw
3 3 3 3 3 1 - 1 3 1 - 1 3 2
tooth waveforms
using processor
Content Beyond the syllabus
Output
quantization noise
3 3 3 3 3 - - 1 3 1 - 1 3 2
for Cascade
realization
Multistage
Implementation of
3 3 3 3 3 1 - 1 3 1 - 1 3 2
sampling rate
conversion
CO (Avg) 3 3 3 2.8 3 1 - 1 3 1 - 1 3 2
List of Experiments
6 Compute and calculate the dead band for a second order system CO3
INTRODUCTION TO SCILAB
Scilab is a scientific software package for numerical computations providing a powerful open computing
environment for engineering and scientific applications. Developed since 1990 by researchers from INRIA
(French National Institute for Research in Computer Science and Control) and ENPC (National School of
Bridges and Roads), it is now maintained and developed by Scilab Consortium since its creation in May
2003 and integrated into Digiteo Foundation in July 2008. The current version is 5.2.1 (February 2010).
Since 1994 it is distributed freely along with source code through the Internet and is currently being used in
educational and industrial environments around the world. From version 5 it is released under the GPL
compatible CeCILL license. Scilab includes hundreds of mathematical functions with the possibility to add
interactively functions from various languages (C, Fortran...). It has sophisticated data structures (including
lists, polynomials, rational functions, linear systems...), an interpreter and a high level programming
language. Scilab has been designed to be an open system where the user can define new data types and
operations on these data types by using overloading.
A number of toolboxes are available with the system:
• 2-D and 3-D graphics, animation
• Linear algebra, sparse matrices
• Polynomials and rational functions
• Simulation: ODE solver and DAE solver
• Scicos: a hybrid dynamic systems modeler and simulator
• Classic and robust control, LMI optimization
• Differentiable and non-differentiable optimization
• Signal processing
• Metanet: graphs and networks
• Parallel Scilab using PVM
• Statistics
• Interface with Computer Algebra (Maple, MuPAD)
• Interface with Tcl/Tk
• And a large number of contributions for various domains.
EX.NO.1 COMPUTATION OF DFT USING BASIC EQUATION, FFT AND POWER SPECTRUM
ESTIMATION USING DFT
DATE:
AIM:
To write and execute the SCILAB programs for computation of DFT, FFT and power spectrum
estimation
APPARATUS REQUIRED:
SCILAB with PC
THEORY
Let X(ejw) be discrete time Fourier transform of the discrete time signal x(n). The discrete Fourier transform
(DFT) of x(n) is obtained by sampling one period of the discrete time Fourier transform X(e jw) at a finite
number of frequency points. Let, x(n) = Discrete time signal of length L and X(k) = DFT of x(n)
The plot of samples of magnitude sequence versus k is called magnitude spectrum and the plot of samples of
phase sequence versus k is called phase spectrum. In general, these plots are called frequency spectrum
PROGRAM:
X1=abs(X);
subplot(1,3,2);
plot2d3(k,X1);
xlabel('K-->');
ylabel('Magnitude of X(K)');
title('Magnitude Plot');
OUTPUT:
RESULT :
3. What is the necessary and sufficient condition for the impulse response to be stable?
The necessary and sufficient condition for the impulse response is given by
DTFT
Sampling is performed only in time domain.
Continuous function of ω
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
AIM:
APPARATUS REQUIRED:
SCILAB With PC
THEORY:
The discrete Fourier transform (DFT) maps a nite number of discrete time-domain samples to the same
number of discrete Fourier-domain samples. Being practical to compute, it is the primary transform applied
to real-world sampled data in digital signal processing. The DFT has special relationships with the discrete-
time Fourier transform and the continuous-time Fourier transform that let it be used as a practical
approximation of them through truncation and windowing of an in nite-length signal. Di erent window
functions make various tradeo s in the spectral distortions and artifacts introduced by DFTbased spectrum
analysis.
PROGRAM:
clc;
clear;
close;
fm=10;
fs=125;
m=2;
t=0.0001:1/fs:m/fm;
x=3*cos(2*%pi*fm*t);
N=(m*fs/fm);
for k=1:N
X1(k)=0;
for n=1:length(x)
X1(k)=X1(k)+x(n)*exp((-%i)*2*%pi*(n-1)*(k-1)/N);
end
end
k=0:N-1
f=k*fs/N;
subplot(2,2,1);
plot2d3(t,x);
xlabel('time');
ylabel('x(n)');
title('No Leakage: m=2, f=10 and Fs=125Hz');
subplot(2,2,2);
plot2d3(f,abs(X1));
xlabel('freq in Hz');
ylabel('Mag');
title('Magnitude plot');
fm=10;
fs=125;
m=2.5;
t=0.0001:1/fs:m/fm;
x=3*cos(2*%pi*fm*t);
N=(m*fs/fm);
for k=1:N
X1(k)=0;
for n=1:length(x)
X1(k)=X1(k)+x(n)*exp((-%i)*2*%pi*(n-1)*(k-1)/N);
end
end
k=0:N-1;
f=k*fs/N;
subplot(2,2,3);
plot2d3(t,x);
xlabel ('time');
ylabel ('x(n)');
title('Spectral Leakage :m=2.5, f=10 and Fs=125Hz');
subplot(2,2,4);
plot2d3(f, abs(X1));
xlabel('freq in Hz');
ylabel('Mag');
title('Magnitude plot');
OUTPUT:
RESULT:
4. What are the two methods used for the sectioned convolution?
The two methods used for the sectioned convolution are
(1) the overlap-add method and
(2) overlap- save method.
1 The size of the input data block is L The size of the input data block is N=L+M-1
2 Each data block is L point and we append M-1 Each data block consists of the last M-1 data
zeros to compute N point DFT points of previous data block followed by L new
data point
3 In this no corruption due to aliasing, as linear In each output block M-1 points are corrupted
convolution is performed using circular due to aliasing, as circular convolution is
convolution. employed.
4 To get output sequence, the last M-1 points To get output sequence, the first M-1 points from
from each output block is added to first M-1 each output block is data are fitted together.
points of succeeding block.
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
APPARATUS REQUIRED:
SCILAB With PC
THEORY:
Suppose, the input sequence x(n) of long duration is to be processed with a system having finite duration
impulse response by convolving the two sequences. Since, the linear filtering performed via DFT involves
operation on a fixed size data block, the input sequence is divided into different fixed size data block before
processing.
The successive blocks are then processed one at a time and the results are combined to produce the net
result.
As the convolution is performed by dividing the long input sequence into different fixed size sections, it is
called sectioned convolution. A long input sequence is segmented to fixed size blocks, prior to FIR filter
processing.
PROGRAM:
clc;clear;close;
h=[1,2];
x=[1,2,-1,2,3,-2,-3,-1,1,1,2,-1];
M=length(h); //length of impulse response
L=2^M; //length of FFT/IFFT operation
N=L-M+1;
xl=length(x);
K=ceil(xl/N); //number of iterations
h=[h zeros(1,L-M)];
x=[x x(1:K*N-xl)];
H=fft(h);
y=zeros(1,M-1);
for k=0:K-1
xk=[x(k*N+1:(k+1)*N) zeros(1,M-1)];
Xk=fft(xk);
Yk=H.*Xk;
yk=ifft(Yk);
yk=clean(yk);
OUTPUT:
RESULT:
1. What are the methods to compute the convolution sum of two sequences?
The methods to compute the convolution sum of two sequences are:
Graphical method
Tabular array method
Tabular method
Matrices method
Sum-by-column method
The flip, shift, multiply and sum method.
9. What is autocorrelation?
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
APPARATUS REQUIRED:
SCILAB With PC
THEORY
The infinite impulse response is a type of digital filter that is used in Digital Signal Processing applications.
A filter’s job is to allow certain types of signals to pass and block the rest. The infinite impulse response
filter is unique because it uses a feedback mechanism. It requires current as well as past output data. Though
they are harder to design, IIR filters are computationally efficient and generally cheaper.
1. Direct method – Designing analog filters and then converting them to digital.
2. Approximation of derivatives method – Approximating a differential equation (continuous-time
(d/dt)) by an equivalent difference equation. We have covered the approximation of derivatives
method to design IIR filters here.
3. Impulse invariance method – simple s-plane to z-plane mapping. The impulse invariance method to
design IIR filters is covered here.
4. Bilinear Transformation method (BLT) – An improvement over the impulse invariance method. We
have covered the Bilinear transform method to design IIR filters here.
5. Approximation of standard analog filters – Butterworth, Chebyshev, and Elliptic analog filter
designs can be approximated as IIR filters. These analog filters have an infinite response too.
6. Spectral transformation – We can create different types of digital IIR filters using a digital IIR low
pass filter via the spectral transformation method.
PROGRAM:
clc;clear;close;
rp=0.9 //passband ripple
rs=0.2 //stopband ripple
wp=%pi/2; //passband frequency
ws=3*%pi/4; //stopband frequency
T=1;
fp=2/T*tan(wp/2);
fs=2/T*tan(ws/2);
s=poly(0,'s');
z=poly(0,'z');
hs=1;
//Calculating the order of filter
num=log((rs^-2 -1)/(rp^-2 -1));
den=2*log(fs/fp);
disp(' order of filter');
N=ceil(num/den)
//Calculation of cut-off frequency
fc=fp/(rp^-2 -1)^(0.5/N);
OUTPUT
RESULT:
ii) FIR filter can be realized in both recursive & non- IIR filter are easily realized with recursive structure.
recursive structure.
iii) Greater flexibility to control the shape of their Less flexibility, limited to specific kind of filter.
magnitude response.
iv)Error due to round off noise are less severe in FIR Round off noise is more.
filters, mainly because feedback is not used.
3. What are the different types of filters based on frequency response?
Based on frequency response the filters can be classified as
1. Lowpass filter
2. Highpass filter
3. Bandpass filter
4. Bandreject filter
The magnitude response decreases monotonically as The magnitude response exhibits ripples in pass
frequency increases band & monotonically decreases in stop band.(type
I)
Transition band is more Transition band is less
Poles lies on a circle Poles lies on ellipse.
Order is more for same specification Order is less .
7. Mention any two procedures for digitizing the transfer function of a analog filter?
5. Impulse invariance method.
6. Bilinear transformation.
9. Why impulse invariant method is not preferred in design of IIR filter other than Low pass filter? Or What
are the demerits of impulse invariant method?
In impulse invariant method, the mapping from s plane to z plane is many to one ie. All poles in the
splane between the intervals (2k-1)∏/ T (for k=0,1,2…) maps into the entire z plane. Thus, there are an
infinite number of poles that maps to the same location in the z plane, producing aliasing effect. Due to
spectrum aliasing the impulse invariant methods is not preferred in designing other than LPF.
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
AIM:
To write a SCILAB program to plot magnitude response and phase response of digital FIR filter.
APPARATUS REQUIRED:
SCILAB With PC
THEORY
The term FIR abbreviation is “Finite Impulse Response” and it is one of two main types of digital filters
used in DSP applications. Filters are signal conditioners and function of each filter is, it allows an AC
components and blocks DC components. The best example of the filter is a phone line, which acts as a filter.
Because, it limits frequencies to a rage significantly smaller than the range of human beings can hear
frequencies.
PROGRAM
clear;
clc ;
close ;
N=7;
U=4;
h_Rect=window('re',N);
for n=-3+U:1:3+U
if n==4
hd(n)=0.4;
else
hd(n)=(sin(2*%pi*(n-U)/5))/(%pi*(n-U));
end
h(n)=hd(n)*h_Rect(n);
end
[hzm ,fr ]= frmag (h ,256) ;
hzm_dB = 20* log10 (hzm)./ max ( hzm );
figure
plot (2*fr , hzm_dB )
a= gca ();
xlabel ('Frequency w*pi');
ylabel ('Magnitude in dB');
title ('Frequency Response of FIR LPF with N=7');
xgrid (2)
disp(h,"Filter Coefficients,h(n)=");
OUTPUT
RESULT:
1. What are desirable & undesirable features/ Characteristics of FIR filter? Or what are advantages &
disadvantages of FIR filter?
Advantage:
i) FIR filter have exact linear phase.
ii) FIR filter are always stable. since all its poles of the filter are at the origin.
iii) FIR filter can be realized in both recursive & non-recursive structure.
iv) Filters with any arbitrary magnitude response can be tackled using FIR.sequency.
Disadvantage:
i) For the same filter specification the order of FIR filter design can be as high as 5 to 10 times that in a
IIR design.
ii) Large storage requirements needed.
iii) Powerful computational facilities required for the implementation.
2. What are the design techniques of FIR filter?
Fourier series method (not used frequently)
Window method
Frequency sampling method
Optimal filter design
3.What is meant by FIR filter and why is it stable?
The filters whose impulse response is finite are referred as FIR filters.These are usually implemented
using nonrecursive structures.
FIR filter is always stable since all of its poles are at the origin.
4. What are the conditions to be satisfied for constant phase delay in linear phase FIR filter? (symm
condition).
The conditions for constant phase delay are
Phase delay, = N-1/2 (i.e., phase delay is constant)
Impulse response, h(n)=h(N-1-n) (ie,impulse response is symmetric).
5. Define signal flow graph.
A signal flow graph is a graphical representation of the relationships between the variables of a set of
linear difference equations.
6. Define ripples in a filter?
The limits of the tolerance in the magnitude of passband and stopband are called ripples.The
tolorance in passband is denoted as p and that in stopband is denoted as s.
7. What is meant by prewarping & how it is done?
Prewarping: The effect of the non-linear compression at high frequencies can be compensated. When
the desired magnitude response is piece-wise constant over frequency, this compression can be
compensated by introducing a suitable pre-scaling, or pre-warping the critical frequencies by using
the formula.
8. What are the advantages & disadvantages of bilinear transformation?
Advantages:
o The bilinear transformation provides one-to-one mapping.
o Stable continuous systems can be mapped into realizable, stable digital systems.
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
EX.NO.6 COMPUTE AND CALCULATE THE DEAD BAND FOR A SECOND ORDER SYSTEM
DATE:
AIM:
To write a SCILAB program to Compute and calculate the dead band for a second order system
APPARATUS REQUIRED:
SCILAB With PC
THEORY
In a limit cycle the amplitudes of the output are confined to a range of values, which is called the dead band
of the filter. For a first-order system described by the equation, y(n) = a y(n–1) + x(n), the dead band is
given by,
where, B = Number of binary bits (including sign bit) used to represent the product.
For a second-order system described by the equation, y(n) = a1 y(n – 1) + a2 y(n – 2) + x(n), the dead
band of the filter is given by,
PROGRAM:
clc; clear;
//y(n)=0.9y(n-1)+x(n)
//Input x(n)=0
n=-1;y=12; //Initial Condition y(-1)=12
flag=1;
while n<8
n=n+1;
y=[y 0.9*y(n+1)];
yr=round(y);
end
disp(n,'n=');
disp(y,'y(n)-exact');
disp(yr,'y(n)-rounded');
disp([-yr(n+2) yr(n+2)],'Deadband interval ')
OUTPUT
RESULT:
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
AIM:
To write a SCILAB program to design and compute the upsampling and downsampling
APPARATUS REQUIRED
SCILAB with PC
THEORY
Downsampling or decimation is the process of reducing the sampling rate by an integer N factor D.
Upsampling or interpolation is the process of increasing the sampling rate by an integer factor I.
Downsampling (or decimation) is the process of reducing the samples of the discrete time signal. Let, x(n) =
Discrete time signal D = Sampling rate reduction factor (and D is an integer) Now, x(Dn) = Downsampled
version of x(n) The device which performs the process of downsampling is called a downsampler (or
decimator).
The upsampling (or interpolation) is the process of increasing the samples of the discrete time signal. Let,
x(n) = Discrete time signal I = Sampling rate multiplication factor (and I is an integer).
Now, x( n/ I ) = Upsampled version of x(n).
The device which perform the process of upsampling is called upsampler (or interpolator).
PROGRAM:
(i) DECIMATION
clc;clear;
function [N,R]=func(Fs,Fp,Ft,Fti,dp,ds,M)
dF=(Fs-Fp)/Ft; //Normalised transition bandwidth
N=round((-20*log10(sqroot(dp*ds))-13)/(14.6*dF)); //FIR Filter length
R=N*Fti/M; //Number of Multiplications per second
endfunction
Ft=20000; //Sampling rate of input signal
Fp=40; //Passband frequency
Fs=50; //Stopband frequency
OUTPUT
ii) INTERPOLATION
clc;clear;close;
x=0:5;
y=[];
for i=1:length(x)
y(1,2*i)=x(i);
end
disp(x,'Input signal x(n)=');
disp(y,'Output signal of interpolation process with factor two y(n)');
subplot(2,1,1);
plot2d3(x);title('Input signal x(n)');
subplot(2,1,2);
plot2d3(y);title('Output signal y(n)');
OUTPUT
RESULT:
7. . What is the need for anti aliasing filter prior to down sampling?
The spectra obtained after down sampling a signal by a factor M is the sum of all the uniformly
shifted and stretched version of original spectrum scaled by the factor 1/M. if thespectrum is not
bandlimited to π/M, then down sampling will cause aliasing. In order to avaoid aliasing the signal
x(n) is to be bandlimited to ± π/M. This can be done by filtering the signal x(n) with a low pass filter
with a cutoff frequency of π/M. this filter is known as anti aliasing filter
9. Why decimate?
The most immediate reason to decimate is simply to reduce the sampling rate at the output of one
system so a system operating at a lower sampling rate can input the signal. But a much more
common motivation for decimation is to reduce the cost of processing: the calculation and/or
memory required to implement a DSP system generally is proportional to the sampling rate, so the
use of a lower sampling rate usually results in a cheaper implementation
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
AIM:
To write a assembly language program to perform Addition of two numbers using Direct addressing
mode.
APPARATUS REQUIRED:
1.Personal Computer
2.RS232C interface cable
3.TMS320C5416 DSP Processor
ALGORITHM:
PROGRAM:
INP1 .SET 0H
INP2 .SET 1H
OUT .SET 2H
.MMREGS
.TEXT
START:
LD #140H,DP
RSBX CPL
NOP
NOP
NOP
NOP
LD INP1,A
ADD INP2,A
STL A ,OUT
HLT: B HLT
OUTPUT:
RESULT:
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
AIM:
To write a assembly language program to perform Subtraction of two numbers using Indirect
addressing mode.
APPARATUS REQUIRED:
1. Personal Computer
2. RS232C interface cable
3. TMS320C5416 Processor
ALGORITHM:
PROGRAM:
.MMREGS
.TEXT
START:
LD #00H,A
STM #1000H,AR4
STM #2000H,AR5
STM #3000H,AR6
LD *AR4,A
SUB*AR5,A
STL A,*AR6+
HLT: B HLT
OUTPUT:
RESULT:
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
DATE
AIM:
To write a assembly language program to generate square and saw tooth waveform using processor
APPARATUS REQUIRED:
1. Personal Computer
2. RS232C interface cable
3. TMS320C5416 Processor
PROCEDURE
PROGRAM
a) Program for Generation of Square Waveform
.MMREGS
.TEXT
START: LDP #100H
LACC #0FFFH ; change this value for amplitude.
LOOP: SACL 0
RPT #0FFH ; change this value for frequency.OUT
0,04H ; address for DAC.
CMPL
B LOOP
.END
.MMREGS
.TEXT
START: LDP #120H
LACC #0H ; change lower amplitudeSACL 0
OBSERVATION
Name of
S.No Waveforms Time Period (msec) Amplitude(Volts)
1 Square Wave
RESULT:
8. Give some examples for fixed point DSPs & floating point DSPs
TM32OC50, TMS320C54, TMS320C55, ADSP-219x, ADSP-219xx - fixed point DSPs
TMS320C3x, TMS320C67x, ADSP-21xxx -- floating point DSPs
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
APPARATUS REQUIRED
SCILAB with PC
THEORY
The Product quantization model is realized with the following assumption:
1. The error e(n) is uniformly distributed over the range –q/2 to q/2, whose mean value is zero and constant
variance
S e2 = 2-2B/12
2. The error e(n) is uncorrelated with the signal x(n)
The Total output noise due to product quantization errors depends on the type of realization structure and point
at which the results are quantized
PROGRAM
clc;clear;close;
x=poly(0,'x'); //x=2^-2B
z=poly(0,'z');
H1=1/(1-0.9/z);
H2=1/(1-0.8/z);
H=H1*H2;
pn=x/12; //Input Noise power
end
P1=numer(X1)/rc1(length(rc1));
Q1=poly(q1,'z');
S1=poly(s1,'z');
I1=abs(residu(P1,Q1,S1)); //Residue Calculation
po1=pn*I1; //Output Noise power
po=po1+po2;
disp(pn,'Input Noise power');
disp(I1,'I1=');disp(I2,'I2=');
disp(po1,'Output Noise power for H1(z)');
disp(po2,'Output Noise power for H2(z)');
disp(po,'Total Output Noise power');
OUTPUT
RESULT:
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100
APPARATUS REQUIRED
SCILAB with PC
THEORY
In sampling rate conversion, when the sampling rate conversion factor I or D is very large then the
multistage sampling rate conversion will be a computationally efficient realization. In interpolation, if
sampling rate multiplication factor, I is very large then I can be expressed as a product of positive integer
Now, the interpolation by sampling rate multiplication factors I1 , I2 , ......IL are implemented separately
and then overall interpolation is obtained by cascading the L-stages of interpolation. In cascading of
interpolators, the anti-imaging filters are introduced at the output of each stage of interpolation in order to
eliminate the images introduced due to upsampling in that stage.
In decimation, if sampling rate reduction factor, D is very large then D can be expressed as a product of
positive integers.
Now, the decimation by sampling rate reduction factors D1 , D2 , DL are implemented separately and
then overall decimation is obtained by cascading the L-stages of decimation. In cascading of decimators, the
anti-aliasing filters are introduced at the input of each stage to limit the bandwidth of the input signal to
decimator in order to avoid aliasing due to decimation in the spectrum of the output signal of that stage.
PROGRAM
clc;clear;close;
x=[0:6 0:6];
y=x(1:3:length(x));
disp(x,'Input signal x(n)=');
disp(y,'Output signal of decimation process by factor three y(n)');
subplot(2,1,1);
plot2d3(x);title('Input signal x(n)');
subplot(2,1,2);
plot2d3(y);title('Output signal y(n)');
OUTPUT
RESULT:
Mark Allocation
Marks Marks
Sl.No. Details
Allotted Awarded
1 Preparation 30
2 Experimental Demonstration 30
3 Verification 20
4 Result 10
5 Viva-Voce 10
Total 100