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,000
0
200
400
600
800
Mag. [Z(w)] versus w (series case)
Mag[Z(w)] in Ohms
0 5000 10,000
− 100
− 50
0
50
100
Phase[Z(w)] versus w (series case)
Phase angle in degrees
0 5000 10,000
0
2
4
6
8
10
Mag. [Z(w)] versus w (parallel case)
Mag[Z(w)] in Ohms
0 5000 10,000
− 50
0
50
100
Phase[Z(w)] versus w (parallel case)
w in rad/sec w in rad/sec
Phase angle in degrees
FIGURE 3.70
Plots of Example 3.13.
Example 3.14
Analyze 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)