Professional Documents
Culture Documents
OF
ELECTRONICS AND COMMUNICATION ENGINEERING
HOD PRINCIPAL
Basic Simulation Lab
DEPARTMENT VISION
To be recognized as a full-fledged center for learning and research in various fields of
Electronics and Communication Engineering through industrial collaboration and to provide
consultancy for solving the real time socio-economic problems.
DEPARTMENT MISSION
To provide innovative teaching and learning in the contemporary technologies in
Electronics and Communication Engineering to support the professional aspirations of the
students.
To promote innovation through research and development among faculty and students by
providing opportunities for inter-disciplinary learning in collaboration with industry.
To encourage professional development of students that will inculcate ethical values and
leadership skills while working with the community to address societal issues.
DEPT OF ECE 2
Basic Simulation Lab
After 3-5 years from the year of graduation, our graduates will,
With an exposure to the areas of VLSI, Embedded Systems, Signal / Image Processing,
Communications, Wave theory, and Electronic circuits in modern electronics and
communications environment.
Demonstrate the impact of Electronics and Communications Engineering on the society,
ethical, social and professional responsibilities/implications of their work.
With strong foundations in mathematical, scientific and engineering fundamentals
necessary to formulate, solve and analyze Electronics and communications. Engineering
problems.
Have strong communication inter-personal skills, multicultural adoptability and to work
effectively in multidisciplinary teams.
Engage life-long learning to become successful in their professional work.
PEO 1: To be equipped with skills for solving complex real-world problems related to
VLSI, Embedded Systems, Signal/Image processing, and Digital and Wireless
Communication.
PEO 2: To develop professional skills that will equip them to succeed in their careers
and encourage lifelong learning in advanced areas of Electronics and communications
and related fields.
PEO 4: To develop the ability to understand and analyze engineering issues in a broader
perspective with ethical responsibility towards sustainable development.
DEPT OF ECE 3
Basic Simulation Lab
Program Outcomes(PO’s):
A graduate of the Electronics and Communication Engineering Program will demonstrate:
PO1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
PO2: Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO3: Design/development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
PO4: Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
PO6: The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
PO7: Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO9: Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO10: Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
PO11: Project management and finance: Demonstrate knowledge and understanding of the
DEPT OF ECE 4
Basic Simulation Lab
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
PO12: Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
DEPT OF ECE 5
Basic Simulation Lab
PSO 1: Problem Solving Skills – Graduates will be able to apply their knowledge in
emerging electronics and communication engineering techniques to design solutions and
solve complex engineering problems.
PSO 3: Successful Career – Graduates will possess a solid foundation in Electronics and
Communications engineering that will enable them to grow in their profession and pursue
lifelong learning through post-graduation and professional development.
PSO 4: Society Impact – Graduate will be able to work with the community and
collaborate to develop technological solutions that would promote sustainable
development in the society.
DEPT OF ECE 6
Basic Simulation Lab
Laboratory: Maintenance
1. The respective Lab assistant takes care of maintenance of all the equipments in the
department.
2. All the activities of the lab maintenance are well documented.
3. Most of the repairing of the equipment is done by the lab assistant himself, except a few
repairing where, the work has to be done by the manufacturing company / vendor.
4. Maintenance registers are maintained to check the working of equipment and updated once
in a semester.
5. Equipment is sent for regular service according to requirement.
6. At the start of every semester the equipment of all the concerned Laboratories are tested by
the Lab in-charges.
7. Any Problem identified is brought to the notice of head of the department.
8. Maintenance of computers is taken care by Computer Science & Engineering department
9. Major repairs are outsourced by following the procedure of the institute.
i. The problematic equipments are checked, noted in the maintenance registers and
they are brought to the notice of HOD by the concerned lab faculty and lab
assistant.
ii. Then the equipment is checked whether it’s repairable or non-repairable, if minor
repairs are identified then they are repaired by our lab assistants.
iii. If non-repairable equipment is identified it will be kept in the same lab separately
for demonstration to students.
iv. If major repairs are identified then the request is forwarded to the vendors for
concerned technical people to repair the equipment.
v. The technical person comes to campus for repairing. This process will be
monitored by the concerned lab faculty.
Laboratory: Overall Ambience
DEPT OF ECE 7
Basic Simulation Lab
DEPT OF ECE 8
Basic Simulation Lab
These are the instructions for the students attending the lab:
Before entering the lab the student should carry the following things (MANDATORY)
Identity card issued by the college
Class notes
Lab observation book
Lab Record
Student must sign in and sign out in the register provided when attending the lab session
without fail.
Come to the laboratory in time. Students, who are late more than 15 min., will not be
allowed to attend the lab.
Students need to maintain 100% attendance in lab if not, strict action will be taken.
All students must follow the Dress Code while in the laboratory.
Foods, drinks are NOT allowed.
All bags must be left at the indicated place.
Refer to the lab staff if you need any help in using the lab.
Respect the laboratory and its other users.
Workplace must be kept clean and tidy after the experiment is completed.
Read the manual carefully before coming to the laboratory and be sure about what you are
supposed to do.
Do the experiments as per the instructions given in the manual.
Copy all the programs to observation which are taught in class before attending the lab
session.
Students are not supposed to use floppy disks, pen drives without permission of lab-in
charge.
Lab records need to be submitted on or before the date of submission.
DEPT OF ECE 9
Basic Simulation Lab
DO’S
Students must enter their details in login book.
Turn off the computer when you are no longer using it.
Report any broken plugs or exposed electrical wires to the lab in-charge immediately.
Program must be executed with in the given time.
Place the chairs properly before leaving the lab.
Check the laboratory notice board regularly for updates.
DONT’S
Do not bring any food or drinks near the computer.
Do not open any irrelevant internet sites on lab computer.
Do not use a flash drive on lab computers.
Do not upload, delete or alter any software on the lab PC.
Do not plug in external devices without scanning them for computer viruses.
Do not attempt to repair, open, tamper or interfere with any of the computer, printing,
cabling, air conditioning or other equipment in the laboratory.
DEPT OF ECE 10
Basic Simulation Lab
CONTENTS
S.No Name of the Experiment Page No.
1 Basic operations on matrices
2 generation of various signals and sequences such as unit impulse, unit
step, square,sawtooth,triangular,sinusoidal,ramp,sinc
3 Operations on signals and sequences such as
addition,multiplication,scaling,shifting,folding,computation of energy
and power
4 finding the even and odd parts of signal/sequence and real and
imaginary parts of the signal
5 convolution for signals and sequences
6 auto correlation and cross correlation for signals & sequences
7 verification of linearity and time invariance properties of a given
continuous/discrete system
8 Computation of unit sample , unit step and sinusoidal responses of the
given LTI system and verifying its physical realizability and stability
properties
9 Gibbs phenomenon simulation
10 Finding the Fourier transform of a given signal and plotting its
magnitude and phase spectrum.
11 waveform synthesis using Laplace transform
12 locating the poles and zeros and plotting the pole-zero maps in s-plane
and z-plane for the given transfer function
13 Generation of gausssian noise(real and complex), computation of it’s
mean,M.S.valueand its skew,kurtosis,and PSD ,probability distribution
function
14 sampling theorem verification
15 removal of noise by auto correlation/cross correlation
16 Extraction of periodic signal masked by noise using correlation
17 verification of weiner - khinchine relations
18 Checking a random process for stationarity in wide sense
DEPT OF ECE 11
Basic Simulation Lab
INTRODUCTION TO SCILAB
From the software point of view, Scilab is an interpreted language. This generally allows
to get faster development processes, because the user directly accesses a high-level language, with
a rich set of features provided by the library. The Scilab language is meant to be extended so that
user-defined data types can be defined with possibly overloaded operations. Scilab users can
develop their own modules so that they can solve their particular problems. The Scilab language
allows to dynamically compile and link other languages such as Fortran and C: this way, external
libraries can be used as if they were a part of Scilab built-in features. Scilab also interfaces
LabVIEW, a platform and development environment for a visual programming language from
National Instruments.
From the scientific point of view, Scilab comes with many features. At the very beginning
of Scilab, features were focused on linear algebra. But, rapidly, the number of features extended to
cover many areas of scientific computing. The following is a short list of its capabilities:
Linear algebra, sparse matrices
Polynomials and rational functions
Interpolation, approximation
Linear, quadratic and non linear optimization
Ordinary Differential Equation solver and Differential Algebraic Equations solver
Classic and robust control, Linear Matrix Inequality optimization
Differentiable and non-differentiable optimization
Signal processing
Statistics.
Scilab provides many graphics features, including a set of plotting functions, which allows to
create 2D and 3D plots as well as user interfaces.
DEPT OF ECE 12
Basic Simulation Lab
In the console after the prompt“-->“,just type a command and press the Enter key (Windows and
Linux) on the key board to obtain the corresponding result.
--> 57/4
ans =
14.25
It is possible to come back at any moment with the key board's arrow keys ← ↑ → ↓or with the
mouse. The left and right keys are used to change the instructions and the up and down keys are
used to come back on a previously executed command.
The editor
Typing directly into the console has two disadvantages: it is not possible to save the commands
and it is not easy to edit multiple lines of instruction. The editor is the appropriate tool to run
multiple instructions.
To open the editor from the console, click on the first icon in the tool bar or on
Applications > SciNotes
In the menu bar, the editor opens with a default file named “Untitled 1“
Typing in the editor is like as in any word processor
Any file can be saved by clicking on File > Save as
DEPT OF ECE 13
Basic Simulation Lab
The extension “.sce“ at the end of a filename will launch automatically Scilab when
opening it (except Under Linux and Mac OSX)
Click on Execute in the menu bar and select save and execute
A graphics window opens automatically when making any plot. It is possible to plot
curves, surfaces, sequences of points
To erase a previous plot, type clf (“clear figure“).
To open another graphics window, type scf; (“set current figure“).
If several graphic windows are open, you can choose in which the plot will be drawn by
typing scf(n); n for the graphics window number (mentioned on the top left).
DEPT OF ECE 14
Basic Simulation Lab
Experiment- 1
BASIC OPERATIONS ON MATRICES
THEORY:
Vectors are special forms of matrices and contain only one row or one column. Whereas
scalars are special forms of matrices and contain only one row and one column. A matrix
with one row is called row vector and a matrix with single column is called column vector.
PROCEDURE:
PROGRAM:
DEPT OF ECE 15
Basic Simulation Lab
disp(A - B);
//Multiplication (ELEMENT BY ELEMENT) of two matrices
disp('Multiplication of A and B Matrices is ..... :: ');
disp(A .* B);
// Finding the Rank of the matrix
disp('Rank of Matrix A is ::');
disp(rank(A));
// Find the determinant of the matrix
disp('Determinant of Matrix A is ::');
disp(det(A));
OUTPUT:
Enter the Matrix A ::[1 2 ; 2 3 ; ]
Enter the Matrix B ::[1 2 ; 2 3 ; ]
The size of Matrix A is .... ::
2. 2.
The size of Matrix B is....::
2. 2.
Addition of A and B Matrices is .... ::
2. 4.
4. 6.
DEPT OF ECE 16
Basic Simulation Lab
Determinant of Matrix A is ::
- 1.
Trace of Matrix A is ::
4.
Inverse of Matrix A is ::
- 3. 2.
2. - 1.
RESULT:
DEPT OF ECE 17
Basic Simulation Lab
DEPT OF ECE 18
Basic Simulation Lab
Experiment-2
AIM: Write a program to Generate various signals and sequences (Periodic and aperiodic), such
as Unit Impulse,Unit Step, Square, Saw tooth, Triangular, Sinusoidal, Ramp, Sinc.
THEORY:
If the amplitude of the signal is defined at every instant of time then it is called continuous time
signal. If the amplitude of the signal is defined at only at some instants of time then it is called
discrete time signal. If the signal repeats itself at regular intervals then it is called periodic signal.
Otherwise they are called aperiodic signals.
Ramp signal: The ramp function is a unitary real function, easily computable as the mean of the
independent variable and its absolute value.This function is applied in engineering. The name
ramp function is derived from the appearance of its graph.
=0 else
Unit impulse signal: One of the more useful functions in the study of linear systems is the "unit
impulse function."An ideal impulse function is a function that is zero everywhere but at the origin,
where it is infinitely high. However, the area of the impulse is finite
DEPT OF ECE 19
Basic Simulation Lab
Unit step signal: The unit step function and the impulse function are considered to be
fundamental functions in engineering, and it is strongly recommended that the reader becomes
very familiar with both of these functions.
=0 if t < 0
u(t) = 1 if t > 0
=1/2 If t=0
Sinc signal: There is a particular form that appears so frequently in communications engineering,
that we give it its own name. This function is called the "Sinc function”.
PROCEDURE:
PROGRAM:
DEPT OF ECE 20
Basic Simulation Lab
y = 0.5 * t;
plot( t , y );
xlabel ('--------->Time Index t (sec.)');
ylabel ('--------->Amplitude');
title ('Ramp Signal Sequence');
ylabel ('---------->Amplitude');
title ('Ramp Signal Sequence');
plot(t,p);
title("Sinusoidal sequence");
xlabel("time");
ylabel("amplitude");
DEPT OF ECE 21
Basic Simulation Lab
d=a*squarewave(2*%pi*10*n);
plot2d3(n,d);
xlabel (" --------- >Time Index n");
ylabel (" --------- >Amplitude");
title ("Square Wave Signal Sequence");
DEPT OF ECE 22
Basic Simulation Lab
DEPT OF ECE 23
Basic Simulation Lab
OUTPUT:
DEPT OF ECE 24
Basic Simulation Lab
DEPT OF ECE 25
Basic Simulation Lab
DEPT OF ECE 26
Basic Simulation Lab
RESULT:
Hence various signals & sequences are generated using SCILAB software
VIVA QUESTIONS:
1. Define Signal?
2. Define continuous and discrete Signals?
3. State the relation between step, ramp and Delta Functions?
4. Differentiate saw tooth and triangular signals?
5. Define Periodic and aperiodic Signal?
DEPT OF ECE 27
Basic Simulation Lab
Experiment -3
AIM: Write a program to perform the operations on signals and sequences such as addition,
multiplication, scaling, shifting, folding and also compute energy and power.
THEORY:
Signal Addition
Addition: any two signals can be added to form a third signal,
Multiplication:
Multiplication of two signals can be obtained by multiplying their values at every instants . z
z(t) = x (t) y (t)
Time reversal/Folding:
Time reversal of a signal x(t) can be obtained by folding the signal about t=0.
Y(t)=y(-t)
DEPT OF ECE 28
Basic Simulation Lab
Time shifting: The time shifting of x(n) obtained by delay or advance the signal in time by
using y(n)=x(n+k)
If k is a positive number, y(n) shifted to the right i e the shifting delays the signal
If k is a negative number, y(n ) it gets shifted left. Signal Shifting advances the signal
Energy:
Average power:
PROCEDURE:
1. Click on SCILAB Icon
2. Click on launch scinotes
3. Type the program on editor window
4. Save the program with filename.sce extension
5. Execute the program and observe the output/wave forms
PROGRAM:
// Addition
x=input('Enter the sequence 1=');
y=input('Enter the sequence 2=');
DEPT OF ECE 29
Basic Simulation Lab
m=length(x);
n=length(y);
if m>n
y=[y,zeros(1,m-n)];
else
x=[x,zeros(1,n-m)];
end
z=x+y;
disp(z,'Addition result of two unequal length sequences:=');
// Multiplication
x=input('Enter the sequence 1=');
y=input('Enter the sequence 2=');
m=length(x);
n=length(y);
if m>n
y=[y,zeros(1,m-n)];
else
x=[x,zeros(1,n-m)];
end
z = x.*y;
disp (z, ' Multiplication result of two unequal lengths equences:= ' );
// Folding Operation
x = input ( ' Enter the input sequence e := ' );
m = length (x);
s = input ( ' Enter the starting point of original signal=' );
h = s + m -1;
n = s :1: h;
subplot (2 ,1 ,1)
x_location = " o r i g i n ";
y_location = " o r i g i n ";
data_bounds = [ -5 ,0;5 ,5];
plot2d3 (n,x)
xlabel ( ' n===>' )
ylabel ( ' Ampl itude' )
title ( ' Original Sequence ' )
subplot (2 ,1 ,2)
x_location = " o r i g i n ";
y_location = " o r i g i n ";
data_bounds = [ -5 ,0;5 ,5];
plot2d3 (-n,x)
xlabel ( ' n===>' )
ylabel ( ' Ampl itude' )
title ( ' Folded Sequence ' )
// Scaling Operation
DEPT OF ECE 30
Basic Simulation Lab
n = s/C:1/C:h/C ;
subplot (2 ,2 ,3)
x_location = " o r i g i n ";
y_location = " o r i g i n ";
data_bounds = [ -10 ,0;10 ,10];
plot2d3 (n,x)
xlabel ( ' n===>' )
ylabel ( ' Ampl itude' )
title ( ' Time Scaling - Compressed Sequence ' )
// shifting operation
subplot (3 ,1 ,1)
x_location = " o r i g i n ";
y_location = " o r i g i n ";
data_bounds = [ -10 ,0;10 ,10];
plot2d3 (n,x);
xlabel ( ' n===>' )
ylabel ( ' Ampl itdue' )
title ( ' Original Sequence' )
d = input ( ' Enter the delay := ' )
n = lx+d:1: hx+d;
subplot (3 ,1 ,2)
x_location = " o r i g i n ";
y_location = " o r i g i n ";
data_bounds = [ -10 ,0;10 ,10];
plot2d3 (n,x)
xlabel ( ' n===>' )
ylabel ( ' Amplitude' )
title ( ' Delayed Sequence ' )
sum = 0;
for i = 1:M,
sum=sum +(i*i);
end;
disp('Energy of the given sequence is ..... :: ');
Energy =sum
disp(Energy);
disp('Average Power of the given sequence is ..... :: ');
Average_power = sum/M
disp(Average_power)
n1=0:7;
y1=[zeros(1,3),ones(1,5)];
y2=n1-2;
y3=n1/4;
y4=n1;
y5=y1+y2;
y6=y3.*y4;
subplot(3,2,1);
plot2d3 (n1,y1);
xlabel('time');
ylabel('amplitude');
title('Sample Signal');
subplot(3,2,2);
plot2d3 (n1,y2);
xlabel('time');
ylabel('amplitude');
title('Advancing Shifting Signal');
subplot(3,2,3);
plot2d3(n1,y3);
xlabel('time');
ylabel('amplitude');
title('scaling of Signals');
subplot(3,2,4);
plot2d3(n1,y4);
xlabel('time');
ylabel('amplitude');
title('Folded Signal');
subplot(3,2,5);
DEPT OF ECE 32
Basic Simulation Lab
plot2d3(n1,y5);
xlabel('time');
ylabel('amplitude');
title('Addition of Signals');
subplot(3,2,6);
plot2d3(n1,y6);
xlabel('time');
ylabel('amplitude');
title('Multiplication of Signals');
OUTPUT:
Enter the sequence 1=[1 2 3]
Enter the sequence 2=[2 3 4 5]
DEPT OF ECE 33
Basic Simulation Lab
DEPT OF ECE 34
Basic Simulation Lab
401.
DEPT OF ECE 35
Basic Simulation Lab
RESULT:-
Hence various operations on signals and sequences are performed.
VIVA QUESTIONS:-
1. Define Symmetric and Anti-Symmetric Signals?
2. Define Continuous and Discrete Time Signals?
3. What are the Different types of representation of discrete time signals?
4. What are the Different types of Operation performed on signals?
5. What is System?
DEPT OF ECE 36
Basic Simulation Lab
Experiment – 4
EVEN AND ODD PARTS OF SIGNAL AND SEQUENCE & REAL AND
IMAGINARY PARTS OF SIGNAL
AIM: Finding even and odd part of the signal and sequence and also find real and imaginary
parts of signal.
THEORY:
One of characteristics of signal is symmetry that may be useful for signal analysis. Even signals
are symmetric around vertical axis, and Odd signals are symmetric about origin.
Even Signal: A signal is referred to as an even if it is identical to its time-reversed counterparts;
x(t) = x(-t).
Odd Signal: A signal is odd if x(t) = -x(-t). An odd signal must be 0 at t=0, in other words, odd
signal passes the origin. Using the definition of even and odd signal, any signal may be
decomposed into a sum of its even part, xe(t), and its odd part, xo(t), as follows
Even and odd part of a signal: Any signal x(t) can be expressed as sum of even and odd
components i.e .,
x(t)=xe(t)+xo(t)
DEPT OF ECE 37
Basic Simulation Lab
PROCEDURE:
1. Click on SCILAB Icon
2. Click on launch scinotes
3. Type the program on editor window
4. Save the program with filename.sce extension
5. Execute the program and observe the output/wave forms
PROGRAM:
// Even and Odd part of Signal:
clc;
t = 0:10;
x = 2*sin(t);
y = -x;
subplot(2,2,1);
plot2d3(x);
xlabel('Time ----> ');
ylabel('Amplitude ---->');
title('Original signal f(t)');
subplot(2,2,2);
plot2d3(y);
xlabel('Time ---- > ');
ylabel('Amplitude --- >');
title('Original signal f(-t)');
DEPT OF ECE 38
Basic Simulation Lab
clc;
x = input('Enter the sequence :: ');
y = -x;
subplot(2,2,1);
plot2d3(x);
xlabel('Time ----> ');
ylabel('Amplitude ---->');
title('Original signal f(t)');
subplot(2,2,2);
plot2d3(y);
xlabel('Time ---- > ');
ylabel('Amplitude ---->');
title('Original signal f(-t)');
subplot(2,2,3);
plot2d3(even);
xlabel('Time ---- > ');
ylabel('Amplitude ---->');
title('Even part');
clc
x = [0, 2+4*%i, -3+2*%i, 5-1*%i, -2-4*%i, -3*%i, 0]
n = -3 : 3;
xc = conj( x );
xc_folded = xc(: , $ : -1 : 1);
xc_even = 0.5 * [x + xc_folded];
xc_odd = 0.5 * [x - xc_folded];
subplot(2,1,1) ;
plot2d3(n , real(xc_even));
title('Real part of even signal xc(n)')
xlabel ( ' n ' );
ylabel ('Magnitude of Real (xc-even)');
subplot(2,1,2) ;
DEPT OF ECE 39
Basic Simulation Lab
plot2d3( n , imag(xc_even) )
OUTPUT:
1. 2. 3. 4. 3. 2. 1.
DEPT OF ECE 40
Basic Simulation Lab
-->y
y =
- 1. - 2. - 3. - 4. - 3. - 2. - 1.
DEPT OF ECE 41
Basic Simulation Lab
RESULT
Even and odd part of the signal and sequence, real and imaginary parts of signal are computed.
DEPT OF ECE 42
Basic Simulation Lab
Experiment -5
AIM:
Write the program for convolution between two signals and also between two sequences.
THEORY:
DEPT OF ECE 43
Basic Simulation Lab
PROGRAM:
// Convolution of two Sequences
x=input('enter the seq1 :: ');
h=input('enter the seq2 :: ');
subplot(3,1,1);
plot2d3(x);
subplot(3,1,2);
plot2d3(h);
o = conv(x,h);
subplot(3,1,3);
plot2d3(o);
OUTPUT:
enter the seq1 :: [1 2 3 4]
enter the seq2 :: [1 2 3 4]
DEPT OF ECE 44
Basic Simulation Lab
RESULT:
convolution between signals and sequences is computed.
VIVA QUESTIONS:
1. Define Convolution?
2. Define Properties of Convolution?
3. What is the Difference between Convolution& Correlation?
4. Define impulse response?
5. What is Half Wave Symmetry?
DEPT OF ECE 45
Basic Simulation Lab
Experiment – 6
AIM:
Write a program to compute Auto correlation and Cross correlation between signals and
sequences.
THEORY:
Correlations of sequences:
It is a measure of the degree to which two sequences are similar. Given two real-valued
sequences x(n) and y(n) of finite energy,
PROGRAM:
// Auto correlation of a sequence
clc;
a = input('Enter the sequence .... :: ');
res = xcorr(a);
subplot(2,1,1);
DEPT OF ECE 46
Basic Simulation Lab
plot2d3(a);
xlabel('----> Samples');
DEPT OF ECE 47
Basic Simulation Lab
title('Output Sequence');
OUTPUT:
Enter the sequence ..... :: [8 9 7 6 5]
DEPT OF ECE 48
Basic Simulation Lab
DEPT OF ECE 49
Basic Simulation Lab
RESULT:
Auto correlation and Cross correlation between signals and sequences is computed.
VIVA QUESTIONS:
DEPT OF ECE 50
Basic Simulation Lab
Experiment -7
AIM: Write a program to Verify linearity and time invariance properties of a given
continuous/discrete system.
THEORY:
linearity property:
Any system is said to be linear if it satisfies the superposition principal. Superposition principal
state that Response to a weighted sum of input signal equal to the corresponding weighted sum of
the outputs of the system to each of the individual input signals. If x(n) is a input signal and y(n) is
a output signal then
y(n)=T[x(n)]
y1(n)=T[x1(n)] and y2(n)=T[x2(n)]
x3=[a*x1(n) +b *x2(n) ]
Y3(n)= T [x3(n)]
T [a*x1(n)+b*x2(n) ] = a y1(n)+ b y2(n)
PROCEDURE:
1. Click on SCILAB Icon
2. Click on launch scinotes
3. Type the program on editor window
4. Save the program with filename.sce extension
5. Execute the program and observe the output/wave forms
DEPT OF ECE 51
Basic Simulation Lab
PROGRAM:
clc;
n=0:0.1:2;
a= -3; b= 5;
x1=cos(2*%pi*n);
x2=cos(3*%pi*n);
x=a*x1+b*x2;
ic=[0 0];
num=[2.2403 2.4908 2.2403];
den=[1 -0.4 0.75];
subplot (3,1,1);
plot2d3 (n,y);
xlabel('---------> Time');
ylabel('-> Amplitude');
title('y = a*x1 + b*x2');
subplot(3,1,2);
plot2d3(n,yt);
xlabel(' -------- > Time');
ylabel('-> Amplitude');
title('yt = a*y1 + b*y2');
subplot(3,1,3);
plot2d3(n,d);
xlabel(' -------- > Time');
ylabel('-> Amplitude');
title('difference of y and yt');
DEPT OF ECE 52
Basic Simulation Lab
OUTPUT:
RESULT:
hence the Linearity and time invariant properties of a given System is verified.
VIVA QUESTIONS:
DEPT OF ECE 53
Basic Simulation Lab
Experiment -8
COMPUTATION OF UNIT SAMPLE, UNIT STEP AND SINUSOIDAL
RESPONSE OF THE GIVEN LTI SYSTEM AND VERIFYING ITS
PHYSICAL REALIZABILITY AND STABILITY PROPERTIES
AIM: Write a program to compute the Unit sample, unit step and sinusoidal response of the given
LTI system and verifying its stability
THEORY:
A discrete time system performs an operation on an input signal based on predefined criteria
to produce a modified output signal. The input signal x(n) is the system excitation, and y(n) is
the system response. The transform operation is shown as,
If the input to the system is unit impulse i.e. x(n) = δ(n) then the output of the system is
known as impulse response denoted by h(n) where,
h(n) = T[δ(n)]
we know that any arbitrary sequence x(n) can be represented as a weighted sum of discrete
impulses. Now the system response is given by,
DEPT OF ECE 54
Basic Simulation Lab
PROCEDURE:
h = (-0.9).^[0:49];
subplot (2,2,1);
stem ([0:49],h,'filled');
xlabel('Samples');
ylabel('Amplitude');
title('h = (-0.9).^[0:49]');
u = ones(1);
subplot(2,2,2);
stem(u,'filled');
xlabel('Samples');
ylabel('Amplitude');
title('Impulse');
s = conv(u,h);
DEPT OF ECE 55
Basic Simulation Lab
subplot(2,2,[3,4]);
stem([0:49],s(1:50));
xlabel('Samples');
ylabel('Amplitude');
title('Response for an impulse');
h = (-0.9).^[0:49];
subplot (2,2,1);
stem([0:49],h,'filled');
xlabel('Samples');
ylabel('Amplitude');
title('h = (-0.9).^[0:49]');
u = ones(1,50);
subplot(2,2,2);
stem([1:50],u,'filled');
xlabel('Samples');
ylabel('Amplitude');
title('Step');
s = conv(u,h);
subplot(2,2,[3,4]);
stem([0:49],s(1:50));
xlabel('Samples');
ylabel('Amplitude');
title('Response for a step');
u = sin(2*pi*t);
DEPT OF ECE 56
Basic Simulation Lab
subplot(2,2,2);
stem(t,u,'filled');
xlabel('Samples');
ylabel('Amplitude');
title('Sine');
s = conv(u,h);
subplot(2,2,[3,4]);
stem([0:49],s(1:50));
xlabel('Samples');
ylabel('Amplitude');
title('Response for a sine');
n=0:0.1:20;
h= (0.5)*exp(-n);
sum=0;
for k=1:201
if abs(h(k))<10^(-6)
end
sum=sum+h(k);
end
stem(n,h);
disp('The summation value is ....:: ');sum
if sum > 5.0983e+008
disp('The System is unstable');
else
disp('The System is stable');
end;
DEPT OF ECE 57
Basic Simulation Lab
OUTPUT:
DEPT OF ECE 58
Basic Simulation Lab
sum = 5.2542
The System is stable
RESULT:
The Unit sample, unit step and sinusoidal response of the given LTI system is computed and its
stability verified. Hence all the poles lie inside the unit circle, so system is stable.
VIVA QUESTIONS:
DEPT OF ECE 60
Basic Simulation Lab
Experiment – 9
THEORY:
The Gibbs phenomenon, the Fourier series of a piecewise continuously differentiable periodic
function behaves at a jump discontinuity. The n the approximated function shows amounts of
ripples at the points of discontinuity. This is known as the Gibbs Phenomena. partial sum of the
Fourier series has large oscillations near the jump, which might increase the maximum of the
partial sum above that of the function itself. The overshoot does not die out as the frequency
increases, but approaches a finite limit. The Gibbs phenomenon involves both the fact that Fourier
sums overshoot at a jump discontinuity, and that this overshoot does not die out as the frequency
increase.
PROCEDURE:
DEPT OF ECE 61
Basic Simulation Lab
output:
RESULT:
VIVA QUESTIONS:
DEPT OF ECE 62
Basic Simulation Lab
Experiment -10
AIM: Write a program to find the Fourier Transform of a given signal and plotting its magnitude
and phase spectrum.
THEORY:
Fourier Transform:
The Fourier transform as follows. Suppose that ƒ is a function which is zero outside of some
interval [−L/2, L/2]. Then for any T ≥ L we may expand ƒ in a Fourier series on the interval
[−T/2,T/2], where the "amount" of the wave e2πinx/T in the Fourier series of ƒ is given By
definition Fourier Transform of signal f(t) and inverse fourier transform is defined as
PROCEDURE:
DEPT OF ECE 63
Basic Simulation Lab
PROGRAM:
clc ;
f=150 //(' enter the frequency in hertzs ');
Fs=2000 //('enter the samplinf freq in khz ')
Ts=1/(Fs);
N=128 //('enter the DFT sequence ');
n=[0:N-1]*Ts;
x=0.8*cos(2*%pi*f*n);
plot(n,x);
set(gca(),"grid",[1 1]);
data_bounds=([0 -1 ; 0.05 1]);
title(' cosine signal frequency ');
xlabel('time in n(sec) ');
ylabel(' amplitude');
Y=fft(x);
w=0:N-1;
figure;
Xmag=abs(Y);
subplot(2,1,1);
plot(w,Xmag);
set(gca(),"grid",[1 1]);
title(' magnitude of fourier transform ');
xlabel(' frequency index w ------ > ');
ylabel(' magnitude ----- > ');
Xphase= atan(imag(Y),real(Y));
subplot(2,1,2);
plot(w,Xphase);
set(gca(),"grid",[1 1]);
title(' phase of fourier transform ');
xlabel(' frequency index w ------ > ');
ylabel(' phase ----- > ');
DEPT OF ECE 64
Basic Simulation Lab
OUTPUT:
RESULT:
Magnitude and phase spectrum of fourier transform of a given signal is plotted.
DEPT OF ECE 65
Basic Simulation Lab
DEPT OF ECE 66
Basic Simulation Lab
Experiment – 11
AIM: write a program to perform Wave form synthesis using Laplace Transforms
SOFTWARE REQUIRED: PC loaded with SCILAB Software
THEORY:
PROCEDURE:
PROGRAM:
clear all;
close all;
clc;
syms t w s
x=input ('Laplace Transform of a function .... :: ');
disp('is ...... :: ');
xf=laplace(x)
DEPT OF ECE 67
Basic Simulation Lab
xt=ilaplace(xf)
OUTPUT:
Laplace Transform of a function ....:: cos(w*t)
is ......::
xf = s/(s^2+w^2)
Inverse Laplace Transform of a function ....::
is ......::
xt =cos(w*t)
RESULT:
1. Define Laplace-Transform?
2. What is the Condition for Convergence of the L.T?
3. What is the Region of Convergence (ROC)?
4. State the Shifting property of L.T?
5. State convolution Property of L.T?
DEPT OF ECE 68
Basic Simulation Lab
Experiment -12
AIM: : Write the program for locating poles and zeros and plotting pole-zero maps in s-plane
and z-plane for the given transfer function.
THEORY:
Z-transforms
The Z-transform, like many other integral transforms, can be defined as either a one-sided or
two-sided transform.
Bilateral Z-transform
The bilateral or two-sided Z-transform of a discrete-time signal x[n] is the function X(z)
defined as
Unilateral Z-transform
Alternatively, in cases where x[n] is defined only for n ≥ 0, the single-sided or unilateral
Ztransform is defined as
DEPT OF ECE 69
Basic Simulation Lab
PROGRAM:
clc;
clear all;
close all;
H = tf(num,den);
[p z]=pzmap(H);
disp('zeros at z= ');
disp(z);
disp('poles at p= ');
disp(p);
subplot(2,1,1);
pzmap(H);
title('pole zero map in s-domain ');
subplot(2,1,2);
zplane(num,den);
title('pole zero map in z-domain ');
OUTPUT:
Enter the numerator coefficients.....:: [1 0 -3]
Enter the denominator coefficients.....:: [1 -3 4]
zeros at z=
1.7321
-1.7321
poles at p=
1.5000 + 1.3229i
1.5000 - 1.3229i
DEPT OF ECE 70
Basic Simulation Lab
RESULT:
Pole-zero maps are plotted in s-plane and z-plane for the given transfer function
DEPT OF ECE 71
Basic Simulation Lab
Experiment -13
AIM: Write the program for Generation of Gaussian noise (Real and Complex),
computation of its mean, M.S. value and its Skew, kurtosis, and PSD, probability
distribution function.
THEORY:
Gaussian noise is statistical noise that has a probability density function (abbreviated pdf) of the
normal distribution (also known as Gaussian distribution). In other words, the values the noise
can take on are Gaussian-distributed. It is most commonly used as additive white noise to yield
additive white Gaussian noise (AWGN).Gaussian noise is properly defined as the noise with a
Gaussian amplitude distribution. says nothing of the correlation of the noise in time or of the
spectral density of the noise. Labeling Gaussian noise as 'white' describes the correlation of the
noise. It is necessary to use the term "white Gaussian noise" to be correct. Gaussian noise is
sometimes misunderstood to be white Gaussian noise, but this is not the case.
PROCEDURE:
.PROGRAM:
clc;
clear all;
close all;
N= input(' Enter the number of samples .... :: ');
DEPT OF ECE 72
Basic Simulation Lab
R1=randn(1,N);
M=mean(R1);
K=kurtosis (R1);
P=periodgram(R1);
V=var(R1);
x = psd(R1);
subplot(2,2,1);
plot(R1);
xlabel('Sample Number');
ylabel('Amplitude');
title('Normal [Gaussian] Distributed Random Signal');
subplot(2,2,2);
hist(R1);
xlabel('Sample Number');
ylabel('Total');
title('Histogram [Pdf] of a normal Random Signal');
subplot(2,2,[3,4]);
plot(x);
xlabel('Sample Number');
ylabel('Amplitude');
title('PSD of a normal Random Signal');
OUTPUT:
DEPT OF ECE 73
Basic Simulation Lab
RESULT:
Hence Gaussian noise (Real and Complex) is generated and compute mean, M.S. value
and its Skew, kurtosis, and PSD, probability distribution function.
DEPT OF ECE 74
Basic Simulation Lab
Experiment -14
THEORY:
Sampling Theorem:
A bandlimited signal can be reconstructed exactly if it is sampled at a rate atleast twice the
maximum frequency component in it." Figure 1 shows a signal g(t) that is bandlimited
The maximum frequency component of g(t) is fm. To recover the signal g(t) exactly from its
samples it has to be sampled at a rate fs ≥ 2fm. The minimum required sampling rate fs = 2fm is
called ' Nyquist rate
PROCEDURE:
DEPT OF ECE 75
Basic Simulation Lab
PROGRAM:
clc;
clear all;
t=-5:.1:5;
T=4;
fm=1/T;
x=cos(2*pi*fm*t);
subplot(2,2,1);
plot(t,x);
xlabel('time');
ylabel('x(t)')
title('continous time signal')
grid;
n1=-2:1:2;
fs1=1.6*fm;
fs2=2*fm;
fs3=8*fm;
x1=cos(2*pi*fm/fs1*n1);
subplot(2,2,2);
stem(n1,x1);
xlabel('time');ylabel('x(n)')
title('discrete time signal with fs<2fm')
hold on
subplot(2,2,2);
plot(n1,x1)
grid;
n2=-3:1:3;
x2=cos(2*pi*fm/fs2*n2);
subplot(2,2,3);
stem(n2,x2);
xlabel('time');
ylabel('x(n)')
title('discrete time signal with fs=2fm')
hold on
subplot(2,2,3);
plot(n2,x2)
grid;
n3=-10:1:10;
x3=cos(2*pi*fm/fs3*n3);
subplot(2,2,4);
stem(n3,x3);
xlabel('time');
ylabel('x(n)')
title('discrete time signal with fs>2fm')
hold on
subplot(2,2,4);
DEPT OF ECE 76
Basic Simulation Lab
plot(n3,x3)
grid;
OUTPUT:
RESULT:
VIVA-VOCE QUESTIONS:
DEPT OF ECE 77
Basic Simulation Lab
Experiment -15
AIM: Write the program for Removal of Noise by Auto Correlation/Cross Correlation.
THEORY:
Detection of a periodic signal masked by random noise is of great importance .The noise signal
encountered in practice is a signal with random amplitude variations. A signal is uncorrelated with
any periodic signal.
Detection of noise by Auto-Correlation:
S(t)=Periodic Signal (Transmitted) , mixed with a noise signal n(t).
Then f(t) is received signal is [s(t ) + n(t) ]
Let Qff(T) =Auto Correlation Function of f(t)
Qss(t) = Auto Correlation Function of S(t)
Qnn(T) = Auto Correlation Function of n(t)
T/2
Qff(T)= Lim 1/T ∫ f(t)f(t-T) dt
T--∞ -T/2
T/2
= Lim 1/T ∫ [s(t)+n(t)] [s(t-T)+n(t-T)] dt
T--∞ -T/2
=Qss(T)+Qnn(T)+Qsn(T)+Qns(T)
The periodic signal s(t) and noise signal n(t) are uncorrelated
Qsn(t)=Qns(t)=0 ;
Then Qff(t)=Qss(t)+Qnn(t)
The Auto correlation function of a periodic signal is periodic of the same frequency and the Auto
correlation function of a non periodic signal is tends to zero for large value of T since s(t) is a
DEPT OF ECE 78
Basic Simulation Lab
periodic signal and n(t) is non periodic signal so Qss(T) is a periodic where as a Qnn(T) becomes
small for large values of T Therefore for sufficiently large values of T Qff(T) is equal to Qss(T).
PROCEDURE:
PROGRAM:
clear all;
close all;
clc;
t=0:0.1:pi*4;
s=sin(t);
k=2;
subplot(3,1,1);
plot(s);
xlabel('---> time');
ylabel('-> Amplitude');
title('Original signal');
n=rand(1,126);
f=s+n;
subplot(3,1,2);
plot(f);
xlabel('---> time');
ylabel('-> Amplitude');
title('Signal+noise');
as=xcorr(s,s);
subplot(3,1,3);
plot(as);
xlabel('---> time');
ylabel('-> Amplitude');
title('auto correlation s(t)');
DEPT OF ECE 79
Basic Simulation Lab
figure;
an=xcorr(n,n);
subplot(3,1,1)
plot(an);
xlabel('---> time');
ylabel('-> Amplitude');
title('auto correlation n(t)');
af=xcorr(f,f);
subplot(3,1,2)
plot(af);
xlabel('---> time');
ylabel('-> Amplitude');
title('auto correlation f(t)');
hh=as+an;
subplot(3,1,3)
plot(hh);
xlabel('---> time');
ylabel('-> Amplitude');
title('addition of s(t) and n(t)');
OUTPUT:
DEPT OF ECE 80
Basic Simulation Lab
RESULT:
VIVA-VOCE QUESTIONS:
DEPT OF ECE 81
Basic Simulation Lab
Experiment -16
THEORY:
PROCEDURE:
PROGRAM:
clear all;
close all;
clc;
h=1/N;
x=0:h:M;
y=cos(3*pi*x);
subplot(4,1,1);
plot(x,y);
DEPT OF ECE 82
Basic Simulation Lab
xlabel('---> time');
ylabel('-> Amplitude');
title('Original signal');
w=rand(1,M*N+1);
subplot(4,1,2);
plot(x,w);
xlabel('---> time');
ylabel('-> Amplitude');
title('Noise');
k=y+w;
subplot(4,1,3);
plot(x,k);
xlabel('---> time');
ylabel('-> Amplitude');
title('Signal+noise');
m=xcorr(k);
subplot(4,1,4)
plot(x,0.01*m(1:M*N+1));
xlabel('---> time');
ylabel('-> Amplitude');
title('Recovered signal');
OUTPUT:
DEPT OF ECE 83
Basic Simulation Lab
RESULT:
VIVA-VOCE QUESTIONS:
Experiment -17
THEORY:
The wiener-khinchin theorem states that the power spectral density of a wide sense stationary
random process is the flourier transform of the corresponding autocorrelation function.
DEPT OF ECE 84
Basic Simulation Lab
PROCEDURE:
PROGRAM:
clc
clear all;
t=0:0.01:2*pi;
x=sin(2*t);
subplot(3,2,1);
plot(x);
au=xcorr(x,x);
Subplot (3,2,2);
plot (au);
v=fft(au);
subplot(3,2,3);
plot(abs(v));
fw=fft(x);
subplot(3,2,4);
plot(fw);
fw2=(abs(fw)).^2;
subplot(3,2,5);
plot(fw2);
OUTPUT:
DEPT OF ECE 85
Basic Simulation Lab
RESULT:
VIVA-VOCE QUESTIONS:
DEPT OF ECE 86
Basic Simulation Lab
Experiment -18
AIM: Write a program for Checking a Random Process for Stationary in Wide Sense
DEPT OF ECE 87
Basic Simulation Lab
THEORY:
The concept of stationarity plays an important role in solving practical problems involving
random processes. Just like time-invariance is an important characteristics of many deterministic
systems, stationarity describes certain time-invariant property of a class of random processes.
Stationarity also leads to frequency-domain description of a random process.
invariant with time. In terms of the joint distribution function, is called SSS if
Thus, the joint distribution functions of any set of random variables does not
depend on the placement of the origin of the time axis. This requirement is a very strict. Less strict
form of stationarity may be defined.
PROCEDURE:
PROGRAM:
clear all;
close all;
clc;
syms x
z = input('Enter the function ..... :: ');
Max = input('Max limit ....:: ');
Min = input('Min limit ....:: ');
mean_value = int(z,Min,Max)
y = subs(z,x,x+5);
Auto_correlation = int(z*y,Min,Max)
OUTPUT:
Enter the function ..... :: 10*cos(10*x + 100)
Max limit ....:: 2*pi
Min limit ....:: 0
mean_value =0
Auto_correlation =100*cos(50)*pi
If the mean value is constant and Auto Correlation is not a function of x variable, then the
Random Process is Wide Sense stationary.
RESULT:
DEPT OF ECE 89
Basic Simulation Lab
VIVA-VOCE QUESTIONS:
DEPT OF ECE 90