{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 20 : Load Frequency Control"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 20.1, Page No 676"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "#let x MW flows from A to B\n",
      "#Load on station A=75+x\n",
      "#%drop in speed =5*(75+x)/200\n",
      "#load on station B =(30-x)\n",
      "#%drp in speed=(30-x)*4/75\n",
      "x=(1.6-1.875)/(.025+.12+.0533) #by manipulating equation : 5*(75+x)/200 + 3*x/25 =(30-x)*4/75 \n",
      "\n",
      "#Results\n",
      "print(\"x=%.2f MW\\n\" %x)\n",
      "print(\"which means power of magnitude %.2f MW will be from B to A\" %abs(x))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "x=-1.39 MW\n",
        "\n",
        "which means power of magnitude 1.39 MW will be from B to A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 20.2, Page No 676"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "x=(250*11.0)/(21.0+11)\t\t# by manipulating equation : 5x/110=5x(250-x)/210\n",
      "P=250-x\t\t\t\t\t\t#Power shared by 210 MW unit \n",
      "\n",
      "#Results\n",
      "print(\"Power supplied by 210 MW unit = %.2f MW \\n\" %P)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power supplied by 210 MW unit = 164.06 MW \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 20.3, Page No 677"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "E=4.5*100\t\t#Energy stored at no load(MJ)\n",
      "E1=25*.6\t\t#Energy lost by rotor(MJ)\n",
      "\n",
      "#Calculations\n",
      "fnew=math.sqrt((E-E1)/E)*50\n",
      "\n",
      "#Results\n",
      "print(\"New frequency will be %.2f Hz\" %fnew)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "New frequency will be 49.16 Hz\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}