{
 "metadata": {
  "name": "",
  "signature": "sha256:6bd0a2b00de113a6b8eee24d69a2fdc031ce769460589b3679ee753d2223f332"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10: Single-Phase Motors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1, Page 571"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P=4;#no. of poles\n",
      "f=60.;#frequency in Hertzs\n",
      "R2=12.5;#rotor resistance (in ohms)\n",
      "\n",
      "#Calculations&Results\n",
      "N_s=120*f/P;#synchronous speed of motor(in rpm)\n",
      "N_m=1710;#speed of motor in clockwise direction (in rpm)\n",
      "s=(N_s-N_m)/N_s;\n",
      "print '(a) slip in forward direction=%.2f'%s\n",
      "s_b=2-s;\n",
      "print '(b) slip in backward direction=%.2f'%s_b\n",
      "#effective rotor resistance\n",
      "R_f=0.5*R2/s;#(in forward branch)\n",
      "print 'effective rotor resistance in forward branch (in ohms)=%.f'%R_f\n",
      "R_b=0.5*R2/s_b;#(in backward direction)\n",
      "print 'effective rotor resistance in backward branch (in ohms)=%.3f'%R_b"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) slip in forward direction=0.05\n",
        "(b) slip in backward direction=1.95\n",
        "effective rotor resistance in forward branch (in ohms)=125\n",
        "effective rotor resistance in backward branch (in ohms)=3.205\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2, Page 576"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V=120.;#in volts\n",
      "f=60.;#frequency in Hertzs\n",
      "P=4.;#no. of poles\n",
      "R1=2.5;#in ohms\n",
      "X1=complex(0,1.25)\n",
      "R2=3.75;\n",
      "X2=complex(0,1.25)\n",
      "X_m=complex(0,65)\n",
      "N_m=1710;#speed of motor (in rpm)\n",
      "P_c=25;#core lossv(in Watts)\n",
      "P_fw=2;#friction and windage loss (in Watts)\n",
      "\n",
      "#Calculations&Results\n",
      "N_s=120*f/P;#synchronous speed of motor\n",
      "s=(N_s-N_m)/N_s;#slip\n",
      "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n",
      "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n",
      "Z_in=R1+X1+Z_f+Z_b;\n",
      "I_1=V/Z_in;\n",
      "P_in=V*I_1.conjugate()\n",
      "I_2f=X_m*I_1/((R2/s)+(X1+X_m));#forward current\n",
      "I_2b=X_m*I_1/((R2/(2-s))+(X1+X_m));#backward current\n",
      "P_agf=0.5*(R2/s)*(abs(I_2f))**2;#air gap power in forward path\n",
      "P_agb=0.5*(R2/(2-s))*(abs(I_2b))**2;#air gap power in backward path\n",
      "P_ag=P_agf-P_agb;#net air gap power\n",
      "P_d=(1-s)*P_ag;#gross power developed\n",
      "P_o=P_d-P_c-P_fw;#net power output\n",
      "w_m=2*(math.pi)*N_m/60;\n",
      "T_s=P_o/w_m;\n",
      "print 'shaft torque (in Newton-meter)=%.3f'%T_s\n",
      "Eff=P_o/P_in.real;\n",
      "print 'Efficiency of motor (%%)=%.2f'%(Eff*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "shaft torque (in Newton-meter)=1.295\n",
        "Efficiency of motor (%)=65.86\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3, Page 590"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V1=230.;#in volts\n",
      "f=50.;#frequency in Hz\n",
      "P=6.;#no. of poles\n",
      "R1=34.14;#in ohms\n",
      "X1=complex(0,35.9)\n",
      "R_a=149.78;\n",
      "X2=complex(0,29.32)\n",
      "X_m=complex(0,248.59)\n",
      "R2=23.25;\n",
      "a=1.73;\n",
      "C=4*10**-6;#in Farad\n",
      "P_c=19.88;#core loss\n",
      "P_fw=1.9;#friction and windage loss\n",
      "N_m=940.;#speed of motor in rpm\n",
      "N_s=120.0*f/P;#synchronous speed of motor\n",
      "\n",
      "#Calculations&Results\n",
      "s=(N_s-N_m)/N_s;#slip\n",
      "w_m=2*math.pi*N_m/60;#in rad/sec\n",
      "X_c=complex(0,1/(2*math.pi*f*C));#reactance of capacitance\n",
      "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n",
      "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n",
      "Z_11=R1+X1+Z_f+Z_b;#in ohms\n",
      "Z_12=-1*complex(0,a*(Z_f-Z_b));#in ohms\n",
      "Z_21=-Z_12;#in ohms\n",
      "Z_22=a*a*(Z_f+Z_b+X1)+R_a-X_c;#in ohms\n",
      "I_1=V1*(Z_22-Z_12)/(Z_11*Z_22-Z_12*Z_21);#current in main winding\n",
      "I_2=V1*(Z_11-Z_21)/(Z_11*Z_22-Z_12*Z_21);#current in auxilary winding\n",
      "I_L=I_1+I_2;\n",
      "print '(a) magnitude of line current (in Amperes)=%.3f'%(math.sqrt(I_L.real**2+I_L.imag**2))\n",
      "print '  phase of line current (in Degree)=%.2f'%math.degrees(math.atan(I_L.imag/I_L.real))\n",
      "P_in=V1*I_L.conjugate();\n",
      "print '(b) power input (in Watts)=%.3f'%P_in.real\n",
      "P_agf=complex((I_1*Z_f),(-I_2*a*Z_f))*I_1.conjugate()+complex((I_2*a*a*Z_f),(I_1*a*Z_f))*I_2.conjugate();#air gap power developed by forward field\n",
      "P_agb=complex((I_1*Z_b),(I_2*a*Z_b))*I_1.conjugate()+complex((I_2*a*a*Z_b),(-I_1*a*Z_b))*I_2.conjugate();#air gap power developed by backward field\n",
      "P_ag=P_agf.real-P_agb.real\n",
      "P_d=(1-s)*P_ag;#power developed\n",
      "P_o=P_d-P_c-P_fw;#output power\n",
      "print '(c) Efficiency of motor (%%)=%.1f'%(P_o*100/P_in.real)\n",
      "T_s=P_o/w_m;\n",
      "print '(d) shaft torque (in Newton-meter)=%.3f'%T_s\n",
      "V_c=I_2*X_c;\n",
      "print '(e) magnitude of voltage across capacitor (in Volts)=%.3f'%(math.sqrt(V_c.real**2+V_c.imag**2))\n",
      "print 'phase of voltage across capacitor (in Degree)=%.2f'%(math.degrees(math.atan(V_c.imag/V_c.real)))\n",
      "#for starting torque\n",
      "s=1;\n",
      "s_b=1;\n",
      "w_s=2*math.pi*N_s/60;\n",
      "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n",
      "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n",
      "Z_11=R1+X1+Z_f+Z_b;#in ohms\n",
      "Z_12=complex(0,(-a*(Z_f-Z_b)));#in ohms\n",
      "Z_21=-Z_12;#in ohms\n",
      "Z_22=a*a*(Z_f+Z_b+X1)+R_a-X_c;#in ohms\n",
      "I_1s = V1/Z_11;#current in main winding\n",
      "I_2s=V1/Z_22\n",
      "#I_2s=V1*(Z_11-Z_21)/(Z_11*Z_22-Z_12*Z_21);#current in auxilary winding\n",
      "I_Ls=I_1s+I_2s;\n",
      "P_in=V1*I_Ls.conjugate();\n",
      "P_agf=complex((I_1s*Z_f),(-I_2s*a*Z_f))*I_1s.conjugate()+complex((I_2s*a*a*Z_f),(I_1s*a*Z_f))*I_2s.conjugate();#air gap power developed by forward field\n",
      "P_agb=complex((I_1s*Z_b),(I_2s*a*Z_b))*I_1s.conjugate()+complex((I_2s*a*a*Z_b),(-I_1s*a*Z_b))*I_2s.conjugate();#air gap power developed by backward field\n",
      "P_ag=P_agf-P_agb;\n",
      "T_s=P_ag.real/w_s;\n",
      "print '(f) starting torque (in Newton-meter)=%.2f'%T_s"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) magnitude of line current (in Amperes)=1.207\n",
        "  phase of line current (in Degree)=-23.48\n",
        "(b) power input (in Watts)=254.563\n",
        "(c) Efficiency of motor (%)=57.5\n",
        "(d) shaft torque (in Newton-meter)=1.488\n",
        "(e) magnitude of voltage across capacitor (in Volts)=444.666\n",
        "phase of voltage across capacitor (in Degree)=-68.29\n",
        "(f) starting torque (in Newton-meter)=0.52\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4, Page 597"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "R_m=2.5;#main winding resistance\n",
      "R_a=100.;#auxilary winding resistance\n",
      "#blocked-rotor test\n",
      "V_bm=25.;#voltage (in Volts)\n",
      "I_bm=3.72;#current (in Amperes)\n",
      "P_bm=86.23;#power (in Watts)\n",
      "#with auxilary winding open no load test\n",
      "V_nL=115;#voltage (in Volts)\n",
      "I_nL=3.2;#current (in Amperes)\n",
      "P_nL=55.17;#power (in Watts)\n",
      "#with main winding open blocked rotor test\n",
      "V_ba=121;#voltage (in Volts)\n",
      "I_ba=1.2;#current (in Amperes)\n",
      "P_ba=145.35;#power (in Watts)\n",
      "\n",
      "#Calculations&Results\n",
      "Z_bm=V_bm/I_bm;\n",
      "R_bm=P_bm/I_bm**2;\n",
      "X_bm=math.sqrt(Z_bm**2-R_bm**2);\n",
      "X1=0.5*X_bm;\n",
      "X2=X1;\n",
      "R2=R_bm-R_m;\n",
      "print 'X1 (in ohms)=%.2f'%X1\n",
      "print 'X2 (in ohms)=%.2f'%X2\n",
      "print 'R2 (in ohms)=%.2f'%R2\n",
      "Z_nL=V_nL/I_nL;\n",
      "R_nL=P_nL/I_nL**2;\n",
      "X_nL=math.sqrt(Z_nL**2-R_nL**2);\n",
      "X_m=2*X_nL-0.75*X_bm;\n",
      "P_r=P_nL-I_nL**2*(R_m+0.25*R2);\n",
      "print 'P_r (in Watts)=%.f'%(int(P_r))\n",
      "print 'X_m (in ohms)=%.2f'%X_m\n",
      "Z_ba=V_ba/I_ba;\n",
      "R_ba=P_ba/I_ba**2;\n",
      "R_2a=R_ba-R_a;\n",
      "alpha=math.sqrt(R_2a/R2);\n",
      "print 'alpha=%.1f'%alpha"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "X1 (in ohms)=1.26\n",
        "X2 (in ohms)=1.26\n",
        "R2 (in ohms)=3.73\n",
        "P_r (in Watts)=20\n",
        "X_m (in ohms)=69.17\n",
        "alpha=0.5\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.5, Page 606"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V_s=120;#in Volts\n",
      "P_rot=80;#rotational loss (in Watts)\n",
      "N_m=8000;#speed of motor (in rpm)\n",
      "pf=0.912;#lagging\n",
      "theta=-math.degrees(math.acos(pf))\n",
      "\n",
      "#Calculations&Results\n",
      "I_a=17.58*complex(math.cos(theta*math.pi/180),math.sin(theta*math.pi/180));#in Amperes\n",
      "Z_s=complex(0.65,1.2);#series field winding impedance (in ohms)\n",
      "Z_a=complex(1.36,1.6);#armature winding impedance (in ohms)\n",
      "E_a=V_s-I_a*(Z_s+Z_a);#induced emf (in Volts)\n",
      "print '(a) induced emf in the armature (in Volts)=%.1f'%(math.sqrt(E_a.real**2+E_a.imag**2))\n",
      "print 'phase of induced emf in the armature (in Degree)=%.2f'%(math.degrees(math.atan(E_a.imag/E_a.real)))\n",
      "P_d=E_a*I_a.conjugate();\n",
      "P_o=P_d.real-P_rot;\n",
      "print '(b) power output (in Watts)=%.2f'%P_o\n",
      "w_m=2*math.pi*N_m/60;#rated speed of motor (in rad/sec)\n",
      "T_s=P_o/w_m;\n",
      "print '(c) shaft torque (in Newton-meter)=%.2f'%T_s\n",
      "P_in=V_s*abs(I_a)*pf;\n",
      "Eff=P_o*100/P_in;\n",
      "print '(d) Efficiency (%%)=%.1f'%Eff"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) induced emf in the armature (in Volts)=74.1\n",
        "phase of induced emf in the armature (in Degree)=-24.22\n",
        "(b) power output (in Watts)=1222.75\n",
        "(c) shaft torque (in Newton-meter)=1.46\n",
        "(d) Efficiency (%)=63.6\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}