bs lab manual new gk
DESCRIPTION
laboratroy works filesTRANSCRIPT
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
CODE OF CONDUCT FOR THE STUDENTS
All students must observe the Dress Code while in the laboratory.
Sandals or open-toed shoes are NOT allowed.
Login in the register.
All bags must be left at the indicated place.
The lab timetable must be strictly followed.
Be PUNCTUAL for your laboratory session.
Program must be executed within the given time.
Noise must be kept to a minimum.
Workspace must be kept clean and tidy at all time.
Handle the systems and interfacing kits with care.
All students are liable for any damage to the accessories due to their own negligence.
All interfacing kits connecting cables must be RETURNED if you taken from the lab supervisor.
Students are strictly PROHIBITED from taking out any items from the laboratory.
Students are NOT allowed to work alone in the laboratory without the Lab Supervisor
USB Ports have been disabled if you want to use USB drive consult lab supervisor.
Report immediately to the Lab Supervisor if any malfunction of the accessories, is there.
Before leaving the lab
Place the chairs properly.
Turn off the system properly
Turn off the monitor.
Please check the laboratory notice board regularly for updates.
Logout the register.
1
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
LABORATORY INSTRUCTIONS
You should be punctual for your laboratory session and should not leave the lab without the permission of the teacher. Each student is expected to have his/her own lab book where they will take notes on the experiments as they are completed. The lab books will be checked at the end of each lab session. Lab notes are a primary source from which you will write your lab reports.
Organization of the Laboratory
It is important that the programs are done according to the timetable and completed within the scheduled time. You should complete the pre-lab work in advance and utilize the laboratory time for verification only. The aim of these exercises is to develop your ability to understand, analyze and test them in the laboratory. A member of staff and a Lab assistant will be available during scheduled laboratory sessions to provide assistance. Always attempt program first without seeking help. When you get into difficulty; ask for assistance.
Assessment
The laboratory work of a student will be evaluated continuously during the semester for 25 marks. Of the 25 marks, 15 marks will be awarded for day-to-day work. For each program marks are awarded under three heads:
Observation & viva – 5marks, &
Record of the Experiment – 5marks
Internal lab test(s) conducted during the semester carries 10 marks.End semester lab examination, conducted as per the JNTU regulations, carries 50 marks.At the end of each laboratory session you must obtain the signature of the teacher along with the marks for the session out of 10 on the lab notebook.
Lab ReportsNote that, although students are encouraged to collaborate during lab, each must individually prepare a report and submit. They must be organized, neat and legible. Your report should be complete, thorough, understandable and literate. You should include a well-drawn and labeled engineering schematic for each circuit investigatedYour reports should follow the prescribed format, to give your report structure and to make sure that you address all of the important points. Graphics requiring- drawn straight lines should be done with a straight edge. Well drawn free-hand sketches are permissible for schematics.
2
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Space must be provided in the flow of your discussion for any tables or figures. Do not collect figures and drawings in a single appendix at the end of the report.Reports should be submitted within one week after completing a scheduled lab session.
PresentationExperimental facts should always be given in the past tense. Discussions or remarks about the presentation of data should mainly be in the present tense. Discussion of results can be in both the present and past tenses, shifting back and forth from experimental facts to the presentation. Any specific conclusions or deductions should be expressed in the past tense.
Report Format: Lab write ups should consist of the following sections:
Aim: Equipments:
Circuit Diagram:
Theory:
Procedure:
Expected Waveform:
Observation and Calculations:
Results:
Conclusions:
.
Note: Diagrams if any must be drawn neatly on left hand side.
3
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
LIST OF EXPERIMENTS
1. Basic Operations on Matrices.
2. Generations of Various Signals and sequences (periodic and Aperiodic), such as
unit impulses, unit step, square, saw tooth, triangular, sinusoidal, ramp, sinc.
3. Operation on Signals and sequences such as addition, Multiplication, Scaling,
Shifting, Folding, Computation of energy and average power
4. Finding the even and odd parts of signal/sequence and real and imaginary parts
of signal.
5. Convolution between Signals and Sequences
6. Auto correlation and cross correlation between signals and sequences.
7. Verification of linearity and time invariance properties of a given
continuous/discrete system.
8. Computation of unit samples, unit step and sinusoidal response of the given LTI
system and verifying its physical realiazability and stability properties.
9. Gibbs phenomenon
10. Finding the Fourier Transform of a given signal and plotting its magnitude and
phase spectrum.
11. Wave form synthesis using Laplace Transforms.
12. Locating the zeros and poles and plotting the pole-zero maps in S-plane and Z-
plane for the given transfer function.
13. Generation of Gauss ion noise (Real and Complex), computation of its mean,
M.S. value and 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 wiener – Khinchine relations.
18. Checking a random process for stationary in wide sense
4
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
TABLE OF CONTENTS
S.NO UNIT
NO
TOPIC WEEK PAGE
NO
1 I Basic Operations on Matrices. w-1 12
2 I Generations of Various Signals and sequences
(periodic and Aperiodic), such as unit impulses,
unit step, square, saw tooth, triangular,sinusoidal,
ramp, sinc.
w-2 15
3 II Operation on Signals and sequences such as
Addition, Multiplication, Scaling,Shifting,Folding,
Computation of energy and average power
w-3 28
4 II Finding the even and odd parts of signal/sequence
and real and imaginary parts of signal.
w-4 32
5 II Gibbs phenomenon w-5 62
6 III Convolution between Signals and Sequences w-5 37
7 III Finding the Fourier Transform of a given signal
and plotting its magnitude and phase spectrum.
w-6 65
8 IV Verification of linearity and time invariance
properties of a given continuous/discrete system.
w-7 51
9 IV Computation of unit samples, unit step and
sinusoidal response of the given LTI system and
verifying its physical realiazability and stability
properties.
w-8 56
10 IV Verification of wiener – Khinchine relations w-9 87
11 V Auto correlation and cross correlation between
signals and sequences.
w-9 44
12 V Generation of Gauss ion noise (Real and
Complex), computation of its mean, M.S. value
and its Skew, kurtosis, and PSD, probability
distribution function
w-10 74
5
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
13 V Removal of noise by auto correlation/cross
correlation.
w-11 81
14 V Extraction of periodic signal masked by noise
using correlation.
w-12 84
15 V Checking a random process for stationary in
wide sense
w-12 90
16 VI Sampling theorem verification w-13 77
17 VII Wave form synthesis using Laplace Transforms w-14 68
18 VIII Locating the zeros and poles and plotting the
pole-zero maps in S-plane and Z-plane for the
given transfer function.
w-15 70
Tools required:-
1.Hardware:
Computer (Pentium 4R, dual core processor,2.60 GHz, 2GB RAM,320GB hard disk)
2.Software:
MATLAB 2012
6
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
MATLAB Programming execution steps:-
Step-1
Step-2
Step-3
7
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Step-4
8
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Step-5
9
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Step-6
10
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Step-7
Step-8
11
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 1
To perform basic operations on matrices
Aim:-: Basic Operations on Matrices (Addition, Subtraction, Multiplication, Determinant, Trace, Inverse, Rank etc.,)
Pre requisite:-
1. Study all the basic operations on Matrices
Apparatus Required:-
1. MATLAB 2012
Algorithm:-
1. Basic Program for Addition, Subtraction and Multiplication of two matrices.
1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Give the variable name for first matrix.5. Give the variable name for second matrix.6. Write the function to find size of matrices7. Write the functions to find the addition ,subtraction, ,multiplication of two matrices
Program:-clc;clear all;close all;A = input('Enter the Matrix A ::');B = input('Enter the Matrix B ::');%%%% Find the size of matricesdisp('The sise of Matrix A is .... :: ');disp(size(A));disp('The sise of Matrix B is .... :: ');disp(size(B)); %%%% Addition of two matrices disp('Addition of A and B Matrices is .....:: ');disp(A + B); %%%%% Subtration of two matricesdisp('Subtraction of A and B Matrices is .....:: ');disp(A - B); %%%%% Multiplication (ELEMENT BY ELEMENT) of two matricesdisp('Multiplication of A and B Matrices is .....:: ');disp(A .* B);
12
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Enter the Matrix A ::[1 2 3 4 5 6 7 ]Enter the Matrix B ::[1 2 3 4 5 6 7 ]The sise of Matrix A is .... :: 1 7
The sise of Matrix B is .... :: 1 7
Addition of A and B Matrices is .....:: 2 4 6 8 10 12 14
Subtraction of A and B Matrices is .....:: 0 0 0 0 0 0 0
Multiplication of A and B Matrices is .....:: 1 4 9 16 25 36 49
Algorithm:-
2. Basic Program for Determinant, Trace, Inverse, Rank of a Square Matrix.
1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Give the variable name for square matrix.5. Write the functions to find the Determinant, Trace, Inverse, Rank of a Square Matrix.
Program:-
clear all;close all;clc; A = input('Enter the Square Matrix A ::'); % Finding the Rank of the matrixdisp('Rank of Matrix A is ::');disp(rank(A)); % Find the determinent of the matrixdisp('Determinent of Matrix A is ::'); disp(det(A)); % Find the trace of the matrixdisp('Trace of Matrix A is ::');disp(trace(A)); % Find the Inverse of the matrix disp('Inverse of Matrix A is ::');disp(inv(A));
13
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Enter the Square Matrix A ::[1 2 3;3 2 3;1 3 3]Rank of Matrix A is :: 3
Determinent of Matrix A is :: 6
Trace of Matrix A is :: 6
Inverse of Matrix A is :: -0.5000 0.5000 0.0000 -1.0000 0 1.0000 1.1667 -0.1667 -0.6667
Result:-
Viva Questions:-1. What is MATLAB2. Expand MATLAB? And importance of MATLAB3. What is clear all and close all will do?
4. What is disp( ) and input( )
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
14
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 2
Generation of various signals and sequences
Aim:-: Generate various signals and sequences (Periodic and Aperiodic), such as Unit Impulse, Unit Step, Square, Saw Tooth, Triangular, Sinusoidal, Ramp, Sinc.
Pre requisite:-
1. Study all the Basic Signals and Sequences2. Study all the Functional Representations of Basic Signals and Sequences
Apparatus Required:-
1. MATLAB 2012
Algorithm:-
1. Generate Sinusoidal signal
1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Give the variable name for number of cycles.5. Specify the time period of the signal6. Give the amplitude of the signal with variable 7. Give the function to plot the continuous signal8. Give the names for x label and y label and title of the figure9. Give the function to plot the discrete signal10. Give the names for x label and y label and title of the figure
.Program:-
clc;clear all;close all;
N = input('Enter the number of cycles ...:: ');t = 0:0.05:N;x = sin(2*pi*t);
subplot(1,2,1);plot(t,x);xlabel('---------> Time');ylabel('---------> Amplitude');title('Sinusoidal');
subplot(1,2,2);stem(t,x);xlabel('---------> Time');ylabel('---------> Amplitude');
15
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
title('Sinusoidal');
OUTPUT
Enter the number of cycles ...:: 2
16
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:-
2. Generate Unit Impulse function
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the input variable name for 1x1 matrix consisting of all ones5. Give the input variable name for 1x2 matrix consisting of all zeros6. Give the out put variable and write output function interms of inputs 7. Give the function to plot the discrete signal of output function.8. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc;
x = ones(1,1);y = zeros(1,2);z = [y, x, y];stem(z);xlabel('---------> Time');ylabel('---------> Amplitude');title('Unit Impulse');
OUTPUT
17
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:-
3. Generate Unit Step function
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the input variable name for matrix consisting of all ones5. Give the function to plot the continuous signal6. Give the function to plot the discrete signal.7. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc;
x = ones(100);
subplot(2,1,1);plot(x);xlabel('---------> Time');ylabel('---------> Amplitude');title('Step signal');
subplot(2,1,2);stem(x);xlabel('---------> Time');ylabel('---------> Amplitude');title('Step signal');
18
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Algorithm:-
4. Generate Ramp function
1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Specify the time period of the signal5. Give the amplitude of the signal with variable (y=t)6. Give the function to plot the continuous signal7. Give the names for x label and y label and title of the figure8. Give the function to plot the discrete signal9. Give the names for x label and y label and title of the figure
19
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Program:-
clear all;close all;clc;
t = 0:25;y = t;
subplot(1,2,1);plot(t,y);xlabel('---------> Time');ylabel('---------> Amplitude');title('Ramp function');
subplot(1,2,2);stem(t,y);xlabel('---------> Time');ylabel('---------> Amplitude');title('Ramp function');
OUTPUT
20
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:-
Generate Sawtooth Waveform1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Give the variable name for number of cycles.5. Specify the time period of the signal6. Give the amplitude of the signal with variable 7. Give the function to plot the continuous signal8. Give the names for x label and y label and title of the figure9. Give the function to plot the discrete signal10. Give the names for x label and y label and title of the figure
Program:-clc;clear all;close all;
N = input('Enter the number of cycles ...:: ');
t1 = 0:25;t = [];
for i = 1:N,t = [t,t1];
end;
subplot(2,1,1); plot(t);xlabel('---------> Time');ylabel('---------> Amplitude');title('Sawtooth waveform');
subplot(2,1,2); stem(t);xlabel('---------> Time');ylabel('---------> Amplitude');title('Sawtooth waveform');
OUTPUT
Enter the number of cycles ...:: 3
21
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Generate Triangular Waveform
1. Clear the command window2. Clear all the global variables3. Delete all existed figures in the window4. Give the variable name for number of cycles.5. Give the variable name for enter the time period6. Specify the time period of the signal7. Give the amplitude of the signal with variable 8. Give the function to plot the continuous signal9. Give the names for x label and y label and title of the figure10. Give the function to plot the discrete signal11. Give the names for x label and y label and title of the figure
Program:-clc;clear all;close all;
N = input('Enter the number of cycles .....:: ');M = input('Enter the period ....:: '); t1 = 0:0.1:M/2;t2 = M/2:-0.1:0;t = [];
22
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
for i = 1:N, t = [t,t1,t2];end; subplot(1,2,1); plot(t);xlabel('---------> Time');ylabel('---------> Amplitude');title('Triangular waveform'); subplot(1,2,2); stem(t);xlabel('---------> Time');ylabel('---------> Amplitude');title('Triangular waveform');
OUTPUT
Enter the number of cycles .....:: 3Enter the period ....:: 4>>
23
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Generate Square waveform
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the variable name for number of cycles.5. Give the variable name for enter the time period6. Give the amplitude of the signal with variable 7. Give the function to plot the continuous signal8. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; N = input('Enter the number of cycles in a square wave....:: ');M = input('Enter the period of the square wave ....:: '); y=0:0.001:2;for j=0:M/2:M*N; x=y; plot(j,x,'r'); hold on;endfor k=0:M:M*N; x=k+y; m=2; plot(x,m,'r') hold onendfor k=2:M:M*N; x=k+y; m=0; plot(x,m,'r'); hold on;endhold offaxis([0 12 -0.5 2.5])xlabel('time---->');ylabel('Amplitude--->');title('Square wave');
OUTPUTEnter the number of cycles in a square wave....:: 3Enter the period of the square wave ....:: 4
24
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:-
Generate Sinc function1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period of the signal5. Specify the amplitude of the sinc signal 6. Give the function to plot the sinc signal7. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc;
t = -3:0.1:3;x = sin(pi*t)./(pi*t);
subplot(1,2,1); plot(x);xlabel('---------> Time');ylabel('---------> Amplitude');title('Sinc function');axis([0,100,-0.5,1.0]);
subplot(1,2,2); stem(x);xlabel('---------> Time');ylabel('---------> Amplitude');title('Sinc function');axis([0,100,-0.5,1.0]);
25
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Result:-
Viva questions:-
1. What is subplot(), stem(), plot()?
2. What is xlabel(), ylabel(), title()?
3. What do you mean by time scale?
4. What is system?
5. What is even and odd signals?
Frequently asked questions:-
1.What is signal?
A signal is defined as any physical quantity that varies with time , space or any
independent variable.
2.Classify the signals?
Signals are classified as
26
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
a) Continuous, discrete time signals
b) Deterministic and random signals
c) Periodic and aperiodic signals
d) Energy and power signals
e) Even and odd signals
f) Causal and non causal signals
3.What is the difference between continuous and discrete time signals?
C.T signals are signals which are defined at all instants of time, where D.T signals are
signals which are defined only at discrete instants of time.
4.Explain periodic and aperiodic signals?
A C.T signal x(t) is said to be periodic if it is satisfies the condition
x(t)=x(t+T) for all t.
whereas a C.T signal is said to be aperiodic if the above condition is not satisfied even
for one value of t.
5. Explain unit step, ramp signals?
unit step:-
u(t)=1 for t>0 or t=0
=0 for t<0
Ramp:-
r(t)=t for t>0 or t=0
=0 for t<0
r(t)=t u(t)
References:-1.Getting started with MATLAB by Rudra Pratap
2.Signals and systems by .Ramesh Babu
3.Signals and systems by A.Anand Kumar
4.Signals, systems and communications by B.P.Lathi
27
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment:3
Performing operations of signals and sequences
Aim:-Operation on Signals and Sequences such as Addition, Multiplication, Scaling, Shifting, Folding, Computation of Energy and Average Power.
Pre requisite:-
1. Study the concepts of Scaling, Folding and Shifting of Signals or Sequences2. Study the concepts of energy and Average Power Calculation of Signals or Sequences
Equipment Required:-
1. MATLAB 2012
Algorithm:- Addition and Multiplication of two Sequences
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the variable name for first input sequence5. Give the variable name for second input sequence6. Specify the length of first sequence with variable7. Specify the length of second sequence with variable8. Add two input sequences and assign the result with variable 9. Plot the discrete signals for two input sequences and out put sequence.10. Give the names for x label and y label and title of the figure11. Multiply two input sequences and assign the result with variable 12. Plot the discrete signal for output sequence.13. Give the names for x label and y label and title of the figure
Program:-clear all;close all;clc; x = input(' Enter sequence 1 :: ');y = input(' Enter sequence 2 :: ');M = length(x);N = length(y); subplot(2,2,1);stem(x);xlabel('---->Time ');ylabel('---->Amplitude ');title('Input sequence 1');subplot(2,2,2);stem(y);xlabel('---->Time ');ylabel('---->Amplitude ');title('Input sequence 2');
28
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
if M > N z = x + [y,zeros(1,M-N)];else z = [x,zeros(1,N-M)] + y;end; subplot(2,2,3);stem(z);xlabel('---->Time ');ylabel('---->Amplitude ');title('Addition of sequences 1 and 2');
if M > N a = x.*[y,zeros(1,M-N)];else a = [x,zeros(1,N-M)].*y;end; subplot(2,2,4);stem(a);xlabel('---->Time ');ylabel('---->Amplitude ');title('Multiplication of sequences 1 and 2');
OUTPUT
Enter sequence 1 :: [1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]Enter sequence 2 :: [5 6 7 8 9 9 8 7 6 5]
29
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-
1. What is Length() function2. What do you mean by zeros(m,n) and ones(m,n)?3. Is the sum of two periodic signls always periodic?
4.5. What are the basic operations on signals?6. What is amplitude scaling and time scaling?7. What is time shifting and time reversal?
Frequently asked questions:-
1. What are the basic operations on signals?a) Time shiftingb) Time reversal c) Time scalingd) Amplitude scalinge) Signal additionf) Signal multiplication
2. What is analog and digital signal?
C.T signals are also called analog signals and the signals that are discrete in time and
quantized in amplitude are called digital signals.
3.Distinguish between deterministic and random signals.
If the signal can be represented by a mathematical equation then it is called
deterministic signal otherwise it is random signal.
4.what is time reversal?The time reversal, also called time folding of a signal x(t) can be obtained by folding the signal about t=0.
5.What is time scaling?
Time scaling may be time expansion or time compressition. The time scaling of a
signal can be accomplished by replacing t by at in it.
y(t)=x(at)
30
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment: 4
Finding the even and odd part of signal/sequence
Aim:-: Finding the even and odd parts of signal/sequence and real and imaginary parts of signal.
Pre requisite:-
1. Study all the Basic Signals and Sequences2. Study all the Functional Representations of Basic Signals and Sequences
Apparatus Required:-
1. MATLAB 2012
Algorithm:- Even and Odd part of Signal
1. Clear all the global variables2. Delete all existed figures in the window
31
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
3. Clear the command window4. Specify the time period5. Specify the amplitude for f(t) signal6. Specify the amplitude for f(-t) signal7. Plot the discrete signal for f(t)8. Plot the discrete signal for f(-t)9. Give the names for x label and y label and title of the figure10. Specify the functions for even part and odd part of the original signals11. Plot the discrete signal for even and odd part of original signal.12. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; t = 0:10;x = 2*sin(t);y = -(4 * x); subplot(2,2,1);stem(x);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Original signal f(t)'); subplot(2,2,2);stem(y);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Original signal f(-t)');
even =0.5*(x + y); subplot(2,2,3);stem(even);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Even part');
odd = 0.5*(x - y); subplot(2,2,4);stem(odd);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Odd part');OUTPUT
32
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Even and Odd part of Sequence
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the input variable for enter the sequence5. Specify the other variable interms of input variable6. Plot the discrete signal for f(t)7. Plot the discrete signal for f(-t)8. Give the names for x label and y label and title of the figure9. Specify the functions for even part and odd part of the original signals10. Plot the discrete signal for even and odd part of original signal.11. Give the names for x label and y label and title of the figure
2. Even and Odd part of Sequence
clear all;close all;
33
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
clc;
x = input('Enter the sequence :: ');y = -x;
subplot(2,2,1);stem(x);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Original signal f(t)');
subplot(2,2,2);stem(y);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Original signal f(-t)');
even =0.5*(x + y);
subplot(2,2,3);stem(even);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Even part');
odd = 0.5*(x - y);
subplot(2,2,4);stem(odd);xlabel('Time ----> ');ylabel('Amplitude ---->');title('Odd part');
OUTPUT
Enter the sequence :: [1 2 3 4 3 2 1]>> x
x =
1 2 3 4 3 2 1
>> y
y =
-1 -2 -3 -4 -3 -2 -1
34
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
.
Result:-
Viva questions:-1. What do you mean by real part and an imaginary part ?
2. Distinguish between even and odd signals?
3. Can every signal be decomposed into even and odd parts?
4. Distinguish between energy and power signals?
5. How to get even and odd part from the signal?
6. What are the types of representation of the discrete signals?
7. Find the even and odd component of x(t)=1+2t+3t2+4t3
Frequently asked questions:-
1. What is an even function?
35
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
The signal x(t) is said to be even if it satisfies the condition
x(t)=x(-t)
2. What is an odd function?
The signal x(t) is said to be even if it satisfies the condition
-x(t)=x(-t)
3. Write the expansions for even and odd parts of a signal
x even=1/2 [x(t)+x(-t)]
x odd=1/2 [x(t)-x(-t)]
4. Define causal and non causal signals?
A signal x(t) is said to be causal if x(t)=0 for t<0, otherwise the signal is non-causal.
5. Define anti causal signal?
A signal x(t) is said to be anti-causal if x(t)=0 for t>0.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment: 5
Convolution between signals and sequences
Aim:-: Verifying the Convolution between Signals and Sequences
Pre requisite:-
1. Study the details of linear convolution 2. Study the details of circular convolution
Apparatus Required:-
1. MATLAB 2012Algorithm:-
36
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Linear Convolution of two Sequences
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the variable name for first input sequence5. Give the variable name for second input sequence6. Plot the discrete signals for two input sequences.7. Specify the functions for convolution between two input sequences.8. Plot the discrete signal for an output.
Program:-
clear all;close all;clc; x=input('enter the seq1 :: ');h=input('enter the seq2 :: ');
subplot(3,1,1);stem(x);
subplot(3,1,2);stem(h);o=zeros(1,length(x)+length(h)-1); for m=1:length(x), for n=1:length(h), y(m,n)=x(m)*h(n); end;end;for n=1:length(x)+length(h)-1, for i=1:length(x), for j=1:length(h), if(i+j==n+1) o(n)=o(n) + y(i,j); end; end; end;end;
subplot(3,1,3);stem(o);
OUTPUTenter the seq1 :: [1 2 3 4 3 2 1]enter the seq2 :: [4 3 2 1 2 3 4]
37
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Linear Convolution of two Signals
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the amplitude with a variable for first signal6. Specify the amplitude with a variable for second signal7. Plot the discrete signals for two input sequences.8. Specify the functions for convolution between two input signals9. Plot the discrete signal for an output.
38
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
clear all;close all;clc; t = 1:10;x = sin(t);h = square(t); subplot(3,1,1);stem(x);
subplot(3,1,2);stem(h); o=zeros(1,length(x)+length(h)-1); for m=1:length(x), for n=1:length(h), y(m,n)=x(m)*h(n); end;end;for n=1:length(x)+length(h)-1, for i=1:length(x), for j=1:length(h), if(i+j==n+1) o(n)=o(n) + y(i,j); end; end; end;end;
subplot(3,1,3);stem(o);
OUTPUT
>> x
x =
Columns 1 through 7
0.8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794 0.6570
Columns 8 through 10
0.9894 0.4121 -0.5440
>> h
h =
39
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
1 1 1 -1 -1 -1 1 1 1 -1
>>
Algorithm:- Linear Convolution of two Signals
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the amplitude with a variable for first signal6. Specify the amplitude with a variable for second signal7. Plot the discrete signals for two input sequences.8. Specify the convolution function between two input signals9. Plot the discrete signal for an output.
40
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Program:-
clear all;close all;clc;
t = 1:10;x = sin(t);h = square(t); subplot(3,1,1);stem(x);
subplot(3,1,2);stem(h); o = conv(x,h);
subplot(3,1,3);stem(o);
OUTPUT
>> x
x =
Columns 1 through 7
0.8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794 0.6570
Columns 8 through 10
0.9894 0.4121 -0.5440
>> h
h =
1 1 1 -1 -1 -1 1 1 1 -1
41
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-1. What is the importance of convolution?
2. Explain the term convolution as applied to a system. illustrate your ans with suitable
examples?
3. What is the difference between Linear and Circular Convolution?
4. Define the term linearity?
5. What do you mean by periodic or circular convolution?
Frequently asked questions:-
1. What is Convolution?
Convolution is a mathematical operation which is used to express the input-output
relationship of an LTI system
2. What is the convolution of a signal with an impulse?
The convolution of a signal with an impulse is equal to that signal itself.
3. State time convolution theorem?
time convolution theorem states that the convolution in time domain is equal to
multiplication of their spectra in frequency domain .
4. State the shift property of convolution?
If x(t)*y(t)=z(t)
Then x(t)*y(t-T)= z(t-T)
x(t-T)*y(t)= z(t-T)
and x(t-T1)*y(t-T2)= z(t-T1-T2)
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
42
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 6
Auto correlation and cross correlation between signals and sequences.
Aim:-: Auto Correlation and Cross Correlation between Signals and Sequences
Pre requisite:-
1. Study in detail about Correlation and how to calculate Correlation of two signals or sequences
Apparatus Required:-
1. MATLAB 2012
Algorithm:- Auto Correlation of a Sequence
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the variable name for first input sequence5. Specify the output function as correlation of input6. Plot the discrete signal for input sequence.7. Plot the discrete signal for an output.8. Give the names for x label and y label and title of the figure
Program:-
1. Auto Correlation of a Sequence
clear all;close all;clc; a = input('Enter the sequence ....:: '); res = xcorr(a); subplot(2,1,1);stem(a);xlabel('----> Samples');ylabel('----> Amplitude');title('Input Sequence'); subplot(2,1,2);stem(res);xlabel('----> Samples');
43
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
ylabel('----> Amplitude');title('Output Sequence');
OUTPUT
Enter the sequence ....:: [1 2 3 4]
Algorithm:- Auto Correlation of a signal
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the input signal function6. Specify the output function as correlation of input7. Plot the discrete signal for input signal.8. Plot the discrete signal for an output.9. Give the names for x label and y label and title of the figure
44
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Program:-
clear all;close all;clc;t = 0:0.01:2;a = cos(2 * pi * t); res = xcorr(a);
subplot(2,1,1);plot(a);xlabel('----> Samples');ylabel('----> Amplitude');title('Input Sequence'); subplot(2,1,2);plot(res);xlabel('----> Samples');ylabel('----> Amplitude');title('Output Sequence');
OUTPUT
45
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Cross Correlation of two Sequences
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Give the variable name for first input sequence5. Give the variable name for second input sequence6. Specify the output function as cross correlation of two inputs7. Plot the discrete signal for input sequence 1.8. Plot the discrete signal for input sequence 29. Plot the discrete signal for an output.10. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; a = input('Enter the first sequence ....:: ');b = input('Enter the second sequence ....:: ');res = xcorr(a,b); subplot(2,2,1);stem(a);xlabel('----> Samples');ylabel('----> Amplitude');title('Input Sequence(1)'); subplot(2,2,2);stem(b);xlabel('----> Samples');ylabel('----> Amplitude');title('Input Sequence(2)');subplot(2,2,[3,4]);stem(res);xlabel('----> Samples');ylabel('----> Amplitude');title('Output Sequence');
OUTPUT
Enter the first sequence ....:: [1 2 3 4]Enter the second sequence ....:: [4 3 2 1]
46
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:- Cross Correlation of a two Signals
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the first input signal function6. Specify the second input signal function7. Specify the output function as cross correlation of input8. Plot the discrete signal for first input signal 9. Plot the discrete signal for second input signal 10. Plot the discrete signal for an output.11. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc;t = 0:0.01:2;
47
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
a = cos(2 * pi * t);b = sin(2 * pi * t); res = xcorr(a,b); subplot(2,2,1);plot(a);xlabel('----> Samples');ylabel('----> Amplitude');title('Input signal(1)'); subplot(2,2,2);plot(b);xlabel('----> Samples');ylabel('----> Amplitude');title('Input Signal(2)'); subplot(2,2,[3,4]);plot(res);xlabel('----> Samples');ylabel('----> Amplitude');title('Output Signal');
OUTPUT
Result:-
48
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Viva questions:-1. What is the importance of Correlation?
2. What is the difference between Correlation and Convolution?
3. Define auto correlation?
4. Define cross correlation?
Frequently asked questions:-
1. What is Correlation?
Correlation is an operation between two signals and it gives us the degree of similarity
between the two signals.
2. What are the advantages of auto correlation &cross correlation and applications?
3. What are incoherent signals?
The signals for which the cross –correlation is zero for all values of t are called un
correlated or incoherent signals
4. What is the cross correlation for orthogonal signals?
ccross correlation for orthogonal signal is zero
5. What are properties of autocorrelation of energy signals?
a) the autocorrelation exhibits conjugate symmetry
b) the value of autocorrelation of an energy signal at the origin gives the total energy
of that signal
c) R(t) is maximum at t=0
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment: 7
49
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Verification of linearity and time invariance properties of a given
continuous/discrete system.
Aim:-: Verification of Linearity and Time Invariance properties of a given Continuous / Discrete system.
Pre requisite:-
1. Study the Concept of Linearity and Time Invariance of a given continuous / discrete system
Apparatus Required:-
1. MATLAB 2012Algorithm:- Linearity of a system
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the constants a and b6. Specify the first input signal function7. Specify the second input signal function8. Specify the system function9. Give the functions to verify the linearity of the system10. Plot the discrete signal for an output of the system.11. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; n=0:0.01: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]; y1=filter(num,den,x1,ic);y2=filter(num,den,x2,ic);y=filter(num,den,x,ic);
50
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
yt=a*y1+b*y2;d=y-yt; subplot(3,1,1), stem(n,y);xlabel('---------> Time');ylabel('-> Amplitude');title('y = a*x1 + b*x2'); subplot(3,1,2), stem(n,yt); xlabel('---------> Time');ylabel('-> Amplitude');title('yt = a*y1 + b*y2'); subplot(3,1,3), stem(n,d); xlabel('---------> Time');ylabel('-> Amplitude');title('difference of y and yt');
OUTPUT
51
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Algorithm:-
Time Invariance of a system
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the constants D6. Specify the input signal function7. Specify the system function8. Give the functions to verify the time invariance of a system9. Plot the discrete signal for an output of the system.10. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; n=0:0.05:4;D=10;x=3*cos(2*pi*n)-0.5*cos(4*pi*n);xd=[zeros(1,D) x];num=[2.2403 2.4908 2.2403];den=[1 -0.4 0.75];ic=[0 0]; y=filter(num,den,x,ic)yd=filter(num,den,xd,ic)d=y-yd(1+D:41+D); subplot(3,1,1), stem(y);xlabel('---------> Time');ylabel('-> Amplitude'); title('y '); subplot(3,1,2), stem(yd); xlabel('---------> Time');ylabel('-> Amplitude'); title('yd'); subplot(3,1,3), stem(d); xlabel('---------> Time');ylabel('-> Amplitude'); title('difference of y and yd');
OUTPUT
52
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-1. What is Linearity and give the condition for a system?
2. What is Time Invariance and give the condition for a system?
3. Explain what is meant by the linearity of a system?
4. What are the problems associated with a non linear system?
5. Discuss on whether linearity is an advantage or disadvantage to a system?
Frequently asked questions:-
1. What is system?
A system is defined as a physical device, that generates a response or output signal for
a given input signal
2. How are systems classified?
53
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Systems are classified as continuous time systems,discrete time systems, static and
dynamic systems, causal and non causal systems, linear and non linear systems, time
variant and time invariant systems.
3. Define unstable system?
An unstable system is a system which produces an unbounded output for a bounded
input.
4. Define a causal systems?
A causal system is a system whose output at any time t depends only on the present
and past values of the input but not on future inputs
5. Define a linear systems?
A linear system is a system which obeys the principle of superposition and principle
of homogeneity.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment: 8
54
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Computation of unit samples, unit step and sinusoidal response of the
given LTI system
Aim:-
: Computation of unit samples, unit step and sinusoidal response of the given LTI system and verifying its physical realiazability and stability properties.
Pre requisite:-
1. Study the details of LTI systems2. Study stability and physical realiazability properties
Apparatus Required:-
1. MATLAB 2012
Algorithm:- Linearity of a system
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the function (h) for number of samples5. Specify the impulse function (u)6. For impulse response convolute between u and h7. Plot the impulse response of LTI system8. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc; 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);subplot(2,2,[3,4]);
55
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
stem([0:49],s(1:50));xlabel('Samples'); ylabel('Amplitude');title('Response for an impulse');
OUTPUT
Algorithm:- 2. Step Response of an LTI system
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the function (h) for number of samples5. Specify the unit step function (u)6. For unit step response, convolute between u and h7. Plot the unit step response of LTI system8. Give the names for x label and y label and title of the figure
Program:-
56
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
clear all;close all;clc;
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'); OUTPUT
Algorithm:-
57
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Sinusoidal Response of an LTI System
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the time period5. Specify the function (h) for number of samples6. Specify the function (u) sinusoidal signal7. For sinusoidal response, convolute between u and h8. Plot the sinusoidal response of LTI system9. Give the names for x label and y label and title of the figure
Program:-
clear all;close all;clc;t = 1:0.04:2;h = (-0.9).^t;subplot(2,2,1); stem(t,h,'filled');xlabel('Samples');ylabel('Amplitude');title('h = (-0.9).^t'); u = sin(2*pi*t);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');
OUTPUT
58
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-1. What is an LTI System?
2. Specify whether the system is stable or not
a. x(t) = 2.5 *exp(t) U(t)
b. x(n) = 0.5*(-0.5)^n U(n)
3. What are the properties of LTI systems?
4. Define causality of a system?
5. Define stable and unstable system?
Frequently asked questions:-
1. Define Stability?
For a stable system , its impulse response must be integrable.
59
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
2. What is the importance of impulse response?
The importance of impulse response is the characteristics of an LTI system are
completely characterized by its impulse response.
3. Define transfer function of a system?
The Transfer function of a system is defined as the ratio of fourier transform of the
output to the F.T of the input when initial conditions are neglected.
4. Define impulse response of a system?
Impulse response of a system is defined as the output of the system when the input is
applied as unit impulse.
5. Define invertibility?
A continuous time LTI system is said to be invertible if the convolution of its impulse
response and the impulse response of its inverse system.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
60
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 9
Gibbs phenomenon
Aim:-: Verification of Gibbs phenomenon on signals
Pre requisite:-
1. Study the details of Gibbs phenomenon
Apparatus Required:-
1. MATLAB 2012
Program:-
clear all;close all;clc; t=linspace(-2,2,2000);u=linspace(-2,2,2000);sq=[zeros(1,500),2*ones(1,1000),zeros(1,500)];
k = 2; N=[1,3,7,15,55,70];for n=1:6;an=[];for m=1:N(n) an=[an,2*k*sin(m*pi/2)/(m*pi)];end;fN= 1 ;for m=1:N(n) fN=fN+an(m)*cos(m*pi*t/2);end;nq=int2str(N(n));subplot(3,2,n);plot(u,sq,'r','LineWidth',2);hold on;plot(t,fN,'LineWidth',2);hold off;axis([-2 2 -0.5 2.5]);grid;xlabel('--- > Time'),ylabel('--- > y_N(t)');title(['N = ',nq]);end;
61
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Result:-
Viva questions:-
1. What is the importance of Gibb’s Phenomenon?
2. Applications of gibb’s phenomenon?
3. What is even and odd symmetry?
4. What is trigonometric fourier series?
5. Hoe do you obtain cosine F.S from exp F.S?
Frequently asked questions:-
1. Define Gibb’s Phenomenon?
Gibbs discovered that for a periodic signal with discontinuities, if the signal is
reconstructed by adding the fourier series , overshoots appear around the edges. These
overshoots decay outwards in a damped oscillatory manner away from the edges. This
is called Gibb’s Phenomenon.
62
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
2. What is fourier series?
The representation of signals over a certain interval of time interms of the lllinear
combination of orthogonal functions is called fourier series.
3. What are Dirichlet’s conditions?
a) The function x(t) must be single valued function
b) The function x(t) has only a finite number of maxima and minima.
c) The function x(t) has finite number of discontinuities
d) The function x(t) must be integrable over one period
4. What are types of symmetries?
Types of symmetries are
a) Even symmetry
b) Odd symmetry
c) Half wave symmetry
d) Quarter wave symmetry
5. what is fourier spectrum?
The fourier spectrum of a periodic signal is a plot of its fourier coefficients versus
frequency w
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
63
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment:10
Finding the Fourier Transform of a given signal
Aim:-To obtain the Fourier Transform of a given signal and plotting its Magnitude and Phase spectrum.
Pre requisite:-
1. Study the Fourier Transform Concepts.2. Study to find the Magnitude and Phase Spectrum of a given Signal.
Apparatus Required:-
1. MATLAB 2012
Algorithm:-
Find the Fourier Transform and its Inverse Fourier Transform of a Signal
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the input function5. Specify the function for fourier transform of given input6. Display the output function (Xf)7. Specify the function for inverse fourier transform of (Xf)8. Display the output function (Xt)
Program:-clear all;close all;clc; syms x a bX = input('Fourier Transform of a function ....:: ');disp('is ......:: '); Xf = fourier(X)disp('Inverse Fourier Transform of a function ....:: ');Xfdisp('is ......:: '); Xt = ifourier(Xf) OUTPUT
Fourier Transform of a function ....:: exp(-5*x)*heaviside(x)is ......:: Xf = 1/(5+i*w) Inverse Fourier Transform of a function ....::
64
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Xf = 1/(5+i*w) is ......:: Xt = exp(-5*x)*heaviside(x)
Algorithm:- Find the Magnitude and Phase Spectrum of the above Signal
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the constant(angular frequency) value5. Specify the function for magnitude of (Xf) 6. Plot the discrete signal for magnitude of (Xf)7. Specify the function for phase angle of (Xf) 8. Plot the discrete signal for phase angle of (Xf)
Program:-clear all;close all;clc;w = -100:5:100; z = sqrt(25+w.*w);subplot(2,1,1);stem(w,z);xlabel('----> Frequency');ylabel('----> Magnitude');title('Magnitude plot'); y = atan(-w/5);subplot(2,1,2);stem(w,y);xlabel('----> Frequency');ylabel('----> Phase');title('Phase plot');
OUTPUT
65
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-
1. What is the use of Fourier transform?2. What is main lobe and side lobe?3. Give the expression for Fourier Transform?4. Give the expression for Inverse Fourier Transform?5. Find the Magnitude and Phase of x + i*y?6. Find the Fourier Transform and find its Magnitude and Phase Spectrum
a) x(t) = U(t) b) x(t) = r(t)c) x(t) = 2sin(10t)U(t) d) x(t) = exp(-|t|)U(t)
Frequently asked questions:-
1. What is Fourier transform?F.T is a technique which transforms signals from the continuous –time domain into frequency domain and vice versa.
2. What is frequency spectrum?The plot of amplitude vs w is known as magnitude spectrum and the plot of phase vs w is known as phase spectrum. The magnitude and phase spectrum together is called frequency spectrum.
3. What is CTFT?CTFT(continuous time F.T) is the fourier transform applied to continuous – time signals .
4. What are the limitations of Fourier transform?The limitations are it is less powerful than laplace transform and there are many functions for which the laplace transform exists, but the fourier transform does not exist.
5. How are a signal and its Hilbert transform related?
A signal and its Hilbert transform are orthogonal to each other
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
66
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 11
Wave form synthesis using Laplace Transforms.
Aim:-To obtain wave form synthesis using Laplace Transforms.
Pre requisite:-
1. Study in detail about Laplace & Inverse Laplace Transforms.
Apparatus Required:-
1. MATLAB 2012Algorithm:-
Find the Fourier Transform and its Inverse Fourier Transform of a Signal
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the input function5. Specify the function for laplace transform of given input6. Display the output function (Xf)7. Specify the function for inverse laplace transform of (Xf)8. Display the output function (Xt)
Program:-
clear all;close all;clc; syms t a bX = input('Laplace Transform of a function ....:: ');disp('is ......:: '); Xf = laplace(X)disp('Inverse Laplace Transform of a function ....:: ');Xfdisp('is ......:: '); Xt = ilaplace(Xf) OUTPUT
Laplace Transform of a function ....:: sin(t) is ......:: Xf = 1/(s^2+1) Inverse Laplace Transform of a function ....:: Xf = 1/(s^2+1) is ......:: Xt = sin(t)
67
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-Viva questions:-
1. What is Waveform Synthesis?
2. What is the difference between Analysis and Synthesis?
3. What is Laplace transform?
4. State initial value theorem?
5. Find the Inverse Laplace Transform of
a) 1/(s+2) b)1/s3
c) (s2 +2s +9)/(s(s2 +9)) d) 18/(s2(s2 + 9))
6. State final value théorèm?
7. what are the différences between F.T and L.T ?
Frequently asked questions:-
1. What is ROC?
The set of points in the s- plane for which the laplace transform of x(t) , i.e. the
function X(s) converges is called the region of convergence.
2. What are proper rational functions?
Proper rational functions are functions in which the order of numerator is smaller than
that of the denominator.
3. What is transient response?
The transient response is the response due to the poles of the system function H(s).
4. What is the sum of transient and steady state response called?
The sum of transient and steady state response called forced response
5. What is the usual condition for x(t) to be laplace transformable?
the usual condition for x(t) to be laplace transformable is that it should be piece-wise
continuous and must be of exponential order.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
68
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 12
Locating the zeros and poles and plotting the pole-zero maps in S-plane
and Z-plane for the given transfer function.
Aim:-: Locating the zeros and poles and plotting the pole-zero maps in S-plane and Z-plane for the given transfer function.
Pre requisite:-
1. Study the details of Laplace Transform and Z Transform in detail.2. Learn to plot the poles and zeros in the S and Z planes
Apparatus Required:-1. MATLAB 2012
Algorithm:- Location of poles and zeros in the S plane
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the input to enter the numerator coefficients5. Specify the another input to enter the denominator coefficients6. Specify the transfer function of given input7. Specify functions for poles and zeros8. Generate s-plane grid lines for a root locus or pole-zero map.9. Specify the function to compute the poles and (transmission) zeros of the
LTI model SYS and plots them in the complex s plane.
Program:-
clear all;close all;clc; num = input('Enter the numerator coefficients.....:: ');den = input('Enter the denominator coefficients.....:: '); H = tf(num, den)poles = roots(den)zeros = roots(num)sgridpzmap(H)grid ontitle('Pole/Zero Plot for Complex Poles and Zeros in S plane');
OUTPUT
Enter the numerator coefficients.....:: [1 2.5]
69
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Enter the denominator coefficients.....:: [1 6 11 6]
Transfer function: s + 2.5----------------------s^3 + 6 s^2 + 11 s + 6
poles = -3.0000 -2.0000 -1.0000
zeros = -2.5000
Algorithm:- Location of poles and zeros in the Z plane
1. Clear all the global variables2. Delete all existed figures in the window3. Clear the command window4. Specify the input to enter the numerator coefficients5. Specify the another input to enter the denominator coefficients6. Specify functions for poles and zeros
70
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
7. Generate z-plane grid lines for pole-zero map.
Program:-clc;clear all;close all; num = input('Enter the numerator coefficients.....:: ');den = input('Enter the denominator coefficients.....:: '); p = roots(den)z = roots(num)zplane(z,p);
title('Pole/Zero Plot for Complex Poles and Zeros in Z plane'); OUTPUT
Enter the numerator coefficients.....:: [1 2.5]Enter the denominator coefficients.....:: [1 6 11 6]p = -3.0000 -2.0000 -1.0000z = -2.5000
Result:-
Viva questions:-1. Study the details of sym() function?2. Study the details of laplace() and ilaplace() functions?3. Study the details of pretty() and factor() functions?4. Study the details of Heaviside() function?5. Study the details of Residue() and roots() functions?
71
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
6. Study the details of ztrans() and iztrans() functions?7. Study the details of dimpulse() function?8. What are Poles and Zeros?
Frequently asked questions:-
1. How are discrete time systems analysed using Z-transforms?discrete time systems are described by difference equations. These eqns are in time domain , are converted into algebraic eqns in z- domain using z- transforms.
2. What is ROC of z-transforms?The range of values of z for which X(z) converges is called ROC of X(z).
3. What is ROC of infinite duration two sided sequence?The ROC of infinite duration two sided sequence is a ring in z-plane or the z-transform does not exist at all.
4. State linearity property in z- transforms?The linearity property in z- transforms states that th z-transform of weighted sum of two signals is equal to weighted sum of individual z- transforms.
5. What is inverse z-transform?The process of finding the time domain function x(n) from its z-transform X(z) is called the inverse Z-transform.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
72
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 13
Generation of Gauss ion noise (Real and Complex), computation of its
mean, M.S. value and PSD, probability distribution function.
Aim:-
: Generation of Gaussian noise (Real and Complex), computation of its mean, M.S. value and its Skew, kurtosis, and PSD, probability distribution function.
Pre requisite:-
1.Learn about Gaussian noise and its importance 2.Study the details about mean, M.S. value and its Skew, kurtosis, and PSD, probability distribution function
Apparatus Required:-
1. MATLAB 2012
Program:-
clc;clear all;close all;N= input(' Enter the number of samples ....:: '); R1=randn(1,N); M=mean(R1)K=kurtosis(R1)P=periodogram(R1);V=var(R1)x = psd(R1);subplot(2,2,1); plot(R1); title('Normal [Gaussian] Distributed Random Signal');xlabel('Sample Number');ylabel('Amplitude'); subplot(2,2,2); hist(R1); title('Histogram [Pdf] of a normal Random Signal');xlabel('Sample Number');ylabel('Total'); subplot(2,2,[3,4]); plot(x);title('PSD of a normal Random Signal');xlabel('Sample Number');ylabel('Amplitude');
73
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Enter the number of samples ....:: 512
M = -0.0398
K = 3.0770
V = 0.9535
Result:-
Viva questions:-1. Define Gaussian Noise?
2. Define Mean and Skew?
3. Define kurtosis and PSD?
4. Define CDF and PDF ?
5. What is the difference between CDF and PDF?
Frequently asked questions:-
74
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
1. What is PSD?
The distribution of avg power of the signal in the frequency domain is called power
spectral density.
2. What is random signal?
A signal is characterized by uncertainty about its occurrence. It can not be represented
by mathematical equation.
3. What are types of symmetries?
Types of symmetries are
a) Even symmetry
b) Odd symmetry
c) Half wave symmetry
d) Quarter wave symmetry
4. What is fourier spectrum?
The fourier spectrum of a periodic signal is a plot of its fourier coefficients versus
frequency w
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
75
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 14
Sampling theorem verification.
Aim:-: Verification of Sampling Theorem
Pre requisite:-
1. Study the details of Sampling Theorem
Apparatus Required:-
1. MATLAB 2012Program:-
clear all;close all;clc; Fs = input('Enter Sampling Frequency in Hz ....:: ');Fm = input('Enter Message Frequency in Hz .....:: '); t = 0:0.01:2;msg = sin(2*pi*t); k = 2*Fs/Fm;step = ceil(201/k);samp_msg = [];for i = 1:201, if (mod(i,step) == 0) samp_msg = [samp_msg,msg(i)]; else samp_msg = [samp_msg,zeros(1)]; end;end; subplot(2,1,1);plot(msg);xlabel('---> Time');ylabel('---> Amplitude');title('Msg signal'); subplot(2,1,2);stem(samp_msg);xlabel('---> Time');ylabel('---> Amplitude');if Fs < 2*Fm title('Under Sampling');else if Fs == 2*Fm title('Critical Sampling'); else title('Over Sampling');
76
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
end;end;
OUTPUT
Enter Sampling Frequency in Hz ....:: 1200Enter Message Frequency in Hz .....:: 60
Enter Sampling Frequency in Hz ....:: 100Enter Message Frequency in Hz .....:: 60
77
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Result:-
Viva questions:-
1. Define Replication property?
2. What is Impulse train?
3. Define sample & hold property?
4. Define power spectral density?
5. What is filter?
Frequently asked questions:-
1. Define Sampling Theorem?
A condition is satisfied by the sampling frequency for a band limited signal to be from its
samples with out distortion.
2. What is sampling period?
78
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
The time interval between two successive sampling instants.
3. What is signal band width?
The band of frequencies that contain most of the signal energy.
4. What is spectral density?
The distribution of power or energy of a signal per unit band width as a function of
frequency.
5. What is aliasing?
Aliasing is defined as the phenomenon in which a high frequency component in the
frequency spectrum of signal takes identity of a lower frequency component in the
spectrum of the sampled signal.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
79
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment:15
Removal of noise by auto correlation/cross correlation.
Aim:-: Removal of Noise by Auto Correlation/Cross Correlation.
Pre requisite:-
1. Study in detail about Noise factors and types of noise in Communication2. Study the details of Correlation(Auto and Cross)
Apparatus Required:-
1. MATLAB 2012
Program:-
clear all;close all;clc; N= input('Enter the number of samples .....:: ');h=1/N;x=0:h:1;y=sin(3*pi*x);
subplot(4,1,1);plot(x,y);xlabel('---> time'); ylabel('-> Amplitude');title('Original signal');w=rand(1,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,100);
subplot(4,1,4)plot(x,0.01*m(1:N+1));xlabel('---> time'); ylabel('-> Amplitude');title('Recovered signal');
80
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Enter the number of samples .....:: 150
Result:-
Viva questions:-1. What is a Noise and how many types of noises are there.
2. What is Gaussian noise?
3. What is Correlation? How many types of Correlations are there?
4. What is the difference between Auto and Cross Correlation
5. What is the importance of Correlation?
6. What is the difference between Correlation and Convolution?
Frequently asked questions:-
1. Define auto correlation?
A measure of similarity or match or relatedness or coherence between a signal and its
time delayed version is called auto correlation.
81
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
2. Define cross correlation?
A measure of similarity or match or relatedness or coherence between a signal and the
time delayed version of the another signal is called cross correlation.
3. What is correlation theorem?
It states that the the cross correlation of two energy signals corresponds to the
multiplication of the F.T of one signal by the complex conjugate of the F.T of the
second signal.
4. What is distortion?
Distortion is a change of shape of the signal when it is transmitted through a system
.
5. What is Guard band?
Guard band is the separation between the spectral replicates.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment: 16
Extraction of periodic signal masked by noise using correlation.
Aim:-: Extraction of periodic signal masked by noise using correlation.
82
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Pre requisite:-
1. Study in detail about Noise factors and types of noise in Communication2. Study the details of Correlation(Auto and Cross)
Apparatus Required:-
1. MATLAB 2012Program:-
clear all;close all;clc; N= input('Enter the number of samples .....:: ');M= input('Enter the number of cycles .....:: '); h=1/N;x=0:h:M;y=cos(3*pi*x);subplot(4,1,1);plot(x,y);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
Enter the number of samples .....:: 100Enter the number of cycles .....:: 4
83
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
.
Result:-
Viva questions:-1. What is a Noise and how many types of noises are there.
2. What is Correlation? How many types of Correlations are there?
3. What is the difference between Auto and Cross Correlation
4. What is the importance of Correlation.
Frequently asked questions:-
1. What do you mean by periodic?
If the signal satisfies the below condition then it is called periodic
x(t) = x(t+T) for all t.
2. Define energy spectral density?
It is defined as the distribution of energy of a signal in frequency domain.
3. Define auto correlation?
84
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
A measure of similarity or match or relatedness or coherence between a signal and its
time delayed version is called auto correlation.
4. What is correlation theorem?
It states that the the cross correlation of two energy signals corresponds to the
multiplication of the F.T of one signal by the complex conjugate of the F.T of the
second signal.
5. What is distortion?
Distortion is a change of shape of the signal when it is transmitted through a system
.
6. What is Guard band?
Guard band is the separation between the spectral replicates.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
85
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Experiment: 17
Verification of wiener – Khinchine relations.
Aim:-: Verification of wiener – Khinchine relations.
Pre requisite:-
1. Study in detail about Fourier Transform and its inverse.2. Learn how to find the Fourier transform of the given function3. Learn how to find the Power Spectrum of a given function4. Learn how to find the Auto Correlation of a given function5. Study the details of wiener – Khinchine relations
Apparatus Required:-
1. MATLAB 2012Program:-
clear all;close all;clc; u=linspace(-2,2,5);sq=[ones(1,5)];stem(u,sq,'linewidth',2);
W = -3*pi:0.01:3*pi;k=sin(2.5*W)./sin(0.5*W);
subplot(2,1,1),plot(W,(k.*k));xlabel('----->Frequency');ylabel('------>Magnitude');title('Power Spectrum Using Fourier Transform');
c=xcorr(sq,sq);k=5+(2*cos(W))+(6*cos(2*W))+(4*cos(3*W))+(2*cos(4*W));z=k/4;
subplot(2,1,2), plot(W,(z.*z));xlabel('----->Frequency');ylabel('------>Magnitude');title('Power Spectrum Using Auto-Correlation');
86
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
OUTPUT
Result:-
Viva questions:-1. Define Fourier Transform and its inverse?
2. What is the importance of Correlation?
3. What is the difference between Convolution and Correlation?
4. What is the importance of power spectrum?
5. Find the Fourier Transform of the following signals
a. x(t) = exp(-2*t)u(t)
b. x(t) = rect(0.5*t)
c. Trapezoidal function
6. Find the Auto Correlation of the above signals
Frequently asked questions:-
1. What is Fourier transform?F.T is a technique which transforms signals from the continuous –time domain into frequency domain and vice versa.
2. What is frequency spectrum?The plot of amplitude vs w is known as magnitude spectrum and the plot of phase vs w is known as phase spectrum. The magnitude and phase spectrum together is called frequency spectrum.
3. What is CTFT?
87
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
CTFT(continuous time F.T) is the fourier transform applied to continuous – time signals .
4. What are the limitations of Fourier transform?The limitations are it is less powerful than laplace transform and there are many functions for which the laplace transform exists, but the fourier transform does not exist.
5. How are a signal and its Hilbert transform related?
A signal and its Hilbert transform are orthogonal to each other.
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
Experiment:18
88
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
Checking a random process for stationary in wide sense
Aim:-: Checking a Random Process for Stationary in Wide Sense
Pre requisite:-
1. Study the details of Random Variables and Processes and types of Random Process
Apparatus Required:-
1. MATLAB 20122. Windows XP SP2
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) disp('If the mean value is constant .....');disp('and');disp('Auto Correlation is not a function of x variable ....');disp('then ');disp('The Random Process is Wide Sense tationary.');
OUTPUT
Enter the function ..... :: 10*cos(10*x + 100)Max limit ....:: 2*piMin limit ....:: 0 mean_value = 0 Auto_correlation = 100*cos(50)*pi If the mean value is constant .....andAuto Correlation is not a function of x variable ....
89
RAMAPPA ENGINEERING COLLEGE BASIC SIMULATION LAB
then The Random Process is Wide Sense stationary.
Result:-
Viva questions:-1. Define Random Variable and Random Process?
2. Define Mean, Median and Mode?
3. Define Auto Correlation?
4. What are the types of Random Process?
5. What is a Stationary Process?
6. What are the conditions for the Random Process to be WSS?
7. What are the conditions for the Random Process to be SSS?
Frequently asked questions:-
1. Define random signal?
If the signal can not possible to represented by mathematical equation then the signal
is called random signal.
2. What is power spectral density?
The distribution of the average power of the signal in the frequency domain is called
power spectral density.
3. write properties of PSD?
The properties of PSD are
a). the area under the PSD function is equal to average power of that signal.
b). output PSD= magnitude square of system function *input PSD
c). the auto correlation function and PSD form a fourier transform pair
References:-1. Getting started with MATLAB by Rudra Pratap
2. Signals and systems by .Ramesh Babu
3. Signals and systems by A.Anand Kumar
4. Signals, systems and communications by B.P.Lathi
90