You are on page 1of 6

Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y.

2021-2022
Department of Electrical and Electronics Engineering

EEE 160 LABORATORY EXPERIMENT NO. 2

2.1 MINIMUM REQUIRED SOFTWARE PACKAGES

MATLAB

2.2 PRELAB

1. Using a hand calculation, find the Laplace transform of:

2. Using a hand calculation, find the inverse Laplace transform of

2(s+ 3)( s+ 5)( s+ 7)


F(s) =

3. Use a hand calculation to solve the circuit for the Laplace transforms of the
loop currents shown in Fig. 2.1.

Solution:

Eq1: (5/s +5+s+2) i1(s) –(s+2) i2(s) -5 i3(s) = 3V(s)


(s+7+5/s) i1(s) –(s+2) i2(s) -5 i3(s) = 3V(s) → (1)

Eq2: –(s+2) i1(s) + (3/s +2+s+s+2) i2(s) –(s+2) i3(s) = 0


–(s+2) i1(s) + (2s+4+3/s) i2(s) –(s+2) i3(s) = 0→ (2)

Eq3: –5i1(s) –(s+2) i2(s) + (5+1+4/s+s+2) i3(s) = 0


–5i1(s) –(s+2) i2(s) + (s+8+4/s) i3(s) = 0 → (3)

| |
−( s+2 )−53 Vs

( 3
)
2 s + 4+ − ( s+ 2 ) 0
s

( 4
−( s+ 2 ) s +8+ 0
s )
I 1=

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.
Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y. 2021-2022
Department of Electrical and Electronics Engineering

¿
−( s +2 ) [ 0 ] −(−5 ) [ 0 ] + 3Vs [ 2 s + 4+ ( 3
s)( 4
)
s+ 8+ −( s+2 )2 ]
s

¿
(
3Vs s +16 s +
2 40 12
+ 2 +39 ∗s
s s
2
)

3 Vs ( s +16 s 3 +39 s 2+ 40 s+12 )
4
I 1=

I 2=
| |
( s+7 + 5s )−5 3 Vs
− ( s+ 2 )−( s+2 ) 0
−5 s+ 8+ 0 ( 4
s

)

(
¿ s +7+
5
s )
[ 0 ] −(−5 ) [ 0 ] +3 Vs ¿ ¿

¿
(
3Vs −s2−15 s−30−
8
s )
∗−s


3 Vs ( s 3+15 s2 +30 s+8 )
I 2=

I 3=
|( s+7 + 5s )−(s +2)3 Vs
3
−( s+2 ) (2 s+ 4+ ) 0
−5−( s +2 ) 0
s


|
¿
5 3
(s+7+ ) [ 0 ]− ( s+ 2 ) [ 0 ] +3 Vs [ ( s+2 )2 −(−5 ) 2 s +4 + ]
s s ( )

¿
(
3Vs s2 +14 s+24 +
15
s)∗s


3Vs ( s 3+14 s 2+ 24 s +15 )
I 3=

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.
Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y. 2021-2022
Department of Electrical and Electronics Engineering

| |
( s+7 + 5s )−( s+2 )−5
( s)
∆= −( s+ 2 ) 2 s+ 4+ 3 −( s+2 )

−5−( s +2 ) ( s+8+ )
4
s

= (s+7+5/s) [(2s+4+3/s)(s++4/s) – (s+2)2] –[-(s+2)][-(s+2)(s+8+4/s) – [(-5)(-(s+2))]


=
3 60 2 284 487 3 2 16 2 15
s+ + 23 s + 2 + +156 s+393−s −17 s −60 s−68− −5( s +14 s+24 + )
s
3
s s s s

¿
[ 60 2 284 396
s
3
+s + 2 +
s s
+26 s+205 ∗s3
]
5 4 3 2
∆=s +26 s +205 s + 396 s + 284 s +60

Therefore:
3 Vs ( s4 + 16 s 3+ 39 s 2+ 40 s +12 )
I 1= 5 4 3 2
s + 26 s +205 s +396 s +284 s+60

3 Vs ( s 3 +15 s 2 +30 s+ 8 )
I 2= 5 4 3 2
s + 26 s +205 s +396 s +284 s+60

3 Vs ( s 3+ 14 s 2 +24 s+15 )
I 3= 5 4 3 2
s + 26 s +205 s +396 s +284 s+ 60

2.3 LAB

1. Use MATLAB to
a. Generate symbolically the time function f(t) shown in Prelab 1.
Generating the function symbolically:
syms t;
f=simplify(ft)
ft=0.0075-0.00034*exp(-2.5*t)*cos(22*t)+0.087*exp(-
2.5*t)*sin(22*t)-0.0072*exp(-8*t);

f =

(87*sin(22*t)*exp(-(5*t)/2))/1000 -
(17*cos(22*t)*exp(-(5*t)/2))/50000 - (9*exp(-8*t))/1250 +
3/400

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.
Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y. 2021-2022
Department of Electrical and Electronics Engineering

b. Generate symbolically F(s) shown in Prelab 2. Obtain your


result symbolically in both factored and polynomial forms.
Generating the function symbolically:
syms s
Fs
Fs=simplify (2*(s+3)*(s+5)*(s+7)/(s*(s+8)*(s^2+10*s+100)));

Fs =
((2*s + 6)*(s + 5)*(s + 7))/(s*(s + 8)*(s^2 + 10*s
+ 100))

Generating the function in Factored Form:


s=zpk('s');
F=2*(s+3)*(s+5)*(s+7)/(s*(s+8)*(s^2+10*s+100));
F
F =

2 (s+3) (s+5) (s+7)


-------------------------
s (s+8) (s^2 + 10s + 100)

Continuous-time zero/pole/gain model.

Generating the function in Polynomial Form:

s=tf('s'); %tf is the polynomial form of F


Fs=2*(s+3)*(s+5)*(s+7)/(s*(s+8)*(s^2+10*s+100));
Fs

Fs =

2 s^3 + 30 s^2 + 142 s + 210


------------------------------
s^4 + 18 s^3 + 180 s^2 + 800 s

Continuous-time transfer function.

c. Find the Laplace transform of f(t) shown in Prelab 1.

Computing the Laplace transform of f(t) by Laplace Transform of Symbolic


Expression.
syms s t; %s and t variable are symbolic
Fs = laplace(ft)
ft=0.0075-0.00034*exp(-2.5*t)*cos(22*t)+0.087*exp(-
2.5*t)*sin(22*t)-0.0072*exp(-8*t);

Fs =

3/(400*s) - 9/(1250*(s + 8)) - (17*(s + 5/2))/(50000*((s +


5/2)^2 + 484)) + 957/(500*((s + 5/2)^2 + 484))

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.
Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y. 2021-2022
Department of Electrical and Electronics Engineering

d. Find the inverse Laplace transform of F(s) shown in Prelab 2.


Computing the Inverse Laplace transform of f(t) by Laplace Transform of Symbolic
Expression.
syms t s;
FS=2*(s+3)*(s+5)*(s+7)/(s*(s+8)*(s^2+10*s+100));
IFS=ilaplace(FS,s,t)

IFS =

(5*exp(-8*t))/112 + (237*exp(-5*t)*(cos(5*3^(1/2)*t) +
(3^(1/2)*sin(5*3^(1/2)*t))/9))/140 + 21/80

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.
Mindanao State University - Marawi EEE 160.1 – 2nd Semester S.Y. 2021-2022
Department of Electrical and Electronics Engineering

e. Solve for the Laplace transforms of the loop currents in Prelab 3.


syms V I1 I2 I3 s
G=[7+s+(5/s) -(2+s) -5; -(2+s) (4+2*s+3/s) -(2+s); -5 -(2+s)
(8+s+4/s)]; %Equations obtained by Mesh Analysis
I=[I1;I2;I3]; %Current I
V=[V;0;0]; %Voltage Vs
I=inv(G)*V; %Formula for Current (I) by Ohm’s Law
pretty(I)

/ 4 3 2 \
| V s (s + 16 s + 39 s + 40 s + 12) |
| ------------------------------------ |
| #1 |
| |
| 2 3 2 |
| V s (s + 15 s + 30 s + 8) |
| ---------------------------- |
| #1 |
| |
| 2 3 2 |
| V s (s + 14 s + 24 s + 15) |
| ----------------------------- |
\ #1 /
where
5 4 3 2

#1 == s + 26 s + 205 s + 396 s + 284 s + 60

3 Vs ( s4 + 16 s 3+ 39 s 2+ 40 s +12 )
I 1= 5 4 3 2
s + 26 s +205 s +396 s +284 s+60

3 Vs ( s 3 +15 s 2 +30 s+ 8 )
I 2= 5 4 3 2
s + 26 s +205 s +396 s +284 s+60

3 Vs ( s 3+ 14 s 2 +24 s+15 )
I 3= 5 4 3 2
s + 26 s +205 s +396 s +284 s+ 60

Reference: Nise, N. S. (2015). Control systems engineering (7th ed). Hoboken, New Jersey: John Wiley & Sons, Inc.

You might also like