{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 6: CONTROL AND STARTING OF A DC MOTOR"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.1, Page number 212"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_t = 220.0      #Supply voltage(V)\n",
      "I_a1 = 10.0      #Armature current(A)\n",
      "N_1 = 900.0      #Speed(rpm)\n",
      "R_a = 1.0        #Armature resistance(ohm)\n",
      "N_2 = 500.0      #Reduced speed(rpm)\n",
      "\n",
      "#Calculation\n",
      "E_b1 = V_t-I_a1*R_a           #Initial back emf(V)\n",
      "R = E_b1/I_a1*(1-(N_2/N_1))   #Value of additional resistance(ohm)\n",
      "\n",
      "#Result\n",
      "print('Value of additional resistance , R = %.1f ohm' %R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Value of additional resistance , R = 9.3 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.2, Page number 212-213"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_t = 230.0    #Supply voltage(V)\n",
      "I_a1 = 15.0    #Armature current(A)\n",
      "N_1 = 650.0    #Speed(rpm)\n",
      "R_a = 0.4      #Armature resistance(ohm)\n",
      "R = 1.0        #Variable resistance in series with the armature(ohm)\n",
      "\n",
      "#Calculation \n",
      "E_b1 = V_t-I_a1*R_a          #Initial back emf(V)\n",
      "#At full load torque\n",
      "E_b2 = V_t-I_a1*(R+R_a)      #Final back emf(V)\n",
      "N_2 = N_1*(E_b2/E_b1)        #Speed at full load torque(rpm)\n",
      "\n",
      "#At half load torque\n",
      "I_a2hl = I_a1/2              #Armature current(A)\n",
      "E_b2hl = V_t-I_a2hl*(R+R_a)  #Back emf(V)\n",
      "N_2hl = N_1*(E_b2hl/E_b1)    #Speed at half load torque(rpm)\n",
      "\n",
      "#Result\n",
      "print('Speed at full load torque , N_2 = %.1f rpm' %N_2)\n",
      "print('Speed at half load torque , N_2 = %.1f rpm' %N_2hl)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed at full load torque , N_2 = 606.5 rpm\n",
        "Speed at half load torque , N_2 = 636.9 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3, Page number 215-216"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_t = 230.0          #Supply voltage(V)\n",
      "R_af = 0.2           #Total resistance of armature & field(ohm)\n",
      "I_a1 = 10.0          #Armature current for certain load(A)\n",
      "N = 1000.0           #Motor speed for certain load(rpm)\n",
      "R_1 = 0              #Variable resistance for certain load(ohm)\n",
      "I_a2 = 8.0           #Armature current for other load(A)\n",
      "R_2 = 2.0            #Variable resistance for other load(ohm)\n",
      "phi_1 = 1.0          #Assuming flux in certain load(Wb)\n",
      "phi_2 = 0.8*phi_1    #Flux in other load(Wb)\n",
      "\n",
      "#Calculation\n",
      "#For certain load\n",
      "R_a1 = R_af+R_1                     #New armature resistance(ohm)\n",
      "E_b1 = V_t-I_a1*R_a1                #Back emf(V)\n",
      "#For other load\n",
      "R_a2 = R_af+R_2                     #New armature resistance(ohm)\n",
      "E_b2 = V_t-I_a2*R_a2                #Back emf(V)\n",
      "N_2 = (E_b2/E_b1)*(phi_1/phi_2)*N   #New speed(rpm) \n",
      "\n",
      "#Result\n",
      "print('New speed , N_2 = %.1f rpm' %N_2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "New speed , N_2 = 1164.5 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4, Page number 216-218"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "N = 1100.0           #Speed of dc series motor(rpm)\n",
      "P = 4.0              #Number of poles\n",
      "path = 4.0           #Number of parallel paths\n",
      "I_a1 = 15.0          #Supply current to dc series motor(A)\n",
      "V_t = 220.0          #Supply voltage(V)\n",
      "R_a = 0.9            #Series armature resistance(ohm)\n",
      "R_se = 0.6           #Series field resistance(ohm)\n",
      "I_a2 = 25            #Supply current to dc series motor(A)\n",
      "phi_1 = 1.0          #Assuming flux for 15 A case(Wb)\n",
      "phi_2 = 0.8*phi_1    #Flux in 25 A case(Wb)\n",
      "\n",
      "#Calculation\n",
      "#First case\n",
      "R_se1 = R_se                         #Total series field resistance(ohm)\n",
      "E_b1 = V_t-I_a1*(R_a+R_se1)          #Back emf(V)\n",
      "#Second case\n",
      "R_se2 = R_se1/path                   #Total series field resistance(ohm)\n",
      "E_b2 = V_t-I_a2*(R_a+R_se2)          #Back emf(V)\n",
      "N_2 = (E_b2/E_b1)*(phi_1/phi_2)*N    #New speed(rpm) \n",
      "\n",
      "#Result\n",
      "print('Speed for second case , N_2 = %.1f rpm = %.f rpm' %(N_2,N_2))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed for second case , N_2 = 1348.9 rpm = 1349 rpm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.5, Page number 233-234"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_t = 230.0         #Shunt motor supply voltage(V)\n",
      "R_a = 0.4           #Armature resistance(ohm)\n",
      "I_a = 30.0          #Armature current(A)\n",
      "n = 3.0             #Number of steps\n",
      "\n",
      "#Calculation\n",
      "R_1 = V_t/I_a              #Maximum resistance(ohm)\n",
      "k = (R_1/R_a)**(1.0/3)     #Constant\n",
      "R_2 = R_1/k                #Resistance(ohm)\n",
      "R_3 = R_2/k                #Resistance(ohm)\n",
      "R_4 = R_3/k                #Resistance(ohm)\n",
      "R_1step = R_1-R_2          #Resistance of the first step(ohm)\n",
      "R_2step = R_2-R_3          #Resistance of the second step(ohm)\n",
      "R_3step = R_3-R_4          #Resistance of the third step(ohm)\n",
      "\n",
      "#Result\n",
      "print('Resistance of the first step , R_1step = %.1f ohm' %R_1step)\n",
      "print('Resistance of the second step , R_2step = %.1f ohm' %R_2step)\n",
      "print('Resistance of the third step , R_3step = %.2f ohm' %R_3step)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance of the first step , R_1step = 4.8 ohm\n",
        "Resistance of the second step , R_2step = 1.8 ohm\n",
        "Resistance of the third step , R_3step = 0.67 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6, Page number 234-236"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V_t = 220.0      #Shunt motor supply voltage(V)\n",
      "P_0 = 3550.0     #Output power(W) \n",
      "n = 0.85         #Efficiency\n",
      "\n",
      "#Calculation\n",
      "P_in = P_0/n             #Input power(W)\n",
      "P_tloss = P_in-P_0       #Total loss(W)\n",
      "I_a = P_in/V_t           #Armature current(A)\n",
      "P_cu = P_tloss/2         #Copper loss(W)\n",
      "R_a = P_cu/I_a**2        #Armature resistance(ohm)\n",
      "I_1 = 2*I_a              #Maximum starting current(A)\n",
      "R_1 = V_t/I_1            #Maximum resistance(ohm)\n",
      "k = (R_1/R_a)**(1.0/4)   #Constant\n",
      "R_2 = R_1/k              #Resistance(ohm)\n",
      "R_3 = R_2/k              #Resistance(ohm)\n",
      "R_4 = R_3/k              #Resistance(ohm)\n",
      "R_5 = R_4/k              #Resistance(ohm)\n",
      "R_1step = R_1-R_2        #Resistance of the first step(ohm)\n",
      "R_2step = R_2-R_3        #Resistance of the second step(ohm)\n",
      "R_3step = R_3-R_4        #Resistance of the third step(ohm)\n",
      "R_4step = R_4-R_5        #Resistance of the fourth step(ohm)\n",
      "\n",
      "#Result\n",
      "print('Resistance of the first step , R_1step = %.1f ohm' %R_1step)\n",
      "print('Resistance of the second step , R_2step = %.2f ohm' %R_2step)\n",
      "print('Resistance of the third step , R_3step = %.2f ohm' %R_3step)\n",
      "print('Resistance of the fourth step , R_4step = %.2f ohm' %R_4step)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance of the first step , R_1step = 2.2 ohm\n",
        "Resistance of the second step , R_2step = 1.36 ohm\n",
        "Resistance of the third step , R_3step = 0.85 ohm\n",
        "Resistance of the fourth step , R_4step = 0.53 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}