{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 10: SYNCHRONOUS MOTOR"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1, Page number 335"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V = 2.5*10**3          #Supply voltage(V)\n",
      "R_r = 0.12             #Per phase resistance(ohm)\n",
      "X_r = 3.2              #Syncronous reactance(ohm)\n",
      "I_a = 185.0            #Line current(A)\n",
      "pf = 0.8               #Leading power factor\n",
      "\n",
      "#Calculation\n",
      "phi = math.acos(pf)                                                #Angle(radians)\n",
      "phi_deg = phi*180/math.pi                                          #Angle(degree)\n",
      "V_t = V/3**0.5                                                     #Terminal voltage per phase(V)\n",
      "Z_s = complex(R_r,X_r)                                             #Impedance per phase(ohm)\n",
      "beta = math.atan(X_r/R_r)                                          #Angle(radians)\n",
      "beta_deg = beta*180/math.pi                                        #Angle(degree)\n",
      "E_r = I_a*abs(Z_s)                                                 #Resultant voltage due to impedance(V)\n",
      "E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(beta+phi))**0.5            #Excitation voltage per phase(V)\n",
      "\n",
      "#Result\n",
      "print('Excitation voltage per phase , E = %.2f V' %E_f)\n",
      "print('\\nNOTE : Changes in answer is due to precision i.e more number of decimal places')\n",
      "print(' ERROR : Line current I_a = 185 A not 180 A as given in textbook question')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Excitation voltage per phase , E = 1846.18 V\n",
        "\n",
        "NOTE : Changes in answer is due to precision i.e more number of decimal places\n",
        " ERROR : Line current I_a = 185 A not 180 A as given in textbook question\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2, Page number 335-337"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "kVA = 1200.0        #kVA ratings\n",
      "V = 14.0*10**3      #Supply voltage(V)\n",
      "R_r = 4.8           #Per phase resistance(ohm)\n",
      "X_r = 35.0          #Syncronous reactance(ohm)\n",
      "pf = 0.95           #Leading power factor\n",
      "\n",
      "#Calculation\n",
      "phi = math.acos(pf)                                  #Angle(radians)\n",
      "phi_deg = phi*180/math.pi                            #Angle(degree)\n",
      "Z_s = complex(R_r,X_r)                               #Impedance per phase(ohm)\n",
      "I_a = kVA*10**3/(3**0.5*V)                           #Armature current(A)\n",
      "E_r = I_a*abs(Z_s)                                   #Resultant voltage due to impedance(V)\n",
      "V_t = V/3**0.5                                       #Terminal voltage per phase(V)\n",
      "b = math.atan(X_r/R_r)                               #Beta value(radians)\n",
      "b_deg = b*180/math.pi                                #Beta value(degree)\n",
      "E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(b-phi))**0.5 #Excitation voltage per phase(V)\n",
      "sin_delta = (E_r/E_f)*math.sin(b-phi)\n",
      "delta = math.asin(sin_delta)*180/math.pi             #Torque angle(degree)\n",
      "\n",
      "#Result\n",
      "print('Excitation voltage per phase , E_f = %.2f V' %E_f)\n",
      "print('Torque angle , \u03b4 = %.2f\u00b0' %delta)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Excitation voltage per phase , E_f = 7483.23 V\n",
        "Torque angle , \u03b4 = 12.12\u00b0\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3, Page number 343-344"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V = 440.0          #Supply voltage(V)\n",
      "R_a = 1.5          #Per phase armature resistance(ohm)\n",
      "X_a = 8.0          #Synchronous reactance(ohm)\n",
      "P = 4.0            #Number of poles\n",
      "f = 50.0           #Supply frequency(Hz)\n",
      "pf = 0.9           #Leading power factor\n",
      "I_a = 50.0         #Armature current(A)\n",
      "\n",
      "#Calculation\n",
      "V_t = V/3**0.5                                            #Terminal voltage per phase(V)\n",
      "phi = math.acos(pf)                                       #Angle(radians)\n",
      "phi_deg = phi*180/math.pi                                 #Angle(degree)\n",
      "Z_s = complex(R_a,X_a)                                    #Impedance per phase(ohm)\n",
      "E_r = I_a*abs(Z_s)                                        #Resultant voltage due to impedance(V)\n",
      "beta = math.atan(X_a/R_a)                                 #Beta value(radians)\n",
      "beta_deg = beta*180/math.pi                               #Beta value(degree)\n",
      "E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(beta+phi))**0.5   #Excitation voltage per phase(V)\n",
      "P_dm = (((E_f*V_t)/abs(Z_s))-((E_f**2*R_a)/abs(Z_s)**2))  #Maximum power per phase(W)\n",
      "\n",
      "#Result  \n",
      "print('Maximum power per phase , P_dm = %.1f W' %P_dm)\n",
      "print('\\nNOTE : ERROR : In textbook solution E_f = 513.5 V is taken instead of 533.337089826 V')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum power per phase , P_dm = 10205.3 W\n",
        "\n",
        "NOTE : ERROR : In textbook solution E_f = 513.5 V is taken instead of 533.337089826 V\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4, Page number 344"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "P = 4.0        #Number of poles\n",
      "f = 50.0       #Supply frequency(Hz)\n",
      "V_t = 1500.0   #Terminal voltage per phase(V)\n",
      "E_f = 1000.0   #Excitation voltage per phase(V)\n",
      "Z_s = 12.0     #Synchronous impedance per phase(ohm)\n",
      "R_a = 1.5      #Armature resistance(ohm)\n",
      "\n",
      "#Caclulation\n",
      "P_dm = ((E_f*V_t/Z_s)-(E_f**2*R_a/Z_s**2))  #Maximum power(W)\n",
      "N_s = 120*f/P                               #Synchronous speed(rpm)\n",
      "T_dm = 9.55*P_dm/N_s                        #Maximum torque(N-m)\n",
      "\n",
      "#Result \n",
      "print('Maximum power developed , P_dm = %.f W' %P_dm)\n",
      "print('Maximum toruqe , T_dm = %.1f N-m' %T_dm)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum power developed , P_dm = 114583 W\n",
        "Maximum toruqe , T_dm = 729.5 N-m\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}