PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

202 Practical MATLAB® Applications for Engineers


MATLAB Solution
% Script file : transient _ RLC _ series
% source free RLC series circuit analysis
disp(‘****************************************’)
disp(‘************R E S U L T S**************’)
disp(‘*****Source free series RLC circuit***’)
disp(‘****************************************’)
disp(‘Solution of diff. equation for R=75 ohms’)
overdamped = dsolve(‘D2y+(75/9)*Dy+4*y=0’,’y(0)=0’, ‘Dy(0)=10’,’t’)
figure(1)
ezplot (overdamped,[0 5])
xlabel (‘time (sec)’)
ylabel (‘current i(t) in amps’)
title (‘i(t) vs t (overdamped case; R=75 ohms)’)
disp (‘***************************************’)

figure(2)
disp(‘Solution of diff. equation for R=36 ohms’)
criticaldamped = dsolve(‘D2y+(36/9)*Dy+4*y=0’,’y(0)=0’,’Dy(0)=10’,’t’)
ezplot(criticaldamped,[0 6])
xlabel(‘time (sec)’); ylabel(‘current i(t) in amps’)
title(‘i(t) vs t (criticaldamped case; R=36 ohms)’)
disp(‘*************************************************************’)
disp(‘Solution of diff. equation for R=3 ohms’)
underdamped = dsolve(‘D2y+(3/9)*Dy+4*y=0’,’y(0)=0’,’Dy(0)=10)

figure(3)
ezplot (underdamped)
xlabel (‘time (sec)’)
ylabel (‘current i(t) in amps’)
title (‘i(t) vs t (underdamped case; R=3 ohms)’)
disp(‘**************************************************************’)
The script fi le transient_RLC_series is executed, and the results and plots (Figures 2.102
through 2.104) are as follows:
>> transient _ RLC _ series
********************************************
*************R E S U L T S*******************************
***Source free series RLC circuit ***
**************************************************************************
Solution of diff. equation for R=75 ohms
overdamped =
30/481*481^(1/2)*exp(1/6*(-25+481^(1/2))*t)- 30/481*481^(1/2)*exp(-
1/6*(25+481^(1/2))*t)
**************************************************************************
Solution of diff. equation for R=36 ohms
criticaldamped =
10*exp(-2*t)*t
**************************************************************************
Solution of diff. equation for R=3 ohms
underdamped =
60/143*143^(1/2)*exp(-1/6*t)*sin(1/6*143^(1/2)*t)
**************************************************************************
Free download pdf