284
Practical MATLAB
® Applications for Engineers
>> PowerWaveAna = (45/2)*cos(15*pi/180)
PowerWaveANA =
21.7333
>>
% results are printed for
comparisons
>> fprintf(‘Average Power, Numerical:%f\n’,PowerWave)
Average Power, Numerical: 21.733331
>> fprintf(‘Average Power, Analytical:%f\n’,PowerWaveANA)
Average Power, Analitical: 21.7333
>> fprintf(‘VRMS, Numerical:%f\n’,VRMS)
VRMS, Numerical: 6.3640
>> fprintf(‘VRMS, Analytical:%f\n’,VRMSANA)
VRMS, Analytical: 6.3630
>> fprintf(‘IRMS, Numerical:%f\n’,IRMS)
IRMS, Numerical: 3.5355
>> fprintf (‘IRMS, Analytical:%f\n’,IRMANA)
IRMS, Analytical: 3.5350
>> fprintf (‘PowerFactor, PF:%f\n’,PF)
PowerFactor,PF: 0.965926
Observe that the analytical results fully agree with the numerical results.
0
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009
0.01
−10
0
10
20
30
40
50
time in seconds
Amplitudes of P, I, & V
Instantaneous Power, Current, and Voltage
i(t)
v(t)
p(t)
FIGURE 3.64
Plots of i(t), v(t), and p(t) of Example 3.10.
CRC_47760_CH003.indd 284
CRC_47760_CH003.indd 284
7/23/2008 1:27:48 PM
7/23/2008 1:27:48 PM
Practical MATLAB
® Applications for Engineers
>> PowerWaveAna = (45/2)*cos(15*pi/180)
PowerWaveANA =
21.7333
>>
% results are printed for
comparisons
>> fprintf(‘Average Power, Numerical:%f\n’,PowerWave)
Average Power, Numerical: 21.733331
>> fprintf(‘Average Power, Analytical:%f\n’,PowerWaveANA)
Average Power, Analitical: 21.7333
>> fprintf(‘VRMS, Numerical:%f\n’,VRMS)
VRMS, Numerical: 6.3640
>> fprintf(‘VRMS, Analytical:%f\n’,VRMSANA)
VRMS, Analytical: 6.3630
>> fprintf(‘IRMS, Numerical:%f\n’,IRMS)
IRMS, Numerical: 3.5355
>> fprintf (‘IRMS, Analytical:%f\n’,IRMANA)
IRMS, Analytical: 3.5350
>> fprintf (‘PowerFactor, PF:%f\n’,PF)
PowerFactor,PF: 0.965926
Observe that the analytical results fully agree with the numerical results.
0
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009
0.01
−10
0
10
20
30
40
50
time in seconds
Amplitudes of P, I, & V
Instantaneous Power, Current, and Voltage
i(t)
v(t)
p(t)
FIGURE 3.64
Plots of i(t), v(t), and p(t) of Example 3.10.
CRC_47760_CH003.indd 284
CRC_47760_CH003.indd 284
7/23/2008 1:27:48 PM
7/23/2008 1:27:48 PM
