summaryrefslogtreecommitdiff
path: root/Electrical_Power_Systems_by_C_L_Wadhwa/19-ECONOMIC_LOAD_DISPATCH.ipynb
blob: 518571f166cb0aac02c147ae4ebc90d30fe38b4d (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
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 19: ECONOMIC LOAD DISPATCH"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 19.1: EX19_1.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// To Determine the economic operating schedule and the corresponding cost of generation.(b)Determine the savings obtained by loading the units.\n",
"clear \n",
"clc;\n",
"//dF1/dP1=.4*P1+40 per MWhr\n",
"//dF2/dP2=.5*P1+30 per MWhr\n",
"mprintf('two equations are :\n');\n",
"mprintf('%.1f P1 %.1f P2 = %.1f\n',.4,-.5,-10);\n",
"mprintf('%.1f P1+ %.1fP2 = %.1f\n',1,1,180);\n",
"A=[.4 -.5;1 1];\n",
"B=[-10;180];\n",
"P=(inv(A))*B;\n",
"P1=P(1,1);\n",
"P2=P(2,1);\n",
"F1=.2*(P1)^2 +40*P1+120;\n",
"F2=.25*(P2)^2+30*P2+150;\n",
"Total=F1+F2;//Total cost\n",
"mprintf('(a)Cost of Generation=Rs %.2f /hr\n',Total);\n",
"P1=90;\n",
"P2=90;\n",
"F1=.2*(P1)^2 +40*P1+120;\n",
"F2=.25*(P2)^2+30*P2+150;\n",
"Total2=F1+F2;//Total cost\n",
"savings=Total2-Total\n",
"mprintf('(b)Savings=Rs %.2f /hr\n',savings)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 19.2: Determine_the_incremental_cost_of_recieved_power_and_penalty_factor_of_the_plant.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Determine the incremental cost of recieved power and penalty factor of the plant\n",
"clear \n",
"clc;\n",
"pf=10/8;//penalty factor\n",
"cost=(.1*10+3)*pf;//Cost of recieved power=dF1/dP1\n",
"mprintf('Penalty Factor=%.1f\n',pf);\n",
"mprintf('Cost of recieved Power=Rs %.1f /MWhr',cost);"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 19.4: Determine_the_minimum_cost_of_generation.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Determine the minimum cost of generation .\n",
"clear \n",
"clc;\n",
"//dF1/dP1=.048*P1+8\n",
"//dF2/dP2=.08*P1+6\n",
"mprintf('two equations are :\n');\n",
"mprintf('%.3f P1 %.2f P2 = %.1f\n',.048,-.08,-2);\n",
"mprintf('%.1f P1+ %.1fP2 = %.1f\n',1,1,50);\n",
"A=[.048 -.08;1 1];\n",
"B=[-2;50];\n",
"P=(inv(A))*B;\n",
"P1=P(1,1);\n",
"P2=P(2,1);\n",
"F1=(.024*(P1)^2 +8*P1+80)*(10^6);\n",
"F2=(.04*(P2)^2+6*P2+120)*(10^6);\n",
"mprintf('when load is 150MW , equations are: :\n');\n",
"mprintf('%.3f P1 %.2f P2 = %.1f\n',.048,-.08,-2);\n",
"mprintf('%.1f P1+ %.1fP2 = %.1f\n',1,1,150);\n",
"A=[.048 -.08;1 1];\n",
"B=[-2;150];\n",
"P=(inv(A))*B;\n",
"P1=P(1,1);\n",
"P2=P(2,1);\n",
"f1=(.024*(P1)^2 +8*P1+80)*(10^6);\n",
"f2=(.04*(P2)^2+6*P2+120)*(10^6);\n",
"Total=(F1+F2+f1+f2)*12*2/(10^6);\n",
"mprintf('Total cost=Rs. %.2f',Total)"
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}