{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 11: SINGLE-PHASE MOTORS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1, Page number 354-355"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V = 220.0            #Supply voltage(V)\n",
      "P = 4.0              #Number of poles\n",
      "f = 50.0             #Frequency(Hz)\n",
      "N_l = 1450.0         #Speed(rpm)\n",
      "R_2 = 10.0           #Rotor resistance at standstill(ohm)\n",
      "\n",
      "#Calculation\n",
      "N_s = 120*f/P        #Synchronous speed(rpm)\n",
      "#For case(i)\n",
      "s_f = (N_s-N_l)/N_s  #Slip due to forward field\n",
      "#For case(ii)\n",
      "s_b = 2-s_f          #Slip due to backward field\n",
      "#For case(iii)\n",
      "R_f = R_2/s_f        #Effective rotor resistance due to forward slip(ohm)\n",
      "R_b = R_2/(2-s_f)    #Effective rotor resistance due to backward slip(ohm)\n",
      "\n",
      "#Result\n",
      "print('(i)   Slip due to forward field , s_f = %.2f ' %s_f)\n",
      "print('(ii)  Slip due to backward field , s_b = %.2f ' %s_b)\n",
      "print('(iii) Effective rotor resistance due to forward slip , R_f = %.2f ohm' %R_f)\n",
      "print('      Effective rotor resistance due to backward slip , R_b = %.2f ohm' %R_b)\n",
      "print('\\nNOTE : Changes in answer from that of textbook is due to precision')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)   Slip due to forward field , s_f = 0.03 \n",
        "(ii)  Slip due to backward field , s_b = 1.97 \n",
        "(iii) Effective rotor resistance due to forward slip , R_f = 300.00 ohm\n",
        "      Effective rotor resistance due to backward slip , R_b = 5.08 ohm\n",
        "\n",
        "NOTE : Changes in answer from that of textbook is due to precision\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.2, Page number 357-358"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "V_t = 220.0     #Supply voltage(V)\n",
      "R_1 = 6.0       #Resistance(ohm)\n",
      "R_2 = 6.0       #Resistance(ohm)\n",
      "X_1 = 10.0      #Inductive reactance(ohm)\n",
      "X_2 = 10.0      #Inductive reactance(ohm)\n",
      "N = 1500.0      #Speed(rpm)\n",
      "s = 0.03        #Slip\n",
      "X_m = 150.0     #Inductive reactance(ohm)\n",
      "\n",
      "#Calculation\n",
      "Z_f = 0.5*complex(0,X_m)*complex(R_2/s,X_2)/complex(R_2/s,X_2+X_m)          #Impedance due to forward field(ohm)\n",
      "Z_b = 0.5*complex(0,X_m)*complex(R_2/(2-s),X_2)/complex(R_2/(2-s),X_2+X_m)  #Impedance due to backward field(ohm)\n",
      "Z_t = complex(R_1+Z_f+Z_b,X_1)                                              #Total impedance(ohm)\n",
      "#For case(i)\n",
      "I_1 = V_t/Z_t                                                               #Input current(A)\n",
      "#For case(ii)\n",
      "P_i = V_t*abs(I_1)                                                          #Input power(W)\n",
      "#For case(iii)\n",
      "R_f = Z_f.real\n",
      "R_b = Z_b.real\n",
      "P_d = abs(I_1)**2*(R_f-R_b)*(1-s)                                           #Power developed(W)\n",
      "#For case(iv)\n",
      "T_d = 9.55*P_d/N                                                            #Torque(N-m)\n",
      "\n",
      "#Result\n",
      "print('(i)   Input current , I_1 = %.2f\u2220%.1f\u00b0 A' %(abs(I_1),cmath.phase(I_1)*180/math.pi))\n",
      "print('(ii)  Input power , P_i = %.2f W' %P_i)\n",
      "print('(iii) Power developed , P_d = %.1f W' %P_d)\n",
      "print('(iv)  Torque developed , T_d = %.2f N-m' %T_d)\n",
      "print('\\nNOTE : Case(ii) is not solved in textbook but solved here')\n",
      "print(' ERROR : Calculation mistake in Z_b in textbook solution')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)   Input current , I_1 = 2.94\u2220-56.2\u00b0 A\n",
        "(ii)  Input power , P_i = 646.10 W\n",
        "(iii) Power developed , P_d = 275.8 W\n",
        "(iv)  Torque developed , T_d = 1.76 N-m\n",
        "\n",
        "NOTE : Case(ii) is not solved in textbook but solved here\n",
        " ERROR : Calculation mistake in Z_b in textbook solution\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3, Page number 363-364"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "V_t = 220.0         #Supply voltage(V)\n",
      "f = 50.0            #Frequency(Hz)\n",
      "Z_m = complex(3,5)  #Main winding impedance of motor(ohm)\n",
      "Z_s = complex(5,3)  #Starting impedance of motor(ohm)\n",
      "\n",
      "#Calculation\n",
      "#For case(i)\n",
      "alpha_s = cmath.phase(Z_s)                 #Starting winding impedance angle(radians)\n",
      "I_s = V_t/Z_s                              #Starting current(A)\n",
      "#For case(ii)\n",
      "alpha_m = cmath.phase(Z_m)                 #Main winding impedance angle(radians)\n",
      "I_m = V_t/Z_m                              #Main winding current(A)\n",
      "#For case(iii)\n",
      "a = alpha_m-alpha_s                        #Angle of line current(radians)\n",
      "I = (abs(I_s)**2+abs(I_m)**2+2*abs(I_s)*abs(I_m)*math.cos(a))**0.5   #Line current(A)\n",
      "\n",
      "#Result\n",
      "print('(i)   Starting current , I_s = %.1f\u2220%.2f\u00b0 A' %(abs(I_s),cmath.phase(I_s)*180/math.pi))\n",
      "print('(ii)  Main winding current , I_m = %.1f\u2220%.f\u00b0 A' %(abs(I_m),cmath.phase(I_m)*180/math.pi))\n",
      "print('(iii) Line current , I = %.1f A' %I)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)   Starting current , I_s = 37.7\u2220-30.96\u00b0 A\n",
        "(ii)  Main winding current , I_m = 37.7\u2220-59\u00b0 A\n",
        "(iii) Line current , I = 73.2 A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.4, Page number 364"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "V_t = 220.0           #Supply voltage(V)\n",
      "f = 50.0              #Frequency(Hz)\n",
      "Z_m = complex(4,3.5)  #Main winding impedance of motor(ohm)\n",
      "Z_s = complex(5,3)    #Starting impedance of motor(ohm)\n",
      "\n",
      "#Calculation\n",
      "alpha_m = cmath.phase(Z_m)                   #Main winding impedance angle(radians)\n",
      "alpha_s = (alpha_m)-(90*math.pi/180)         #Angle of starting winding current(radians)\n",
      "X_c = Z_s.imag-Z_s.real*math.tan(alpha_s)    #Reactance connected in series with starting winding(ohm)\n",
      "C = 1/(2*math.pi*f*X_c)*10**6                #Starting capacitance for getting maximum torque(\u00b5F)\n",
      "\n",
      "#Result\n",
      "print('Starting capacitance for getting maximum torque , C = %.f \u00b5F' %C)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Starting capacitance for getting maximum torque , C = 365 \u00b5F\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.5, Page number 370-371"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "f = 50.0         #Supply frequency(Hz)\n",
      "V_nl = 100.0     #No-load voltage(V)\n",
      "I_nl = 2.5       #No-load current(A)\n",
      "P_nl = 60.0      #No-load power(W)\n",
      "V_br = 60.0      #Block rotor voltage(V)\n",
      "I_br = 3.0       #Block rotor current(A)\n",
      "P_br = 130.0     #Block rotor power(W)\n",
      "R_1 = 2.0        #Main winding resistance(ohm)\n",
      "\n",
      "#Calculation\n",
      "Z_br = V_br/I_br                      #Impedance due to blocked rotor test(ohm)\n",
      "R_br = P_br/I_br**2                   #Resistance due to blocked rotor test(ohm)\n",
      "X_br = (Z_br**2-R_br**2)**0.5         #Reactance under blocked rotor condition(ohm)\n",
      "X_1 = 0.5*X_br                        #Leakage reactance(ohm)\n",
      "X_2 = X_1                             #Leakage reactance(ohm)\n",
      "R_2 = R_br-R_1                        #Rotor circuit resistance(ohm)\n",
      "Z_nl = V_nl/I_nl                      #Impedance due to no-load(ohm)\n",
      "R_nl = P_nl/I_nl**2                   #Resistance due to no-load(ohm)\n",
      "X_nl = (Z_nl**2-R_nl**2)**0.5         #Reactance due to no-load(ohm)\n",
      "X_m = 2*(X_nl-X_1-0.5*X_2)            #Magnetizing reactance(ohm)\n",
      "P_rot = P_nl-I_nl**2*(R_1+(R_2/4))    #Rotational loss(W)\n",
      "\n",
      "#Result\n",
      "print('Equivalent circuit parameters of the motor')\n",
      "print('Under Blocked rotor test :')\n",
      "print('Input impedance , Z_br = %.f ohm' %Z_br)\n",
      "print('Total resistance , R_br = %.1f ohm' %R_br)\n",
      "print('Total reactance , X_br = %.1f ohm' %X_br)\n",
      "print('Rotor circuit resistance , R_2 = %.1f ohm' %R_2)\n",
      "print('Leakage reactances , X_1 = X_2 = %.1f ohm' %X_1)\n",
      "print('\\nUnder No load test :')\n",
      "print('Input impedance , Z_nl = %.f ohm' %Z_nl)\n",
      "print('No-load resistance , R_nl = %.1f ohm' %R_nl)\n",
      "print('No-load reactance , X_nl = %.1f ohm' %X_nl)\n",
      "print('Magnetizing reactance , X_m = %.1f ohm' %X_m)\n",
      "print('Rotational loss , P_rot = %.f W' %P_rot)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Equivalent circuit parameters of the motor\n",
        "Under Blocked rotor test :\n",
        "Input impedance , Z_br = 20 ohm\n",
        "Total resistance , R_br = 14.4 ohm\n",
        "Total reactance , X_br = 13.8 ohm\n",
        "Rotor circuit resistance , R_2 = 12.4 ohm\n",
        "Leakage reactances , X_1 = X_2 = 6.9 ohm\n",
        "\n",
        "Under No load test :\n",
        "Input impedance , Z_nl = 40 ohm\n",
        "No-load resistance , R_nl = 9.6 ohm\n",
        "No-load reactance , X_nl = 38.8 ohm\n",
        "Magnetizing reactance , X_m = 56.9 ohm\n",
        "Rotational loss , P_rot = 28 W\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.6, Page number 372"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "r_t = 36.0   #Number of rotor teeth\n",
      "N = 4.0      #Number of stator phases\n",
      "\n",
      "#Calculation\n",
      "#For case(i)\n",
      "T_p = 360/r_t        #Tooth pitch(degree)\n",
      "#For case(ii)\n",
      "teta = 360/(N*r_t)   #Step angle(degree)\n",
      "\n",
      "#Result\n",
      "print('(i)  Tooth pitch , T_p = %.f\u00b0 ' %T_p)\n",
      "print('(ii) Step angle , \u03b8 = %.1f\u00b0 ' %teta)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)  Tooth pitch , T_p = 10\u00b0 \n",
        "(ii) Step angle , \u03b8 = 2.5\u00b0 \n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}