clc // Fundamental of Electric Circuit // Charles K. Alexander and Matthew N.O Sadiku // Mc Graw Hill of New York // 5th Edition // Part 2 : AC Circuits // Chapter 11 : AC power Analysis // Example 11 - 4 clear; clc; close; // Clear the work space and console. // // Given data I_mag_1 = 4.0000; // I_mag_1 = Magnitude of Source Current 4 Ampere for Mesh 1 I_angle_1 = 0.0000; // I_angle_1 = Angle of Source Current 0 Degree for Mesh 1 I_mag_2 = 10.5800; // I_mag_2 = Magnitude of Source Current 10.58 Ampere for Mesh 2 I_angle_2 = 79.1000; // I_angle_2 = Angle of Source Current 79.10 Degree for Mesh 2 V_mag_v = 60.0000; // V_mag_v = Magnitude of Source Voltage 60 Volt V_angle_v = 30.0000; // V_angle_v = Angle of Source Voltage 30 Degree V_mag_i = 184.9840; // V_mag_i = Magnitude of Source Voltage 184.9840 Volt V_angle_i = 6.2100; // V_angle_i = Angle of Source Current 6.2100 Degree R2 = 20.0000; // R2 = Resistance of Resistor 20 Ohm XL = 10.0000; // XL = Reactance of Inductor 10 Ohm XC = 5.0000; // XC = Reactance of Capasitor 5 Ohm // // Calculations Average Power Generated by The Source Voltage P_5 = 0.5000 * V_mag_v* I_mag_2 * cosd(V_angle_v - I_angle_2); // P_5 = Average Power Generated by The Source Voltage // Calculations Average Power Generated by The Source Current P_1 = -0.5000 * V_mag_i* I_mag_1 * cosd(V_angle_i - I_angle_1); // P_1 = Average Power Generated by The Source Current // Calculations Power Absorbed by Resistor V_20 = R2 * I_mag_1; // V_20 = Voltage of Resistor 20 Ohm P_2 = 0.5000 * V_20 * I_mag_1; // P_2 = Power Absorbed by Resistor 20 Ohm // Calculations Power Absorbed by Inductor I_mag_1_real = I_mag_1*cosd(I_angle_1); // I_mag_1_real = Real Part of Current for Mesh 1 I_mag_1_imag = I_mag_1*sind(I_angle_1); // I_mag_1_imag = Imaginary Part of Current for Mesh 1 I_mag_2_real = I_mag_2*cosd(I_angle_2); // I_mag_2_real = Real Part of Current for Mesh 2 I_mag_2_imag = I_mag_2*sind(I_angle_2); // I_mag_2_imag = Imaginary Part of Current for Mesh 2 I_L_10_mag_real = I_mag_1_real - I_mag_2_real; // I_L_10_mag_real = Real Part of Current Through Inductor I_L_10_mag_imag = I_mag_1_imag - I_mag_2_imag; // I_L_10_mag_imag = Imaginary Part of Current Through Inductor I_L_10_mag = norm(complex(I_L_10_mag_real,I_L_10_mag_imag)); // V_L_10_mag = Magnitude of Current Through Inductor V_L_10_mag = XL*I_L_10_mag; // P_3 = Power Absorbed by Inductor P_3 = 0.5000 * V_L_10_mag * I_L_10_mag * cosd(90.0000) // Calculations Power Absorbed by Capasitor V_C_5_mag = norm(complex(I_mag_2_real,I_mag_2_imag))*XC; // V_C_5_mag = Magnitude of Current Through Capasitor P_4 = 0.5000 *V_C_5_mag*norm(complex(I_mag_2_real,I_mag_2_imag))*cosd(90.0000); // P_4 = Power Absorbed by Capasitor // disp("Example 11-4 Solution : "); printf(" \n P_1 = Average Power Generated by Source Current = %.3f Watt",P_1) printf(" \n P_2 = Average Power Absorbed by Resistor 20 Ohm = %.3f Watt",P_2) printf(" \n P_3 = Average Power Absorbed by Inductor 10 Ohm = %.3f Watt",P_3) printf(" \n P_4 = Average Power Absorbed by Capasitor 5 Ohm = %.3f Watt",P_4) printf(" \n P_5 = Average Power Generated by Source Voltage = %.3f Watt",P_5)