PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

422 Practical MATLAB® Applications for Engineers


FIGURE 4.68
Plots of the analytical solutions of Example 4.15.


30

20

10

− 10

− 2

− 1

− 2

0

0246

− 2 0

0

1

2

3

1

0

2

3

4

(^246) − 2 0246
− 2
−0.5
0.5
0
0
1
1.5
246
time (sec) time (sec)
Amplitude (amps)
Amplitude (volts)
Amplitude (amps)
Amplitude (amps)
v(t) versus t (analytical) ir(t) versus t (analytical)
ic(t) versus t (analytical) il(t) versus t (analytical)
ylabel(‘Amplitude (volts)’)
subplot(2,2,2)
numr = [0 0 6];%IR=6/s^2+s+8;
denr = [1 2 8];
ir = impulse(numr,denr,t);ir = [zeros(1,20) ir’];
plot(t,ir);title(‘ ir(t) vs. t (sym. Laplace)’);
ylabel(‘Amplitude (amps)’)
subplot(2,2,3)
numc =[0 3 0];%IC=3s/(s^2+2s+8);
denc = [1 2 8];
ic = impulse(numc,denc,t);ic=[zeros(1,20) ic’];
plot(t,ic);title(‘ ic(t) vs. t (sym. Laplace)’);
ylabel(‘Amplitude (amps)’);xlabel(‘time(sec)’);
subplot(2,2,4)
numl = [0 0 0 120];
denl = [5 10 40 0];%IL(s)=120/(5s^3+10s^2+40s);
il =impulse(numl,denl,t);il=[3*ones(1,20) il’];
plot(t,il);
title(‘ il(t) vs. t (sym. Laplace)’);
ylabel(‘Amplitude (amps)’) ;xlabel(‘time (sec)’);
The script fi le RLC_parallel is executed and the results are shown in Figures 4.68
and 4.69.
Note that the analytical solutions fully agree with the symbolic solutions.

Free download pdf