PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Fourier and Laplace 417


Ys
Zs

Ys
RsL sC

s
ss

s
s

Is
Vs
Z

()
()

()
(/ ) ( )

()
()












11
121220132

(()

() ()
s

VsYs

Since

Vs ut
s

()£50[ ()]
50

then

Is
s

s
ss

it I s et

()
() ()

() [(()] si









50
13

50
3

3
13
50
3

22 22

1


£⋅ nn( )tut⋅ ( ) 3

MATLAB Solution
% Script file : analysis _ RLC
t =-1:0.1:8;t0=0;
u = stepfun(t,t0);
it = 50/3*exp(-t).*sin(3*t).*u;
subplot(2,1,1)
plot(t,it);
title(‘i(t) vs t (numeric solution)’)
xlabel(‘time(sec)’)
ylabel(‘Amplitude (amps)’)
axis([0 6 -4 11])
syms s zs
zs = 2+s+(1/(s*.1));
vs = 50/s;
ILs = vs/zs;
IL = ilaplace(ILs);
disp(‘*******************************************’)
disp(‘ **** symbolic result (sw closes at t=0)*****’)
disp(‘The current i(t) (in amps) is :’)
simIL = simplify(IL);
disp(simIL)
subplot(2,1,2)
ezplot(simIL)
title(‘i(t) vs. t (symbolic solution)’)
axis([0 6 -4 11])
xlabel(‘time(sec)’)
ylabel(‘Amplitude (amps)’)
t0=1;
IL = ilaplace((ILs)*exp(-s)); %sw closes at t=1
disp(‘******* *symbolic result(sw closes at t=1) *****’)
disp(‘The current i(t) (in amps) is given by :’)
simIL = simplify(IL);
disp(simIL)
disp(‘***************************************’)
Free download pdf