summaryrefslogtreecommitdiff
path: root/Principles_of_Power_System/chapter15.ipynb
blob: 35b4fcc7ba093dad2e8944ddcad10fd907d3e9f5 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:99f2463b3650514f9c88ec63c2c7f7ef832ae42348e5f3fe2b1b870ab9434349"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 15: Voltage Control"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 15.1, Page Number: 384"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "import math\n",
      "\n",
      "#Variable declaration:\n",
      "Pl = 10000                      #load(kW)\n",
      "pf = 0.8                        #power factor(lag)\n",
      "Vl = 33000                      #receiving end line voltage(V)\n",
      "R = 5                           #line resistance(ohm)\n",
      "X = 10                          #line reactance(ohm)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "I2 = math.floor(Pl*1000/(3**0.5*Vl*0.8))        #load current(A)\n",
      "Ip = I2*pf                        #A\n",
      "Iq = I2*math.sin(math.acos(pf))     #A\n",
      "V1 = round(Vl/3**0.5)                      #sending end voltage(V)\n",
      "#Let Im be the current taken by the synchronous condenser.\n",
      "Im = symbols('Im')                   #A\n",
      "Im1 = solve((V1+Ip*R-X*(Im-Iq))**2+(Ip*X+(Im-Iq)*R)**2-V1**2,Im)[0]\n",
      "C = 3*V1*round(Im1)/1000                   #kVAR\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Capacity of synchronous condenser is\",math.floor(C),\"kVAR\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacity of synchronous condenser is 13203.0 kVAR\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 15.2 Page Number: 385"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#Variable declaration:\n",
      "Pl = 25000                      #load(kW)\n",
      "pf = 0.8                        #power factor(lag)\n",
      "Vl = 33000                      #receiving end line voltage(V)\n",
      "R = 5                           #line resistance(ohm)\n",
      "X = 20                          #line reactance(ohm)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "I2 = round(Pl*1000/(3**0.5*Vl*pf),1)        #load current(A)\n",
      "Ip = I2*pf                        #A\n",
      "Iq = I2*math.sin(math.acos(pf))     #A\n",
      "V1 = Vl/3**0.5                      #sending end voltage(V)\n",
      "#Let Im be the current taken by the synchronous condenser.\n",
      "Im = symbols('Im')                   #A\n",
      "Im1 = solve((V1+Ip*R-X*(Im-Iq))**2+(Ip*X+(Im-Iq)*R)**2-V1**2,Im)[0]\n",
      "C = 3*V1*Im1/1000                   #kVAR\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Capacity of synchronous condenser is\",round(C/1000,2),\"MVAR\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacity of synchronous condenser is 33.11 MVAR\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}