{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 13: RATINGS, SELECTION, AND MAINTENANCE OF ELECTRIC MACHINERY"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.1, Page number 460"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T = 125.0         #Recorded temperature by the embedded detectors(\u00b0C)\n",
      "life_orig = 10.0  #Standard life of the motor(years)\n",
      "\n",
      "#Calculation\n",
      "delta_T = T-105            #Positive temp diff b/w the given max hottest spot temp of its insulation and ambient temp recorded\n",
      "R = 2**(delta_T/10.0)      #Life reduction factor\n",
      "Life_calc = life_orig/R    #Reduced life expectancy of the motor(years)\n",
      "\n",
      "#Result\n",
      "print('Life reduction factor , R = %.f ' %R)\n",
      "print('Reduced life expectancy of the motor , Life_calc = %.1f years' %Life_calc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Life reduction factor , R = 4 \n",
        "Reduced life expectancy of the motor , Life_calc = 2.5 years\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.2, Page number 460"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T = 75.0            #Recorded temperature by the embedded detectors(\u00b0C)\n",
      "life_orig = 10.0    #Standard life of the motor(years)\n",
      "\n",
      "#Calculation\n",
      "delta_T = 105-T            #Positive temp diff b/w the given max hottest spot temp of its insulation and ambient temp recorded\n",
      "E = 2**(delta_T/10.0)      #Life extension factor\n",
      "Life_calc = life_orig*E    #Increased life expectancy of the motor(years)\n",
      "\n",
      "#Result\n",
      "print('Life extension factor , E = %.f ' %E)\n",
      "print('Increased life expectancy of the motor , Life_calc = %.f years' %Life_calc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Life extension factor , E = 8 \n",
        "Increased life expectancy of the motor , Life_calc = 80 years\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.3, Page number 461"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T_A = 105.0            #Recorded temperature by the embedded detectors at hottest spot limiting temp by class A(\u00b0C)\n",
      "T_B = 130.0            #Recorded temperature by the embedded detectors at hottest spot limiting temp by class B(\u00b0C)\n",
      "life_orig = 5.0        #Standard life of the motor(years)\n",
      "\n",
      "#Calculation\n",
      "delta_T = T_B-T_A          #Positive temp diff b/w the given max hottest spot temp of its insulation and ambient temp recorded\n",
      "E = 2**(delta_T/10.0)      #Life extension factor\n",
      "Life_new = life_orig*E    #Increased life expectancy of the motor(years)\n",
      "\n",
      "#Result\n",
      "print('New life if wound with class B insulation , Life_new = %.1f years' %Life_new)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "New life if wound with class B insulation , Life_new = 28.3 years\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.4, Page number 463"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P_o = 25.0          #Rated power of SCIM(hp)\n",
      "T_ambient = 40.0    #Standard ambient temperature recorded by the embedded hot-spot detectors(\u00b0C)\n",
      "T_hottest = 115.0   #Hottest-spot winding temperature recorded by the embedded hot-spot detectors(\u00b0C)\n",
      "\n",
      "#Calculation\n",
      "delta_Tf = 90.0                #Allowable temperature rise for the insulation type used(\u00b0C)\n",
      "T_rise = T_hottest-T_ambient   #Actual temperature rise of the SCIM(\u00b0C)\n",
      "P_f = P_o*(delta_Tf/T_rise)    #Approximate power the motor can deliver at temperature rise(hp)\n",
      "power = 30.0                   #Power rating that may be stamped on the name plate(hp)\n",
      "delta_Tf_e = 90.0              #Temperature rise that must be stamped on the name plate(\u00b0C)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Allowable temperature rise for the insulation type used = %.f\u00b0C' %delta_Tf)\n",
      "print('Case(b): Actual temperature rise of the SCIM = %.f\u00b0C' %T_rise)\n",
      "print('Case(c): Approximate power the motor can deliver at the temperature rise , P_f = %.f hp' %P_f)\n",
      "print('Case(d): Power rating that may be stamped on the name plate = %.f hp' %power)\n",
      "print('Case(e): Temperature rise that must be stamped on the name plate = %.f\u00b0C' %delta_Tf_e)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Allowable temperature rise for the insulation type used = 90\u00b0C\n",
        "Case(b): Actual temperature rise of the SCIM = 75\u00b0C\n",
        "Case(c): Approximate power the motor can deliver at the temperature rise , P_f = 30 hp\n",
        "Case(d): Power rating that may be stamped on the name plate = 30 hp\n",
        "Case(e): Temperature rise that must be stamped on the name plate = 90\u00b0C\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.5, Page number 464"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P_o = 50.0            #Power rating of the WRIM(hp)\n",
      "T_hottest = 160.0     #Hottest-spot winding temperature recorded by the embedded hot-spot detectors(\u00b0C)\n",
      "T_ambient = 40.0      #Standard ambient temperature recorded by the embedded hot-spot detectors(\u00b0C)\n",
      "P_f_a = 40.0          #Power rating of load(hp)\n",
      "P_f_b = 55.0          #Power rating of load(hp)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "delta_T_o = T_hottest-T_ambient         #Temperature rise for the insulation type used(\u00b0C)\n",
      "delta_T_f_a = (P_f_a/P_o)*delta_T_o     #Final temperature rise(\u00b0C)\n",
      "T_f_a = delta_T_f_a+T_ambient           #Approximate final hot-spot temperature(\u00b0C)\n",
      "#Case(b)\n",
      "delta_T_f_b = (P_f_b/P_o)*delta_T_o     #Final temperature rise(\u00b0C)\n",
      "T_f_b = delta_T_f_b+T_ambient           #Approximate final hot-spot temperature(\u00b0C)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Approximate final hot-spot temperature at a continuous output load of 40 hp , T_f = %.f\u00b0C ' %T_f_a)\n",
      "print('Case(b): Approximate final hot-spot temperature at a continuous output load of 55 hp , T_f = %.f\u00b0C ' %T_f_b)\n",
      "print('         Yes, Motor life is reduced at 110 percent motor load because allowable maximum hot-spot motor temperature is 155\u00b0C')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Approximate final hot-spot temperature at a continuous output load of 40 hp , T_f = 136\u00b0C \n",
        "Case(b): Approximate final hot-spot temperature at a continuous output load of 55 hp , T_f = 172\u00b0C \n",
        "         Yes, Motor life is reduced at 110 percent motor load because allowable maximum hot-spot motor temperature is 155\u00b0C\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.6, Page number 464"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P_o = 55.0             #Power rating of the WRIM(hp)\n",
      "T_ambient = 40.0       #Standard ambient temperature recorded by the embedded hot-spot detectors(\u00b0C)\n",
      "life_orig = 10.0       #Standard life of the motor(years)\n",
      "T_f = 172.0            #Approximate final hot-spot temperature(\u00b0C)\n",
      "\n",
      "#Calculation\n",
      "delta_T = T_f-155.0       #Positive temp diff b/w the given max hottest spot temp of its insulation and ambient temp recorded\n",
      "R = 2**(delta_T/10.0)     #Life reduction factor\n",
      "Life_calc = life_orig/R   #Reduced life expectancy of the motor(years)\n",
      "\n",
      "#Result\n",
      "print('Reduced life expectancy of the motor , Life_calc = %.2f years' %Life_calc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reduced life expectancy of the motor , Life_calc = 3.08 years\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.7, Page number 466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P_o = 200.0     #Power rating of the test motor(hp)\n",
      "P1 = 200.0      #Operating power of test motor at t1 duration(hp)\n",
      "t1 = 5.0        #Time duration for which test motor is operated(min) \n",
      "P2 = 20.0       #Operating power of test motor at t2 duration(hp)\n",
      "t2 = 5.0        #Time duration for which test motor is operated(min)\n",
      "P3 = 0.0        #Operating power of test motor at t3 duration at rest(hp)\n",
      "t3 = 10.0       #Time duration for which test motor is operated(min)\n",
      "P4 = 100.0      #Operating power of test motor at t4 duration(hp)\n",
      "t4 = 10.0       #Time duration for which test motor is operated(min) \n",
      "\n",
      "#Calculation\n",
      "rms_hp = ((P1**2*t1+P2**2*t2+P3**2*t3+P4**2*t4)/(t1+t2+t3+t4/3))**0.5   #HP required for intermittent varying load\n",
      "\n",
      "#Result\n",
      "print('Horsepower required for such an intermittent varying load , rms hp = %.f hp' %rms_hp)\n",
      "print('125 hp motor would be selected because that is the nearest larger commercial standard rating')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Horsepower required for such an intermittent varying load , rms hp = 114 hp\n",
        "125 hp motor would be selected because that is the nearest larger commercial standard rating\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.8, Page number 472"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V = 120.0   #Rated output voltage of separately excited dc generator(V)\n",
      "I = 100.0   #Rated output current of separately excited dc generator(A)\n",
      "R = 0.1     #Armature resistance(ohm)\n",
      "\n",
      "#Calculation\n",
      "V_b = V          #Base voltage(V)\n",
      "I_b = I          #Base current(A)\n",
      "R_b = V_b/I_b    #Base resistance(ohm)\n",
      "R_pu = R/R_b     #Per-unit value of armature resistance\n",
      "\n",
      "#Result\n",
      "print('Case(a): Base voltage , V_b = %.f V' %V_b)\n",
      "print('Case(b): Base current , I_b = %.f A' %I_b)\n",
      "print('Case(b): Base resistance , R_b = %.1f \u03a9' %R_b)\n",
      "print('Case(d): Per-unit value of armature resistance , R_p.u = %.3f p.u' %R_pu)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Base voltage , V_b = 120 V\n",
        "Case(b): Base current , I_b = 100 A\n",
        "Case(b): Base resistance , R_b = 1.2 \u03a9\n",
        "Case(d): Per-unit value of armature resistance , R_p.u = 0.083 p.u\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.9, Page number 473"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "V = 500.0     #Rated voltage of the alternator(V)\n",
      "P = 20.0      #Rated power of the alternator(kVA)\n",
      "I = 40.0      #Rated current of the alternator(A)\n",
      "R = 2.0       #Armature resistance(ohm)\n",
      "X = 15.0      #Armature reactance(ohm)\n",
      "\n",
      "#Calculation\n",
      "V_b = V                             #Base voltage(V)\n",
      "I_b = I                             #Base current(A)\n",
      "R_pu = R*I_b/V_b                    #Per-unit value of armature resistance\n",
      "jX_pu = X*I_b/V_b                   #Per-unit value of armature reactance\n",
      "Z_pu1 = complex(R_pu,jX_pu)         #Per-unit value of armature impedance\n",
      "Z_pu2 = complex(R,X)*(I/V)          #Per-unit value of armature impedance\n",
      "\n",
      "#Result\n",
      "print('Case(a): Per unit value of armature resistance , R_p.u = %.2f p.u' %R_pu)\n",
      "print('Case(b): Per unit value of armature reactance , jX_p.u = j%.1f p.u' %jX_pu)\n",
      "print('Case(c): Per-unit value of armature impedance , Z_p.u = %.3f\u2220%.1f\u00b0 p.u (Method 1)' %(abs(Z_pu1),cmath.phase(Z_pu1)*180/math.pi))\n",
      "print('         Per-unit value of armature impedance , Z_p.u = %.3f\u2220%.1f\u00b0 p.u (Method 2)' %(abs(Z_pu2),cmath.phase(Z_pu2)*180/math.pi))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Per unit value of armature resistance , R_p.u = 0.16 p.u\n",
        "Case(b): Per unit value of armature reactance , jX_p.u = j1.2 p.u\n",
        "Case(c): Per-unit value of armature impedance , Z_p.u = 1.211\u222082.4\u00b0 p.u (Method 1)\n",
        "         Per-unit value of armature impedance , Z_p.u = 1.211\u222082.4\u00b0 p.u (Method 2)\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.10, Page number 473"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_orig = 500.0      #Rated voltage of the alternator(V)\n",
      "kVA_orig = 20.0     #Rated power of the alternator(kVA)\n",
      "I = 40.0            #Rated current of the alternator(A)\n",
      "R = 2.0             #Armature resistance(ohm)\n",
      "X = 15.0            #Armature reactance(ohm)\n",
      "V_new = 5000.0      #New voltage of the alternator(V)\n",
      "kVA_new = 100.0     #New power of the alternator(kVA)\n",
      "Z_pu_orig = 1.211   #Original per-unit value of armature impedance\n",
      "\n",
      "#Calculation\n",
      "Z_pu_new = Z_pu_orig*(kVA_new/kVA_orig)*(V_orig/V_new)**2   #New per-unit impedance\n",
      "\n",
      "#Result\n",
      "print('New per-unit impedance , Z_pu(new) = %.5f p.u' %Z_pu_new)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "New per-unit impedance , Z_pu(new) = 0.06055 p.u\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.11, Page number 474"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V = 2300.0        #Line voltage of 3-phase distribution system(V)\n",
      "V_p = 1328.0      #Phase voltage of 3-phase distribution system(V)\n",
      "V_b = 69000.0     #Common base line voltage(V)\n",
      "V_pb = 39840.0    #Common base phase voltage(V)\n",
      "\n",
      "#Calculation\n",
      "V_pu_line = V/V_b          #Distribution system p.u line voltage\n",
      "V_pu_phase = V_p/V_pb      #Distribution system p.u phase voltage\n",
      "\n",
      "#Result\n",
      "print('Case(a): Distribution system p.u line voltage , V_pu = %.2f p.u' %V_pu_line)\n",
      "print('Case(b): Distribution system p.u phase voltage , V_pu = %.2f p.u' %V_pu_phase)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Distribution system p.u line voltage , V_pu = 0.03 p.u\n",
        "Case(b): Distribution system p.u phase voltage , V_pu = 0.03 p.u\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.12, Page number 474"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "VA_b = 50.0    #Base power rating of the 3-phase Y-connected alternator(MVA)\n",
      "V_b = 25.0     #Base voltage of the 3-phase Y-connected alternator(kV)\n",
      "X_pu = 1.3     #Per unit value of synchronous reactance\n",
      "R_pu = 0.05    #Per unit value of resistance\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "Z_b1 = V_b**2/VA_b      #Base impedance(ohm)\n",
      "S_b = VA_b              #Base power rating of the 3-phase Y-connected alternator(MVA)\n",
      "I_b = S_b/V_b           #Base current(kA)\n",
      "Z_b2 = V_b/I_b          #Base impedance(ohm)\n",
      "#Case(b)\n",
      "Z_b = Z_b1              #Base impedance(ohm)\n",
      "X_s = X_pu*Z_b          #Actual value of synchronous reactance per phase(ohm)\n",
      "#Case(c)\n",
      "R_a = R_pu*Z_b          #Actual value of armature stator resistance per phase(ohm)\n",
      "#Case(d)\n",
      "Z_s1 = complex(R_a,X_s)     #Synchronous impedance per phase(ohm)\n",
      "Z_pu = complex(R_pu,X_pu)   #Per unit value of impedance\n",
      "Z_s2 = Z_pu*Z_b             #Synchronous impedance per phase(ohm)\n",
      "#Case(d)\n",
      "S = S_b                     #Base power rating of the 3-phase Y-connected alternator(MVA)\n",
      "P = S*R_pu                  #Full-load copper losses for all three phases(MW)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Base impedance , Z_b = %.1f \u03a9' %Z_b1)\n",
      "print('         Base impedance , Z_b = %.1f \u03a9' %Z_b2)\n",
      "print('Case(b): Actual value of synchronous reactance per phase , X_s = j%.2f \u03a9' %X_s)\n",
      "print('Case(c): Actual value of armature stator resistance per phase , R_a = %.3f \u03a9' %R_a)\n",
      "print('Case(d): Synchronous impedance per phase , Z_s = %.2f\u2220%.1f\u00b0 \u03a9 (Method 1)' %(abs(Z_s1),cmath.phase(Z_s1)*180/math.pi))\n",
      "print('         Synchronous impedance per phase , Z_s = %.2f\u2220%.1f\u00b0 \u03a9 (Method 2)' %(abs(Z_s2),cmath.phase(Z_s2)*180/math.pi))\n",
      "print('Case(e): Full-load copper losses for all three phases , P = %.1f MW' %P)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Base impedance , Z_b = 12.5 \u03a9\n",
        "         Base impedance , Z_b = 12.5 \u03a9\n",
        "Case(b): Actual value of synchronous reactance per phase , X_s = j16.25 \u03a9\n",
        "Case(c): Actual value of armature stator resistance per phase , R_a = 0.625 \u03a9\n",
        "Case(d): Synchronous impedance per phase , Z_s = 16.26\u222087.8\u00b0 \u03a9 (Method 1)\n",
        "         Synchronous impedance per phase , Z_s = 16.26\u222087.8\u00b0 \u03a9 (Method 2)\n",
        "Case(e): Full-load copper losses for all three phases , P = 2.5 MW\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}