summaryrefslogtreecommitdiff
path: root/Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb')
-rw-r--r--Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb3305
1 files changed, 3305 insertions, 0 deletions
diff --git a/Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb b/Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb
new file mode 100644
index 0000000..a6935ac
--- /dev/null
+++ b/Electric_Machinery_And_Transformers_by_I_L_Kosow/14-TRANSFORMERS.ipynb
@@ -0,0 +1,3305 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: TRANSFORMERS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.10: Piro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-10\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data(from Example 14-9)\n",
+"kVA = 1 ; // kVA rating of the transformer\n",
+"V_1 = 220 ; // Primary voltage in volt\n",
+"V_2 = 110 ; // Secondary voltage in volt\n",
+"f_o = 400 ; // Frequency in Hz\n",
+"f_f = 60 ; // Frequency in Hz for which the transformer is to be used\n",
+"P_orig = 10 ; // Original iron losses of the transformer in W\n",
+"\n",
+"// Calculations\n",
+"// consider only ratio of frequencies for calculating B \n",
+"B = f_o / f_f ; // flux density\n",
+"\n",
+"P_iron = (P_orig)*(B^2); // Iron losses in W\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-10 Solution : ');\n",
+"\n",
+"printf(' \n Since E = k*f*B_m and the same primary voltage is applied to the ');\n",
+"printf(' \n transformer at reduced frequency, the final flux density B_mf ');\n",
+"printf(' \n increased significantly above its original maximum permissible ');\n",
+"printf(' \n value B_mo to :\n B_mf = B_mo * (f_o/f_f) = %.2fB_mo \n ',B );\n",
+"\n",
+"printf(' \n Since the iron losses vary approximately as the square of the flux density :');\n",
+"printf(' \n P_iron = %d W ',P_iron );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.11: I2_I1_Z2_Z1their_loss_E2_E1_alpha.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-11\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"f = 60 ; // Frequency in Hz\n",
+"r_1 = 0.1 ; // Primary winding resistance in ohm\n",
+"x_1 = 0.3 ; // Primary winding reactance in ohm\n",
+"r_2 = 0.001 ; // Secondary winding resistance in ohm\n",
+"x_2 = 0.003 ; // Secondary winding reactance in ohm\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"// case a\n",
+"I_2 = (kVA*1000) / V_2 ; // Secondary current in A\n",
+"I_1 = I_2 / alpha ; // Primary current in A\n",
+"\n",
+"// case b\n",
+"Z_2 = r_2 + %i*(x_2); // Secondary internal impedance in ohm\n",
+"Z_2_m = abs(Z_2);//Z_2_m=magnitude of Z_2 in ohm\n",
+"Z_2_a = atan(imag(Z_2) /real(Z_2))*180/%pi;//Z_2_a=phase angle of Z_2 in degrees\n",
+"\n",
+"Z_1 = r_1 + %i*(x_1); // Primary internal impedance in ohm\n",
+"Z_1_m = abs(Z_1);//Z_1_m=magnitude of Z_1 in ohm\n",
+"Z_1_a = atan(imag(Z_1) /real(Z_1))*180/%pi;//Z_1_a=phase angle of Z_1 in degrees\n",
+"\n",
+"// case c\n",
+"I_2_Z_2 = I_2 * Z_2_m ; // Secondary internal voltage drop in volt\n",
+"I_1_Z_1 = I_1 * Z_1_m ; // Primary internal voltage drop in volt\n",
+"\n",
+"// case d\n",
+"E_2 = V_2 + I_2_Z_2 ; // Secondary induced voltage in volt\n",
+"E_1 = V_1 - I_1_Z_1 ; // Primary induced voltage in volt\n",
+"\n",
+"// case e\n",
+"ratio_E = E_1 / E_2 ; // ratio of primary to secondary induced voltage\n",
+"ratio_V = V_1 / V_2 ; // ratio of primary to secondary terminal voltage\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-11 Solution : ');\n",
+"\n",
+"printf(' \n a: Secondary current :\n I_2 = %.f A \n ',I_2 );\n",
+"printf(' \n Primary current :\n I_1 = %.1f A \n ',I_1 );\n",
+"\n",
+"printf(' \n b: Secondary internal impedance : \n Z_2 in ohm = ');disp(Z_2);\n",
+"printf(' \n Z_2 = %f <%.2f ohm \n ',Z_2_m , Z_2_a );\n",
+"printf(' \n Primary internal impedance : \n Z_1 in ohm = ');disp(Z_1);\n",
+"printf(' \n Z_1 = %f <%.2f ohm \n ',Z_1_m , Z_1_a );\n",
+"\n",
+"printf(' \n c: Secondary internal voltage drop :\n I_2*Z_2 = %.2f V \n ',I_2_Z_2);\n",
+"printf(' \n Primary internal voltage drop :\n I_1*Z_1 = %.2f V \n ',I_1_Z_1);\n",
+"\n",
+"printf(' \n d: Secondary induced voltage :\n E_2 = %.2f V \n',E_2 );\n",
+"printf(' \n Primary induced voltage :\n E_1 = %.2f V \n',E_1 );\n",
+"\n",
+"printf(' \n e: Ratio of E_1/E_2 = %.2f = α = N_1/N_2 \n',ratio_E );\n",
+"printf(' \n But V_1/V_2 = %d ',ratio_V );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.12: ZL_ZP_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-12\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data(from Example 14-11)\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"I_2 = 2174 ; // Secondary current in A\n",
+"I_1 = 217.4 ; // Primary current in A\n",
+"// calculated values from Example 14-11\n",
+"Z_2 = 0.00316 ; // Secondary internal impedance in ohm\n",
+"Z_1 = 0.316 ; // Primary internal impedance in ohm\n",
+"\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"// case a\n",
+"Z_L = V_2 / I_2 ; // Load impedance in ohm\n",
+"\n",
+"// case b\n",
+"Z_p = V_1 / I_1 ; // Primary input impedance in ohm\n",
+"\n",
+"Zp = (alpha)^2 * Z_L ; // Primary input impedance in ohm\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-12 Solution : ');\n",
+"\n",
+"printf(' \n a: Load impedance :\n Z_L = %.4f ohm \n ', Z_L );\n",
+"\n",
+"printf(' \n b: Primary input impedance : ');\n",
+"printf(' \n (method 1) :\n Z_p = %.2f ohm \n ',Z_p );\n",
+"printf(' \n (method 2) :\n Z_p = %.2f ohm \n ',Zp );\n",
+"\n",
+"printf(' \n c: The impedance of the load Z_L = %.4f Ω, which is much greater',Z_L);\n",
+"printf(' \n than the internal secondary impedance Z_2 = %.5f Ω .\n ',Z_2);\n",
+"printf(' \n The primary input impedance Z_p = %.2f Ω,which is much greater',Z_p);\n",
+"printf(' \n than the internal primary impedance Z_1 = %.3f Ω .\n',Z_1);\n",
+"\n",
+"printf(' \n d: It is essential for Z_L to be much greater than Z_2 so that the ');\n",
+"printf(' \n major part of the voltage produced by E_2 is dropped across the ');\n",
+"printf(' \n load impedance Z_L. As Z_L is reduced in proportion to Z_2, the ');\n",
+"printf(' \n load current increases and more voltage is dropped internally ');\n",
+"printf(' \n across Z_2.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.13: Re1_Xe1_Ze1_ZLprime_I1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-13\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"f = 60 ; // Frequency in Hz\n",
+"r_1 = 0.1 ; // Primary winding resistance in ohm\n",
+"x_1 = 0.3 ; // Primary winding reactance in ohm\n",
+"r_2 = 0.001 ; // Secondary winding resistance in ohm\n",
+"x_2 = 0.003 ; // Secondary winding reactance in ohm\n",
+"// calculated data from Example 14-12\n",
+"Z_L = 0.1058 ; // Load impedance in ohm\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"\n",
+"// case a\n",
+"R_e1 = r_1 + (alpha)^2 * r_2 ; // Equivalent internal resistance referred to the\n",
+"// primary side in ohm\n",
+"\n",
+"// case b\n",
+"X_e1 = x_1 + (alpha)^2 * x_2 ; // Equivalent internal reactance referred to the\n",
+"// primary side in ohm\n",
+"\n",
+"// case c\n",
+"Z_e1 = R_e1 + %i*(X_e1) ; // Equivalent internal impedance referred to the\n",
+"// primary side in ohm\n",
+"Z_e1_m = abs(Z_e1);//Z_e1_m=magnitude of Z_e1 in ohm\n",
+"Z_e1_a = atan(imag(Z_e1) /real(Z_e1))*180/%pi;//Z_e1_a=phase angle of Z_e1 in degrees\n",
+"\n",
+"// case d\n",
+"Z_L_prime = (alpha)^2 * (Z_L); // Equivalent secondary load impedance referred\n",
+"// to the primary side in ohm\n",
+"\n",
+"// case e\n",
+"R_L = Z_L ; // Load resistance in ohm\n",
+"X_L = 0 ; // Load reactance in ohm\n",
+"\n",
+"// Primary load current in A , when V_1 = 2300 V\n",
+"I_1 = V_1 / ( (R_e1 + alpha^2*R_L) + %i*(X_e1 + alpha^2*X_L) ); \n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-13 Solution : ');\n",
+"\n",
+"printf(' \n a: Equivalent internal resistance referred to the primary side :');\n",
+"printf(' \n R_c1 = %.2f ohm \n ',R_e1 );\n",
+"\n",
+"printf(' \n b: Equivalent internal reactance referred to the primary side :');\n",
+"printf(' \n X_c1 = %.2f ohm \n ',X_e1 );\n",
+"\n",
+"printf(' \n c: Equivalent internal impedance referred to the primary side : ');\n",
+"printf(' \n Z_c1 in ohm = ');disp(Z_e1);\n",
+"printf(' \n Z_c1 = %.3f <%.2f ohm \n ', Z_e1_m , Z_e1_a );\n",
+"\n",
+"printf(' \n d: Equivalent secondary load impedance referred to the primary side :');\n",
+"printf(' \n (alpha)^2 * Z_L = %.2f ohm = (alpha)^2 * R_L \n',Z_L_prime);\n",
+"\n",
+"printf(' \n e: Primary load current :\n I_1 = %f A ≈ %.f A ', I_1, I_1);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.14: I2_ohmdrops_E2_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-14\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"R_e2 = 2 ; // Equivalent resistance referred to the\n",
+"// primary side in mΩ\n",
+"X_e2 = 6 ; // Equivalent reactance referred to the\n",
+"// primary side in mΩ\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"I_2 = (kVA ) / V_2 ; // Rated secondary current in kA\n",
+"\n",
+"// case b\n",
+"R_e2_drop = I_2 * R_e2 ; // Full-load equivalent resistance voltage drop in volt\n",
+"\n",
+"// case c\n",
+"X_e2_drop = I_2 * X_e2 ; // Full-load equivalent reactance voltage drop in volt\n",
+"\n",
+"// case d\n",
+"// unity PF \n",
+"cos_theta2 = 1;\n",
+"sin_theta2 = sqrt(1 - (cos_theta2)^2);\n",
+"\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E_2 = (V_2*cos_theta2 + I_2*R_e2) + %i*(V_2*sin_theta2 + I_2*X_e2);\n",
+"E_2_m = abs(E_2);//E_2_m=magnitude of E_2 in volt\n",
+"E_2_a = atan(imag(E_2) /real(E_2))*180/%pi;//E_2_a=phase angle of E_2 in degrees\n",
+"\n",
+"// case e\n",
+"VR = ( (E_2_m - V_2) / V_2 ) * 100 ; // Percent voltage regulation at unity PF \n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-14 Solution : ');\n",
+"\n",
+"printf(' \n a: Rated secondary current :\n I_2 = %.3f kA \n ', I_2 );\n",
+"\n",
+"printf(' \n b: Full-load equivalent resistance voltage drop : ');\n",
+"printf(' \n I_2*R_c2 = %.2f V \n', R_e2_drop );\n",
+"\n",
+"printf(' \n c: Full-load equivalent reactance voltage drop : ');\n",
+"printf(' \n I_2*X_c2 = %.2f V \n', X_e2_drop );\n",
+"\n",
+"printf(' \n d: Induced voltage when the transformer is delivering rated current ');\n",
+"printf(' \n to unity PF load :\n E_2 in volt = ');disp(E_2);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E_2_m , E_2_a);\n",
+"\n",
+"printf(' \n e: Voltage regulation at unity PF :\n VR = %.2f percent ',VR );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.15: E2_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-15\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"R_e2 = 2 ; // Equivalent resistance referred to the\n",
+"// primary side in mΩ\n",
+"X_e2 = 6 ; // Equivalent reactance referred to the\n",
+"// primary side in mΩ\n",
+"I_2 = 2.174 ; // Rated secondary current in kA\n",
+"\n",
+"cos_theta2 = 0.8 ; // lagging PF\n",
+"sin_theta2 = sqrt(1 - (cos_theta2)^2);\n",
+"\n",
+"// Calculations\n",
+"\n",
+"// case d\n",
+"// Induced voltage when the transformer is delivering rated current to 0.8 lagging PF load\n",
+"E_2 = (V_2*cos_theta2 + I_2*R_e2) + %i*(V_2*sin_theta2 + I_2*X_e2);\n",
+"E_2_m = abs(E_2);//E_2_m=magnitude of E_2 in volt\n",
+"E_2_a = atan(imag(E_2) /real(E_2))*180/%pi;//E_2_a=phase angle of E_2 in degrees\n",
+"\n",
+"// case e\n",
+"VR = ( (E_2_m - V_2) / V_2 ) * 100 ; // Percent voltage regulation at 0.8 PF lag\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-15 Solution : ');\n",
+"\n",
+"printf(' \n d: Induced voltage when the transformer is delivering rated current ');\n",
+"printf(' \n to 0.8 lagging PF load :\n E_2 in volt = ');disp(E_2);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E_2_m , E_2_a);\n",
+"\n",
+"printf(' \n e: Voltage regulation at 0.8 lagging PF :\n VR = %.2f percent ',VR );\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.16: E2_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-16\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"R_e2 = 2 ; // Equivalent resistance referred to the\n",
+"// primary side in mΩ\n",
+"X_e2 = 6 ; // Equivalent reactance referred to the\n",
+"// primary side in mΩ\n",
+"I_2 = 2.174 ; // Rated secondary current in kA\n",
+"\n",
+"cos_theta2 = 0.6 ; // leading PF\n",
+"sin_theta2 = sqrt(1 - (cos_theta2)^2);\n",
+"\n",
+"// Calculations\n",
+"\n",
+"// case d\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E_2 = (V_2*cos_theta2 + I_2*R_e2) + %i*(V_2*sin_theta2 - I_2*X_e2);\n",
+"E_2_m = abs(E_2);//E_2_m=magnitude of E_2 in volt\n",
+"E_2_a = atan(imag(E_2) /real(E_2))*180/%pi;//E_2_a=phase angle of E_2 in degrees\n",
+"\n",
+"// case e\n",
+"VR = ( (E_2_m - V_2) / V_2 ) * 100 ; // Percent voltage regulation at 0.8 leading PF \n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-16 Solution : ');\n",
+"\n",
+"printf(' \n d: Induced voltage when the transformer is delivering rated current ');\n",
+"printf(' \n to 0.6 leading PF load :\n E_2 in volt = ');disp(E_2);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E_2_m , E_2_a);\n",
+"\n",
+"printf(' \n e: Voltage regulation at 0.8 leading PF :\n VR = %.2f percent ',VR );\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.17: Ze1_Re1_Xe1_Ze2_Re2_Xe2their_drops_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-17\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 20 ; // kVA rating of the step-down transformer\n",
+"S = 20000 ; // power rating of the step-down transformer in VA\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"\n",
+"// w.r.t HV side following is SC-test data\n",
+"P1 = 250 ; // wattmeter reading in W\n",
+"I1 = 8.7 ; // Input current in A\n",
+"V1 = 50 ; // Input voltage in V\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"// case a\n",
+"Z_e1 = V1 / I1 ; // Equivalent impedance w.r.t HV side in ohm\n",
+"\n",
+"R_e1 = P1 / (I1)^2 ; // Equivalent resistance w.r.t HV side in ohm\n",
+"\n",
+"theta = acosd(R_e1/Z_e1) ; // PF angle in degrees\n",
+"\n",
+"X_e1 = Z_e1*sind(theta); // Equivalent reactance w.r.t HV side in ohm\n",
+"\n",
+"// case b\n",
+"Z_e2 = Z_e1 / (alpha)^2 ; // Equivalent impedance w.r.t LV side in ohm\n",
+"\n",
+"R_e2 = R_e1 / (alpha)^2 ; // Equivalent resistance w.r.t LV side in ohm\n",
+"\n",
+"X_e2 = Z_e2*sind(theta); // Equivalent reactance w.r.t LV side in ohm\n",
+"\n",
+"// case c\n",
+"I_2 = S / V_2 ; // Rated secondary load current in A\n",
+"\n",
+"R_e2_drop = I_2 * R_e2 ; // Full-load equivalent resistance voltage drop in volt\n",
+"X_e2_drop = I_2 * X_e2 ; // Full-load equivalent reactance voltage drop in volt\n",
+"\n",
+"// At unity PF\n",
+"cos_theta2 = 1;\n",
+"sin_theta2 = sqrt(1 - (cos_theta2)^2);\n",
+"\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E_2 = (V_2*cos_theta2 + I_2*R_e2) + %i*(V_2*sin_theta2 + I_2*X_e2);\n",
+"E_2_m = abs(E_2);//E_2_m=magnitude of E_2 in volt\n",
+"E_2_a = atan(imag(E_2) /real(E_2))*180/%pi;//E_2_a=phase angle of E_2 in degrees\n",
+"\n",
+"VR_unity_PF = ( (E_2_m - V_2) / V_2 ) * 100 ; // Transformer voltage regulation\n",
+"\n",
+"// case d\n",
+"// at 0.7 lagging PF\n",
+"cos_theta_2 = 0.7 ; // lagging PF\n",
+"sin_theta_2 = sqrt(1 - (cos_theta_2)^2);\n",
+"\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E2 = (V_2*cos_theta_2 + I_2*R_e2) + %i*(V_2*sin_theta_2 + I_2*X_e2);\n",
+"E2_m = abs(E2);//E2_m=magnitude of E2 in volt\n",
+"E2_a = atan(imag(E2) /real(E2))*180/%pi;//E2_a=phase angle of E2 in degrees\n",
+"\n",
+"VR_lag_PF = ( (E2_m - V_2) / V_2 ) * 100 ; // Transformer voltage regulation\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-17 Solution : ');\n",
+"\n",
+"printf(' \n a: Equivalent impedance w.r.t HV side :\n Z_e1 = %.2f Ω \n',Z_e1);\n",
+"printf(' \n Equivalent resistance w.r.t HV side :\n R_e1 = %.1f Ω \n',R_e1);\n",
+"printf(' \n θ = %.f degrees \n',theta );\n",
+"printf(' \n Equivalent reactance w.r.t HV side :\n X_e1 = %.2f \n',X_e1);\n",
+"\n",
+"printf(' \n b: Equivalent impedance w.r.t LV side :');\n",
+"printf(' \n Z_e2 = %f Ω = %.2f mΩ \n',Z_e2 ,Z_e2*1000);\n",
+"printf(' \n Equivalent resistance w.r.t LV side :\n R_e2 = %f Ω \n',R_e2);\n",
+"printf(' \n R_e2 = %f Ω = %.2f mΩ \n',R_e2,R_e2*1000);\n",
+"printf(' \n Equivalent reactance w.r.t LV side :\n X_e2 = %f Ω \n',X_e2);\n",
+"printf(' \n X_e2 = %f Ω = %.2f mΩ \n',X_e2,X_e2*1000);\n",
+"\n",
+"printf(' \n c: Rated secondary load current :\n I_2 = %.f A\n',I_2);\n",
+"printf(' \n I_2*R_c2 = %.2f V \n', R_e2_drop );\n",
+"printf(' \n I_2*X_c2 = %.2f V \n', X_e2_drop );\n",
+"printf(' \n At unity PF,\n E_2 in volt = ');disp(E_2);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E_2_m , E_2_a);\n",
+"printf(' \n Voltage regulation at unity PF :\n VR = %.2f percent ',VR_unity_PF );\n",
+"\n",
+"printf(' \n\n d: At 0.7 lagging PF, \n E_2 in volt = ');disp(E2);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E2_m , E2_a);\n",
+"printf(' \n Voltage regulation at 0.7 lagging PF :\n VR = %.2f percent ',VR_lag_PF );\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.18: Pcsc.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-18\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"V_sc = 50 ; // Short circuit voltage in volt\n",
+"V_1 = 2300 ; // Rated primary voltage in volt\n",
+"\n",
+"// Calculations\n",
+"P_c = poly(0,'P_c');// Making P_c as a variable just for displaying answer as per\n",
+"// textbook\n",
+"\n",
+"P_c_sc = (V_sc / V_1)^2 * P_c ; // Fraction of P_c measured by the wattmeter\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-18 Solution : ');\n",
+"\n",
+"printf(' \n Since P_c is proportional to the square of the primary voltage V_sc, ');\n",
+"printf(' \n then under short circuit conditions,the fraction of rated-core loss is :');\n",
+"printf(' \n P_c(sc) = ');disp(P_c_sc);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.19: Ze1drop_Re1drop_Xe1drop_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-19\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"\n",
+"kVA = 20 ; // kVA rating of the step-down transformer\n",
+"S = 20000 ; // power rating of the step-down transformer in VA\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"Z_e1 = 5.75 ; // Equivalent impedance w.r.t HV side in ohm\n",
+"R_e1 = 3.3 ; // Equivalent resistance w.r.t HV side in ohm\n",
+"X_e1 = 4.71 ; // Equivalent reactance w.r.t HV side in ohm\n",
+"\n",
+"// w.r.t HV side following is SC-test data\n",
+"P1 = 250 ; // wattmeter reading in W\n",
+"I1 = 8.7 ; // Input current in A\n",
+"V1 = 50 ; // Input voltage in V\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"Z_e1_drop = V1 ; // High voltage impedance drop in volt\n",
+"\n",
+"// case b\n",
+"theta = acosd(R_e1/Z_e1) ; // PF angle in degrees\n",
+"\n",
+"R_e1_drop = I1*Z_e1*cosd(theta) ; //HV-side equivalent resistance voltage drop in volt\n",
+"\n",
+"// case c\n",
+"X_e1_drop = I1*Z_e1*sind(theta) ; //HV-side equivalent reactance voltage drop in volt\n",
+"\n",
+"// case d\n",
+"// At unity PF\n",
+"cos_theta1 = 1;\n",
+"sin_theta1 = sqrt(1 - (cos_theta1)^2);\n",
+"\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E_1 = (V_1*cos_theta1 + I1*R_e1) + %i*(V_1*sin_theta1 + I1*X_e1);\n",
+"E_1_m = abs(E_1);//E_1_m=magnitude of E_1 in volt\n",
+"E_1_a = atan(imag(E_1) /real(E_1))*180/%pi;//E_1_a=phase angle of E_1 in degrees\n",
+"\n",
+"VR_unity_PF = ( (E_1_m - V_1) / V_1 ) * 100 ; // Transformer voltage regulation\n",
+"\n",
+"// case e\n",
+"// at 0.7 lagging PF\n",
+"cos_theta_1 = 0.7 ; // lagging PF\n",
+"sin_theta_1 = sqrt(1 - (cos_theta_1)^2);\n",
+"\n",
+"// Induced voltage when the transformer is delivering rated current to unity PF load\n",
+"E1 = (V_1*cos_theta_1 + I1*R_e1) + %i*(V_1*sin_theta_1 + I1*X_e1);\n",
+"E1_m = abs(E1);//E1_m=magnitude of E1 in volt\n",
+"E1_a = atan(imag(E1) /real(E1))*180/%pi;//E1_a=phase angle of E1 in degrees\n",
+"\n",
+"VR_lag_PF = ( (E1_m - V_1) / V_1 ) * 100 ; // Transformer voltage regulation\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-19 Solution : ');\n",
+"\n",
+"printf(' \n a: High voltage impedance drop :\n I_1*Z_e1 = V_1 = %d\n',Z_e1_drop);\n",
+"\n",
+"printf(' \n b: θ = %.f degrees \n',theta );\n",
+"printf(' \n High voltage resistance drop :\n I_1*R_e1 = %.2f \n',R_e1_drop);\n",
+"\n",
+"printf(' \n c: High voltage reactance drop :\n I_1*X_e1 = %.2f \n',X_e1_drop);\n",
+"\n",
+"printf(' \n d: At unity PF,\n E_2 in volt = ');disp(E_1);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E_1_m , E_1_a);\n",
+"printf(' \n Voltage regulation at unity PF :\n VR = %.2f percent ',VR_unity_PF );\n",
+"\n",
+"printf(' \n\n e: At 0.7 lagging PF, \n E_2 in volt = ');disp(E1);\n",
+"printf(' \n E_2 = %.2f <%.2f V \n ',E1_m , E1_a);\n",
+"printf(' \n Voltage regulation at 0.7 lagging PF :\n VR = %.2f percent ',VR_lag_PF );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: stepup_stepdown_alpha_I1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-1\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data for Step -down transformer\n",
+"N_1 = 500 ; // Number of turns in the primary\n",
+"N_2 = 100 ; // Number of turns in the secondary\n",
+"I_2 = 12 ; // Load (Secondary) current in A\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"alpha = N_1 / N_2 ; // Transformation ratio\n",
+"\n",
+"// case b\n",
+"I_1 = I_2 / alpha ; // Load component of primary current in A\n",
+"\n",
+"// case c\n",
+"// sunscript c for alpha indicates case c\n",
+"// For step up transformer , using above given data\n",
+"N1 = 100 ; // Number of turns in the primary\n",
+"N2 = 500 ; // Number of turns in the secondary\n",
+"alpha_c = N1 / N2 ; // Transformation ratio\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-1 Solution : ');\n",
+"\n",
+"printf(' \n a: Transformation ratio(step-down transformer) :\n α = %d\n',alpha);\n",
+"\n",
+"printf(' \n b: Load component of primary current : \n I_1 = %.1f A \n',I_1);\n",
+"\n",
+"printf(' \n c: Transformation ratio(step-up transformer) :\n α = %.1f',alpha_c);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.20: Re1_Re1_r2_its_drop_Pc.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-20\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 500 ; // kVA rating of the step-down transformer\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 208 ; // Secondary voltage in volt\n",
+"f = 60 ; // Frequency in Hz\n",
+"\n",
+"// SC-test data\n",
+"P_sc = 8200 ; // wattmeter reading in W\n",
+"I_sc = 217.4 ; // Short circuit current in A\n",
+"V_sc = 95 ; // Short circuit voltage in V\n",
+"\n",
+"// OC-test data\n",
+"P_oc = 1800 ; // wattmeter reading in W\n",
+"I_oc = 85 ; // Open circuit current in A\n",
+"V_oc = 208 ; // Open circuit voltage in V\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"// case a\n",
+"P = P_sc ; // wattmeter reading in W\n",
+"I1 = I_sc ; // Short circuit current in A\n",
+"R_e1 = P / (I1)^2 ; // Equivalent resistance w.r.t HV side in ohm\n",
+"R_e2 = R_e1 / (alpha)^2 // Equivalent resistance referred to LV side in ohm\n",
+"\n",
+"// case b\n",
+"r_2 = R_e2 / 2 ; // Resistance of low-voltage side in ohm\n",
+"\n",
+"// case c\n",
+"I_m = I_oc ; // Open circuit current in A\n",
+"P_cu = (I_m)^2 * r_2 ; // Transformer copper loss of the LV side wdg during OC-test in W\n",
+"\n",
+"// case d\n",
+"P_c = P_oc - P_cu ; // Transformer core loss in W\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-20 Solution : ');\n",
+"\n",
+"printf(' \n a: Equivalent resistance w.r.t HV side :\n R_e1 = %.4f Ω\n',R_e1);\n",
+"printf(' \n Equivalent resistance w.r.t LV side :\n R_e2 = %f Ω = %.3f mΩ \n',R_e2,R_e2*1000);\n",
+"\n",
+"printf(' \n b: Resistance of LV side :\n r_2 = %f Ω = %.2f mΩ\n',r_2,r_2*1000);\n",
+"\n",
+"printf(' \n c: Transformer copper loss of the LV side wdg during OC-test : ');\n",
+"printf(' \n (I_m)^2 * r_2 = %f W \n',P_cu);\n",
+"\n",
+"printf(' \n d: Transformer core loss :\n P_c = %f W \n ',P_c);\n",
+"\n",
+"printf(' \n e: Yes.The error is approximately 5/%d = 0.278 percent,which is',P_oc);\n",
+"printf(' \n within the error produced by the instruments used in the test.');\n",
+"printf(' \n We may assume that the core loss is %d W.',P_oc);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.21: tabulate_I2_efficiencies.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-21\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data(from Ex.14-18)\n",
+"V_sc = 50 ; // Short circuit voltage in volt\n",
+"V_1 = 2300 ; // Rated primary voltage in volt\n",
+"\n",
+"\n",
+"// Preliminary data before tabulating\n",
+"\n",
+"// from ex.14-20\n",
+"P_c = 1.8 ; // core losses in kW\n",
+"P_k = 1.8 ; // fixed losses in kW \n",
+"P_cu_rated = 8.2 ; // Rated copper loss in kW\n",
+"\n",
+"// given rating\n",
+"kVA = 500 ; // Power rating in kVA\n",
+"PF = 1 ; // power factor\n",
+"P_o = kVA * PF ; // full-load output at unity PF in kW\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"LF1 = 1/4 ; // Load fraction\n",
+"LF2 = 1/2 ; // Load fraction\n",
+"LF3 = 3/4 ; // Load fraction\n",
+"LF4 = 5/4 ; // Load fraction\n",
+"P_cu_fl = 8.2 ; // Equivalent copper loss at full-load slip\n",
+"P_cu_LF1 = (LF1)^2 * P_cu_fl ; // Equivalent copper loss at 1/4 rated load\n",
+"P_cu_LF2 = (LF2)^2 * P_cu_fl ; // Equivalent copper loss at 1/2 rated load\n",
+"P_cu_LF3 = (LF3)^2 * P_cu_fl ; // Equivalent copper loss at 3/4 rated load\n",
+"P_cu_LF4 = (LF4)^2 * P_cu_fl ; // Equivalent copper loss at 5/4 rated load\n",
+"\n",
+"P_L_1 = P_c + P_cu_LF1 ; // Total losses in kW at 1/4 rated load\n",
+"P_L_2 = P_c + P_cu_LF2 ; // Total losses in kW at 1/2 rated load\n",
+"P_L_3 = P_c + P_cu_LF3 ; // Total losses in kW at 3/4 rated load\n",
+"P_L_fl = P_c + P_cu_fl ; // Total losses in kW at rated load\n",
+"P_L_4 = P_c + P_cu_LF4 ; // Total losses in kW at 5/4 rated load\n",
+"\n",
+"P_o_1 = P_o*LF1 ; // Total output in kW at 1/4 rated load\n",
+"P_o_2 = P_o*LF2 ; // Total output in kW at 1/2 rated load\n",
+"P_o_3 = P_o*LF3 ; // Total output in kW at 3/4 rated load\n",
+"P_o_fl = P_o ; // Total output in kW at rated load\n",
+"P_o_4 = P_o*LF4 ; // Total output in kW at 5/4 rated load\n",
+"\n",
+"P_in_1 = P_L_1 + P_o_1 ; // Total input in kW at 1/4 rated load\n",
+"P_in_2 = P_L_2 + P_o_2 ; // Total input in kW at 1/2 rated load\n",
+"P_in_3 = P_L_3 + P_o_3 ; // Total input in kW at 3/4 rated load\n",
+"P_in_fl = P_L_fl + P_o_fl ; // Total input in kW at rated load\n",
+"P_in_4 = P_L_4 + P_o_4 ; // Total input in kW at 5/4 rated load\n",
+"\n",
+"eta_1 = (P_o_1/P_in_1)*100 ; // Efficiency at 1/4 rated load\n",
+"eta_2 = (P_o_2/P_in_2)*100 ; // Efficiency at 1/2 rated load\n",
+"eta_3 = (P_o_3/P_in_3)*100 ; // Efficiency at 3/4 rated load\n",
+"eta_fl = (P_o_fl/P_in_fl)*100 ; // Efficiency at rated load\n",
+"eta_4 = (P_o_4/P_in_4)*100 ; // Efficiency at 5/4 rated load\n",
+"\n",
+"\n",
+"// case b\n",
+"PF_b = 0.8 ; // 0.8 PF lagging\n",
+"Po_1 = P_o*LF1*PF_b ; // Total output in kW at 1/4 rated load\n",
+"Po_2 = P_o*LF2*PF_b ; // Total output in kW at 1/2 rated load\n",
+"Po_3 = P_o*LF3*PF_b ; // Total output in kW at 3/4 rated load\n",
+"Po_fl = P_o*PF_b ; // Total output in kW at rated load\n",
+"Po_4 = P_o*LF4*PF_b ; // Total output in kW at 5/4 rated load\n",
+"\n",
+"Pin_1 = P_L_1 + Po_1 ; // Total input in kW at 1/4 rated load\n",
+"Pin_2 = P_L_2 + Po_2 ; // Total input in kW at 1/2 rated load\n",
+"Pin_3 = P_L_3 + Po_3 ; // Total input in kW at 3/4 rated load\n",
+"Pin_fl = P_L_fl + Po_fl ; // Total input in kW at rated load\n",
+"Pin_4 = P_L_4 + Po_4 ; // Total input in kW at 5/4 rated load\n",
+"\n",
+"eta1 = (Po_1/Pin_1)*100 ; // Efficiency at 1/4 rated load\n",
+"eta2 = (Po_2/Pin_2)*100 ; // Efficiency at 1/2 rated load\n",
+"eta3 = (Po_3/Pin_3)*100 ; // Efficiency at 3/4 rated load\n",
+"etafl = (Po_fl/Pin_fl)*100 ; // Efficiency at rated load\n",
+"eta4 = (Po_4/Pin_4)*100 ; // Efficiency at 5/4 rated load\n",
+"\n",
+"// case c\n",
+"R_e2 = 1.417e-3 ; // Equivalent resistance in ohm referred to LV side\n",
+"Pc = 1800 ; // Core losses in W\n",
+"I_2 = sqrt(Pc/R_e2); // Load current in A for max.efficiency invariant of LF\n",
+"\n",
+"// case d\n",
+"V = 208 ; // Voltage rating in volt\n",
+"I_2_rated = (kVA*1000) / V ; // Rated secondary current in A\n",
+"LF_max = I_2 / I_2_rated ; // Load fraction for max.efficiency\n",
+"\n",
+"// case e\n",
+"// subscript e for eta_max indicates case e\n",
+"cos_theta = 1;\n",
+"V_2 = V ; // secondary voltage in volt\n",
+"Pc = 1800 ; // core loss in W\n",
+"// max.efficiency for unity PF\n",
+"eta_max_e = (V_2*I_2*cos_theta) / ((V_2*I_2*cos_theta) + (Pc + I_2^2*R_e2)) * 100\n",
+"\n",
+"// case f\n",
+"// subscript f for eta_max indicates case e\n",
+"cos_theta2 = 0.8;\n",
+"// max.efficiency for 0.8 lagging PF\n",
+"eta_max_f = (V_2*I_2*cos_theta2) / ((V_2*I_2*cos_theta2) + (Pc + I_2^2*R_e2)) * 100\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-21 Solution : ');\n",
+"\n",
+"printf(' \n a: Tabulation at unity PF : ');\n",
+"printf(' \n __________________________________________________________________________________________________________');\n",
+"printf(' \n L.F \t Core loss \t Copper loss \tTotal loss \t Total Output \t Total Input \t Efficiency');\n",
+"printf(' \n \t (kW) \t (kW) \t P_L (kW) \t P_o(kW) \t P_L+P_o(kW)\t P_o/P_in(percent)');\n",
+"printf(' \n __________________________________________________________________________________________________________');\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF1,P_c,P_cu_LF1,P_L_1,P_o_1,P_in_1,eta_1);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF2,P_c,P_cu_LF2,P_L_2,P_o_2,P_in_2,eta_2);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF3,P_c,P_cu_LF3,P_L_3,P_o_3,P_in_3,eta_3);\n",
+"printf(' \n 1 \t\t %.1f \t\t %.3f \t %.3f \t %.1f \t %.2f \t %.2f ',P_c,P_cu_fl,P_L_fl,P_o_fl,P_in_fl,eta_fl);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t %.1f \t %.2f \t %.2f ',LF4,P_c,P_cu_LF4,P_L_4,P_o_4,P_in_4,eta_4);\n",
+"printf(' \n __________________________________________________________________________________________________________\n\n');\n",
+"\n",
+"printf(' \n b: Tabulation at 0.8 PF lagging : ');\n",
+"printf(' \n __________________________________________________________________________________________________________');\n",
+"printf(' \n L.F \t Core loss \t Copper loss \tTotal loss \t Total Output \t Total Input \t Efficiency');\n",
+"printf(' \n \t (kW) \t (kW) \t P_L (kW) \t P_o(kW) \t P_L+P_o(kW)\t P_o/P_in(percent)');\n",
+"printf(' \n __________________________________________________________________________________________________________');\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF1,P_c,P_cu_LF1,P_L_1,Po_1,Pin_1,eta1);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF2,P_c,P_cu_LF2,P_L_2,Po_2,Pin_2,eta2);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f ',LF3,P_c,P_cu_LF3,P_L_3,Po_3,Pin_3,eta3);\n",
+"printf(' \n 1 \t\t %.1f \t\t %.3f \t %.3f \t %.1f \t %.2f \t %.2f ',P_c,P_cu_fl,P_L_fl,Po_fl,Pin_fl,etafl);\n",
+"printf(' \n %.2f \t %.1f \t\t %.3f \t %.3f \t %.1f \t %.2f \t %.2f ',LF4,P_c,P_cu_LF4,P_L_4,Po_4,Pin_4,eta4);\n",
+"printf(' \n __________________________________________________________________________________________________________\n\n');\n",
+"\n",
+"printf(' \n c: Load current at which max.efficiency occurs :\n I_2 = %.1f A \n',I_2);\n",
+"\n",
+"printf(' \n d: Rated load current :\n I_2(rated) = %.1f A \n',I_2_rated);\n",
+"printf(' \n Load fraction for η_max = %.3f(≃half rated load)\n ',LF_max);\n",
+"\n",
+"printf(' \n e: Max.efficiency for unity PF :\n η_max = %.2f percent \n',eta_max_e);\n",
+"\n",
+"printf(' \n f: Max.efficiency for 0.8 lagging PF :\n η_max = %.2f percent',eta_max_f);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.22: Zeqpu_V1pu_VR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-22\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"P = 20 ; // Power rating of the transformer in kVA\n",
+"// Short circuit test data\n",
+"P_sc = 250 ; // Power measured in W\n",
+"V_sc = 50 ; // Short circuit voltage in volt\n",
+"I_sc = 8.7 ; // Short circuit current in A\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_1b = V_1 ; // base voltage in volt\n",
+"Z_eq_pu = V_sc / V_1 ;\n",
+"\n",
+"funcprot(0) ; // Use this to avoid the message 'Warning : redefining function: beta ' .\n",
+"beta = acosd(P_sc/(V_sc*I_sc)); // angle in degrees\n",
+"\n",
+"Zeq_pu = Z_eq_pu*exp(%i*(beta)*(%pi/180));\n",
+"Zeq_pu_m = abs(Zeq_pu);//Zeq_pu_m=magnitude of Zeq_pu in p.u\n",
+"Zeq_pu_a = atan(imag(Zeq_pu) /real(Zeq_pu))*180/%pi;//Zeq_pu_a=phase angle of Zeq_pu in degrees\n",
+"\n",
+"// case b\n",
+"// at unity PF\n",
+"V_1_pu = 1*exp(%i*(0)*(%pi/180)) + 1*exp(%i*(0)*(%pi/180))*Z_eq_pu*exp(%i*(beta)*(%pi/180));\n",
+"// RHS is written in exponential complex form and (%pi/180) is radians to degrees conversion factor\n",
+"V_1_pu_m = abs(V_1_pu);//V_1_pu_m=magnitude of V_1_pu in volt\n",
+"V_1_pu_a = atan(imag(V_1_pu) /real(V_1_pu))*180/%pi;//V_1_pu_a=phase angle of V_1_pu in degrees\n",
+"\n",
+"// case c\n",
+"// at 0.7 PF lagging\n",
+"theta = acosd(0.7); // Power factor angle in degrees\n",
+"V1_pu = 1*exp(%i*(0)*(%pi/180)) + 1*exp(%i*(-theta)*(%pi/180))*Z_eq_pu*exp(%i*(beta)*(%pi/180));\n",
+"V1_pu_m = abs(V1_pu);//V1_pu_m=magnitude of V1_pu in volt\n",
+"V1_pu_a = atan(imag(V1_pu) /real(V1_pu))*180/%pi;//V1_pu_a=phase angle of V1_pu in degrees\n",
+"\n",
+"// case d\n",
+"VR_unity_PF = V_1_pu_m - 1 ; // voltage regulation at unity PF \n",
+"\n",
+"// case e\n",
+"VR_lag_PF = V1_pu_m - 1 ; // voltage regulation at 0.7 lagging PF \n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-22 Solution : ');\n",
+"\n",
+"printf(' \n a: Z_eq(pu) = %.5f p.u \n',Z_eq_pu);\n",
+"printf(' \n β = %.f degrees \n',beta);\n",
+"printf(' \n Z_eq(pu) <β = ');disp(Zeq_pu);\n",
+"printf(' \n Z_eq(pu) <β = %.5f <%.f p.u \n ',Zeq_pu_m,Zeq_pu_a);\n",
+"\n",
+"printf(' \n b: |V_1(pu)| = ');disp(V_1_pu);\n",
+"printf(' \n |V_1(pu)| = %.4f <%.2f V \n ',V_1_pu_m , V_1_pu_a );\n",
+"\n",
+"printf(' \n c: |V_1(pu)| = ');disp(V1_pu);\n",
+"printf(' \n |V_1(pu)| = %.4f <%.2f V \n ',V1_pu_m , V1_pu_a );\n",
+"\n",
+"printf(' \n d: Voltage regulation at unity PF :\n VR = %f ',VR_unity_PF);\n",
+"printf(' \n VR = %.3f percent \n ',100*VR_unity_PF);\n",
+"\n",
+"printf(' \n e: Voltage regulation at 0.7 lagging PF :\n VR = %f ',VR_lag_PF);\n",
+"printf(' \n VR = %.2f percent \n ',100*VR_lag_PF);\n",
+"\n",
+"printf(' \n f: VRs as found by p.u method are essentially the same as those found ');\n",
+"printf(' \n in Exs.14-17 and 14-19 using the same data, for the same transformer, ');\n",
+"printf(' \n but with much less effort.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.23: Pcu_LF_efficiencies.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-23\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"S = 500 ; // Power rating of the transformer in kVA\n",
+"f= 60 ; // Frequency in Hz\n",
+"\n",
+"// Open circuit test data\n",
+"V_oc = 208 ; // Open circuit voltage in volt\n",
+"I_oc = 85 ; // Open circuit current in A\n",
+"P_oc = 1800 ; // Power measured in W\n",
+"\n",
+"// Short circuit test data\n",
+"V_sc = 95 ; // Short circuit voltage in volt\n",
+"I_sc = 217.4 ; // Short circuit current in A\n",
+"P_sc = 8200 ; // Power measured in W\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"S_b = S ; // Base voltage in kVA\n",
+"Psc = 8.2 ; // Power measured in kW during SC-test\n",
+"P_Cu_pu = Psc / S_b ; // per unit value of P_Cu at rated load\n",
+"\n",
+"// case b\n",
+"Poc = 1.8 ; // Power measured in kW during OC-test\n",
+"P_CL_pu = Poc / S_b ; // per unit value of P_CL at rated load\n",
+"\n",
+"// case c\n",
+"PF = 1 ; // unity Power factor\n",
+"eta_pu = PF / (PF + P_CL_pu + P_Cu_pu ) * 100 ; // Efficiency at rated load,unity PF\n",
+"\n",
+"// case d\n",
+"// subscript d for PF and eta_pu indicates case d\n",
+"PF_d = 0.8 ; // 0.8 lagging Power factor\n",
+"eta_pu_d = PF_d / (PF_d + P_CL_pu + P_Cu_pu ) * 100 ; // Efficiency at rated load,unity PF\n",
+"\n",
+"// case e\n",
+"LF = sqrt(P_CL_pu / P_Cu_pu); // Load fraction producing max.efficiency\n",
+"\n",
+"// case f\n",
+"eta_pu_max = (LF*PF) / ( (LF*PF) + 2*(P_CL_pu) ) * 100 ; // Maximum efficiency at unity PF load\n",
+"\n",
+"// case g\n",
+"eta_pu_max_g = (LF*PF_d) / ( (LF*PF_d) + 2*(P_CL_pu) ) * 100 ; // Maximum efficiency at 0.8 lagging PF load\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-23 Solution : ');\n",
+"\n",
+"printf(' \n a: Per unit copper loss at rated load :');\n",
+"printf(' \n P_Cu(pu) = %.4f p.u = R_eq(pu)\n',P_Cu_pu);\n",
+"\n",
+"printf(' \n a: Per unit core loss at rated load :');\n",
+"printf(' \n P_CL(pu) = %.4f p.u \n',P_CL_pu);\n",
+"\n",
+"printf(' \n c: Efficiency at rated load,unity PF :\n η_pu = %.2f percent \n',eta_pu);\n",
+"\n",
+"printf(' \n c: Efficiency at rated load,0.8 lagging PF :\n η_pu = %.2f percent \n',eta_pu_d);\n",
+"\n",
+"printf(' \n e: Load fraction producing max.efficiency :\n L.F = %.3f \n ',LF );\n",
+"\n",
+"printf(' \n f: Maximum efficiency at unity PF load :\n η_pu(max) = %.2f percent \n',eta_pu_max);\n",
+"\n",
+"printf(' \n g: Maximum efficiency at 0.8 lagging PF load :\n η_pu(max) = %.2f percent \n',eta_pu_max_g);\n",
+"\n",
+"printf(' \n h: All efficiency values are identical to those computed in solution to Ex.14-21. \n');\n",
+"\n",
+"printf(' \n i: Per-unit method is much simpler and less subject to error than conventional method.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.24: efficiencies_at_differnt_LFs.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-24\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data(From Ex.14-23)\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"S = 500 ; // Power rating of the transformer in kVA\n",
+"f= 60 ; // Frequency in Hz\n",
+"\n",
+"// Open circuit test data\n",
+"V_oc = 208 ; // Open circuit voltage in volt\n",
+"I_oc = 85 ; // Open circuit current in A\n",
+"P_oc = 1800 ; // Power measured in W\n",
+"\n",
+"// Short circuit test data\n",
+"V_sc = 95 ; // Short circuit voltage in volt\n",
+"I_sc = 217.4 ; // Short circuit current in A\n",
+"P_sc = 8200 ; // Power measured in W\n",
+"\n",
+"// Calculations\n",
+"// Preliminary calculations\n",
+"S_b = S ; // Base voltage in kVA\n",
+"Psc = 8.2 ; // Power measured in kW during SC-test\n",
+"P_Cu_pu = Psc / S_b ; // per unit value of P_Cu at rated load\n",
+"\n",
+"Poc = 1.8 ; // Power measured in kW during OC-test\n",
+"P_CL_pu = Poc / S_b ; // per unit value of P_CL at rated load\n",
+"\n",
+"// case a\n",
+"LF1 = 3/4 ; // Load fraction of rated load \n",
+"PF1 = 1 ; // unity Power factor\n",
+"eta_pu_LF1 = (LF1*PF1) / ((LF1*PF1) + P_CL_pu + (LF1)^2*P_Cu_pu ) * 100 ; // Efficiency at rated load,unity PF\n",
+"\n",
+"// case b\n",
+"LF2 = 1/4 ; // Load fraction of rated load \n",
+"PF2 = 0.8 ; // 0.8 lagging PF\n",
+"eta_pu_LF2 = (LF2*PF2) / ((LF2*PF2) + P_CL_pu + (LF2)^2*P_Cu_pu ) * 100 ; // Efficiency at 1/4 rated load,0.8 lagging PF\n",
+"\n",
+"// case c\n",
+"LF3 = 5/4 ; // Load fraction of rated load \n",
+"PF3 = 0.8 ; // 0.8 leading PF\n",
+"eta_pu_LF3 = (LF3*PF3) / ((LF3*PF3) + P_CL_pu + (LF3)^2*P_Cu_pu ) * 100 ; // Efficiency at r1/4 rated load,0.8 leading PF\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-24 Solution : ');\n",
+"\n",
+"printf(' \n Efficiency(pu) :\n ');\n",
+"printf(' \n a: η_pu at %.2f rated-load = %.2f percent \n',LF1,eta_pu_LF1);\n",
+"\n",
+"printf(' \n b: η_pu at %.2f rated-load = %.2f percent \n',LF2,eta_pu_LF2);\n",
+"\n",
+"printf(' \n c: η_pu at %.2f rated-load = %.2f percent \n',LF3,eta_pu_LF3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.25: Zpu2_St_S2_S1_LF.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-25\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA_1 = 500 ; // Power rating of the transformer 1 in kVA\n",
+"R_1_pu = 0.01 ; // per-unit value of resistance of the transformer 1\n",
+"X_1_pu = 0.05 ; // per-unit value of reactance of the transformer 1\n",
+"Z_1_pu = R_1_pu + %i*X_1_pu ; //per-unit value of impedance of the transformer 1\n",
+"\n",
+"PF = 0.8 ; // lagging power factor\n",
+"V_2 = 400 ; // Secondary voltage in volt\n",
+"S_load = 750 ; // Increased system load in kVA\n",
+"\n",
+"kVA_2 = 250 ; // Power rating of the transformer 2 in kVA\n",
+"R_pu_2 = 0.015 ; // per-unit value of resistance of the transformer 2\n",
+"X_pu_2 = 0.04 ; // per-unit value of reactance of the transformer 2\n",
+"\n",
+"// smaller transformer secondary voltageis same as larger transformer\n",
+"\n",
+"// Calculations\n",
+"// Preliminary calculations\n",
+"Z_pu_1 = R_pu_2 + %i*X_pu_2 ; // New transformer p.u. impedance\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_b1 = 400 ; // base voltage in volt\n",
+"V_b2 = 400 ; // base voltage in volt\n",
+"Z_pu_2 = (kVA_1/kVA_2)*(V_b1/V_b2)^2 * (Z_pu_1); // New transformer p.u impedance\n",
+"Z_2_pu = Z_pu_2 ; //New transformer p.u impedance\n",
+"\n",
+"// case b\n",
+"cos_theta = PF ; // Power factor\n",
+"sin_theta = sqrt( 1 - (cos_theta)^2 );\n",
+"S_t_conjugate = (kVA_1 + kVA_2)*(cos_theta + %i*sin_theta); // kVA of total load\n",
+"\n",
+"// case c\n",
+"S_2_conjugate = S_t_conjugate * ( Z_1_pu /(Z_1_pu + Z_2_pu) ); // Portion of load carried by the smaller transformer in kVA\n",
+"S_2_conjugate_m = abs(S_2_conjugate);//S_2_conjugate_m=magnitude of S_2_conjugate in kVA\n",
+"S_2_conjugate_a = atan(imag(S_2_conjugate) /real(S_2_conjugate))*180/%pi;//S_2_conjugate_a=phase angle of S_2_conjugate in degrees\n",
+"\n",
+"// case d\n",
+"S_1_conjugate = S_t_conjugate * ( Z_2_pu/(Z_1_pu + Z_2_pu) ); // Portion of load carried by the original transformer in kVA\n",
+"S_1_conjugate_m = abs(S_1_conjugate);//S_1_conjugate_m=magnitude of S_1_conjugate in kVA\n",
+"S_1_conjugate_a = atan(imag(S_1_conjugate) /real(S_1_conjugate))*180/%pi;//S_1_conjugate_a=phase angle of S_1_conjugate in degrees\n",
+"\n",
+"// case e\n",
+"S_1 = S_1_conjugate_m ; \n",
+"S_b1 = kVA_1 ; // base power in kVA of trancsformer 1\n",
+"LF1 = (S_1 / S_b1)*100 ; // Load fraction of the original transformer in percent\n",
+"\n",
+"// case f\n",
+"S_2 = S_2_conjugate_m ; \n",
+"S_b2 = kVA_2 ; // base power in kVA of trancsformer 2\n",
+"LF2 = (S_2 / S_b2)*100 ; // Load fraction of the original transformer in percent\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-25 Solution : ');\n",
+"\n",
+"printf(' \n a: New transformer p.u impedance :\n Z_p.u.2 in p.u = ');disp(Z_pu_2);\n",
+"\n",
+"printf(' \n b: kVA of total load :\n S*_t in kVA = ');disp(S_t_conjugate);\n",
+"\n",
+"printf(' \n c: Portion of load carried by the smaller transformer in kVA :');\n",
+"printf(' \n S*_2 in kVA = ');disp(S_2_conjugate);\n",
+"printf(' \n S*_2 = %.1f <%.2f kVA (inductive load)\n',S_2_conjugate_m,S_2_conjugate_a);\n",
+"\n",
+"printf(' \n d: Portion of load carried by the original transformer in kVA :');\n",
+"printf(' \n S*_2 in kVA = ');disp(S_1_conjugate);\n",
+"printf(' \n S*_2 = %.1f <%.2f kVA (inductive load)\n',S_1_conjugate_m,S_1_conjugate_a);\n",
+"\n",
+"printf(' \n e: Load fraction of the original transformer :\n L.F.1 = %.1f percent\n',LF1);\n",
+"\n",
+"printf(' \n f: Load fraction of the original transformer :\n L.F.2 = %.1f percent\n',LF2);\n",
+"\n",
+"printf(' \n g: Yes. Reduce the no-load voltage of the new transformer to some value ');\n",
+"printf(' \n below that of its present value so that its share of the load is reduced.');\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.26: Vb_Ib_Zb_Z1_Z2_I1_I2_E1_E2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-26\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data(From Ex.14-25)\n",
+"kVA_1 = 500 ; // Power rating of the transformer 1 in kVA\n",
+"R_1_pu = 0.01 ; // per-unit value of resistance of the transformer 1\n",
+"X_1_pu = 0.05 ; // per-unit value of reactance of the transformer 1\n",
+"Z_1_pu = R_1_pu + %i*X_1_pu ; //per-unit value of impedance of the transformer 1\n",
+"\n",
+"PF = 0.8 ; // lagging power factor\n",
+"V = 400 ; // Secondary voltage in volt\n",
+"S_load = 750 ; // Increased system load in kVA\n",
+"\n",
+"kVA_2 = 250 ; // Power rating of the transformer 2 in kVA\n",
+"R_pu_2 = 0.015 ; // per-unit value of resistance of the transformer 2\n",
+"X_pu_2 = 0.04 ; // per-unit value of reactance of the transformer 2\n",
+"\n",
+"// smaller transformer secondary voltageis same as larger transformer\n",
+"\n",
+"// Calculations\n",
+"// Preliminary calculations\n",
+"Z_pu_1 = R_pu_2 + %i*X_pu_2 ; // New transformer p.u. impedance\n",
+"\n",
+"// case a\n",
+"V_b = V ; // (given)\n",
+"\n",
+"//case b\n",
+"S_b =500*1000 ; // base power in VA\n",
+"I_b = S_b / V_b ; // base current in A\n",
+"\n",
+"// case c\n",
+"Z_b = V^2/S_b ; // Base impedance in ohm\n",
+"\n",
+"// case d\n",
+"Z_1 = Z_b * Z_1_pu * 1000 ; // Actual impedance of larger transformer in milli-ohm\n",
+"Z_1_m = abs(Z_1);//Z_1_m=magnitude of Z_1 in ohm\n",
+"Z_1_a = atan(imag(Z_1) /real(Z_1))*180/%pi;//Z_1_a=phase angle of Z_1 in degrees\n",
+"\n",
+"// case e\n",
+"V_b1 = V_b ; // base voltage in volt\n",
+"V_b2 = V_b ; // base voltage in volt\n",
+"Z_pu_2 = (kVA_1/kVA_2)*(V_b1/V_b2)^2 * (Z_pu_1); // New transformer p.u impedance\n",
+"Z_2_pu = Z_pu_2 ; //New transformer p.u impedance\n",
+"\n",
+"Z_2 = Z_b * Z_2_pu*1000 ; // Actual impedance of smaller transformer in milli-ohm\n",
+"Z_2_m = abs(Z_2);//Z_2_m=magnitude of Z_2 in ohm\n",
+"Z_2_a = atan(imag(Z_2) /real(Z_2))*180/%pi;//Z_2_a=phase angle of Z_2 in degrees\n",
+"\n",
+"// case f\n",
+"cos_theta = 0.8 ; // Power factor\n",
+"sin_theta = sqrt( 1 - (cos_theta)^2 );\n",
+"S_T = (kVA_1 + kVA_2)*(cos_theta - %i*sin_theta); // kVA of total load\n",
+"\n",
+"I_T = S_T*1000 / V_b ; // Total current in A\n",
+"\n",
+"I_1 = I_T*(Z_2/(Z_1 + Z_2)); // Actual current delivered by larger transformer in A\n",
+"I_1_m = abs(I_1);//I_1_m=magnitude of I_1 in A\n",
+"I_1_a = atan(imag(I_1) /real(I_1))*180/%pi;//I_1_a=phase angle of I_1 in degrees\n",
+"\n",
+"// case g\n",
+"I_2 = I_T*(Z_1/(Z_1 + Z_2)); // Actual current delivered by larger transformer in A\n",
+"I_2_m = abs(I_2);//I_2_m=magnitude of I_2 in A\n",
+"I_2_a = atan(imag(I_2) /real(I_2))*180/%pi;//I_2_a=phase angle of I_2 in degrees\n",
+"\n",
+"// case h\n",
+"Z1 = Z_1/1000 ; // Z_1 in ohm\n",
+"E_1 = I_1*Z1 + V_b ; // No-load voltage of larger Tr. in volt\n",
+"E_1_m = abs(E_1);//E_1_m=magnitude of E_1 in volt\n",
+"E_1_a = atan(imag(E_1) /real(E_1))*180/%pi;//E_1_a=phase angle of E_1 in degrees\n",
+"\n",
+"\n",
+"// case i\n",
+"Z2 = Z_2/1000 ; // Z_2 in ohm\n",
+"E_2 = I_2*Z2 + V_b ; // No-load voltage of smaller Tr. in volt\n",
+"E_2_m = abs(E_2);//E_2_m=magnitude of E_2 in volt\n",
+"E_2_a = atan(imag(E_2) /real(E_2))*180/%pi;//E_2_a=phase angle of E_2 in degrees\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-26 Solution : ');\n",
+"\n",
+"printf(' \n a: Base voltage :\n V_b = %d <0 V (given)\n',V_b);\n",
+"\n",
+"printf(' \n b: Base current :\n I_b = %.2f A \n',I_b);\n",
+"\n",
+"printf(' \n c: Base impedance :\n Z_b = %.2f ohm\n',Z_b);\n",
+"\n",
+"printf(' \n d: Actual impedance of larger transformer :\n Z_1 in mΩ = \n');disp(Z_1);\n",
+"printf(' \n Z_1 = %.2f <%.2f mΩ \n ',Z_1_m,Z_1_a);\n",
+"\n",
+"printf(' \n e: Actual impedance of smaller transformer :\n Z_1 in mΩ = \n');disp(Z_2);\n",
+"printf(' \n Z_1 = %.2f <%.2f mΩ \n ',Z_2_m,Z_2_a);\n",
+"\n",
+"printf(' \n f: Actual current delivered by larger transformer :\n I_1 in A = ');disp(I_1);\n",
+"printf(' \n I_1 = %.2f <%.2f A \n ',I_1_m,I_1_a);\n",
+"\n",
+"printf(' \n g: Actual current delivered by smaller transformer :\n I_2 in A = ');disp(I_2);\n",
+"printf(' \n I_1 = %.2f <%.2f A \n ',I_2_m,I_2_a);\n",
+"\n",
+"printf(' \n h: No-load voltage of larger Tr :\n E_1 in volt = ');disp(E_1);\n",
+"printf(' \n E_1 = %.2f <%.2f V \n ',E_1_m,E_1_a);\n",
+"\n",
+"printf(' \n i: No-load voltage of smaller Tr :\n E_2 in volt = ');disp(E_2);\n",
+"printf(' \n E_1 = %.2f <%.2f V \n ',E_2_m,E_2_a);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.27: RL_ZbL_ZLpu_Z2pu_Z1pu_IbL_ILpu_VRpu_VSpu_VS_VxVxpu.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-27\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// From diagram in fig.14-23a\n",
+"P_L = 14400 ; // Load output power in W\n",
+"V_L = 120 ; // Load voltage in volt\n",
+"V_b1 = 120 ; // base voltage at point 1 in volt\n",
+"V_b2 = 600 ; // base voltage at point 2 in volt\n",
+"V_b3 = 120 ; // base voltage at point 3 in volt\n",
+"S_b3 = 14.4 ; // base power in kVA\n",
+"X_2 = %i*0.25 ; // reactance in p.u\n",
+"X_1 = %i*0.2 ; // reactance in p.u\n",
+"I_L = 120 ; // Load current in A\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"R_L = P_L / (V_L^2); // Resistance of the load in ohm\n",
+"\n",
+"// case b\n",
+"Z_bL = (V_b3^2)/(S_b3*1000); // Base impedance in ohm\n",
+"\n",
+"// case c\n",
+"Z_L_pu = R_L / Z_bL ; // per unit load impedance \n",
+"\n",
+"// case d\n",
+"Z_2_pu = X_2 ; // per unit impedance of Tr.2\n",
+"\n",
+"// case e\n",
+"Z_1_pu = X_1 ; // per unit impedance of Tr.1\n",
+"\n",
+"// case g\n",
+"I_bL = (S_b3*1000)/V_b3 ; // Base current in load in A\n",
+"\n",
+"// case h\n",
+"I_L_pu = I_L / I_bL ; // per unit load current\n",
+"\n",
+"// case i\n",
+"V_R_pu = I_L_pu * Z_L_pu ; // per unit voltage across load \n",
+"\n",
+"// case j\n",
+"I_S_pu = I_L_pu ; //per unit current of source\n",
+"Z_T_pu = Z_L_pu + Z_1_pu + Z_2_pu ; // Total p.u impedance\n",
+"V_S_pu = I_S_pu * Z_T_pu ; // per unit voltage of source\n",
+"V_S_pu_m = abs(V_S_pu);//V_S_pu_m=magnitude of V_S_pu in p.u\n",
+"V_S_pu_a = atan(imag(V_S_pu) /real(V_S_pu))*180/%pi;//V_S_pu_a=phase angle of V_S_pu in degrees\n",
+"\n",
+"// case k\n",
+"V_S = V_S_pu * V_b1 ; // Actual voltage across source in volt\n",
+"V_S_m = abs(V_S);//V_S_m=magnitude of V_S in volt\n",
+"V_S_a = atan(imag(V_S) /real(V_S))*180/%pi;//V_S_a=phase angle of V_S in degrees\n",
+"\n",
+"\n",
+"// case l\n",
+"I_x_pu = I_L_pu ; // p.u current at point x\n",
+"Z_x_pu = Z_L_pu + Z_2_pu ; // p.u impedance at point x \n",
+"V_x_pu = I_x_pu * Z_x_pu ; // p.u voltage at point x\n",
+"\n",
+"// case m\n",
+"V_x = V_x_pu * V_b2 ; // Actual voltage at point x in volt\n",
+"V_x_m = abs(V_x);//V_x_m=magnitude of V_x in volt\n",
+"V_x_a = atan(imag(V_x) /real(V_x))*180/%pi;//V_x_a=phase angle of V_x in degrees\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-27 Solution : ');\n",
+"\n",
+"printf(' \n a: Resistance of the load :\n R_L = %d Ω \n',R_L);\n",
+"\n",
+"printf(' \n b: Base impedance :\n Z_bL = %d Ω \n',Z_bL);\n",
+"\n",
+"printf(' \n c: per unit load impedance :\n Z_L(pu) = ');disp(Z_L_pu);\n",
+"\n",
+"printf(' \n d: per unit impedance of Tr.2 :\n Z_2(pu) = ');disp(Z_2_pu);\n",
+"\n",
+"printf(' \n e: per unit impedance of Tr.1 :\n Z_1(pu) = ');disp(Z_1_pu);\n",
+"\n",
+"printf(' \n f: See Fig.14-23b \n');\n",
+"\n",
+"printf(' \n g: Base current in load :\n I_bL = %d A (resistive)\n',I_bL);\n",
+"\n",
+"printf(' \n h: per unit load current :\n I_L_pu = ');disp(I_L_pu);\n",
+"\n",
+"printf(' \n i: per unit voltage across load :\n V_R_pu');disp(V_R_pu);\n",
+"\n",
+"printf(' \n j: per unit voltage of source :\n V_S_pu = ');disp(V_S_pu);\n",
+"printf(' \n V_S_pu = %.3f <%.2f p.u \n',V_S_pu_m,V_S_pu_a);\n",
+"\n",
+"printf(' \n k: Actual voltage across source :\n V_S in volt = ');disp(V_S);\n",
+"printf(' \n V_S = %.1f <%.2f V \n',V_S_m,V_S_a);\n",
+"\n",
+"printf(' \n l: p.u voltage at point x :\n V_x(pu) = ');disp(V_x_pu);\n",
+"\n",
+"printf(' \n m: Actual voltage at point x :\n V_x in volt = ');disp(V_x);\n",
+"printf(' \n V_S = %.1f <%.2f V \n',V_x_m,V_x_a);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.28: ZT1_ZT2_Zbline3_Zlinepu_VLpu_IbL_IL_ILpu_VSpu_VS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-28\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// From diagram in fig.14-24a\n",
+"V_1 = 11 ; // Tr.1 voltage in kV\n",
+"V_b1 = 11 ; // Base Tr.1 voltage in kV\n",
+"S_1 = 50 ; // KVA rating of power for Tr.1\n",
+"S_2 = 100 ; // KVA rating of power for Tr.2\n",
+"Z_1_pu = %i*0.1 ; // per unit impedance of Tr.1\n",
+"Z_2_pu = %i*0.1 ; // per unit impedance of Tr.2\n",
+"V_b2 = 55 ; // Base Tr.2 voltage in kV\n",
+"S_b = 100 ; // base power in kVA\n",
+"PF = 0.8 ; // power factor of the Tr.s\n",
+"\n",
+"Z_line = %i*200 ; // line impedance in ohm\n",
+"\n",
+"V_L = 10 ;// Load voltage in kV\n",
+"V_Lb3 = 11 ; // base line voltage at point 3\n",
+"\n",
+"V_b3 = 11 ; // line voltage at point 3\n",
+"\n",
+"P_L = 50 ; // Power rating of each Tr.s in kW\n",
+"cos_theta_L = 0.8 ; // PF operation of each Tr.s\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"Z_T1 = Z_1_pu * (V_1/V_b1)^2 * (S_2/S_1); // p.u impedance of Tr.1\n",
+"\n",
+"// case b\n",
+"Z_T2 = Z_2_pu * (V_1/V_b3)^2 * (S_2/S_1); // p.u impedance of Tr.1\n",
+"\n",
+"// case c\n",
+"V_b = 55 ; // base voltage in volt\n",
+"Z_b_line = (V_b^2)/S_b * 1000 ; // base line impedance in ohm\n",
+"Z_line_pu = Z_line / Z_b_line ; // p.u impedance of the transmission line\n",
+"\n",
+"// case d\n",
+"V_L_pu = V_L / V_Lb3 ; // p.u voltage across load\n",
+"\n",
+"// case e\n",
+"//See Fig.14-24b\n",
+"\n",
+"// case f\n",
+"I_bL = S_b / V_b3 ; // base current in load in A\n",
+"\n",
+"// case g\n",
+"VL = 11 ; // load voltage in kV\n",
+"cos_theta_L = 0.8 ; // power factor\n",
+"I_L = P_L / (VL*cos_theta_L);\n",
+"I_L_pu = I_L / I_bL ; // p.u load current\n",
+"theta = acosd(0.8);\n",
+"I_Lpu = I_L_pu*(cosd(theta) - %i*sind(theta)) ;// p.u current in complex form\n",
+"\n",
+"// case h\n",
+"Z_series_pu = Z_T1 + Z_line_pu + Z_T2 ; // p.u series impedance os the transmission line\n",
+"V_S_pu = I_Lpu * Z_series_pu + V_L_pu ; // p.u source voltage\n",
+"V_S_pu_m = abs(V_S_pu);//V_S_pu_m=magnitude of V_S_pu in p.u\n",
+"V_S_pu_a = atan(imag(V_S_pu) /real(V_S_pu))*180/%pi;//V_S_pu_a=phase angle of V_S_pu in degrees\n",
+"\n",
+"// case i\n",
+"V_S = V_S_pu_m * V_b1 ; // Actual value of source voltage in kV\n",
+"V_source = V_S*exp(%i*(V_S_pu_a)*(%pi/180)); // V_S in exponential form\n",
+"V_source_m = abs(V_source);//V_source_m=magnitude of V_source in p.u\n",
+"V_source_a = atan(imag(V_source) /real(V_source))*180/%pi;//V_source_a=phase angle of V_source in degrees\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-28 Solution : ');\n",
+"\n",
+"printf(' \n a: p.u impedance of Tr.1 :\n Z_T1 = ');disp(Z_T1);\n",
+"\n",
+"printf(' \n b: p.u impedance of Tr.2 :\n Z_T2 = ');disp(Z_T2);\n",
+"\n",
+"printf(' \n c: base line impedance in ohm :\n Z_b(line) = %d ohm \n',Z_b_line);\n",
+"printf(' \n p.u impedance of the transmission line :\n Z(line)_pu = ');disp(Z_line_pu);\n",
+"\n",
+"printf(' \n d: p.u voltage across load :\n V_L_pu = ');disp(V_L_pu);\n",
+"\n",
+"printf(' \n e: See Fig.14-24b \n');\n",
+"\n",
+"printf(' \n f: base current in load :\n I_bL = %.3f A \n',I_bL);\n",
+"\n",
+"printf(' \n g: Load current :\n I_L = %f A \n',I_L);\n",
+"printf(' \n p.u load current:\n I_L_pu = %.3f at %.1f PF lagging \n',I_L_pu,PF);\n",
+"printf(' \n p.u current in complex form :\n I_L_pu = ');disp(I_Lpu);\n",
+"\n",
+"printf(' \n h: per unit voltage of source :\n V_S_pu = ');disp(V_S_pu);\n",
+"printf(' \n V_S_pu = %.3f <%.2f p.u \n',V_S_pu_m,V_S_pu_a);\n",
+"\n",
+"printf(' \n i: Actual voltage across source :\n V_S in kV = ');disp(V_source);\n",
+"printf(' \n V_S = %.1f <%.2f kV \n',V_source_m,V_source_a);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.29: Z1pu_Z2pu_Vbline_Zlinepu_ZMs.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-29\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// From diagram in fig.14-25a\n",
+"Z_pu_1 = %i*0.1 ; // p.u impedance \n",
+"MVA_2 = 80 ; // MVA rating os system 2\n",
+"MVA_1 = 100 ; // MVA rating of Tr.s 1 and 2\n",
+"V_2 = 30 ; // voltage in KV\n",
+"V_1 = 32 ; // voltage in KV\n",
+"\n",
+"Z_pu_2 = %i*0.15 ; // p.u impedance \n",
+"\n",
+"V_b1 = 100 ; // base voltage of Tr.1\n",
+"\n",
+"Z_line = %i*60 ; // Line impedance \n",
+"\n",
+"MVA_M1 = 20 ; // MVA rating of motor load 1\n",
+"Z_pu_M1 = %i*0.15 ; // p.u impedance of motor load M1\n",
+"\n",
+"MVA_M2 = 35 ; // MVA rating of motor load 2\n",
+"Z_pu_M2 = %i*0.25 ; // p.u impedance of motor load M2\n",
+"\n",
+"MVA_M3 = 25 ; // MVA rating of motor load 3\n",
+"Z_pu_M3 = %i*0.2 ; // p.u impedance of motor load M3\n",
+"\n",
+"V_M = 28 ; // voltage across motor loads M1,M2,M3 in kV\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"Z_1_pu = Z_pu_1*(MVA_2/MVA_1)*(V_2/V_1)^2 ; // p.u imepedance of T1\n",
+"\n",
+"// case b\n",
+"Z_2_pu = Z_pu_2*(MVA_2/MVA_1)*(V_2/V_1)^2 ; // p.u imepedance of T2\n",
+"\n",
+"// case c\n",
+"V_b_line = V_b1*(V_1/V_2) ; // base voltage of the long-transmission line in kV\n",
+"\n",
+"// case d\n",
+"MVA_b = 80 ; // MVA rating\n",
+"V_b = V_b_line ;\n",
+"Z_line_pu = Z_line*(MVA_b/(V_b)^2); // p.u impedance of the transmission line\n",
+"\n",
+"// case e\n",
+"Z_M1_pu = Z_pu_M1 * (MVA_2/MVA_M1)*(V_M/V_1)^2 ; // p.u impedance of motor load M1\n",
+"Z_M2_pu = Z_pu_M2 * (MVA_2/MVA_M2)*(V_M/V_1)^2 ; // p.u impedance of motor load M2\n",
+"Z_M3_pu = Z_pu_M3 * (MVA_2/MVA_M3)*(V_M/V_1)^2 ; // p.u impedance of motor load M3\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-29 Solution : ');\n",
+"\n",
+"printf(' \n a: p.u imepedance of T1 :\n Z_1(pu) = ');disp(Z_1_pu);\n",
+"\n",
+"printf(' \n b: p.u imepedance of T2 :\n Z_2(pu) = ');disp(Z_2_pu);\n",
+"\n",
+"printf(' \n c: base voltage of the long-transmission line :\n V_b(line) = %.1f kV \n',V_b_line);\n",
+"\n",
+"printf(' \n d: p.u impedance of the transmission line :\n Z(line)_pu = ');disp(Z_line_pu);\n",
+"\n",
+"printf(' \n e: p.u impedance of motor load M1 :\n Z_M1(pu) = ');disp(Z_M1_pu);\n",
+"\n",
+"printf(' \n f: p.u impedance of motor load M1 :\n Z_M2(pu) = ');disp(Z_M2_pu);\n",
+"\n",
+"printf(' \n g: p.u impedance of motor load M1 :\n Z_M3(pu) = ');disp(Z_M3_pu);\n",
+"\n",
+"printf(' \n h: See Fig.14-25b.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: turns_I1_I2_stepup_stepdown_alpha.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-2\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"V_h = 2300 ; // high voltage in volt\n",
+"V_l = 115 ; // low voltage in volt\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 115 ; // Secondary voltage in volt\n",
+"f = 60 ; // Frequency in Hz\n",
+"S = 4.6 ; // kVA rating of the step-down transformer\n",
+"S_1 = S ; \n",
+"S_2 = S ;\n",
+"V_per_turn = 2.5 ; // Induced EMF per turn in V/turn\n",
+"// Ideal transformer\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"N_h = V_h / V_per_turn ; // Number of high-side turns\n",
+"N_l = V_l / V_per_turn ; // Number of low-side turns\n",
+"\n",
+"N_1 = N_h;// Number of turns in the primary\n",
+"N_2 = N_l;// Number of turns in the secondary\n",
+"\n",
+"// case b\n",
+"I_1 = S_1*1000 / V_1 ; // Rated primary current in A\n",
+"I_2 = S_2*1000 / V_2 ; // Rated secondary current in A\n",
+"\n",
+"I_h = 2 ; // Rated current in A on HV side\n",
+"I_l = 40 ; // Rated current in A on LV side\n",
+"\n",
+"// case c\n",
+"// subscript c for alpha_stepdown and alpha_stepup indicates case c\n",
+"alpha_stepdown_c = N_1 / N_2 ; // step-down transformation ratio\n",
+"alpha_stepup_c = N_l / N_h ; // step-up transformation ratio\n",
+"\n",
+"// case d\n",
+"// subscript d for alpha_stepdown and alpha_stepup indicates case d\n",
+"alpha_stepdown_d = I_2 / I_1 ; // step-down transformation ratio\n",
+"alpha_stepup_d = I_h / I_l ; // step-up transformation ratio\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-2 Solution : ');\n",
+"\n",
+"printf(' \n a: Number of high-side turns :\n N_h = %d t = N_1 \n',N_h);\n",
+"printf(' \n Number of low-side turns :\n N_l = %d t = N_2\n',N_l);\n",
+"\n",
+"printf(' \n b: Rated primary current :\n I_h = I_1 = %d A \n',I_1);\n",
+"printf(' \n Rated secondary current :\n I_l = I_2 = %d A\n',I_2);\n",
+"\n",
+"printf(' \n c: step-down transformation ratio :\n α = N_1/N_2 = %d\n',alpha_stepdown_c);\n",
+"printf(' \n step-up transformation ratio :\n α = N_l/N_h = %.2f\n',alpha_stepup_c);\n",
+"\n",
+"printf(' \n d: step-down transformation ratio :\n α = I_2 / I_1 = %d\n',alpha_stepdown_d);\n",
+"printf(' \n step-up transformation ratio :\n α = I_h / I_lh = %.2f\n',alpha_stepup_d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.30: ST_ST_Sxformer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-30\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// subscripts a,b,c for the current, voltages indicates respective cases a ,b ,c.\n",
+"// from fig.14-27a\n",
+"V_pa = 1000 ; // Phase voltage in volt\n",
+"I_1a = 1 ; // line current in primary in A\n",
+"V_2a = 100 ; // voltage across secondary in V\n",
+"Ic_a = 10 ; // current in lower half of auto-transformer in A\n",
+"\n",
+"// from fig.14-26b\n",
+"V_s = 100 ; // voltage in secondary wdg in V\n",
+"I_2b = 10 ; // current in secondary in A\n",
+"V_1b = 1000 ; // voltage across primary in V\n",
+"Ic_b = 1 ; // current in lower half of auto-transformer in A\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"S_T1 = (V_pa*I_1a + V_2a*I_1a)/1000 ; // Total kVA transfer in step-down mode\n",
+"\n",
+"// case b\n",
+"S_T2 = (V_s*I_2b + V_1b*I_2b)/1000 ; // Total kVA transfer in step-up mode\n",
+"\n",
+"// case c\n",
+"S_x_former_c = V_pa*I_1a/1000 ; // kVA rating of th autotransformer in Fig.14-27a\n",
+"\n",
+"// case d\n",
+"V_1 = V_pa ;\n",
+"S_x_former_d = V_1*Ic_b/1000 ; // kVA rating of th autotransformer in Fig.14-26b\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-30 Solution : ');\n",
+"\n",
+"printf(' \n a: Total kVA transfer in step-down mode :\n S_T = %.1f kVA transferred \n',S_T1);\n",
+"\n",
+"printf(' \n b: Total kVA transfer in step-up mode :\n S_T = %.1f kVA transferred \n',S_T2);\n",
+"\n",
+"printf(' \n c: kVA rating of th autotransformer in Fig.14-27a:\n S_x-former = %d kVA \n ',S_x_former_c);\n",
+"\n",
+"printf(' \n d: kVA rating of th autotransformer in Fig.14-26b:\n S_x-former = %d kVA \n ',S_x_former_d);\n",
+"\n",
+"printf(' \n e: Both transformers have the same kVA rating of 1 kVA since the same ');\n",
+"printf(' \n autotransformer is used in both parts.Both transformers transform ');\n",
+"printf(' \n a total of 1 KVA. But the step-down transformer in part(a) conducts ');\n",
+"printf(' \n only 0.1 kVA while the step-up transformer in the part(b) conducts 10');\n",
+"printf(' \n kVA from the primary to the secondary.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.31: Wc_tabulate_allday_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-31\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"S = 500 ; // kVA rating of distribution transformer\n",
+"// given data from ex.14-20\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 208 ; // Secondary voltage in volt\n",
+"f = 60 ; // Frequency in Hz\n",
+"\n",
+"// SC-test data\n",
+"P_sc = 8200 ; // wattmeter reading in W\n",
+"I_sc = 217.4 ; // Short circuit current in A\n",
+"V_sc = 95 ; // Short circuit voltage in V\n",
+"\n",
+"// OC-test data\n",
+"P_oc = 1800 ; // wattmeter reading in W\n",
+"I_oc = 85 ; // Open circuit current in A\n",
+"V_oc = 208 ; // Open circuit voltage in V\n",
+"\n",
+"LF_1 = 20 ; // Load fraction in percent\n",
+"LF_2 = 40 ; // Load fraction in percent \n",
+"LF_3 = 80 ; // Load fraction in percent\n",
+"LF_fl = 100 ; // rated load in percent\n",
+"LF_4 = 125 ; // Load fraction in percent\n",
+"\n",
+"LF1 = 0.2 ; // Load fraction \n",
+"LF2 = 0.4 ; // Load fraction \n",
+"LF3 = 0.8 ; // Load fraction \n",
+"LF4 = 1.25 ; // Load fraction \n",
+"\n",
+"PF1 = 0.7 ; // power factor\n",
+"PF2 = 0.8 ; // power factor\n",
+"PF3 = 0.9 ; // power factor\n",
+"PF_fl = 1 ; // power factor\n",
+"PF4 = 0.85 ; // power factor\n",
+"\n",
+"t1 = 4 ; // period of operation in hours\n",
+"t2 = 4 ; // period of operation in hours\n",
+"t3 = 6 ; // period of operation in hours\n",
+"t_fl = 6 ; // period of operation in hours\n",
+"t4 = 2 ; // period of operation in hours\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"t = 24 ; // hrs in a day\n",
+"P_c = P_oc ; // wattmeter reading in W (OC test)\n",
+"W_c = (P_c * t)/1000 ; // COre loss over 24 hour period\n",
+"\n",
+"// case b\n",
+"Psc = P_sc/1000 ; // wattmeter reading in W (SC test)\n",
+"P_loss_1 = (LF1^2)*Psc ; // Power loss in kW for 20% Load\n",
+"P_loss_2 = (LF2^2)*Psc ; // Power loss in kW for 40% Load\n",
+"P_loss_3 = (LF3^2)*Psc ; // Power loss in kW for 80% Load\n",
+"P_loss_fl = Psc ; // Power loss in kW for 100% Load\n",
+"P_loss_4 = (LF4^2)*Psc ; // Power loss in kW for 125% Load\n",
+"\n",
+"// energy loss in kWh\n",
+"energy_loss1 = P_loss_1 * t1 ; // Enegry loss in kWh for 20% Load\n",
+"energy_loss2 = P_loss_2 * t2 ; // Enegry loss in kWh for 40% Load\n",
+"energy_loss3 = P_loss_3 * t3 ; // Enegry loss in kWh for 80% Load\n",
+"energy_loss_fl = P_loss_fl * t_fl ; // Enegry loss in kWh for 100% Load\n",
+"energy_loss4 = P_loss_4 * t4 ; // Enegry loss in kWh for 125% Load\n",
+"\n",
+"// Total energy losses in 24hrs\n",
+"W_loss_total = energy_loss1 + energy_loss2 + energy_loss3 + energy_loss_fl + energy_loss4 ;\n",
+"\n",
+"// case c\n",
+"P_1 = LF1*S*PF1 ; // Power output for 20% load\n",
+"P_2 = LF2*S*PF2 ; // Power output for 40% load\n",
+"P_3 = LF3*S*PF3 ; // Power output for 80% load\n",
+"P_fl = S*PF_fl ; // Power output for 100% load\n",
+"P_4 = LF4*S*PF4 ; // Power output for 125% load\n",
+"\n",
+"Energy_1 = P_1*t1 ; // Energy delivered in kWh for 20%load\n",
+"Energy_2 = P_2*t2 ; // Energy delivered in kWh for 40%load\n",
+"Energy_3 = P_3*t3 ; // Energy delivered in kWh for 80%load\n",
+"Energy_fl = P_fl*t_fl ; // Energy delivered in kWh for 100%load\n",
+"Energy_4 = P_4*t4 ; // Energy delivered in kWh for 125%load\n",
+"\n",
+"// Total energy delivered in 24hrs\n",
+"W_out_total = Energy_1 + Energy_2 + Energy_3 + Energy_fl + Energy_4 ;\n",
+"\n",
+"// case d\n",
+"eta = W_out_total / (W_out_total + W_c + W_loss_total) * 100 ; // All-day efficiency\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-31 Solution : ');\n",
+"\n",
+"printf(' \n a: Total energy core loss for 24hrs, including 2hours at no-load,');\n",
+"printf(' \n W_c = %.1f kWh \n ',W_c);\n",
+"\n",
+"printf(' \n b: From SC test, equivalent copper loss at rated load = %.1f kW, ',Psc);\n",
+"printf(' \n and the various energy losses during the 24 hr period are tabulated as :\n');\n",
+"\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n Percent Rated load \t Power loss(kW) \t Time period(hours) \t Energy loss(kWh)');\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n\t\t%d \t %f \t\t\t %d \t\t\t %.2f \n ',LF_1,P_loss_1,t1,energy_loss1);\n",
+"printf(' \n\t\t%d \t %f \t\t\t %d \t\t\t %.2f \n ',LF_2,P_loss_2,t2,energy_loss2);\n",
+"printf(' \n\t\t%d \t %f \t\t\t %d \t\t\t %.2f \n ',LF_3,P_loss_3,t3,energy_loss3);\n",
+"printf(' \n\t\t%d \t %f \t\t\t %d \t\t\t %.2f \n ',LF_fl,P_loss_fl,t_fl,energy_loss_fl);\n",
+"printf(' \n\t\t%d \t %f \t\t\t %d \t\t\t %.2f \n ',LF_4,P_loss_4,t4,energy_loss4);\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n Total energy load losses over 24hour period (excluding 2hrs at no-load) = %.2f ',W_loss_total);\n",
+"printf(' \n _____________________________________________________________________________________\n\n');\n",
+"\n",
+"printf(' \n c: Total energy output over the 24 hour period is tabulated as : \n');\n",
+"\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n Percent Rated load \t PF \t kW \t Time period(hours) \t Energy delivered(kWh)');\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n\t\t%d \t %.1f \t %.f \t\t %d \t\t\t %d ',LF_1,PF1,P_1,t1,Energy_1);\n",
+"printf(' \n\t\t%d \t %.1f \t %.f \t\t %d \t\t\t %d ',LF_2,PF2,P_2,t2,Energy_2);\n",
+"printf(' \n\t\t%d \t %.1f \t %.f \t\t %d \t\t\t %d ',LF_3,PF3,P_3,t3,Energy_3);\n",
+"printf(' \n\t\t%d \t %.1f \t %.f \t\t %d \t\t\t %d ',LF_fl,PF1,P_fl,t_fl,Energy_fl);\n",
+"printf(' \n\t\t%d \t %.1f \t %.f \t\t %d \t\t\t %d ',LF_4,PF4,P_4,t4,Energy_4);\n",
+"printf(' \n _____________________________________________________________________________________');\n",
+"printf(' \n Total energy required by load for 24hour period (excluding 2hrs at no-load) = %d ',W_out_total);\n",
+"printf(' \n _____________________________________________________________________________________\n\n');\n",
+"\n",
+"printf(' \n d: All-day efficiency = %.1f percent',eta);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.32: I2_Ic.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-32\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"S_1 = 10 ; // VA rating of small transformer\n",
+"V = 115 ; // voltage rating of transformer in volt\n",
+"V_2_1 = 6.3 ; // voltage rating of one part of secondary winding in volt\n",
+"V_2_2 = 5.0 ; // voltage rating of other part of secondary winding in volt\n",
+"Z_2_1 = 0.2 ; // impedance of one part of secondary winding in ohm\n",
+"Z_2_2 = 0.15 ; // impedance of other part of secondary winding in ohm\n",
+"\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_2 = V_2_1 + V_2_2 ; // voltage across secondary winding in volt\n",
+"I_2 = S_1 / V_2 ; // Rated secondary current in A when the LV secondaries are\n",
+"// connected in series-aiding\n",
+"\n",
+"// case b\n",
+"I_c = (V_2_1 - V_2_2) / (Z_2_1 + Z_2_2); // Circulating current when LV windings are paralled\n",
+"percent_overload = (I_c / I_2)*100 ; // percent overload produced\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-32 Solution : ');\n",
+"\n",
+"printf(' \n a: Both coils must be series-connected and used to account for the ');\n",
+"printf(' \n full VA rating of the transformer. Hence,the rated current in 5 V ');\n",
+"printf(' \n and 6.3 V winding is : \n');\n",
+"printf(' \n I_2 = %.3f A \n\n', I_2);\n",
+"\n",
+"printf(' \n b: When the windings are paralleled, the net circulating current is ');\n",
+"printf(' \n the net voltage applied across the total internal impedance of ');\n",
+"printf(' \n the windings,or :\n');\n",
+"printf(' \n I_c = %.2f A \n ',I_c);\n",
+"\n",
+"printf(' \n The percent overload is = %f percent ≃ %.f percent ',percent_overload,percent_overload);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.33: Zeh_Zel_I2rated_I2sc_overload.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-33\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"S = 20 ; // kVA rating of transformer\n",
+"N_1 = 230 ; // Number of primary turns\n",
+"N_2 = 20 ; // Number of secondary turns\n",
+"\n",
+"V_1 = 230 ; // Primary voltage in volt\n",
+"V_2 = 20 ; // Secondary voltage in volt\n",
+"\n",
+"// from Fig.14-31a\n",
+"// HV side SC test data\n",
+"V_sc = 4.5 ; // short circuit voltage in volt\n",
+"I_sc = 87 ; // short circuit current in A\n",
+"P_sc = 250 ; // Power measured in W\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_h = V_sc ;// short circuit voltage in volt on HV side\n",
+"I_h = I_sc ;// short circuit current in A on HV side\n",
+"Z_eh = V_h /I_h ; // Equivalent immpedance reffered to the high side when coils are series connected\n",
+"\n",
+"// case b\n",
+"Z_el = Z_eh * (N_2/N_1)^2 ; //Equivalent immpedance reffered to the low side \n",
+"// when coils are series connected\n",
+"\n",
+"// case c\n",
+"I_2_rated = (S*1000)/V_2 ; // Rated secondary current when coils are series connected\n",
+"\n",
+"// case d\n",
+"I_2_sc = S / Z_el ; // Secondary current when the coils in Fig.14-31a are \n",
+"// short-circuited with rated voltage applied to the HV side \n",
+"\n",
+"percent_overload = (I_2_sc/I_2_rated)*100 ; // percent overload\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-33 Solution : ');\n",
+"\n",
+"printf(' \n Slight variations in answers are due to non-approximated calculations');\n",
+"printf(' \n in scilab\n\n');\n",
+"printf(' \n a: Equivalent immpedance reffered to the high side when coils are series connected :');\n",
+"printf(' \n Z_eh = %f ohm \n ',Z_eh);\n",
+"\n",
+"printf(' \n b: Equivalent immpedance reffered to the low side when coils are series connected :');\n",
+"printf(' \n Z_el = %f ohm \n ',Z_el);\n",
+"\n",
+"printf(' \n c: Rated secondary current when coils are series connected :');\n",
+"printf(' \n I_2(rated) = %d A \n',I_2_rated);\n",
+"\n",
+"printf(' \n d: Secondary current when the coils in Fig.14-31a are short-circuited :');\n",
+"printf(' \n with rated voltage applied to the HV side :');\n",
+"printf(' \n I_2(sc) = %d A \n',I_2_sc);\n",
+"printf(' \n The percent overload is = %d percent',percent_overload);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.34: PT_kVA_phase_and_line_currents_kVAtransformers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-34\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"I_L = 100 ; // Load current in A\n",
+"cos_theta = 0.7 ; // power factor lagging\n",
+"\n",
+"// Y-Δ distribution transformer\n",
+"S = 60 ; // kVA rating of transformer\n",
+"V_1 = 2300 ; // primary voltage in volt\n",
+"V_2 = 230 ; // secondary voltage in volt\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_L = 230 ; // voltage across load in volt\n",
+"P_T = (sqrt(3)*V_L*I_L*cos_theta)/1000 ; // power consumed by the plant in kW\n",
+"kVA_T = P_T/cos_theta ; // apparent power in kVA\n",
+"\n",
+"// case b\n",
+"kVA = S ; // kVA rating of transformer\n",
+"V_p = V_2 ; // phase voltage in volt (delta- connection on load side)\n",
+"I_P2_rated = (kVA*1000)/(3*V_p); // Rated secondary phase current in A\n",
+"I_L2_rated = sqrt(3)*I_P2_rated ; // Rated secondary line current in A\n",
+"\n",
+"// case c\n",
+"//percent load on each transformer = (load current per line) / (rated current per line)\n",
+"percent_load = I_L / I_L2_rated * 100 ;\n",
+"\n",
+"// case d\n",
+"// subscript d for V_L indicates case d ,V_L\n",
+"V_L_d = 2300 ;\n",
+"I_P1 = (kVA_T*1000)/(sqrt(3)*V_L_d); // primary phase current in A\n",
+"I_L1 = I_P1 ; // primary line current in A(Y-connection)\n",
+"\n",
+"// case e\n",
+"kVA_transformer = kVA / 3 ; // kVA rating of each transformer\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-34 Solution : ');\n",
+"\n",
+"printf(' \n a: power consumed by the plant :\n P_T = %.1f kW \n ',P_T);\n",
+"printf(' \n apparent power :\n kVA_T = %.1f kVA \n',kVA_T);\n",
+"\n",
+"printf(' \n b: Rated secondary phase current :\n I_P2(rated) = %f A ≃ %.f A \n',I_P2_rated,I_P2_rated);\n",
+"printf(' \n Rated secondary line current :\n I_L2(rated) = %f A ≃ %.1f A \n',I_L2_rated,I_L2_rated);\n",
+"\n",
+"printf(' \n c: percent load on each transformer = %.1f percent \n ',percent_load);\n",
+"\n",
+"printf(' \n d: primary phase current :\n I_P1 = %.f A \n',I_P1);\n",
+"printf(' \n primary line current :\n I_L1 = %.f A \n',I_L1);\n",
+"\n",
+"printf(' \n e: kVA rating of each transformer = %d kVA',kVA_transformer);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.35: PT_ST_phase_and_line_currents_kVAtransformers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-35\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"I_L = 100 ; // Load current in A\n",
+"cos_theta = 0.7 ; // power factor lagging\n",
+"\n",
+"// Δ-Δ distribution transformer\n",
+"S = 60 ; // kVA rating of transformer\n",
+"V_1 = 2300 ; // primary voltage in volt\n",
+"V_2 = 230 ; // secondary voltage in volt\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_L = 230 ; // voltage across load in volt\n",
+"P_T = (sqrt(3)*V_L*I_L*cos_theta)/1000 ; // power consumed by the plant in kW\n",
+"kVA_T = P_T/cos_theta ; // apparent power in kVA\n",
+"\n",
+"// case b\n",
+"kVA = S ; // kVA rating of transformer\n",
+"V_p = V_2 ; // phase voltage in volt \n",
+"I_P2_rated = (kVA*1000)/(3*V_p); // Rated secondary phase current in A\n",
+"I_L2_rated = sqrt(3)*I_P2_rated ; // Rated secondary line current in A\n",
+"\n",
+"// case c\n",
+"//percent load on each transformer = (load current per line) / (rated current per line)\n",
+"percent_load = I_L / I_L2_rated * 100 ;\n",
+"\n",
+"// case d\n",
+"// subscript d for V_L indicates case d ,V_L\n",
+"V_L_d = 2300 ;\n",
+"I_P1 = (kVA_T*1000)/(sqrt(3)*V_L_d); // primary phase current in A\n",
+"I_L1 = sqrt(3)*I_P1 ; // primary line current in A\n",
+"\n",
+"// case e\n",
+"kVA_transformer = kVA / 3 ; // kVA rating of each transformer\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-35 Solution : ');\n",
+"\n",
+"printf(' \n a: power consumed by the plant :\n P_T = %.1f kW \n ',P_T);\n",
+"printf(' \n apparent power :\n kVA_T = %.1f kVA \n',kVA_T);\n",
+"\n",
+"printf(' \n b: Rated secondary phase current :\n I_P2(rated) = %f A ≃ %.f A \n',I_P2_rated,I_P2_rated);\n",
+"printf(' \n Rated secondary line current :\n I_L2(rated) = %f A ≃ %.1f A \n',I_L2_rated,I_L2_rated);\n",
+"\n",
+"printf(' \n c: percent load on each transformer = %.1f percent \n ',percent_load);\n",
+"\n",
+"printf(' \n d: primary phase current :\n I_P1 = %.f A \n',I_P1);\n",
+"printf(' \n primary line current :\n I_L1 = %f A ≃ %.1f A \n',I_L1,I_L1);\n",
+"printf(' \n The primary line current drawn by a Δ-Δ bank is √3 times the ');\n",
+"printf(' \n line current drawn by a Y-Δ bank.\n');\n",
+"\n",
+"printf(' \n e: kVA rating of each transformer = %d kVA',kVA_transformer);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.36: find_line_currents_and_their_sum.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-36\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// 3-phase,3-wire Δ-connected transformer shown in Fig.14-42\n",
+"V_L = 33 ; // line voltage in kV\n",
+"\n",
+"f = 60 ;// frequency in Hz\n",
+"\n",
+"// power factor\n",
+"PF1 = 1; // unity power factor for I_AB\n",
+"PF2 = 0.7; // 0.7 lagging power factor for I_BC\n",
+"PF3 = 0.9; // 0.9 lagging power factor for I_CA\n",
+"\n",
+"// Calculations\n",
+"V_AB = V_L*exp(%i*(0)*(%pi/180)) ; // line voltage in kV taken as reference voltage\n",
+"\n",
+"V_BC = V_L*exp(%i*(-120)*(%pi/180)) ; // line voltage in kV\n",
+"V_BC_m = abs(V_BC);//V_BC_m=magnitude of V_BC in kV\n",
+"V_BC_a = atan(imag(V_BC) /real(V_BC))*180/%pi - 180 ;//V_BC_a=phase angle of V_BC in degrees\n",
+"// 180 is subtracted from I_BC_a to make it similar to textbook angle\n",
+"\n",
+"V_CA = V_L*exp(%i*(-240)*(%pi/180)) ; // line voltage in kV\n",
+"V_CA_m = abs(V_CA);//V_CA_m=magnitude of V_CA in kV\n",
+"V_CA_a = atan(imag(V_CA) /real(V_CA))*180/%pi - 180 ;//V_CA_a=phase angle of V_CA in degrees\n",
+"// 180 is subtracted from I_BC_a to make it similar to textbook angle\n",
+"\n",
+"theta_1 = acosd(PF1); // PF1 angle\n",
+"theta_2 = acosd(PF2); // PF2 angle\n",
+"theta_3 = acosd(PF3); // PF3 angle\n",
+"\n",
+"\n",
+"I_AB = 10*exp(%i*(theta_1)*(%pi/180)) ; // I_AB current in kA\n",
+"I_AB_m = abs(I_AB);//I_AB_m=magnitude of I_AB in kA\n",
+"I_AB_a = atan(imag(I_AB) /real(I_AB))*180/%pi;//I_AB_a=phase angle of I_AB in degrees\n",
+"\n",
+"I_BC = 15*exp(%i*(-120 - theta_2)*(%pi/180)) ; // I_BC current in kA\n",
+"I_BC_m = abs(I_BC);//I_BC_m=magnitude of I_BC in kA\n",
+"I_BC_a = atan(imag(I_BC) /real(I_BC))*180/%pi - 180;//I_BC_a=phase angle of I_BC in degrees\n",
+"// 180 is subtracted from I_BC_a to make it similar to textbook angle\n",
+"\n",
+"I_CA = 12*exp(%i*(-240 + theta_3)*(%pi/180)) ; // I_CA current in kA\n",
+"I_CA_m = abs(I_CA);//I_CA_m=magnitude of I_CA in kA\n",
+"I_CA_a = 180 + atan(imag(I_CA) /real(I_CA))*180/%pi;//I_CA_a=phase angle of I_CA in degrees\n",
+"// 180 is added to I_BC_a to make it similar to textbook angle\n",
+"\n",
+"// case a\n",
+"I_AC = -I_CA ;\n",
+"I_A = I_AB + I_AC ; // phase current in kA\n",
+"I_A_m = abs(I_A);//I_A_m=magnitude of I_A in kA\n",
+"I_A_a = atan(imag(I_A) /real(I_A))*180/%pi;//I_A_a=phase angle of I_A in degrees\n",
+"\n",
+"// case b\n",
+"I_BA = -I_AB ;\n",
+"I_B = I_BC + I_BA ; // phase current in kA\n",
+"I_B_m = abs(I_B);//I_B_m=magnitude of I_B in kA\n",
+"I_B_a = atan(imag(I_B) /real(I_B))*180/%pi;//I_B_a=phase angle of I_B in degrees\n",
+"\n",
+"// case c\n",
+"I_CB = -I_BC ;\n",
+"I_C = I_CA + I_CB ; // phase current in kA\n",
+"I_C_m = abs(I_C);//I_C_m=magnitude of I_C in kA\n",
+"I_C_a = atan(imag(I_C) /real(I_C))*180/%pi;//I_C_a=phase angle of I_C in degrees\n",
+"\n",
+"// case d\n",
+"phasor_sum = I_A + I_B + I_C ;\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-36 Solution : ');\n",
+"\n",
+"printf(' \n We must first write each of the phase currents in polar form. ');\n",
+"printf(' \n Since reference voltage,V_AB is assumed as 33 <0 kV, we may write\n');\n",
+"\n",
+"printf(' \n I_AB = %d <%d kA (unity PF),\n',I_AB_m,I_AB_a);\n",
+"printf(' \n But I_BC lags V_BC, which is %.f <%d kV',V_BC_m,V_BC_a);\n",
+"printf(' \n by θ = acosd(%.1f) = -%.2f lag, and consequently',PF2,theta_2);\n",
+"printf(' \n I_BC = %.f <%.2f kA \n',I_BC_m,I_BC_a);\n",
+"\n",
+"printf(' \n Similarly,I_CA leads V_CA = %.f <%.f kV',V_CA_m,V_CA_a);\n",
+"printf(' \n by θ = acosd(%.1f) = %.2f lead, and consequently',PF3,theta_3);\n",
+"printf(' \n I_CA = %d <%.2f kA \n',I_CA_m,I_CA_a);\n",
+"\n",
+"printf(' \n Writing three phase currents in comples form yields.\n');\n",
+"printf(' \n I_AB in kA = ');disp(I_AB);\n",
+"printf(' \n I_BC in kA = ');disp(I_BC);\n",
+"printf(' \n I_CA in kA = ');disp(I_CA);\n",
+"\n",
+"printf(' \n From conventional three phase theory for unbalanced Δ-connected loads');\n",
+"printf(' \n and from Fig.14-42, we have\n');\n",
+"\n",
+"printf(' \n a: I_A in kA = ');disp(I_A);\n",
+"printf(' \n I_A = %.2f <%.2f kA \n',I_A_m,I_A_a);\n",
+"\n",
+"printf(' \n b: I_B in kA = ');disp(I_B);\n",
+"printf(' \n I_B = %.2f <%.2f kA \n',I_B_m,I_B_a);\n",
+"\n",
+"printf(' \n c: I_C in kA = ');disp(I_C);\n",
+"printf(' \n I_C = %.2f <%.2f kA \n',I_C_m,I_C_a);\n",
+"\n",
+"printf(' \n d: Phasor sum of the line currents :');\n",
+"printf(' \n ΣI_L in kA = ');disp(phasor_sum);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.37: kVAcarry_loadtransformer_VVkVA_ratiokVA_increaseload.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-37\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// Δ-Δ transformers in Ex.35\n",
+"kVA_1 = 20 ; // kVA rating of transformer 1\n",
+"kVA_2 = 20 ; // kVA rating of transformer 2\n",
+"kVA_3 = 20 ; // kVA rating of transformer 3\n",
+"\n",
+"V_1 = 2300 ; // Primary voltage in volt\n",
+"V_2 = 230 ; // Secondary voltage in volt\n",
+"\n",
+"kVA = 40 ; // kVA supplied by the bank\n",
+"PF = 0.7 ; // lagging power factor at which bank supplies kVA\n",
+"\n",
+"// one defective transformer is removed\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"kVA_transformer = kVA / sqrt(3); // kVA load carried by each transformer\n",
+"\n",
+"// case b\n",
+"percent_ratedload_Tr = kVA_transformer / kVA_1 * 100 ; // percent load carried by each transformer\n",
+"\n",
+"// case c\n",
+"kVA_V_V = sqrt(3)*kVA_1 ; // Total kVA rating of the transformer bank in V-V\n",
+"\n",
+"// case d\n",
+"ratio_banks = kVA_V_V / (kVA_1 + kVA_2 + kVA_3) * 100; // ratio of V-V bank to Δ-Δ bank Tr ratings\n",
+"\n",
+"// case e\n",
+"kVA_Tr = kVA / 3 ;\n",
+"percent_increase_load = kVA_transformer / kVA_Tr * 100 ; // percent increase in load on each transformer when one Tr is removed\n",
+"\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-37 Solution : ');\n",
+"\n",
+"printf(' \n a: kVA load carried by each transformer = %.1f kVA/transformer\n',kVA_transformer);\n",
+"\n",
+"printf(' \n b: percent rated load carried by each transformer = %.1f percent \n',percent_ratedload_Tr);\n",
+"\n",
+"printf(' \n c: Total kVA rating of the transformer bank in V-V = %.2f kVA \n',kVA_V_V);\n",
+"\n",
+"printf(' \n d: ratio of V-V bank to Δ-Δ bank Tr ratings = %.1f percent \n',ratio_banks);\n",
+"\n",
+"printf(' \n e: kVA load carried by each transformer(V-V) = %.2f kVA/transformer\n',kVA_Tr);\n",
+"printf(' \n percent increase in load on each transformer when one Tr is removed :');\n",
+"printf(' \n = %.1f percent',percent_increase_load);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.38: IL_alpha_Ia_kVA.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-38\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// 3-phase SCIM\n",
+"V = 440 ; // rated voltage in volt of SCIM\n",
+"hp = 100 ; // rated power in hp of SCIM\n",
+"PF = 0.8 ; // power factor\n",
+"V_1 = 155 ; // primary voltage in volt of Tr\n",
+"V_2 = 110 ; // secondary voltage in volt of Tr\n",
+"\n",
+"V_a = 110 ; // armature voltage in volt\n",
+"V_L = 440 ; // Load voltage in volt\n",
+"eta = .98 ; // efficiency of the Tr.\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"// referring to appendix A-3,Table 430-150 footnotes\n",
+"I_L = 124*1.25 ; // Motor line current in A\n",
+"\n",
+"// case b\n",
+"alpha = V_a/V_L ; // Transformation ratio\n",
+"\n",
+"// case c\n",
+"I_a = (sqrt(3)/2)*( I_L / (alpha*eta) ); // Current in the primary of the scott transformers\n",
+"\n",
+"// case d\n",
+"kVA = (V_a*I_a)/((sqrt(3)/2)*1000); // kVA rating of the main and teaser transformers\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-38 Solution : ');\n",
+"\n",
+"printf(' \n a: Motor line current :\n I_L = %d A \n ',I_L);\n",
+"\n",
+"printf(' \n b: Transformation ratio :\n alpha = N_1/N_2 = V_a/V_L = %.2f \n',alpha);\n",
+"\n",
+"printf(' \n c: Current in the primary of the scott transformers :\n I_a = %.f A \n',I_a);\n",
+"\n",
+"printf(' \n d: kVA rating of the main and teaser transformers :\n kVA = %.1f kVA',kVA);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.39: VL_ST_Idc_Sac_Sdc_per_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-39\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"I_L = 1 ; // Load current in kA\n",
+"V_m = 750 ; // Peak voltage in kV\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_L = (V_m)/sqrt(2); // Max. allowable Vrms in kV that may be applied to the lines using ac\n",
+"\n",
+"// case b\n",
+"S_T_ac = sqrt(3)*V_L*I_L ; // Total 3-phase apparent power in MVA\n",
+"\n",
+"// case c\n",
+"I_rms = I_L ; // rms value of load current in kA\n",
+"I_dc =I_rms*sqrt(2); // Max.allowable current in kA that can be delivered by dc transmission\n",
+"\n",
+"// case d\n",
+"V_dc = V_m ; // dc voltage in kV\n",
+"S_T_dc = V_dc*I_dc ; // Total dc apparent power delivered by two lines in MVA\n",
+"\n",
+"// case e\n",
+"S_ac_line = S_T_ac / 3 ; // Power per ac line\n",
+"\n",
+"// case f\n",
+"S_dc_line = S_T_dc / 2 ; // Power per dc line\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-39 Solution : ');\n",
+"\n",
+"printf(' \n :a Max. allowable Vrms in kV that may be applied to the lines using ac :');\n",
+"printf(' \n V_L = %.1f kV \n ',V_L);\n",
+"\n",
+"printf(' \n :b Total 3-phase apparent power :\n S_T = %.1f MVA \n',S_T_ac);\n",
+"\n",
+"printf(' \n :c Max.allowable current in kA that can be delivered by dc transmission :');\n",
+"printf(' \n I_dc = %.3f kA \n ',I_dc);\n",
+"\n",
+"printf(' \n :d Total dc apparent power delivered by two lines :\n S_T = %.1f MVA\n',S_T_dc);\n",
+"\n",
+"printf(' \n :e Power per ac line :\n S/ac line = %.1f MVA/line \n',S_ac_line);\n",
+"\n",
+"printf(' \n :f Power per dc line :\n S/dc line = %.1f MVA/line \n',S_dc_line);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.3: alpha_Z1_I1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-3\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"N_1 = 500 ; // Number of primary turns in the audio output transformer\n",
+"N_2 = 25 ; // Number of secondary turns in the audio output transformer\n",
+"Z_L = 8 ; // Speaker impedance in ohm\n",
+"V_1 = 10 ; // Output voltage of the audio output transformer in volt\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"alpha = N_1/N_2 ; // step-down transformation ratio\n",
+"Z_1 = (alpha)^2 * Z_L ; // Impedance reflected to the transformer primary \n",
+"// at the output of Tr in ohm\n",
+"\n",
+"// case b\n",
+"I_1 = V_1 / Z_1 ; // Primary current in A\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-3 Solution : ');\n",
+"\n",
+"printf(' \n a: Transformation ratio :\n α = %d\n',alpha);\n",
+"printf(' \n Impedance reflected to the transformer primary at the output of Tr :');\n",
+"printf(' \n Z_1 = %d ohm \n ',Z_1);\n",
+"\n",
+"printf(' \n b: Matching transformer primary current :\n I_1 = %f A',I_1);\n",
+"printf(' \n I_1 = %.3f mA ',1000 * I_1);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4: Z2prime_Z3prime_Z1_I1_Pt_V2_P2_V3_P3_Pt.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-4\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"N_1 = 600 ; // Number of primary turns \n",
+"N_2 = 150 ; // Some number of secondary turns \n",
+"N_3 = 300 ; // Some number of secondary turns \n",
+"Z_2 = 30 ; // Resistive load in ohm across N_2\n",
+"Z_3 = 15 ; // Resistive load in ohm across N_3\n",
+"R_2 = 30 ;\n",
+"R_3 = 15 ;\n",
+"V_p = 16 ; // Primary applied voltage in volt\n",
+"cos_theta = 1 ; // unity PF\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"Z_2_prime = Z_2 * (N_1/N_2)^2 ; // Impedance reflected to the primary by load Z_2 in ohm\n",
+"\n",
+"// case b\n",
+"Z_3_prime = Z_3 * (N_1/N_3)^2 ; // Impedance reflected to the primary by load Z_3 in ohm\n",
+"\n",
+"// case c\n",
+"// Total impedance reflected to the primary in ohm\n",
+"Z_1 = (Z_2_prime * Z_3_prime) / (Z_2_prime + Z_3_prime) ; \n",
+"\n",
+"// case d\n",
+"I_1 = V_p / Z_1 ; // Total current drawn from the supply in A\n",
+"\n",
+"// case e\n",
+"P_t = V_p * I_1 * cos_theta ; // Total power in W drwan from the supply at unity PF\n",
+"\n",
+"// case f\n",
+"V_2 = V_p * (N_2/N_1) ; // Voltage across Z_2 in volt\n",
+"P_2 = (V_2)^2 / R_2 ; // Power dissipated in load Z_2 in W\n",
+"\n",
+"// case g\n",
+"V_3 = V_p * (N_3/N_1) ; // Voltage across Z_3 in volt\n",
+"P_3 = (V_3)^2 / R_3 ; // Power dissipated in load Z_3 in W\n",
+"\n",
+"// case h\n",
+"P_total = P_2 + P_3 ; // Total power dissipated in both loads in W\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-4 Solution : ');\n",
+"\n",
+"printf(' \n a: Impedance reflected to the primary by load Z_2 : ');\n",
+"printf(' \n Z_2 = %d ohm \n ',Z_2_prime );\n",
+"\n",
+"printf(' \n b: Impedance reflected to the primary by load Z_3 : ');\n",
+"printf(' \n Z_3 = %d ohm \n ',Z_3_prime );\n",
+"\n",
+"printf(' \n c: Total impedance reflected to the primary : ');\n",
+"printf(' \n Z_1 = %.1f ohm \n ',Z_1 );\n",
+"\n",
+"printf(' \n d: Total current drawn from the supply : ');\n",
+"printf(' \n I_1 = %.1f A \n ',I_1 );\n",
+"\n",
+"printf(' \n e: Total power drawn from the supply at unity PF : ');\n",
+"printf(' \n P_t = %.1f W \n ',P_t );\n",
+"\n",
+"printf(' \n f: Voltage across Z_2 in volt :\n V_2 = %d V \n ',V_2 );\n",
+"printf(' \n Power dissipated in load Z_2 :\n P_2 = %.2f W \n',P_2 );\n",
+"\n",
+"printf(' \n g: Voltage across Z_3 in volt :\n V_3 = %d V \n ',V_3 );\n",
+"printf(' \n Power dissipated in load Z_3 :\n P_3 = %f W \n',P_3 );\n",
+"\n",
+"printf(' \n h: Total power dissipated in both loads :\n P_t = %.1f W',P_total);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: alpha_N2_N1_ZL.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-5\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"P = 100 ; // Power rating of the single channel power amplifier in W\n",
+"Z_p = 3200 ; // Output impedance in ohm of the single channel power amplifier\n",
+"N_p = 1500 ; // Number of primary turns in a tapped impedance-matching transformer\n",
+"Z_L1 = 8 ; // Amplifier output in ohm using a tapped impedance-matching transformer\n",
+"Z_L2 = 4 ; // Amplifier output in ohm using a tapped impedance-matching transformer\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"alpha = sqrt(Z_p/Z_L1) ; // Transformation ratio\n",
+"N_2 = N_p / alpha ; // Total number of secondary turns to match 8 ohm speaker\n",
+"\n",
+"// case b\n",
+"// subscript b for alpha indicates case b\n",
+"alpha_b = sqrt(Z_p/Z_L2) ; // Transformation ratio\n",
+"N_1 = N_p / alpha_b ; // Number of primary turns to match 4 ohm speaker\n",
+"\n",
+"// case c\n",
+"turns_difference = N_2 - N_1 ; // Difference in secondary and primary turns\n",
+"// subscript c for alpha indicates case c\n",
+"alpha_c = (1500/22); // Transformation ratio\n",
+"Z_L = Z_p / (alpha_c)^2 ; // Impedance that must be connected between 4 ohm and\n",
+"// 8 ohm terminals to reflect a primary impedance of 3.2 kilo-ohm\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-5 Solution : ');\n",
+"\n",
+"printf(' \n a: Transformation ratio : \n α = %d \n ',alpha );\n",
+"printf(' \n Total number of secondary turns to match 8 ohm speaker : ');\n",
+"printf(' \n N_2 = %d t \n ',N_2 );\n",
+"\n",
+"printf(' \n b: Transformation ratio : \n α = %.3f \n ',alpha_b );\n",
+"printf(' \n Number of primary turns to match 4 ohm speaker : ');\n",
+"printf(' \n N_1 = %d t \n ',N_1 );\n",
+"\n",
+"printf(' \n c: Difference in secondary and primary turns : ');\n",
+"printf(' \n N_2 - N_1 = %.f t \n ',turns_difference );\n",
+"printf(' \n Impedance that must be connected between 4 ohm and 8 ohm ');\n",
+"printf(' \n terminals to reflect a primary impedance of 3.2 kilo-ohm : ');\n",
+"printf(' \n Z_L = %.2f ohm ',Z_L );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6: Z_between_terminals_A_B.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-6\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"P = 100 ; // Power rating of the single channel power amplifier in W\n",
+"Z_L1 = 8 ; // Amplifier output in ohm using a tapped impedance-matching transformer\n",
+"Z_L2 = 4 ; // Amplifier output in ohm using a tapped impedance-matching transformer\n",
+"P_servo = 10 ; // Power rating of the servo motor in W\n",
+"Z_servo = 0.7 ; // Impedance of the servo motor in ohm\n",
+"\n",
+"// Calculations\n",
+"root_Z_AB = sqrt(8) - sqrt(4);\n",
+"Z_AB = (root_Z_AB)^2;\n",
+"\n",
+"// Display the resulta\n",
+"disp('Example 14-6 Solution : ');\n",
+"\n",
+"printf(' \n Z_p = %dΩ*(N_p/N_1)^2 = %dΩ*(N_p/N_2)^2\n',Z_L2,Z_L1);\n",
+"printf(' \n = Z_AB * (N_p/(N_2 - N_1)^2 ) \n');\n",
+"printf(' \n Dividing each of the three numerators by N_p^2 and taking the ');\n",
+"printf(' \n square root of each term, we have\n');\n",
+"\n",
+"printf(' \n √(Z_AB)/(N_2 - N_1) = √(4)/N_1 = √(8)/N_2 \n');\n",
+"printf(' \n √(Z_AB)/(N_2 - N_1) = √(4)/N_1 - √(8)/N_2 \n');\n",
+"printf(' \n yielding, √(Z_AB) = √(8) - √(4) = %f \n',root_Z_AB);\n",
+"printf(' \n which Z_AB = (%f)^2 = %.2f Ω \n',root_Z_AB,Z_AB);\n",
+"\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.7: alpha_V1_V2_I2_I1_PL_Ps_PT_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-7\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"V = 10 * exp(%i * 0 * (%pi/180)); // Supply voltage of the source 10<0 V\n",
+"R_s = 1000 ; // Resistance of the source in ohm \n",
+"R_L = 10 ; // Load resistance in ohm\n",
+"Z_L = R_L ; // Load resistance in ohm\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"alpha = sqrt(R_s/R_L) ; // Transformation ratio of the matching transformer for MPT\n",
+"\n",
+"// case b\n",
+"V_1 = V / 2 ; // Terminal voltage in volt of the source at MPT \n",
+"\n",
+"// case c\n",
+"V_2 = V_1 / alpha ; // Terminal voltage in volt across the load at MPT\n",
+"\n",
+"// case d\n",
+"I_2 = V_2 / Z_L ; // Secondary load current in A (method 1)\n",
+"I2 = V / (2*alpha*R_L) ; // Secondary load current in A (method 2)\n",
+"\n",
+"// case e\n",
+"I_1 = I_2 / alpha ; // Primary load current drawn from the source in A (method 1)\n",
+"I1 = V / (2*R_s) ; // Primary load current drawn from the source in A (method 2)\n",
+"\n",
+"// case f\n",
+"P_L = (I_2)^2 * R_L ; // Maximum power dissipated in the load in W\n",
+"\n",
+"// case g\n",
+"P_s = (I_1)^2 * R_s ; // Power dissipated internally within the source in W\n",
+"\n",
+"// case h\n",
+"P_T1 = V * I_1 * cosd(0) ; // Total power supplied by the source in W(method 1)\n",
+"\n",
+"P_T2 = P_L + P_s ; // Total power supplied by the source in W(method 2)\n",
+"\n",
+"// case i\n",
+"P_T = P_T1 ;\n",
+"eta = P_L / P_T * 100 ; // Power transfer efficiency in percent\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-7 Solution : ');\n",
+"\n",
+"printf(' \n a: Transformation ratio of the matching transformer for MPT : ');\n",
+"printf(' \n α = %d \n ',alpha );\n",
+"\n",
+"printf(' \n b: Terminal voltage of the source at MPT :\n V_1 = %d V \n',V_1);\n",
+"\n",
+"printf(' \n c: Terminal voltage across the load at MPT :\n V_2 = %.1f V \n',V_2);\n",
+"\n",
+"printf(' \n d: Secondary load current :');\n",
+"printf(' \n (method 1) :\n I_2 = %.2f A = %d mA \n ',I_2, 1000*I_2);\n",
+"\n",
+"printf(' \n (method 2) :\n I_2 = %.2f A = %d mA \n ',I2, 1000*I2);\n",
+"\n",
+"printf(' \n e: Primary load current drawn from the source : ');\n",
+"printf(' \n (method 1) :\n I_1 = %f A = %d mA \n ',I_1 , 1000*I_1 );\n",
+"printf(' \n (method 2) :\n I_1 = %f A = %d mA \n ',I1 , 1000*I1 );\n",
+"\n",
+"printf(' \n f: Maximum power dissipated in the load : ');\n",
+"printf(' \n P_L = %f W = %d mW \n',P_L , 1000*P_L );\n",
+"\n",
+"printf(' \n g: Power dissipated internally within the source : ' );\n",
+"printf(' \n P_s = %f W = %d mW \n',P_s , 1000*P_s );\n",
+"\n",
+"printf(' \n h: Total power supplied by the source : ');\n",
+"printf(' \n (method 1) :\n P_T = %f W = %d mW \n ',P_T1, 1000*P_T1);\n",
+"printf(' \n (method 2) :\n P_T = %f W = %d mW \n ',P_T2, 1000*P_T2);\n",
+"\n",
+"printf(' \n i: Power transfer efficiency :\n η = %d percent ',eta );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.8: PL_alpha_maxPL.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-8\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"// power transformer\n",
+"V = 20 ; // No-load voltage in volt\n",
+"R_s = 18 ; // Internal resistance of the power amplifier in ohm\n",
+"R_L = 8 ; // Load resistance in ohm(Speaker)\n",
+"\n",
+"// Calculations\n",
+"// case a\n",
+"V_L = ( R_L / (R_L + R_s) )* V; // Load voltage in volt\n",
+"P_L = (V_L)^2 / R_L ; // Power delivered in W to the speaker when connected \n",
+"// directly to the amplifier\n",
+"\n",
+"// case b\n",
+"alpha = sqrt(R_s/R_L); // Turns ratio of the transformer to maximize speaker power\n",
+"\n",
+"// case c\n",
+"V_2 = V / (2*alpha); // Secondary voltage in volt\n",
+"P_L2 = (V_2)^2 / R_L ; // Maximum power delivered in W to the speaker using matching\n",
+"// transformer of part b\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-8 Solution : ');\n",
+"\n",
+"printf(' \n a; Load voltage :\n V_L = %.2f V across the 8 Ω speaker\n ',V_L);\n",
+"printf(' \n Power delivered in W to the speaker when connected directly to the amplifier : ');\n",
+"printf(' \n P_L = %.2f W \n ', P_L );\n",
+"\n",
+"printf(' \n b: Turns ratio of the transformer to maximize speaker power : ');\n",
+"printf(' \n α = %.1f \n ', alpha );\n",
+"\n",
+"printf(' \n c: Secondary voltage :\n V_2 = %f V \n ',V_2 );\n",
+"printf(' \n Maximum power delivered in W to the speaker using matching ');\n",
+"printf(' \n transformer of part b :\n P_L = %f W ',P_L2 );"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.9: Eh_El_Ih_new_kVA.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Electric Machinery and Transformers\n",
+"// Irving L kosow \n",
+"// Prentice Hall of India\n",
+"// 2nd editiom\n",
+"\n",
+"// Chapter 14: TRANSFORMERS\n",
+"// Example 14-9\n",
+"\n",
+"clear; clc; close; // Clear the work space and console.\n",
+"\n",
+"// Given data\n",
+"kVA = 1 ; // kVA rating of the transformer\n",
+"V_1 = 220 ; // Primary voltage in volt\n",
+"V_2 = 110 ; // Secondary voltage in volt\n",
+"f_o = 400 ; // Frequency in Hz(original frequency)\n",
+"f_f = 60 ; // Frequency in Hz for which the transformer is to be used\n",
+"\n",
+"// Calculations\n",
+"alpha = V_1 / V_2 ; // Transformation ratio\n",
+"// case a\n",
+"E_h = V_1 * (f_f / f_o); // Maximum rms voltage in volt applied to HV side\n",
+"E_1 = E_h ; \n",
+"E_l = E_1 / alpha ; // Maximum rms voltage in volt applied to HV side\n",
+"\n",
+"// case b\n",
+"V_h = V_1 ; // High voltage in volt\n",
+"I_h = kVA * 1000 / V_h ;\n",
+"Vh = E_h ;\n",
+"kVA_new = Vh * I_h ;\n",
+"\n",
+"// Display the results\n",
+"disp('Example 14-9 Solution : ');\n",
+"\n",
+"printf(' \n a: To maintain the same permissible flux density in Eqs.(14-15)');\n",
+"printf(' \n and (14-16),both voltages of the high and low sides must change ');\n",
+"printf(' \n in the same proportion as the frequency : ');\n",
+"printf(' \n E_h = %d V \n and,\n E_l = %.1f V\n',E_h , E_l );\n",
+"\n",
+"printf(' \n b: The original current rating of the transformer is unchanged since');\n",
+"printf(' \n the conductors still have the same current carrying capacity.');\n",
+"printf(' \n Thus,\n I_h = %.3f A\n and the new kVA rating is',I_h );\n",
+"printf(' \n V_h*I_h = V_1*I_1 = %d VA = %.2f kVA',kVA_new , kVA_new/1000);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}