{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 9: POLYPHASE INDUCTION(ASYNCHRONOUS) DYNAMOS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1, Page number 281"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "phase = 3.0   #Number of phases\n",
      "n = 3.0       #Slots per pole per phase\n",
      "f = 60.0      #Line frequency(Hz)\n",
      "f_c = 50.0    #Changed line frequency(Hz)\n",
      "\n",
      "#Calculation\n",
      "P = 2*n                    #Number of poles produced\n",
      "Total_slots = n*P*phase    #Total number of slots on the stator\n",
      "S_b = 120*f/P              #Speed of the rotating magnetic field or poles(rpm)\n",
      "S_c = 120*f_c/P            #Speed of the rotating magnetic field(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Number of poles produced , P = %.f poles' %P)\n",
      "print('         Total number of slots on the stator , Total slots = %.f slots' %Total_slots)\n",
      "print('Case(b): Speed of the rotating magnetic fields or poles , S = %.f rpm' %S_b)\n",
      "print('Case(c): Speed of the rotating magnetic field , S = %.f rpm' %S_c)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Number of poles produced , P = 6 poles\n",
        "         Total number of slots on the stator , Total slots = 54 slots\n",
        "Case(b): Speed of the rotating magnetic fields or poles , S = 1200 rpm\n",
        "Case(c): Speed of the rotating magnetic field , S = 1000 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2, Page number 281"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "s_a = 0.05    #Slip\n",
      "f_a = 60.0    #Line frequency(Hz)\n",
      "S_a = 1200.0  #Speed of the rotating magnetic field(rpm)\n",
      "s_b = 0.07    #Slip\n",
      "f_b = 50.0    #Line frequency(Hz)\n",
      "S_b = 1000.0  #Speed of the rotating magnetic field(rpm)\n",
      "\n",
      "#Calculation\n",
      "S_r_a = S_a*(1-s_a)  #Full-load rotor speed(rpm)\n",
      "S_r_b = S_b*(1-s_b)  #Full-load rotor speed(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Full-load rotor speed if slip is 5 percent slip when the frequency is 60 Hz , S_r = %.f rpm' %S_r_a)\n",
      "print('Case(b): Full-load rotor speed if slip is 7 percent slip when the frequency is 50 Hz , S_r = %.f rpm' %S_r_b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Full-load rotor speed if slip is 5 percent slip when the frequency is 60 Hz , S_r = 1140 rpm\n",
        "Case(b): Full-load rotor speed if slip is 7 percent slip when the frequency is 50 Hz , S_r = 930 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3, Page number 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0      #Number of poles in Induction motor\n",
      "f = 60.0     #Frequency(Hz)\n",
      "s_f = 0.05   #Full-load rotor slip\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "s = 1.0          #Slip = 1 at the instant of starting, since S_r = 0\n",
      "f_r_a = s*f      #Rotor frequency in Hz at the instant of starting\n",
      "#Case(b)\n",
      "f_r_b = s_f*f    #Full-load rotor frequency in Hz\n",
      "\n",
      "#Result\n",
      "print('Case(a): Rotor frequency at the instant of starting , f_r  = %.f Hz' %f_r_a)\n",
      "print('Case(b): Rotor frequency at full load , f_r  = %.f Hz' %f_r_b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Rotor frequency at the instant of starting , f_r  = 60 Hz\n",
        "Case(b): Rotor frequency at full load , f_r  = 3 Hz\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4, Page number 286"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0          #Number of poles in the induction motor\n",
      "hp = 50.0        #Rating of the induction motor(hp)\n",
      "V_o = 208.0      #Voltage rating of the induction motor(V)\n",
      "T_orig = 225.0   #Starting torque(lb-ft)\n",
      "I_orig = 700.0   #Instantaneous starting current at rated voltage(A)\n",
      "V_s = 120.0      #Reduced 3-phase voltage supplied(V)\n",
      "\n",
      "#Calculation\n",
      "T_s = T_orig*(V_s/V_o)**2   #Starting torque(lb-ft)\n",
      "I_s = I_orig*(V_s/V_o)      #Starting current(A)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Starting torque , T_s = %.f lb-ft' %T_s)\n",
      "print('Case(b): Starting current , I_s = %d A' %I_s)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Starting torque , T_s = 75 lb-ft\n",
        "Case(b): Starting current , I_s = 403 A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.5, Page number 288"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 8.0          #Number of poles in the motor\n",
      "f = 60.0         #Frequency(Hz)\n",
      "R_r = 0.3        #Rotor resistance per phase(ohm)\n",
      "S_r = 650.0      #Speed at which motor stalls(rpm)\n",
      "s = 0.05         #Rated slip\n",
      "\n",
      "#Calculation\n",
      "S = 120*f/P        #Speed of the rotating magnetic field(rpm)\n",
      "s_b = (S-S_r)/S    #Breakdown Slip\n",
      "X_lr = R_r/s_b     #Locked rotor reactance(ohm)\n",
      "f_r = s_b*f        #Rotor frequency at the maximum torque point(Hz)\n",
      "S_r = S*(1-s)      #Full-load speed at rated slip(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Breakdown slip , s_b = %.3f' %s_b)\n",
      "print('Case(b): Locked-rotor reactance , X_lr = %.2f \u03a9' %X_lr)\n",
      "print('Case(c): Rotor frequency at the maximum torque point , f_r = %.1f Hz' %f_r)\n",
      "print('Case(d): Full-load speed if the rated slip is 5 percent , S_r = %.f rpm' %S_r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Breakdown slip , s_b = 0.278\n",
        "Case(b): Locked-rotor reactance , X_lr = 1.08 \u03a9\n",
        "Case(c): Rotor frequency at the maximum torque point , f_r = 16.7 Hz\n",
        "Case(d): Full-load speed if the rated slip is 5 percent , S_r = 855 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.6, Page number 295"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 8.0             #Number of poles in the motor\n",
      "f = 60.0            #Frequency(Hz)\n",
      "R_r = 0.3           #Rotor resistance per phase(ohm/phase)\n",
      "R_x = 0.7           #Added resistance(ohm/phase)\n",
      "S_r = 875.0         #Full-load Speed(rpm) \n",
      "S = 900.0           #Speed of the rotating magnetic field(rpm)\n",
      "X_lr = 1.08         #Locked rotor reactance(ohm)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "s = (S-S_r)/S           #Full-load slip,short circuited\n",
      "R_r_total = R_r+R_x     #Total resistance per phase(ohm)\n",
      "s_r = R_r_total/R_r*s   #New full-load slip with added resistance\n",
      "S_r_new = S*(1-s_r)     #New full-load speed(rpm) \n",
      "#Case(b)\n",
      "T_o = R_r/(R_r**2+X_lr**2)               #Original torque\n",
      "T_f = (R_r+R_x)/((R_r+R_x)**2+X_lr**2)   #New torque\n",
      "torque_ratio = T_f/T_o                   #Ratio of final torque to original torque\n",
      "T_final = 2*torque_ratio\n",
      "\n",
      "#Result\n",
      "print('Case(a): New full-load speed with added resistance , S(1-s) = %.f rpm' %S_r_new)\n",
      "print('Case(b): Starting torque with added resistance , T_f = %.2f*T_fl' %T_final)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): New full-load speed with added resistance , S(1-s) = 817 rpm\n",
        "Case(b): Starting torque with added resistance , T_f = 3.87*T_fl\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.7, Page number 295"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "P = 8.0             #Number of poles in the motor\n",
      "f = 60.0            #Frequency(Hz)\n",
      "R_r = 0.3           #Rotor resistance per phase(ohm/phase)\n",
      "R_x = 0.7           #Added resistance(ohm/phase)\n",
      "X_lr = 1.08         #Locked rotor reactance(ohm)\n",
      "E_lr = 112.0        #Induced voltage per phase(V)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "Z_lr = complex(R_r,X_lr)                       #Locked rotor impedance per phase(ohm)\n",
      "I_r = E_lr/abs(Z_lr)                           #Rotor current per phase(A)\n",
      "angle_Z_lr = cmath.phase(Z_lr)*180/math.pi     #Angle of locked rotor impedance per phase(degree)\n",
      "PF = math.cos(angle_Z_lr*math.pi/180)          #PF with rotor short circuited\n",
      "PF_a = R_r/abs(Z_lr)                           #PF with rotor short circuited\n",
      "#Case(b)\n",
      "Z_lr_b = complex(R_r+R_x,X_lr)                 #Locked rotor impedance per phase with added resistance(ohm)\n",
      "I_r_b = E_lr/abs(Z_lr_b)                       #Rotor current per phase with added resistance(A)\n",
      "angle_Z_lr_b = cmath.phase(Z_lr_b)*180/math.pi #Angle of locked rotor impedance per phase with added resistance(degree)\n",
      "PF_2 = math.cos(angle_Z_lr_b*math.pi/180)      #PF with added resistance\n",
      "PF_b = (R_r+R_x)/abs(Z_lr_b)                   #PF with added resistance\n",
      "\n",
      "#Result\n",
      "print('Case(a): Rotor current per phase with rotor short-circuited , I_r = %.fA' %I_r)\n",
      "print('         Power factor with rotor short-circuited , cos\u03b8 = %.3f ' %PF)\n",
      "print('Case(b): Rotor current per phase with added resistance , I_r = %.1f A' %I_r_b)\n",
      "print('         Power factor with added resistance , cos\u03b8_r = %.2f ' %PF_2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Rotor current per phase with rotor short-circuited , I_r = 100A\n",
        "         Power factor with rotor short-circuited , cos\u03b8 = 0.268 \n",
        "Case(b): Rotor current per phase with added resistance , I_r = 76.1 A\n",
        "         Power factor with added resistance , cos\u03b8_r = 0.68 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.8, Page number 296"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "\n",
      "#Variable declaration\n",
      "P = 8.0             #Number of poles in the motor\n",
      "f = 60.0            #Frequency(Hz)\n",
      "R_r = 0.3           #Rotor resistance per phase(ohm/phase)\n",
      "R_x = 0.7           #Added resistance(ohm/phase)\n",
      "X_lr = 1.08         #Locked rotor reactance(ohm)\n",
      "E_lr = 112.0        #Induced voltage per phase(V)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "T_o = R_r/(R_r**2+X_lr**2)            #Original torque\n",
      "a = 0.24                              #Co-efficient of x^2\n",
      "b = -0.856                            #Co-efficient of x\n",
      "c = 0                                 #Constant\n",
      "sol_1 = (-b+(b**2-4*a*c)**0.5)/(2*a)  #Solution 1\n",
      "sol_2 = (-b-(b**2-4*a*c)**0.5)/(2*a)  #Solution 1\n",
      "R_x = sol_1\n",
      "R_x2 = sol_2\n",
      "R_T = R_r+R_x                         #Added rotor resistance(ohm)\n",
      "#Case(b)\n",
      "Z_T = complex(R_T,X_lr)               #Impedance(ohm)\n",
      "angle_Z_T = cmath.phase(Z_T)*180/math.pi #Angle of impedance(degree)\n",
      "PF = math.cos(angle_Z_T*math.pi/180)  #Rotor PF\n",
      "PF_b = R_T/abs(Z_T)                   #Rotor PF\n",
      "#Case(c)\n",
      "I_r = E_lr/abs(Z_T)                   #Starting current(A)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Added rotor resistance , R_T = %.2f \u03a9' %R_T)\n",
      "print('Case(b): Rotor power factor that will produce same starting torque , cos\u03b8 = %.3f ' %PF)\n",
      "print('Case(c): Starting current , I_r = %.f A' %I_r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Added rotor resistance , R_T = 3.87 \u03a9\n",
        "Case(b): Rotor power factor that will produce same starting torque , cos\u03b8 = 0.963 \n",
        "Case(c): Starting current , I_r = 28 A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.9, Page number 297"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 8.0             #Number of poles in the motor\n",
      "f = 60.0            #Frequency(Hz)\n",
      "R_r = 0.3           #Rotor resistance(ohm)\n",
      "S_r = 875.0         #Full-load Speed(rpm)\n",
      "R_x_a = 1.7         #Added rotor resistance(ohm)\n",
      "R_x_b = 2.7         #Added rotor resistance(ohm)\n",
      "R_x_c = 3.7         #Added rotor resistance(ohm)\n",
      "R_x_d = 4.7         #Added rotor resistance(ohm)\n",
      "\n",
      "#Calculation\n",
      "S_o = 120*f/P               #Speed of the rotating magnetic field(rpm)\n",
      "s_o = (S_o-S_r)/S_o         #Full-load slip\n",
      "s_r_a = s_o*(R_r+R_x_a)/R_r #Slip\n",
      "S_r_a = S_o*(1-s_r_a)       #Rotor speed(rpm)\n",
      "s_r_b = s_o*(R_r+R_x_b)/R_r #Slip\n",
      "S_r_b = S_o*(1-s_r_b)       #Rotor speed(rpm)\n",
      "s_r_c = s_o*(R_r+R_x_c)/R_r #Slip\n",
      "S_r_c = S_o*(1-s_r_c)       #Rotor speed(rpm)\n",
      "s_r_d = s_o*(R_r+R_x_d)/R_r #Slip\n",
      "S_r_d = S_o*(1-s_r_d)       #Rotor speed(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Full load speed for added rotor resistance of 1.7 \u03a9 , S_r = %.1f rpm' %S_r_a)\n",
      "print('Case(b): Full load speed for added rotor resistance of 2.7 \u03a9 , S_r = %.f rpm' %S_r_b)\n",
      "print('Case(c): Full load speed for added rotor resistance of 3.7 \u03a9 , S_r = %d rpm' %S_r_c)\n",
      "print('Case(d): Full load speed for added rotor resistance of 4.7 \u03a9 , S_r = %.f rpm' %S_r_d)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Full load speed for added rotor resistance of 1.7 \u03a9 , S_r = 733.3 rpm\n",
        "Case(b): Full load speed for added rotor resistance of 2.7 \u03a9 , S_r = 650 rpm\n",
        "Case(c): Full load speed for added rotor resistance of 3.7 \u03a9 , S_r = 566 rpm\n",
        "Case(d): Full load speed for added rotor resistance of 4.7 \u03a9 , S_r = 483 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.10, Page number 302"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0             #Number of poles in WRIM\n",
      "f = 60.0            #Frequency(Hz)\n",
      "V = 220.0           #Line voltage(V)\n",
      "hp = 1.0            #Power rating of WRIM(hp)\n",
      "S_r = 1740.0        #Full-load rated speed(rpm)\n",
      "R_r = 0.3           #Rotor resistance(ohm)\n",
      "X_lr = 1.0          #Locked rotor reactance(ohm)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "V_p = V                #Phase voltage(V)\n",
      "E_lr = V_p/4           #Locked-rotor voltage per phase(V)\n",
      "#Case(b)\n",
      "S = 120*f/P            #Speed of the rotating magnetic field(rpm)\n",
      "s = (S-S_r)/S          #Slip\n",
      "I_r = E_lr/((R_r/s)**2+X_lr**2)**0.5 #Rotor current per phase at rated speed(A/phase)\n",
      "#Case(c)\n",
      "P_in = I_r**2*R_r/s    #Rated rotor power input per phase(W/phase)\n",
      "#Case(d)\n",
      "P_RL = I_r**2*R_r      #Rated rotor copper loss per phase(W/phase)\n",
      "#Case(e)\n",
      "P_d = P_in-P_RL        #Rotor power developed per phase(W)\n",
      "P_d_hp = P_d/746       #Rotor power developed per phase(hp)\n",
      "#Case(f)\n",
      "T_d = P_d_hp*5252/S_r  #Rotor torque developed per phase(lb-ft)\n",
      "T_d2 = 7.04*P_in/S     #Rotor torque developed per phase(lb-ft)\n",
      "T_dm = 3*T_d           #Total rotor torque(lb-ft)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Locked-rotor voltage per phase , E_lr = %.f V' %E_lr)\n",
      "print('Case(b): Rotor current per phase at rated speed , I_r = %.3f A/phase' %I_r)\n",
      "print('Case(c): Rated rotor power input per phase , P_in = %.f W/phase' %P_in)\n",
      "print('Case(d): Rated rotor copper loss per phase , P_RL = %.2f W' %P_RL)\n",
      "print('Case(e): Rotor power developed per phase , P_d = %.1f W/phase' %P_d)\n",
      "print('         Rotor power developed per phase , P_d = %.2f hp/phase' %P_d_hp)\n",
      "print('Case(f): Rotor torque developed per phase by method 1 , T_d = %.1f lb-ft' %T_d)\n",
      "print('         Rotor torque developed per phase by method 2 , T_d = %.1f lb-ft' %T_d2)\n",
      "print('         Total rotor torque , T_dm = %.1f lb-ft' %T_dm)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Locked-rotor voltage per phase , E_lr = 55 V\n",
        "Case(b): Rotor current per phase at rated speed , I_r = 6.074 A/phase\n",
        "Case(c): Rated rotor power input per phase , P_in = 332 W/phase\n",
        "Case(d): Rated rotor copper loss per phase , P_RL = 11.07 W\n",
        "Case(e): Rotor power developed per phase , P_d = 320.9 W/phase\n",
        "         Rotor power developed per phase , P_d = 0.43 hp/phase\n",
        "Case(f): Rotor torque developed per phase by method 1 , T_d = 1.3 lb-ft\n",
        "         Rotor torque developed per phase by method 2 , T_d = 1.3 lb-ft\n",
        "         Total rotor torque , T_dm = 3.9 lb-ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.11, Page number 303"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 6.0             #Number of poles in WRIM\n",
      "f = 60.0            #Frequency(Hz)\n",
      "V = 208.0           #Line voltage(V)\n",
      "hp = 7.5            #Power rating of WRIM(hp)\n",
      "S_r = 1125.0        #Full-load rated speed(rpm)\n",
      "R_r = 0.08          #Rotor resistance(ohm/phase)\n",
      "X_lr = 0.4          #Locked rotor reactance(ohm/phase)\n",
      "\n",
      "#Calculation\n",
      "#Case(a)\n",
      "V_p = V/3**0.5         #Phase voltage(V)\n",
      "E_lr = V_p/2           #Locked-rotor voltage per phase(V)\n",
      "#Case(b)\n",
      "S = 120*f/P            #Speed of the rotating magnetic field(rpm)\n",
      "s = (S-S_r)/S          #Slip\n",
      "I_r = E_lr/((R_r/s)**2+X_lr**2)**0.5 #Rotor current per phase at rated speed(A/phase)\n",
      "#Case(c)\n",
      "P_in = I_r**2*R_r/s    #Rated rotor power input per phase(W/phase)\n",
      "#Case(d)\n",
      "P_RL = I_r**2*R_r      #Rated rotor copper loss per phase(W/phase)\n",
      "#Case(e)\n",
      "P_d = P_in-P_RL        #Rotor power developed per phase(W)\n",
      "P_d_hp = P_d/746       #Rotor power developed per phase(hp)\n",
      "#Case(f)\n",
      "T_d = P_d_hp*5252/S_r  #Rotor torque developed per phase(lb-ft)\n",
      "T_d2 = 7.04*P_in/S     #Rotor torque developed per phase(lb-ft)\n",
      "#Case(g)\n",
      "T_dm = 3*T_d           #Total rotor torque(lb-ft)\n",
      "#Case(h)\n",
      "P_o = hp*746           #Output power(W)\n",
      "T_o = 7.04*P_o/S_r     #Total output rotor torque(lb-ft)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Locked-rotor voltage per phase , E_lr = %.f V' %E_lr)\n",
      "print('Case(b): Rotor current per phase at rated speed , I_r = %.2f A/phase' %I_r)\n",
      "print('Case(c): Rated rotor power input per phase , P_in = %.f W/phase' %P_in)\n",
      "print('Case(d): Rated rotor copper loss per phase , P_RL = %.1f W/phase' %P_RL)\n",
      "print('Case(e): Rotor power developed per phase , P_d = %.f W/phase' %P_d)\n",
      "print('         Rotor power developed per phase , P_d = %.2f hp/phase' %P_d_hp)\n",
      "print('Case(f): Rotor torque developed per phase by method 1 , T_d = %.1f lb-ft/phase' %T_d)\n",
      "print('         Rotor torque developed per phase by method 2 , T_d = %.1f lb-ft/phase' %T_d2)\n",
      "print('Case(g): Total rotor torque , T_dm = %.f lb-ft' %T_dm)\n",
      "print('Case(h): Total output rotor torque , T_o = %.f lb-ft' %T_o)\n",
      "print('\\nNOTE: Changes in obtained answer from that of textbook is due to more precision i.e more number of decimal places')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Locked-rotor voltage per phase , E_lr = 60 V\n",
        "Case(b): Rotor current per phase at rated speed , I_r = 44.77 A/phase\n",
        "Case(c): Rated rotor power input per phase , P_in = 2566 W/phase\n",
        "Case(d): Rated rotor copper loss per phase , P_RL = 160.4 W/phase\n",
        "Case(e): Rotor power developed per phase , P_d = 2406 W/phase\n",
        "         Rotor power developed per phase , P_d = 3.22 hp/phase\n",
        "Case(f): Rotor torque developed per phase by method 1 , T_d = 15.1 lb-ft/phase\n",
        "         Rotor torque developed per phase by method 2 , T_d = 15.1 lb-ft/phase\n",
        "Case(g): Total rotor torque , T_dm = 45 lb-ft\n",
        "Case(h): Total output rotor torque , T_o = 35 lb-ft\n",
        "\n",
        "NOTE: Changes in obtained answer from that of textbook is due to more precision i.e more number of decimal places\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.12, Page number 304"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0             #Number of poles in WRIM\n",
      "f = 60.0            #Frequency(Hz)\n",
      "V = 220.0           #Line voltage(V)\n",
      "hp = 1.0            #Power rating of WRIM(hp)\n",
      "R_r = 0.3           #Rotor resistance(ohm)\n",
      "X_lr = 1.0          #Locked rotor reactance(ohm)\n",
      "n = 3.0             #Number of phases\n",
      "\n",
      "#Calculation\n",
      "V_p = V                     #Phase voltage(V)\n",
      "E_lr = V_p/4                #Locked-rotor voltage per phase(V)\n",
      "P_in = E_lr**2/(2*X_lr)*n   #Total 3-phase rotor power input(W)\n",
      "S = 120*f/P                 #Speed of the rotating magnetic field(rpm)\n",
      "T_max = 7.04*P_in/S         #Maximum torque developed(lb-ft)\n",
      "s_b = R_r/X_lr              #Slip\n",
      "S_r = S*(1-s_b)             #Speed at which maximum torque is developed(rpm)\n",
      "\n",
      "#Result\n",
      "print('Maximum torque developed , T_max = %.2f lb-ft' %T_max)\n",
      "print('Percent slip , s_b = %.f percent' %(s_b*100))\n",
      "print('Speed at which maximum torque is developed , S_r = %.f rpm' %S_r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum torque developed , T_max = 17.75 lb-ft\n",
        "Percent slip , s_b = 30 percent\n",
        "Speed at which maximum torque is developed , S_r = 1260 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.13, Page number 304"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0             #Number of poles in WRIM\n",
      "f = 60.0            #Frequency(Hz)\n",
      "V = 220.0           #Line voltage(V)\n",
      "hp = 1.0            #Power rating of WRIM(hp)\n",
      "R_r = 0.3           #Rotor resistance(ohm)\n",
      "X_lr = 1.0          #Locked rotor reactance(ohm)\n",
      "n = 3.0             #Number of phases\n",
      "\n",
      "#Calculation\n",
      "V_p = V                                  #Phase voltage(V)\n",
      "E_lr = V_p/4                             #Locked-rotor voltage per phase(V)\n",
      "P_in = n*(E_lr**2/(R_r**2+X_lr**2))*R_r  #Total 3-phase rotor power input(W)\n",
      "S = 120*f/P                              #Speed of the rotating magnetic field(rpm)\n",
      "T_s = 7.04*P_in/S                        #Starting torque developed(lb-ft)\n",
      "\n",
      "#Result\n",
      "print('Starting torque developed , T_s = %.2f lb-ft' %T_s)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Starting torque developed , T_s = 9.77 lb-ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.14, Page number 306"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T_max = 17.75     #Maximum torque developed(lb-ft)\n",
      "s_max = 0.3       #Slip for which T_max occurs\n",
      "s_a = 0.0333      #Slip\n",
      "s_b = 1.0         #Slip \n",
      "\n",
      "#Calculation\n",
      "T_a = T_max*(2/((s_max/s_a)+(s_a/s_max)))   #Full-load torque(lb-ft)\n",
      "T_b = T_max*(2/((s_max/s_b)+(s_b/s_max)));  #Starting torque(lb-ft)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Full-load torque at a slip of 0.0333 , T = %.1f lb-ft' %T_a)\n",
      "print('Case(b): Starting torque at a slip of 1.0 , T = %.2f lb-ft' %T_b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Full-load torque at a slip of 0.0333 , T = 3.9 lb-ft\n",
        "Case(b): Starting torque at a slip of 1.0 , T = 9.77 lb-ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.15, Page number 307"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import cmath\n",
      "import numpy\n",
      "\n",
      "#Variable declaration\n",
      "P = 4.0            #Number of poles in SCIM \n",
      "S_r = 1746.0       #Rated rotor speed(rpm)\n",
      "V = 220.0          #Voltage rating of SCIM(V)\n",
      "f = 60.0           #Frequency(Hz)\n",
      "P_hp = 10.0        #Power rating of SCIM(hp)\n",
      "R_a = 0.4          #Armature resistance(ohm)\n",
      "R_r = 0.14         #Rotor resistance(ohm)\n",
      "jXm = 16.0         #Reactance(ohm)\n",
      "jXs = 0.35         #Synchronous reactance(ohm)\n",
      "jXlr = 0.35        #Locked rotor reactance(ohm)\n",
      "P_r_total = 360.0  #Total rotational losses(W)\n",
      "\n",
      "#Calculation\n",
      "V_p = V/3**0.5     #Voltage per phase(V)\n",
      "S = 120*f/P        #Speed of the rotating magnetic field(rpm)\n",
      "s = (S-S_r)/S      #Slip\n",
      "I1_1 = complex(R_a,jXm+jXs)\n",
      "I1_2 = complex(0,-jXm)\n",
      "I2_1 = complex(0,-jXm)\n",
      "I2_2 = complex(R_r/s,jXm+jXlr)\n",
      "V_1 = V_p\n",
      "V_2 = 0\n",
      "A = [[I1_1,I2_1],[I1_2,I2_2]]        #Matrix containing above mesh eqns array\n",
      "delta = numpy.linalg.det(A)          #Determinant of A\n",
      "#Case(a)\n",
      "I_p = numpy.linalg.det([[V_1,I2_1],[V_2,I2_2]])/delta #Stator armature current(A)\n",
      "I_1 = I_p\n",
      "#Case(b)\n",
      "I_r = numpy.linalg.det([[I1_1,V_1],[I1_2,V_2]])/delta #Rotor armature current(A)\n",
      "I_2 = I_r\n",
      "#Case(c)\n",
      "theta_1 = cmath.phase(I_p)*180/math.pi           #Motor PF angle(degrees)\n",
      "cos_theta1 = math.cos(theta_1*math.pi/180)       #Motor PF\n",
      "#Case(d)\n",
      "SPI = V_p*abs(I_p)*cos_theta1                    #Stator power input(W)\n",
      "#Case(e)\n",
      "SCL = abs(I_p)**2 *R_a                           #Stator Copper Loss(W)\n",
      "#Case(f)\n",
      "RPI = SPI-SCL                                    #Rotor power input(W) Method 1\n",
      "RPI_2 = abs(I_r)**2*(R_r/s)                      #Rotor power input(W) Method 2\n",
      "#Case(g)\n",
      "RPD = RPI*(1-s)                                  #Rotor power developed(W) Method 1\n",
      "RCL = s*RPI                                      #Rotor copper losses(W)\n",
      "RPD_2 = RPI-RCL                                  #Rotor power developed(W) Method 2\n",
      "RPD_3 = abs(I_r)**2*R_r*(1-s)/s                  #Rotor power developed(W) Method 3\n",
      "#Case(h)\n",
      "P_r = P_r_total/3                                #Rotational losses per phase(W)\n",
      "P_o = RPD-P_r                                    #Rotor power per phase(W)\n",
      "P_to = 3.0*P_o                                   #Total rotor power at the motor pulley(W)\n",
      "#Case(i)\n",
      "T = 7.04*(P_to/S_r)                              #Total 3-phase torque(lb-ft)\n",
      "#Case(j)\n",
      "P_t = P_to \n",
      "hp = P_t/746.0                                   #Output horsepower(hp)\n",
      "#Case(k)\n",
      "P_in = SPI                                       #Input power to stator(W)\n",
      "n = P_o/P_in*100                                 #Motor efficiency at rated load(%)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Stator armature current , I_p = %.2f\u2220%.2f\u00b0 A  (lagging)' %(abs(I_p),cmath.phase(I_p)*180/math.pi))\n",
      "print('Case(b): Rotor current per phase , I_r = %.3f\u2220%.2f\u00b0 A  (lagging)' %(abs(I_r),cmath.phase(I_r)*180/math.pi))\n",
      "print('Case(c): Motor power factor , cos \u04e8_1 = %.4f' %cos_theta1)\n",
      "print('Case(d): Stator power input , SPI = %d W' %SPI)\n",
      "print('Case(e): Stator copper loss , SCL = %d W' %SCL)\n",
      "print('Case(f): Rotor power input , RPI = %d W (Method 1)' %RPI)\n",
      "print('         Rotor power input , RPI = %d W (Method 2)' %RPI_2)\n",
      "print('Case(g): Rotor power developed , RPD = %d W (Method 1)' %RPD)\n",
      "print('         Rotor power developed , RPD = %d W (Method 2)' %RPD_2)\n",
      "print('         Rotor power developed , RPD = %d W (Method 3)' %RPD_3)\n",
      "print('Case(h): Total rotor power at the motor pulley , P_to = %d W' %P_to)\n",
      "print('Case(i): Total three-phase output torque , T = %d lb-ft' %T)\n",
      "print('Case(j): Output horsepower , hp = %.1f hp' %hp)\n",
      "print('Case(k): Motor efficiency at rated load , \u03b7 = %.1f percent' %n)\n",
      "print('\\nNOTE: Changes in obtained answer from that of textbook is due to more precision i.e more number of decimal places')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Stator armature current , I_p = 25.90\u2220-22.44\u00b0 A  (lagging)\n",
        "Case(b): Rotor current per phase , I_r = 24.374\u2220-6.51\u00b0 A  (lagging)\n",
        "Case(c): Motor power factor , cos \u04e8_1 = 0.9243\n",
        "Case(d): Stator power input , SPI = 3040 W\n",
        "Case(e): Stator copper loss , SCL = 268 W\n",
        "Case(f): Rotor power input , RPI = 2772 W (Method 1)\n",
        "         Rotor power input , RPI = 2772 W (Method 2)\n",
        "Case(g): Rotor power developed , RPD = 2689 W (Method 1)\n",
        "         Rotor power developed , RPD = 2689 W (Method 2)\n",
        "         Rotor power developed , RPD = 2689 W (Method 3)\n",
        "Case(h): Total rotor power at the motor pulley , P_to = 7707 W\n",
        "Case(i): Total three-phase output torque , T = 31 lb-ft\n",
        "Case(j): Output horsepower , hp = 10.3 hp\n",
        "Case(k): Motor efficiency at rated load , \u03b7 = 84.5 percent\n",
        "\n",
        "NOTE: Changes in obtained answer from that of textbook is due to more precision i.e more number of decimal places\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.16, Page number 313"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V = 208.0      #Rated voltage(V)\n",
      "P_o = 15.0     #Rated power(hp)\n",
      "I = 42.0       #Rated current(A)\n",
      "I_st = 252.0   #Starting current(A)\n",
      "T_st = 120.0   #Full-voltage starting torque(lb-ft)\n",
      "tap = 0.6      #Tapping employed by compensator\n",
      "\n",
      "#Calculation\n",
      "I_sm = tap*I_st                 #Motor starting current at reduced voltage(A) \n",
      "I_L = tap*I_sm                  #Motor line current(A)\n",
      "T_s = tap**2*T_st               #Motor starting torque at reduced voltage(lb-ft)\n",
      "percent_I_L = I_L/I_st*100      #Percent line current at starting\n",
      "percent_T_st = T_s/T_st*100     #Percent motor starting torque\n",
      "\n",
      "#Result\n",
      "print('Case(a): Motor starting current at reduced voltage , I_sm = %.1f A to the motor' %I_sm)\n",
      "print('Case(b): Motor line current neglecting tarnsformer exciting current and losses , I_L = %.2f A drawn from the mains' %I_L)\n",
      "print('Case(c): Motor starting torque at reduced voltage , T_s = %.1f lb-ft' %T_s)\n",
      "print('Case(d): Percent line current at starting = %.f percent of line current at full voltage' %percent_I_L)\n",
      "print('Case(e): Percent motor starting torque = %.f percent of starting torque at full voltage' %percent_T_st)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Motor starting current at reduced voltage , I_sm = 151.2 A to the motor\n",
        "Case(b): Motor line current neglecting tarnsformer exciting current and losses , I_L = 90.72 A drawn from the mains\n",
        "Case(c): Motor starting torque at reduced voltage , T_s = 43.2 lb-ft\n",
        "Case(d): Percent line current at starting = 36 percent of line current at full voltage\n",
        "Case(e): Percent motor starting torque = 36 percent of starting torque at full voltage\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.17, Page number 324"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_o = 220.0      #Rated voltage(V)\n",
      "P = 4.0          #Number of poles in SCIM\n",
      "P_o = 10.0       #Rated power(hp)\n",
      "T_o = 30.0       #Rated torque(lb-ft)\n",
      "S_r = 1710.0     #Rated rotor speed(rpm)\n",
      "V_n1 = 242.0     #Impressed stator voltage(V) Case(a)\n",
      "V_n2 = 198.0     #Impressed stator voltage(V) Case(b)\n",
      "f = 60.0         #Frequency(Hz) assumption\n",
      "\n",
      "#Calculation\n",
      "S = (120*f)/P               #Speed of the rotating magnetic field(rpm)\n",
      "s_o = (S-S_r)/S             #Rated slip\n",
      "#Case(a)\n",
      "T_n1 = T_o*(V_n1/V_o)**2    #New torque(lb-ft)\n",
      "s_n1 = s_o*(T_o/T_n1)       #New slip\n",
      "S_rn1 = S*(1-s_n1)          #New speed(rpm)\n",
      "#Case(b)\n",
      "T_n2 = T_o*(V_n2/V_o)**2    #New torque(lb-ft)\n",
      "s_n2 = s_o*(T_o/T_n2)       #New slip\n",
      "S_rn2 = S*(1-s_n2)          #New speed(rpm)\n",
      "#Case(c)\n",
      "percent_slip_a = (s_o-s_n1)/s_o*100    #Percent change in slip in part(a)\n",
      "percent_speed_a = (S_rn1-S_r)/S_r*100  #Percent change in speed in part(a)\n",
      "#Case(d)\n",
      "percent_slip_b = (s_n2-s_o)/s_o*100    #Percent change in slip in part(b)\n",
      "percent_speed_b = (S_r-S_rn2)/S_r*100  #Percent change in speed in part(b)\n",
      "\n",
      "#Result\n",
      "print('Case(a): New torque at an impressed stator voltage of 242 V , T_n = %.1f lb-ft' %T_n1)\n",
      "print('         New slip , s_n = %.4f ' %s_n1)\n",
      "print('         New speed , S_rn = %.f rpm' %S_rn1)\n",
      "print('Case(b): New torque at an impressed stator voltage of 198 V , T_n = %.1f lb-ft' %T_n2)\n",
      "print('         New slip , s_n = %.4f ' %s_n2)\n",
      "print('         New speed , S_rn = %.f rpm' %S_rn2)\n",
      "print('Case(c): Percentage change in slip due to voltage change in part a = %.1f percent decrease' %percent_slip_a)\n",
      "print('         Percentage change in speed = %.2f percent increase' %percent_speed_a)\n",
      "print('Case(d): Percentage change in slip due to voltage change in part b = %.1f percent increase' %percent_slip_b)\n",
      "print('         Percentage change in speed = %.2f percent decrease' %percent_speed_b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): New torque at an impressed stator voltage of 242 V , T_n = 36.3 lb-ft\n",
        "         New slip , s_n = 0.0413 \n",
        "         New speed , S_rn = 1726 rpm\n",
        "Case(b): New torque at an impressed stator voltage of 198 V , T_n = 24.3 lb-ft\n",
        "         New slip , s_n = 0.0617 \n",
        "         New speed , S_rn = 1689 rpm\n",
        "Case(c): Percentage change in slip due to voltage change in part a = 17.4 percent decrease\n",
        "         Percentage change in speed = 0.91 percent increase\n",
        "Case(d): Percentage change in slip due to voltage change in part b = 23.5 percent increase\n",
        "         Percentage change in speed = 1.23 percent decrease\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.18, Page number 324"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_o = 220.0      #Rated voltage(V)\n",
      "P = 4.0          #Number of poles in SCIM\n",
      "P_o = 10.0       #Rated power(hp)\n",
      "R_ro = 0.3       #Rotor resistance(ohm)\n",
      "R_re = 1.7       #External rotor resistance(ohm)\n",
      "T_o = 30.0       #Rated torque(lb-ft)\n",
      "S_r = 1750.0     #Rated rotor speed(rpm)\n",
      "V_n1 = 240.0     #Impressed stator voltage(V) Case(a)\n",
      "V_n2 = 208.0     #Impressed stator voltage(V) Case(b)\n",
      "V_n3 = 110.0     #Impressed stator voltage(V) Case(c)\n",
      "f = 60.0         #Frequency(Hz) assumption\n",
      "\n",
      "#Calculation\n",
      "S = (120*f)/P                      #Speed of the rotating magnetic field(rpm)\n",
      "s_o = (S-S_r)/S                    #Rated slip\n",
      "R_rn = R_ro+R_re                   #Resistance(ohm)\n",
      "#Case(a)\n",
      "T_n1 = T_o*(V_n1/V_o)**2           #New torque(lb-ft)\n",
      "s_n1 = s_o*(T_o/T_n1)*(R_rn/R_ro)  #New slip\n",
      "S_rn1 = S*(1-s_n1)                 #New speed(rpm)\n",
      "#Case(b)\n",
      "T_n2 = T_o*(V_n2/V_o)**2           #New torque(lb-ft)\n",
      "s_n2 = s_o*(T_o/T_n2)*(R_rn/R_ro)  #New slip\n",
      "S_rn2 = S*(1-s_n2)                 #New speed(rpm)\n",
      "#Case(c)\n",
      "T_n3 = T_o*(V_n3/V_o)**2           #New torque(lb-ft)\n",
      "s_n3 = s_o*(T_o/T_n3)*(R_rn/R_ro)  #New slip\n",
      "S_rn3 = S*(1-s_n3)                 #New speed(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): New torque at an impressed stator voltage of 240 V , T_n = %.1f lb-ft' %T_n1)\n",
      "print('         New slip , s_n = %.4f ' %s_n1)\n",
      "print('         New speed , S_rn = %.f rpm' %S_rn1)\n",
      "print('Case(b): New torque at an impressed stator voltage of 208 V , T_n = %.2f lb-ft' %T_n2)\n",
      "print('         New slip , s_n = %.3f ' %s_n2)\n",
      "print('         New speed , S_rn = %.f rpm' %S_rn2)\n",
      "print('Case(c): New torque at an impressed stator voltage of 110 V , T_n = %.1f lb-ft' %T_n3)\n",
      "print('         New slip , s_n = %.3f ' %s_n3)\n",
      "print('         New speed , S_rn = %.f rpm' %S_rn3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): New torque at an impressed stator voltage of 240 V , T_n = 35.7 lb-ft\n",
        "         New slip , s_n = 0.1556 \n",
        "         New speed , S_rn = 1520 rpm\n",
        "Case(b): New torque at an impressed stator voltage of 208 V , T_n = 26.82 lb-ft\n",
        "         New slip , s_n = 0.207 \n",
        "         New speed , S_rn = 1427 rpm\n",
        "Case(c): New torque at an impressed stator voltage of 110 V , T_n = 7.5 lb-ft\n",
        "         New slip , s_n = 0.741 \n",
        "         New speed , S_rn = 467 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.19, Page number 327"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 8.0            #Number of poles in WRIM\n",
      "f = 60.0           #Operating frequency of the WRIM(Hz)\n",
      "S_con_a1 = 1800.0  #Speed of the convertor(rpm)\n",
      "S_con_a2 = 450.0   #Speed of the convertor(rpm)\n",
      "f_con_b1 = 25.0    #Frequency of an induction converter(Hz)\n",
      "f_con_b2 = 400.0   #Frequency of an induction converter(Hz)\n",
      "f_con_b3 = 120.0   #Frequency of an induction converter(Hz)\n",
      "\n",
      "#Calculation\n",
      "S = (120*f)/P                  #Speed of the rotating magnetic field(rpm)\n",
      "#Case(a)\n",
      "f_con_a1 = f*(1+S_con_a1/S)    #Frequency of an induction converter(Hz)\n",
      "f_con_a2 = f*(1-S_con_a2/S)    #Frequency of an induction converter(Hz)\n",
      "#Case(b)\n",
      "S_con_b1 = (-1+f_con_b1/f)*S   #Speed of the converter(rpm)\n",
      "S_con_b2 = (-1+f_con_b2/f)*S   #Speed of the converter(rpm)\n",
      "S_con_b3 = (-1+f_con_b3/f)*S   #Speed of the converter(rpm)\n",
      "\n",
      "#Result\n",
      "print('Case(a): Frequency , f_con = %.f Hz for %d rpm in opposite direction' %(f_con_a1,S_con_a1))\n",
      "print('         Frequency , f_con = %.f Hz for %d rpm in same direction' %(f_con_a2,S_con_a2))\n",
      "print('Case(b)1: Speed and direction to obtain 25 Hz , S_con = %.f rpm, or %.f rpm in same direction' %(S_con_b1,abs(S_con_b1)))\n",
      "print('       2: Speed and direction to obtain 400 Hz , S_con = %.f rpm in opposite direction' %S_con_b2)\n",
      "print('       3: Speed and direction to obtain 120 Hz , S_con = %.f rpm in opposite direction to rotating stator flux' %S_con_b3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a): Frequency , f_con = 180 Hz for 1800 rpm in opposite direction\n",
        "         Frequency , f_con = 30 Hz for 450 rpm in same direction\n",
        "Case(b)1: Speed and direction to obtain 25 Hz , S_con = -525 rpm, or 525 rpm in same direction\n",
        "       2: Speed and direction to obtain 400 Hz , S_con = 5100 rpm in opposite direction\n",
        "       3: Speed and direction to obtain 120 Hz , S_con = 900 rpm in opposite direction to rotating stator flux\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}