PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

198 Practical MATLAB® Applications for Engineers


MATLAB Solution
% Script file : transient _ RLC _ parallel
% source free RLC parallel circuit analysis
disp(‘***************************************’)
disp(‘*******R E S U L T S*******************’)
disp(‘Source free parallel RLC circuit’)
disp(‘***************************************’)
disp(‘Solution of diff. equation for R=3 ohms’)
overdamped = dsolve(‘(1/36)*D2y+(1/3)*Dy+(1/9)*y=0’,’y(0) = 0’,’Dy(0)= 32’,’t’)
figure(1)
ezplot(overdamped)
xlabel(‘time (sec)’)
ylabel(‘voltage(volts)’)
title(‘v(t) vs t (overdamped case; R=3 ohms)’)
axis([0 3 0 40]);
disp(‘***************************************’)
figure(2)
disp(‘Solution of diff. equation for R=9 ohms’)
criticaldamped = dsolve(‘(1/36)*D2y+(1/9)*Dy+(1/9)*y=0’,’y(0)=0’,’D y(0)=432’,’t’)
simple _ crit=simple(criticaldamped);
ezplot(criticaldamped)
xlabel(‘time (sec)’)
ylabel(‘voltage(volts)’)
title(‘v(t) vs t (criticaldamped case; R=9 ohms)’)
axis([0 4 0 90]);
disp(‘***************************************’)
disp(‘Solution of diff. equation for R=72 ohms’)
underdamped = dsolve(‘(1/36)*D2y+(1/72)*Dy+(1/9)*y=0’,’y(0)=0’,’Dy(0)=432’,’t’)
figure(3)
ezplot(underdamped)
xlabel(‘time (sec)’); ylabel(‘voltage(volts)’)
title(‘v(t) vs t (underdamped case; R=72 ohms)’)
axis([0 6 -150 200]);
disp(‘****************************************’)
The script fi le transient_RLC_parallel is executed, and the results and plots (Figures 2.98
through 2.100) are as follows:
>> transient _ RLC _ parallel
***************************************
*******R E S U L T S*******************
Source free parallel RLC circuit
***************************************
Solution of diff. equation for R=3 ohms
overdamped =
27*2^(1/2)*exp(2*(-3+2*2^(1/2))*t)-27*2^(1/2)*exp(-2*(3+2*2^(1/2))*t)
***************************************
Solution of diff. equation for R=9 ohms
criticaldamped =
432*exp(-2*t)*t
***************************************
Solution of diff. equation for R=72 ohms
underdamped =
576/7*7^(1/2)*exp(-1/4*t)*sin(3/4*7^(1/2)*t)
****************************************
Free download pdf