Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

SET- 7

Q1)

LAPLACE TRANSFORM OF A SIGNAL


AIM: Program to find the laplace transform of a signal.
A) Dirac function
B) Unit step signal
C) f ( t )=e−at cos ⁡(bt )

SOFTWARE REQUIRED : MATLAB 7.0 or above


THEORY : The Laplace transform is an integral transform named after its discoverer Pierre-
Simon Laplace . It takes a function of a real variable t (often time) to a function of a complex
variable s (frequency).
The Laplace transform is a frequency-domain approach for continuous time signals
irrespective of whether the system is stable or unstable. The Laplace transform of
a function f(t), defined for all real numbers t ≥ 0, is the function F(s), which is a unilateral
transform defined by

F ( s ) =∫ f ( t ) e− st dt
0

where s is a complex number frequency parameter

s=σ + jω
, with real numbers σ and ω.

(i) Dirac function.


PROGRAM :
syms t;
f=dirac(t);
k=laplace(f);
disp(k)

OUTPUT:

1 - θ(0)
(ii)Unit step signal

PROGRAM :

syms t;
f=heaviside(t);
k=laplace(f);
disp(k)

OUTPUT:

1

S

( iii ) f ( t )=e−at cos ⁡( bt)


PROGRAM :

syms t;
f=e^(-6*t)*cos(0*t);
k=laplace(f);
disp(k)

OUTPUT:

A = (sym) -6
Q2) CONVOLUTION OF SIGNALS

AIM : Program to perform convolution of two signals SOFTWARE REQUIRED :


MATLAB 7.0 or above

THEORY : Convolution is a mathematical operation on two functions (f and g); it produces

a third function, that is typically viewed as a modified version of one of the original

functions, giving the integral of the point wise multiplication of the two functions as a

function of the amount that one of the original functions is translated.

The convolution of f and g is written f∗g, using an asterisk or star. It is defined as the integral
of the product of the two functions after one is reversed and shifted. As such, it is a particular
kind of integral transform:

𝑓(𝑡) ∗ 𝑔(𝑡) = ∫ 𝑓(𝜏)𝑔(𝑡 − 𝜏)𝑑𝜏

PROGRAM CODE:

s=0:1:3;

x=[1 2 3 4];

h=[2 3 4 5];

a=length(x)

b=length(h)

t=0:1:a-1;

t1=0:1:b-1;

y=conv(x,h)

c=length(y)

t2=0:1:c-1;

subplot(3,1,1)

stem(t,x);
title('Input signal');

xlabel('Time');

ylabel('Amplitude');

subplot(3,1,2)

stem(t1,h);

title('Impulse response');

xlabel('Time');

ylabel('Amplitude');

subplot(3,1,3)

stem(t2,y);

title('Output signal');

xlabel('Time');

ylabel('Amplitude');

OUTPUT:
Q3)
EVEN AND ODD PARTS OF SIGNAL & REAL AND IMAGINARY
PARTS OF SIGNAL

AIM: To find even and odd part of the signal and sequence and also find real and imaginary
parts of signal and energy and power of the signal.
SOFTWARE REQUIRED: Matlab software
 THEORY: One of characteristics of signal is symmetry that may be useful for signal
analysis. Even signals are symmetric around vertical axis, and Odd signals are symmetric
about origin.
 Even Signal: A signal is referred to as an even if it is identical to its time-reversed
counterparts; 
x(t) = x(-t).
 Odd Signal: A signal is odd if
 x(t) = -x(-t).
 An odd signal must be 0 at t=0, in other words, odd signal passes the origin. Using the
definition of even and odd signal, any signal may be decomposed into a sum of its even part,
xe(t), and its odd part, xo(t), as follows Even and odd part of a signal: Any signal x(t) can be
expressed as sum of even and odd components ,i.e.
xt=xet+xo(t)
xet=12xt+x(-t)
xot=12xt-x(-t)

xt=xet+ xo(t)
Energy Signal : 
E=n=-NN|xn|2
Average Power :
P=12N+1n=-NN|xn|2

PROGRAM CODE:
t=-10:0.01:10;
a=2;
x=exp(a*sin(t)) + exp(a*cos(t)) + (1\sin(t));
y=exp(a*sin(-t)) + exp(a*cos(-t)) + (1\sin(-t));
xe=(x+y)/2;
xo=(x-y)/2;
subplot(3,1,1);
plot(t,x);
title('Original signal');
xlabel('Time')
ylabel('Amplitude')
subplot(3,1,2);
plot(t,xe);
title('Even signal');
xlabel('Time')
ylabel('Amplitude')
subplot(3,1,3)
plot(t,xo);
title('Odd signal');
xlabel('Time')
ylabel('Amplitude')
OUTPUT:
Q4) Signum Function

PROGRAM CODE:

x = [-5 -eps(1) 0 eps(1) 5];


y = sign(x);
subplot(2,1,1);
plot(x,y)
subplot(2,1,2);
stem(x,y)
ylim([-2 2])

OUTPUT:

You might also like