S&S LAB MANUA-final - Merged
S&S LAB MANUA-final - Merged
(An ISO 9001:2008 certified and AICTE approved institution, affiliated to JNTU-Kakinada)
Devarajugattu, Peddaraveedu (M), Markapur-523320, Prakasam (D), A.P
(Accrediated By NAAC)
Prepared by
Dr.P.PRASANNA MURALI KRISHNA Ph.D
Mr. N.B.JILANI, M.Tech
VISION
To emerge as a premiere institution for engineering education and research, through integrated
education for sustainable development of society and serve as resource center for the global industry.
.
MISSION
1. Imparting technical education to students in a caring and learning environment so that they
blossom as globally competent technocrats who respect and value their culture and contribute to
national development.
2. Providing cutting edge academic and research facilities so as to chisel the students to fit them into
a technically challenging future, instilling positive, productive thoughts that will enable them to
achieve success in their professional carriers and make them better employable.
3. Facilitate the use modern pedagogy and ICT for improving the teaching-learning process and to
involve students and faculty in innovative research projects linked with industry, academic and
research institutions in India and abroad.
4. To encourage multidisciplinary learning and research in cutting edge and niche areas & to provide
access to education for empowering the underprivileged and socially disadvantaged sections of
society.
VISION & MISSION OF ECE DEPARTMENT
VISION
To become a leading Centre of Excellence in higher learning and research, and to facilitate the
transformation of students into globally competent engineering professionals and to bring out quality
research in the frontier areas of Electronics & Communication Engineering.
MISSION
2. Provide an academic environment that fosters leadership, research aptitude and promotes
life–long learning.
3. Practice and inculcate high standards of professional ethics, transparency and accountability.
4. Innovate and develop real time projects in the campus.
5. Increase the visibility of academic programs globally and attract talent at all levels.
PROGRAM SPECIFIC OUTCOMES (PSOs)
PSO1: Software Usage: Apply the simulation tools like VHDL, Verilog, MATLAB, MULTISIM
and Mentor Graphics to design and analyze both Analog & Digital Circuits.
PSO2: Problem Solving Skills: Apply the principles of analog, digital, Instrumentation and signal
processing concepts for Bio-Medical, Consumer Electronics, and Advanced communication
systems.
PSO3: Professional Knowledge: Apply the principles of Electronics & Communication
Engineering to provide cost effective and appropriate models.
PEO1:
Be receptive to new technologies and attain professional competence through lifelong
learning such as advanced degrees, professional registration, publications communication
skills and team work etc...
PEO2:
Analyze real life problems, design appropriate system to provide solutions that are
technically sound, economically feasible and socially acceptable.
PEO3: Communicate effectively and manage resources skillfully as members and leaders of
the profession.
PEO4:
Practice the ethics of their profession consistent with a sense of social responsibility
PROGRAMME OUTCOMES
List of Experiments:
PO1 PO2 PO3 PPO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 - - 3 2 - - - 1 1 - 2
CO2 3 2 1 - - - - - 2 2 - 2
CO3 2 2 2 - 2 - - - 1 1 - 1
CO4 2 1 2 2 1 - - - 1 1 - 2
CO5 1 2 3 2 1 - - - 1 1 - 2
Course
Correlation
2.2 1.4 1.6 1.6 1.2 - - - 1. 1.2 - 1.8
mapping
KRISHNA CHAITANYA INSTITUTE OF TECHNOLOGY AND SCIENCES
(An ISO 9001:2008 certified and AICTE approved institution, affiliated to JNTU-Kakinada)
Devarajugattu, peddaraveedu (M), Markapur-523320, Prakasam (D), A.P
(Accrediated By NAAC)
CERTIFICATE
This is to certify that the lab manual entitled “SIGNALS & SYSTEMS” is being prepared by
record work carried out by him. The results given in this record work are produced by conducting
experiments. I appreciate the faculty member for his effort in preparation of this record.
6 Correlation
10
Z-Transforms
ADDITIONAL EXPERIMENTS
1
EXPERIMENT NO.1
Generation of Basic Signals (Analog & Discrete)
Aim:-
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
THEORY:-
a) Step Function
The unit step function
is defined as
U(t) = 1 for t ≥ 0
= 0 for t > 0
U(t)=1
clc;
clear all;
close all;
1
N=50;
t=1:50;
x=ones(1,N);
subplot(2,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('continuous time unit step signal');
subplot(2,1,2);
stem(t,x,'r');
xlabel('time');
ylabel('amplitude');
title('Discrete time unit step signal');
OUTPUT WAVEFORMS:
(OR)
clc;
clear all;
close all;
2
t= -5:0.01:5;
x=heaviside(t);
subplot(2,1,1);
plot(t,x);
axis([-5 5 -0.5 1.5]);
xlabel('time');
ylabel('amplitude');
title('conitunuous time unit step function');
n= -10:10;
Xn=(n>=0);
subplot(2,1,2);
stem(n,Xn);
axis([-10 10 -0.5 1.5]);
xlabel('Samples');
ylabel('amplitude');
title('discrete unit step signal');
OUTPUT WAVEFORMS:
b) Impulse Function
The impulse function is defined as
and
δ(t) = 0 for t ≠ 0)
That is the impulse function has zero amplitude everywhere expect at t = 0.
3
δ(t)
0
PROGRAM:-
clc;
clear all;
close all;
t= -10:0.01:10;
x = (t==0);
subplot(2,1,1);
plot(t,x,'g');
axis([-10 10 -0.5 1.5]);
xlabel('time');
ylabel('amplitude');
title('Continuous unit impulse signal');
n= -10:10;
Xn = (n==0);
subplot(2,1,2);
stem(n,Xn);
axis([-10 10 -0.5 1.5]);
xlabel('Samples');
ylabel('amplitude');
title('Discrete time unit impulse signal');
OUTPUT:
4
C) UNIT RAMP SIGNAL:
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
PROGRAM:
clc;
clear all;
close all;
t= -10:0.01:10;
x=(t>=0).*t;
subplot(2,1,1);
plot(t,x);
xlabel('time');
ylabel('amplitude');
title('Continuous time unit ramp signal');
subplot(2,1,2);
n= -10:10;
Xn=(n>=0).*n;
subplot(2,1,2);
stem(n,Xn);
xlabel(' Samples');
ylabel('amplitude');
title('discrete time unit ramp signal');
5
OUTPUT WAVEFORMS:
6
PROGRAM:
clc;
clear all;
close all;
t=0:0.01:2;
f=1;
x=sin(2*pi*f*t);
subplot(2,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
subplot(2,1,2);
stem(t,x,'r');
xlabel('time');
ylabel('amplitude');
title('sinusoidal sequence');
OUTPUT WAVEFORMS:
7
5. SIGNUM SIGNAL
PROGRAM:
clc;
clear all;
close all;
t=-10:0.01:10;
y1=[-ones(1,1000),zeros(1,1),ones(1,1000)];
subplot(3,1,1);
plot(t,y1,'r');
xlabel('time');
ylabel('amplitude');
title('Signum signal');
axis([-5 5 -2 2]);
y2=sign(t);
subplot(3,1,2);
plot(t,y2,'b');
xlabel('time');
ylabel('amplitude');
8
title('Signum signal');
axis([-5 5 -2 2]);
y3=t./abs(t);
subplot(3,1,3);
plot(t,y3,'g');
xlabel('time');
ylabel('amplitude');
title('Signum signal');
axis([-5 5 -2 2]);
OUTPUT WAVEFORMS:
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?
9
EXPERIMENT NO.2
OPERATIONS ON SIGNALS
AIM: perform the operations on signals and sequences such as addition, subtraction,
multiplication, Division, Maximum and Minimum
SOFTWARE USED:- MATLAB R2009A
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
Theory:
Signal Addition
Similar to the case of addition, subtraction deals with the subtraction of two or more signals in
order to obtain a new signal. Mathematically it can be represented as
y(t) = x1(t) - x2(t) … for continuous time signals, x1(t) and x2(t)
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s1=6*sin(2*pi*5*t);
subplot(4,1,1);
plot(t,s1,'g');
xlabel('time');
10
ylabel('amplitude');
title('first signal');
s2=8*sin(2*pi*5*t);
subplot(4,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1+s2;
subplot(4,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('sum of two signals');
s4=s1-s2;
subplot(4,1,4);
plot(t,s4,'g');
xlabel('time');
ylabel('amplitude');
title('Subtraction of two signals');
Output waveforms:
11
Multiplication of two signals:
The basic signal operation performed over the dependent variable is multiplication. In this
case, two or more signals will be multiplied so as to obtain the new signal.
(A) PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=2*sin(2*pi*5*t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');
12
(B) Multiplication Program:
clc;
clear all;
close all;
t=0:0.01:1;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=exp(t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
13
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');
© Multiplication Pogram
clc;
clear all;
close all;
t=0:0.01:1;
s1=2*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=exp(-t);
14
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1.*s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Multiplication of two signals');
PROGRAM
clc;
clear all;
close all;
t=0:0.001:2;
15
s1=2*sin(2*pi*10*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('first signal');
s2=2*sin(2*pi*5*t);
subplot(3,1,2);
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('second signal');
s3=s1./s2;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('Division of two signals');
16
% Division of two signals sin t/t
clc;
clear all;
close all;
t=-20:0.01:20;
y=(sin(t))./t;
plot(t,y,'g');
xlabel('time');
ylabel('amplitude');
title('Division of two signals');
17
EXPERIMENT NO.3
AIM: To find the Energy, Power, Even and Odd components of both continuous and
Discrete time signals
SOFTWARE USED:- MATLAB R2009A
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
OUTPUT:
E = 1/2
E1 = 1/2 - exp(-2*T)/2
P = Inf
clc;
clear all;
close all;
syms t T;
y=exp(2*t);
E=int(y,t,0,inf);
E
E1=int(y,t,0,T);
18
E1
P=limit(E1/2*T,T,inf);
P
OUTPUT:
E = Inf
E1 = exp(2*T)/2 - 1/2
P = Inf
clc;
clear all;
close all;
syms n N;
y= (1/2)^n;
E=symsum(y,n,0,inf);
E
E1=symsum(y,n,0,N);
E1
P=limit(E1/(2*N+1),N,inf);
P
OUTPUT:
E = 2
E1 = 2 - (1/2)^N
P = 0
clc;
clear all;
close all;
t=-10:0.01:10;
u=0.5*sign(t)+0.5;
x1=exp(-1.5*t).*u;
subplot(4,1,1);
plot(t,x1);
19
title('x1(t)---->');
x2=fliplr(x1);
subplot(4,1,2);
plot(t,x2);
title('x2(t)---->');
xe=0.5*(x1+x2);
subplot(4,1,3);
plot(t,xe);
title('Even Component of x1(t)');
xo=0.5*(x1-x2);
subplot(4,1,4);
plot(t,xo);
title('Odd Component of x1(t)');
OUTPUT:
20
EVEN AND ODD COMPONENTS OF DISCRETE TIME SIGNAL
n=-5:5;
yn= 0*(n<0)+1*(n==0)+1*(n>0);
yflip=fliplr(yn);
subplot(4,1,1);
stem(n,yn,'r');
title('plot of yn');
xlabel('time');
ylabel('yn');
subplot(4,1,2);
stem(n,yflip,'r');
title('plot of yflip');
xlabel('time');
ylabel('yflip');
ye = (1/2)*(yn+yflip);
subplot(4,1,3);
stem(n,ye,'b');
title('plot of even');
xlabel('time');
ylabel('y even');
yo= (1/2)*(yn-yflip);
subplot(4,1,4);
stem(n,yo);
title('plot of odd');
xlabel('time');
ylabel('y odd');
21
OUTPUT WAVEFORMS:
22
EXPERIMENT NO.4
TRANSFORMATIONS OF INDEPENDENT VARIABLE
AIM: Perform the operations on signals and sequences such as scaling, shifting and
Reversing .
SOFTWARE USED:- MATLAB R2009A
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
Amplitude scaling rescales the amplitude of the signal. As a result signal may be amplified or
attenuated. Given a signal x=Asin(2πft) where A is the amplitude of the signal. We can rescale
the amplitude by some constant multiplier alpha or beta. Amplitude scaled output will be
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s1=6*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
s2=3*s1;
subplot(3,1,2);
23
plot(t,s2,'r');
xlabel('time');
ylabel('amplitude');
title('amplified signal');
s3=s1/3;
subplot(3,1,3);
plot(t,s3,'g');
xlabel('time');
ylabel('amplitude');
title('attenuated signal');
Output waveforms:
Time Shift or delay operation shifts the signals to the desired delay. Given a signal x(t) a shifted
signal will be of the form y (t)= x(t- to) where to is the delay or shift in time domain. Let
Asin(2πft) is the signal which is desired to be shifted by an amount to.
24
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:3;
s1=6*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
t1=t+10;
subplot(3,1,2);
plot(t1,s1,'r');
xlabel('time');
ylabel('amplitude');
t2=t-10;
subplot(3,1,3);
plot(t2,s1,'g');
xlabel('time');
ylabel('amplitude');
25
Output Waveforms:
Time Reversal operation flips each sample of the signal about t=0 or n=0 to obtain a
folded sequence.
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s=sin(2*pi*5*t);
m=length(s);
n=[-m:m];
y=[0,zeros(1,m),s];
subplot(2,1,1);
26
plot(n,y,'g');
xlabel('time');
ylabel('amplitude');
title('original signal');
y1=[fliplr(s),0,zeros(1,m)];
subplot(2,1,2);
plot(n,y1,'r');
xlabel('time');
ylabel('amplitude');
title('folded signal');
Operation of time scaling scales the time axis to a certain scale resulting in increasing or
decreasing the frequency of the signal which compresses or expands the signal on time
domain. General expression for the time scaled output is given below.
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:2;
s1=6*sin(2*pi*5*t);
subplot(3,1,1);
plot(t,s1,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
27
t1=3*t;
subplot(3,1,2);
plot(t1,s1,'r');
xlabel('time');
ylabel('amplitude');
title('compressed signal');
t2=t/3;
subplot(3,1,3);
plot(t2,s1,'g');
xlabel('time');
ylabel('amplitude');
title('enlarged signal');
OUTPUT:
29
EXPERIMENT NO.5
CONVOLUTION & DE-CONVOLUTION
AIM: Write the program for convolution &De-Convolution between two signals
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
Convolution is an integral concatenation of two signals. It is used for the determination of the
output signal of a linear time-invariant system by convolving the input signal with the impulse
response of the system. Note that convolving two signals is equivalent to multiplying the Fourier
transform of the two signals.
These operations can be represented by a Mathematical Expression as follows:
x[n]= Input signal Samples
h[ n-k]= Impulse response co-efficient.
y[ n]= Convolution output.
n = No. of Input samples
h = No. of Impulse response co-efficient.
30
PROGRAM:
clc;
clear all;
close all;
t=0:0.001:10;
x=sin(t);
h=square(t);
subplot(3,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('sinusoidal signal');
subplot(3,1,2);
plot(t,h,'r');
xlabel('time');
ylabel('amplitude');
title('square function');
y=conv(x,h);
subplot(3,1,3);
plot(y);
xlabel('time');
ylabel('amplitude');
title('convolution signal');
31
Convolution of two sequences
PROGRAM:
clc;
clear all;
close all;
N=0:(L+M-1);
y=conv(x,h);
subplot(3,1,1);
stem(x,'g');
xlabel('discrete time');
ylabel('x(n)');
title('1st sequence');
subplot(3,1,2);
stem(h,'r');
xlabel('discrete time');
ylabel('h(n)');
title('second sequence');
subplot(3,1,3);
stem(y);
xlabel('discrete time');
ylabel('y(n)');
32
OUTPUT;
33
EXPERIMENT NO.6
CORRELATION
AIM: To Compute Auto Correlation And Cross Correlation Between Signals And Sequences
SOFTWARE USED:- MATLAB R2009A
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
Theory
Correlation:
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,
Convolution involves the following operations.
1. Shifting 2. Multiplication 3. Addition
Cross correlation
clc;
clear all;
close all;
t=0:0.001:1;
34
x=cos(2*pi*3*t);
a=xcorr(x);
subplot(2,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('input signal');
subplot(2,1,2);
plot(a,'r');
xlabel('time');
ylabel('amplitude');
OUTPUT:
35
PROGRAM:-cross correlation for a signal
clc;
clear all;
close all;
t=0:0.001:1;
x=cos(2*pi*3*t);
y=cos(2*pi*5*t);
a=xcorr(x,y);
subplot(3,1,1);
plot(t,x,'g');
xlabel('time');
ylabel('amplitude');
title('1st signal');
subplot(3,1,2);
plot(t,y,'r');
xlabel('time');
ylabel('amplitude');
title('2nd signal');
subplot(3,1,3);
plot(a,'r');
xlabel('time');
ylabel('amplitude');
36
OUTPUT:
clc;
clear all;
close all;
a=xcorr(x);
subplot(2,1,1);
stem(x,'g');
xlabel('time');
ylabel('amplitude');
title('input sequence');
subplot(2,1,2);
stem(a,'r');
xlabel('time');
37
ylabel('amplitude');
clc;
clear all;
close all;
y=input('entersecond sequence');
a=xcorr(x,y);
subplot(3,1,1);
stem(x,'g');
xlabel('time');
ylabel('amplitude');
title('1stsequence');
subplot(3,1,2);
stem(y,'r');
xlabel('time');
ylabel('amplitude');
38
title('2nd sequence');
subplot(3,1,3);
stem(a,'r');
xlabel('time');
ylabel('amplitude');
Result: Auto correlation and Cross correlation between signals and sequences is computed.
VIVA QUESTIONS:-
1. Define Correlation? And its properties?
2. Define Auto-Correlation?
3. Define Cross-Correlation?
4. What is the importance of correlation?
5. What is the difference b/w correlation and convolution?
39
EXPERIMENT NO.7
FOURIER SERIES REPRESENTATION
AIM: Write a MATLAB program to generate Exponential Fourier series of a Square Wave
waveform and also plot the magnitude spectrum of its coefficients
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
THEORY:-
MATLAB PROGRAM:
clc;
close all;
clear all;
syms t n;
w0=1;
T=2*pi;
n=-10:10;
cn=int(exp(-j*n*w0*t),t,0,pi)+int(-exp(-j*n*w0*t),t,pi,2*pi);
40
cn1=(1/T)*cn;
stem(n,abs(cn1));
xlabel('n----->');
ylabel('Magnitude of cn---->');
OUTPUT:
41
EXPERIMENT NO.8
FOURIER TRANSFORM AND ANALYSIS OF FOURIER SPECTRUM:
AIM: To find the Fourier Transform of a given signal and plotting its magnitude and phase
spectrum.
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
THEORY:-
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 By
definition Fourier Transform of signal f(t) is defined as
x(t) = ʃ X(f)exp(j2πft)df.
clc;
clear all;
close all;
syms t;
x=exp(-2*t)*heaviside(t);
y=fourier(x);
42
disp('Fourier Transform of input signal');
z=ifourier(y);
mg=abs(y);
subplot(2,1,1);
ezplot(mg);
xlabel('time');
ylabel('amplitude');
grid;
pha=atan(imag(y)/real(y));
subplot(2,1,2);
ezplot(pha);
xlabel('time');
ylabel('amplitude');
grid;
Result: Magnitude and phase spectrum of Fourier Transform of a given signal is plotted.
43
VIVA QUESTIONS:
44
EXPERIMENT NO.8
LAPLACE TRANSFORM
AIM: Write a MATLAB program to find Laplace Transform and Inverse Laplace Transform
of the following signals
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window\ Figure window
THEORY:-
Laplace transform is the integral transform of the given derivative function with real variable t to
convert into a complex function with variable s. For t ≥ 0, let f(t) be given and assume the function
satisfies certain conditions to be stated later on.
The Laplace transform of f(t), that is denoted by L{f(t)} or F(s) is defined by the Laplace
transform formula:
MATLAB PROGRAM:
clc;
clear all;
close all;
syms a t w;
x1=exp(-a*t);
disp('Laplace Transform of x1(t) signal');
y1=laplace(x1)
45
disp('Inverse Laplace Transform of input signal');
z1=ilaplace(y1)
x2=t*exp(-a*t);
disp('Laplace Transform of x2(t) signal');
y2=laplace(x2)
disp('Inverse Laplace Transform of input signal');
z2=ilaplace(y2)
x3=cos(w*t);
disp('Laplace Transform of x3(t) signal');
y3=laplace(x3)
disp('Inverse Laplace Transform of input signal');
z3=ilaplace(y3)
x4=exp(-a*t)*cos(w*t);
disp('Laplace Transform of x4(t) signal');
y4=laplace(x4)
46
PROGRAM:- Locating Poles Of Zero On S-Plane
clc;
clear all;
close all;
h=tf(num,den);
poles=roots(den);
zeros=roots(num);
sgrid;
pzmap(h);
grid on;
47
Z-TRANSFORM
clc;
close all;
clear all;
syms a b w0 n;
disp('the sequence x1(n) is');
x1=sin(w0*n);
z1=ztrans(x1);
disp('the Z-Transform of x1(n) is');
pretty(z1)
x2=cos(w0*n);
z2=ztrans(x2);
disp('the Z-Transform of x2(n) is');
pretty(z2)
x3=a^n;
z3=ztrans(x3);
disp('the Z-Transform of x3(n) is');
pretty(z3)
RESULT:
48
49