290 Practical MATLAB® Applications for Engineers
XC = -j./(w*C);
XL = j*w*L;
ZLC = XC.*XL./(XC+XL);
ZRLC = R.*ZLC./(R+ZLC); % parallel case
subplot (2,2,3);
plot (w,abs(ZRLC));
title(‘Mag. [Z(w)] vs w (parallel case)’);
xlabel (‘w in rad/sec’);
ylabel (‘Mag[Z(w)] in Ohms’);
grid on;
subplot(2,2,4);
plot(w,angle(ZRLC)*180/pi); grid on;
title(‘Phase[Z(w)] vs w (parallel case)’);
xlabel(‘w in rad/sec’);
ylabel(‘Phase angle in degrees’);The script fi le impedance_plots is executed, and the results are indicated in Figure 3.70.0 5000 10,0000200400600800Mag. [Z(w)] versus w (series case)Mag[Z(w)] in Ohms0 5000 10,000− 100− 50050100Phase[Z(w)] versus w (series case)Phase angle in degrees0 5000 10,0000246810Mag. [Z(w)] versus w (parallel case)Mag[Z(w)] in Ohms0 5000 10,000− 50050100Phase[Z(w)] versus w (parallel case)w in rad/sec w in rad/secPhase angle in degreesFIGURE 3.70
Plots of Example 3.13.
Example 3.14Analyze the circuit diagram shown in Figure 3.71, and obtain by hand the system loop
equations, as well as the matrix loop equation.
Create the script fi le loops that returns- The system matrices Z and V
- The loop currents I 1 , I 2 , and I 3 , in phasor form
- The instantaneous loop currents i 1 (t), i 2 (t), and i 3 (t)