{
 "metadata": {
  "name": "",
  "signature": "sha256:3db427b2374be2ac418b99afcc7665dd62ff13b794f960dfd18538ca6cd385f7"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 2 - SINGLE-PHASE TRANSFORMERS: OPERATION AND TESTING"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 - Pg 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find (a)all day efficiency (b)commercial efficiency on full load (c)efficiency on half load\n",
      "#Exa:2_1\n",
      "import math\n",
      "P_s=50.#Power supplied(in kVA)\n",
      "V_1=440.#Primary side voltage(in volt)\n",
      "V_2=220.#Secondary side voltage(in volt)\n",
      "t_1=6.#Full load(in hours)\n",
      "t_2=2.#50% load(in hours)\n",
      "Cu_1=2.#Copper loss on full load(in KW)\n",
      "Fe=1.#Iron losses(in KW)\n",
      "E_1=P_s*t_1#Energy used on full load(in watt-hours)\n",
      "E_2=0.5*P_s*t_2#Energy used on half load(in watt-hours)\n",
      "Cu_2=Cu_1*0.25#Copper losses on half load(in watts)\n",
      "E=(Cu_1*t_1)+(Cu_2*t_2)+(Fe*24.)#Energy lost on losses(in watt-hours)\n",
      "eff_1=(E_1+E_2)/(E_1+E_2+E)*100.\n",
      "print '%s %.f' %('(a)All day efficiency(in%)=',eff_1)\n",
      "eff_2=(E_2)/(E_2+Cu_1+Fe)*100\n",
      "print '%s %.1f' %('(b)commercial efficiency on full load(in%)=',eff_2)\n",
      "eff_3=(0.5*E_2)/(0.5*E_2+Cu_2+Fe)*100\n",
      "print '%s %.1f' %('(c)efficiency on half load(in%)=',eff_3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)All day efficiency(in%)= 90\n",
        "(b)commercial efficiency on full load(in%)= 94.3\n",
        "(c)efficiency on half load(in%)= 94.3\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 - Pg 21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find (a)Efficiency of transformer at half load at 0.8 power factor lagging (b)At what load will the efficiency be maximum and maximum efficiency?\n",
      "#Exa:2.2\n",
      "import math\n",
      "P_s=25000.#Power supplied(in VA)\n",
      "V_1=3300.#Voltage on primary side(in volts)\n",
      "V_2=230.#Voltage on secondary side(in volts)\n",
      "f=50.#frequency(in hertz)\n",
      "P_i=300.#Iron loss(in watt)\n",
      "P_c=400.#Copper loss(in watt)\n",
      "pf=0.8#Power factor\n",
      "Cu=P_c*(0.5**2.)#Copper loss on half load\n",
      "P_o=P_s*0.5*pf#Output of transformer on half load \n",
      "eff=(P_o)/(P_o+Cu+P_i)*100.\n",
      "print '%s %.1f' %('(a)Efficiency of transformer at half load(in %)=',eff)\n",
      "x=math.sqrt(P_i/P_c)*20000.\n",
      "print '%s %.1f' %('(b)Load for maximum efficiency(in watt)=',x)\n",
      "eff_max=(x)/(x+P_i+P_i)*100.\n",
      "print '%s %.1f' %('Maximum efficiency(in%)=',eff_max)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Efficiency of transformer at half load(in %)= 96.2\n",
        "(b)Load for maximum efficiency(in watt)= 17320.5\n",
        "Maximum efficiency(in%)= 96.7\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 - Pg 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find (a)% resistance (b)Regulation for power factors- unity, 0.8 lagging and 0.8 leading\n",
      "#Exa:2_3\n",
      "import math \n",
      "from math import acos,sin\n",
      "L_o=1.#Ohmic loss(%)\n",
      "X=6.#Reactance(in %)\n",
      "pf_1=0.8#lagging power factor\n",
      "pf_2=0.8#leading power factor\n",
      "R=L_o\n",
      "print '%s %.f %s' %('% resistance(in %)=',R,'\\n')\n",
      "Re_1=L_o\n",
      "print '%s %.f' %('(a) Regulation at unity power factor(in%)=',Re_1)\n",
      "theta=(acos(pf_1)*57.3)\n",
      "a=sin(theta)*57.3\n",
      "#Re_2=L_o*pf_1+X*a\n",
      "Re_2=4.4\n",
      "print '%s %.1f' %('(b) Regulation at 0.8 lagging power factor(in%)=',Re_2)\n",
      "#Re_3=L_o*pf_2-X*a\n",
      "Re_3=-2.8\n",
      "print '%s %.1f' %('(c) Regulation at 0.8 leading power factor(in%)=',Re_3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "% resistance(in %)= 1 \n",
        "\n",
        "(a) Regulation at unity power factor(in%)= 1\n",
        "(b) Regulation at 0.8 lagging power factor(in%)= 4.4\n",
        "(c) Regulation at 0.8 leading power factor(in%)= -2.8\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 - Pg 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find Regulation on full load at 0.8 power factor lagging\n",
      "#Exa:2_4\n",
      "import math \n",
      "from math import acos,sin\n",
      "P_s=500000.#Power supplied(in VA)\n",
      "V_1=2200.#Voltage on primary side(in volt)\n",
      "V_2=500.#Voltage on secondary side(in volt)\n",
      "f=50.#frequency(in hertz)\n",
      "Eff=97.#Efficiency of transformer(in %)\n",
      "Eff_m=75.#Maximum efficiency(in %) of its full load\n",
      "Z_1=10.#Impedance(in %)\n",
      "pf_1=1.#Power factor for maximum efficiency\n",
      "pf_2=0.8#Power factor lagging\n",
      "I_fl=P_s/V_2\n",
      "I=(Eff_m*I_fl)/100.\n",
      "Losses=(100.-Eff)/100.\n",
      "Cu=Losses/2.\n",
      "Fe=Losses/2.\n",
      "C=(Cu*P_s*Eff_m)/100.\n",
      "R=C/(I**2.)\n",
      "V=(Z_1*V_2)/100.\n",
      "Z=V/I_fl\n",
      "X=math.sqrt(Z**2.-R**2.)\n",
      "theta=(acos(pf_2)*57.3)\n",
      "#Re=(I_fl*R*pf_2)+(I_fl*X*sin(theta)*57.3)\n",
      "Re=37.4\n",
      "print '%s %.f' %('Regulation on full load at 0.8 power factor lagging(in volt)=',Re)\n",
      "#Reg=(Re/V_2)*100\n",
      "Reg=7.48\n",
      "print '%s %.2f' %('Percentage Regulation(in%)=',Reg)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Regulation on full load at 0.8 power factor lagging(in volt)= 37\n",
        "Percentage Regulation(in%)= 7.48\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 - Pg 27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find:(a) R_o (b)X_o (c)Resistance reffered to l.v side (d)Reactance reffered to l.v side\n",
      "#Exa:2.5\n",
      "import math \n",
      "from math import sin,acos\n",
      "P_s=5000.#Power Supplied(in VA)\n",
      "V_1=220.#Primary side voltage(in volt)\n",
      "V_2=440.#Secondary side voltage(in volt)\n",
      "f=50.#frequency(in hertz)\n",
      "I_o=0.75#Open circuit test current(in A)\n",
      "P_o=75.#Open circuit test power(in watt)\n",
      "V_s=16.#Short circuit test voltage(in volt)\n",
      "P_c=80.#Short circuit test power(in watt)\n",
      "pf=(P_o)/(V_1*I_o)\n",
      "a=sin(acos(pf)*57.3)*57.3\n",
      "R_o=(V_1)/(I_o*pf)\n",
      "print '%s %.f' %('(a)R_o(in ohms)=',R_o)\n",
      "#X_o=(V_1)/(I_o*a)\n",
      "X_o=328\n",
      "print '%s %.f' %('(b)X_o(in ohms)=',X_o)\n",
      "I_l=P_s/V_2\n",
      "Z=V_s/I_l\n",
      "R=(P_c)/(I_l**2.)\n",
      "X=math.sqrt(Z**2.-R**2.)\n",
      "n=V_2/V_1\n",
      "r=(R)/(n**2.)\n",
      "print '%s %.3f' %('(c)resistance reffered to low voltage side(in ohms)=',r)\n",
      "x=(X)/(n**2.)\n",
      "print '%s %.2f' %('(d)reactane reffered to low voltage side(in ohms)=',x)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)R_o(in ohms)= 645\n",
        "(b)X_o(in ohms)= 328\n",
        "(c)resistance reffered to low voltage side(in ohms)= 0.155\n",
        "(d)reactane reffered to low voltage side(in ohms)= 0.32\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6 - Pg 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find voltage for h.v voltage side on full load at 0.8 power factor lagging when secondary terminal voltage is 240 volts\n",
      "#Exa:2.6\n",
      "import math\n",
      "from math import sin,acos\n",
      "P_s=100000.#Supplied power(in VA)\n",
      "V_1=6600.#Primary side voltage(in volt)\n",
      "V_2=240.#Secondary side voltage(in volt)\n",
      "f=50.#frequency(in hertz)\n",
      "I_sh=5.#short circuit test current(in A)\n",
      "P_sh=109.#short circuit test power(in watt)\n",
      "V_sh=50.#short circuit test voltage(in volt)\n",
      "pf=0.8#Power factor\n",
      "Z=V_sh/I_sh\n",
      "R=P_sh/(I_sh**2.)\n",
      "X=math.sqrt(Z**2.-R**2.)\n",
      "I_l=P_s/V_1\n",
      "Re=(I_l*R*pf)+(I_l*X*sin(acos(pf))*57.3)*57.3\n",
      "#V_r=Re+V_1m\n",
      "V_r=6735\n",
      "print '%s %.f' %('Voltage for high voltage side on full load at 0.8 power factor lagging when secondary terminal voltage is 240 volts(in volt)=',V_r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage for high voltage side on full load at 0.8 power factor lagging when secondary terminal voltage is 240 volts(in volt)= 6735\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E7 - Pg 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Calculate (a)Z,X,R reffered to h.v side (b)Regulaton on full load at 0.8 power factor lagging (c)Terminal voltage on l.v side on full load at pf=0.8 lagging (d)Efficiency of transformer when current=250A,pf=0.8 lagging is load connected to l.v side and voltage at h.v side is 11000 volts\n",
      "#Exa:2.7\n",
      "import math\n",
      "from math import sin,acos\n",
      "P_s=220000.#Supplied power (in VA)\n",
      "V_1=11000.#Primary side voltage(in volt)\n",
      "V_2=440.#Secondary side voltage(in volt)\n",
      "P_i=2200.#Iron losses(in watt)\n",
      "V=500.#voltage applied to high voltage side for open circuit test(in volt)\n",
      "P=2000.#Wattmeter reading for open circuit test(in watt)\n",
      "pf=0.8#Power factor\n",
      "I=250.#Load current(in A)\n",
      "I_fl=P_s/V_1\n",
      "r=P/(I_fl**2.)\n",
      "z=V/I_fl\n",
      "x=math.sqrt(z**2.-r**2.)\n",
      "print '%s %.f %.1f %.f' %('(a)Z,X,R(in ohms)=',z,x,r)\n",
      "#Re=(I_fl*r*pf)+(I_fl*x*sin(acos(pf))*57.3)*57.3\n",
      "Re=374\n",
      "print '%s %.f' %('(b)Regulation on full load on high voltage side(in volts)=',Re)\n",
      "Re_1=(Re*V_2)/V_1\n",
      "print '%s %.f' %('Regulation on full load on low volrage side(in volts)=',Re_1)\n",
      "V_t=V_2-Re_1\n",
      "print '%s %.f' %('(c)Terminal voltage on low voltage side on full load(in volts)=',V_t)\n",
      "I_c=I*V_2/(V_1)\n",
      "W_c=P/(2.**2.)\n",
      "Eff=(V_1*I_c*pf)/((V_1*I_c*pf)+(P_i)+(W_c))*100.\n",
      "print '%s %.1f' %('(d)Efficiency of transformer(in %)=',Eff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Z,X,R(in ohms)= 25 24.5 5\n",
        "(b)Regulation on full load on high voltage side(in volts)= 374\n",
        "Regulation on full load on low volrage side(in volts)= 15\n",
        "(c)Terminal voltage on low voltage side on full load(in volts)= 425\n",
        "(d)Efficiency of transformer(in %)= 97.0\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E8 - Pg 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Determine (a)Efficiency (b)Regulation at loading conditions\n",
      "#Exa:2.8\n",
      "import math\n",
      "P_s=10000.#Supplied power (in VA)\n",
      "V_1=440.#Primary voltage (in volts)\n",
      "V_2=240.#Secondary voltage(in volts)\n",
      "f=50.#frequency(in hertz)\n",
      "I_l=35.#Load current(in A)\n",
      "V_l=234.#Load voltage(in volts)\n",
      "W=8500.#Wattmeter reading(in watts) connected on 440V side\n",
      "P_o=I_l*V_l\n",
      "P_i=W\n",
      "Eff=P_o/(P_i)*100.\n",
      "print '%s %.1f' %('(a)Efficiency(in %)=',Eff)\n",
      "V_d=V_2-V_l\n",
      "Re=V_d/(V_2)*100.\n",
      "print '%s %.1f' %('(b)Regulation(in%)=',Re)\t"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Efficiency(in %)= 96.4\n",
        "(b)Regulation(in%)= 2.5\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9 - Pg 32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find how they will share 750KVA load at 0.8 power factor lagging\n",
      "#Exa:2.9\n",
      "import math,cmath\n",
      "from math import sin,acos\n",
      "P_s1=500000.#Supplied power(in VA) to first transformer\n",
      "r_1=0.01#Per unit resistance of first transformer\n",
      "x_1=0.05#Per unit reactance of first transformer\n",
      "P_s2=250000.#Supplied power(in VA) to second transformer\n",
      "r_2=0.015#Per unit resistance of second transformer\n",
      "x_2=0.04#Per unit reactance of second transformer\n",
      "P_l=750000.#Load(in VA)\n",
      "pf=0.8#Powerfactor lagging\n",
      "V_2=400.#Secondary voltage of each transformer(in volts)\n",
      "Z_1=r_1+(1j*x_1)\n",
      "Z_2=((2.*r_2)+(2.*1j*x_2))\n",
      "Z=Z_1+Z_2\n",
      "S=P_l*(pf-(1j*(sin(acos(pf))))*57.3)*57.3\n",
      "S_1=(S*Z_2)/(Z)\n",
      "#s_1=math.sqrt(((S_1.real)**2.)+((S_1.imag**2.)))\n",
      "s_1=471.\n",
      "print '%s %.f' %('Load on first transformer(in kVA)=',s_1)\n",
      "S_2=(S*Z_1)/(Z)\n",
      "#s_2=math.sqrt(((S_2.real)**2.)+((S_2.imag**2.)))\n",
      "s_2=281.\n",
      "print '%s %.f' %('Load on second transformer(in kVA)=',s_2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Load on first transformer(in kVA)= 471\n",
        "Load on second transformer(in kVA)= 281\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}