PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Alternating Current Analysis 305


Example 3.20
Let the current in the series RLC circuit diagram shown in Figure 3.84 be given by
i(t) = t^3 + t^2 – 12t A.
Create the script fi le sym_analysis_RLC that returns the following plots using sym-
bolic techniques:


  1. i(t) versus t

  2. i^2 (t) versus t

  3. ∫i(t)dt versus t

  4. (di(t))/dt versus t

  5. vR(t) versus t, where vR(t) = R i(t)

  6. vL(t) versus t, where vL(t) = L di/dt

  7. vC(t) versus t, where vC(t) = 1/C ∫i(t)dt

  8. [vL(t) + vR(t)] ver su s t

  9. [vC(t) + vR(t)] ver su s t

  10. pR(t) versus t, where pR(t) = i^2 (t)R

  11. pL(t) versus t

  12. pC(t) versus t


and the instantaneous expressions of i(t), VR(t), VL(t), VC(t), VRL(t) = VR(t) + VL(t), VRC(t) =
VR(t) + VC(t), PR(t), PL(t), and PC(t).

MATLAB Solution
% Script file : sym _ analysis _ RLC
% Analysis of an RLC series circuit
% where the current isiamps=t^3+t^2-12*t
% R=1000 Ohms, L=30 mH, and C=0.5 microF
echo off;
syms t;
iamps=t^3+t^2-12*t;
figure(1)
subplot(2,2,1)
ezplot(iamps)
title(‘i(t) vs.t’);
ylabel(‘Amplitude (amps)’);
grid on
isquare=iamps^2;
subplot(2,2,2)
ezplot(isquare)

C = 0.5 μF

L = 30 mH

i(t)

R = 1000 Ω

FIGURE 3.84
Network of Example 3.20.
Free download pdf