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

Shah hussain

Name

FA19-BEE-227
Registration Number

Class
4C

Instructor’s Name Mehwish Mehmood


Lab 12- Open ended lab

Task 01:
Compute the unilateral Laplace transform of the function 2 2 ( ) 1.25 3.5 1.25 t t f t te e − − = − + + . Also
evaluate the inverse Laplace transform of your result.

ANS:

Laplace

syms t s
t
s
f=-1.25+3.5.*t.*exp(-2.*t)+1.25.*exp(-2.*t);
laplace(f,s)

ans =

5/(4*(s + 2)) + 7/(2*(s + 2)^2) - 5/(4*s)

Inverse laplace

syms t s
F=5/(4*(s + 2)) + 7/(2*(s + 2)^2) - 5/(4*s);
ilaplace(F,t)

>> shah

ans =

(5*exp(-2*t))/4 + (7*t*exp(-2*t))/2 - 5/4


Task 02:
Compute the unilateral Laplace transform of the function f (t ) =1

syms t s
t
s
f=1;
laplace(f,s)

ans =

1/s
Task 03:
Express in the partial fraction form the signal

num = [1 -3 2];
den = [1 4 5];
[R,P,K] = residue(num,den)

ans
R =

-3.5000 - 5.5000i
-3.5000 + 5.5000i

P =

-2.0000 + 1.0000i
-2.0000 - 1.0000i
K =

Task 04:
Express in the partial fraction form the signal 2 4 5 4 ( ) 1

num = [1 5 4];
den = [1 1];
[R,P,K] = residue(num,den)
Ans

Ans
R =

P =

-1

K =

1 4

Inverse Laplace
syms t s
F=(s^2+5.*s+4)/(s^4+1);
ilaplace(F,t)

ans =

5*sin((2^(1/2)*t)/2)*sinh((2^(1/2)*t)/2) -
(3*2^(1/2)*cos((2^(1/2)*t)/2)*sinh((2^(1/2)*t)/2))/2 +
(5*2^(1/2)*cosh((2^(1/2)*t)/2)*sin((2^(1/2)*t)/2))/2
In-Lab Open ended Tasks
Task 01: Examine the network shown in figure 12.1 below. Assume the network is in
steady state prior to 𝒕 = 𝟎.

I. Plot the output current 𝒊(𝒕), for 𝒕 > 0


II. Determine whether the system is stable or not?

syms t s
𝒊 𝒕
(𝒕 =𝟎
)
𝑣𝐶(
𝑡)
Vin=12;
V=laplace(Vin,s);
I=V/(10./s+s+2);
Iout=ilaplace(I,t);
ezplot(Iout,[0 10]);
ylim([-5 5]);
grid on;
xlabel('Time');
ylabel('Amplitude');
e = sum(int(abs(Iout).^2,t,-inf,inf))
stability = tf([0,12,0],[1,2,10]);
S = isstable(stability)
Task 02: For the circuit shown in figure 12.2, the input voltage is 𝐕𝐢(𝐭) = 𝟏𝟎
𝐜𝐨𝐬(𝟐𝐭) 𝐮(𝐭)

I. Plot the steady state output voltage 𝐯𝐨𝐬𝐬(𝐭) for 𝒕 > 0 assuming zero initial
conditions.
II. Determine whether the system is stable or not?

𝐕𝐢 𝐯 𝐨(
(𝐭 𝐭)
)

clear all
close all
clc
syms t s
vin= 10.*cos(2.*t).*heaviside(t);
vin1=laplace(vin,s); % Taking Laplace of the given input voltage
vout = vin1.* ((s.^2)./ ((2*s).^2) + 2*s + 4); %Ouput Voltage
vout1 =ilaplace(vout ,t); %Output voltage in t domain
plot1 = ezplot( vout1 ,[0 20])
set(plot1,'color','k')
xlabel('t axis')
ylabel('Amplitude axis')
title('Vout')
Critical analysis:
In this lab we perform the Laplace domain by changing the
circuit from time domain into the Laplace domain. We need
Laplace time domain to determine all type and complex
signal behavior easily. MATLAB have particular commend for
Laplace transform and inverse Laplace. Laplace is the
simplest way to solve signal system.

You might also like