summaryrefslogtreecommitdiff
path: root/Electrical_Power_System_by_C.L._Wadhwa/Chapter24.ipynb
blob: 07826bb50fa0126e5e94ebfa55b7d573f17c677d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 24 : Unit Commitment"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 24.3, Page No 803"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Fc1=1.1\t\t\t#Fuel cost(1)=Rs 1.1/MBtu\n",
      "Fc2=1\t\t\t#Fuel cost(2)=1/MBtu\n",
      "Fc3=1.2\t\t\t#Fuel cost(3)=1.2/MBtu\n",
      "P1max=600.0\n",
      "P1=P1max\n",
      "\n",
      "#Calculations\n",
      "F1=600+7.1*P1+0.00141*(P1**2)\t#For P1= Pm1ax\n",
      "Favg1=F1*Fc1/600.0\t\t\t\t#Full load average production cost\n",
      "P2max=450.0\n",
      "P2=P2max\n",
      "F2=350+7.8*P2+0.00195*(P2**2)\t#For P2= P2max\n",
      "Favg2=F2*Fc2/450.0\t\t\t\t#Full load average production cost\n",
      "P3max=250.0\n",
      "P3=P3max\n",
      "F3=80+8*P3+0.0049*(P3**2)\t\t#For P3= P3max\n",
      "Favg3=F3*Fc3/250.0\t\t\t\t#Full load average production cost\n",
      "\n",
      "#Results\n",
      "print(\"Priority List is as follows\")\n",
      "print(\"Unit       Rs/MWhr     MinMW        Max MW\")\n",
      "print(\" 2           %.3f       100           %.0f \" %(Favg2,P2max))\n",
      "print(\" 1           %.4f       60            %.0f \" %(Favg1,P1max))\n",
      "print(\" 3           %.2f        50           %.0f \" %(Favg3,P3max))\n",
      "Fmax1=P1max+P2max+P3max\n",
      "Fmax2=P2max+P1max\n",
      "Fmax3=P2max\n",
      "print(\"Unit Commitment Scheme is follows\")\n",
      "print(\"Combination        Min.MW from Combination         Max.MW from Combination\")\n",
      "print(\"2+1+3                 310                              %.0f   \" %Fmax1)\n",
      "print(\"2+1                   260                              %.0f   \" %Fmax2)\n",
      "print(\"2                     100                              %.0f   \" %Fmax3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Priority List is as follows\n",
        "Unit       Rs/MWhr     MinMW        Max MW\n",
        " 2           9.455       100           450 \n",
        " 1           9.8406       60            600 \n",
        " 3           11.45        50           250 \n",
        "Unit Commitment Scheme is follows\n",
        "Combination        Min.MW from Combination         Max.MW from Combination\n",
        "2+1+3                 310                              1300   \n",
        "2+1                   260                              1050   \n",
        "2                     100                              450   \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 24.4, Page No 805"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "#Calculations\n",
      "\n",
      "def F1(P1):\n",
      "    F1=7.1*P1+.00141*(P1^2)\n",
      "    print(\"F1(%.0f)=%.1f\" %(P1,F1))\n",
      "\n",
      "def F2(P2):\n",
      "    f2=7.8*P2+.00195*(P2^2)\n",
      "    print(\"f2(%.0f)=%.0f\" %(P2,f2))\n",
      "\n",
      "def F(P1,P2):\n",
      "    F1=7.1*P1+.00141*(P1**2)\n",
      "    F2=7.8*P2+.00195*(P2**2)\n",
      "    F=F1+F2\n",
      "    print(\"F1(%.0f)+f2(%.0f)=%.0f\" %(P1,P2,F))\n",
      "\n",
      "\n",
      "    \n",
      "#Results\n",
      "P1max=600\n",
      "P2max=450\n",
      "print(\"Unit Commitment using Load 500MW\")\n",
      "F1(500)\n",
      "print(\"\\n Since min. Power of second unit is 100MW , we find\")\n",
      "F(400,100)\n",
      "F(380,120)\n",
      "F(360,140)\n",
      "print(\"\\n Therefore for load 500 MW , the load commitment on unit 1 is 400 MW and that on 2 is 100 MW which gives min. cost\")\n",
      "print(\"Next we increase the load by 50 MW and  loading unit 1 we get, \\n\")\n",
      "F1(550)\n",
      "print(\"Also if we distribute a part of load to unit 2 we get ,\")\n",
      "F(450,100)\n",
      "F(400,150)\n",
      "F(350,200)\n",
      "print(\"\\n Therefore for load 550 MW , the load commitment on unit 1 is 400 MW and that on 2 is 150 MW which gives min. cost\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Unit Commitment using Load 500MW\n",
        "F1(500)=3550.7\n",
        "\n",
        " Since min. Power of second unit is 100MW , we find\n",
        "F1(400)+f2(100)=3865\n",
        "F1(380)+f2(120)=3866\n",
        "F1(360)+f2(140)=3869\n",
        "\n",
        " Therefore for load 500 MW , the load commitment on unit 1 is 400 MW and that on 2 is 100 MW which gives min. cost\n",
        "Next we increase the load by 50 MW and  loading unit 1 we get, \n",
        "\n",
        "F1(550)=3905.8\n",
        "Also if we distribute a part of load to unit 2 we get ,\n",
        "F1(450)+f2(100)=4280\n",
        "F1(400)+f2(150)=4279\n",
        "F1(350)+f2(200)=4296\n",
        "\n",
        " Therefore for load 550 MW , the load commitment on unit 1 is 400 MW and that on 2 is 150 MW which gives min. cost\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}