Fundamentals of Electrical Engineering - R. Prasad
Fundamentals of Electrical Engineering - R. Prasad
Fundamentals of Electrical Engineering - R. Prasad
Created by
Suji M
BE
Electrical Engineering
St.Xavier’s Catholic College of Engineering
College Teacher
None
Cross-Checked by
None
Author: R. Prasad
Edition: 3
Year: 2014
ISBN: 9788120348950
1
Scilab numbering policy used in this document and the relation to the
above book.
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.
2
Contents
4 Electrostatics 97
7 Transformer 139
3
13 Dynamic Response of Network 262
4
List of Scilab Codes
5
Exa 2.5 Determination of voltage and current using
nodal method . . . . . . . . . . . . . . . . . 34
Exa 2.6 Determination of voltage and current using
mesh analysis method . . . . . . . . . . . . 37
Exa 2.7 Determination of voltage using nodal analysis
method . . . . . . . . . . . . . . . . . . . . 38
Exa 2.8 Determination of current using mesh voltage
method . . . . . . . . . . . . . . . . . . . . 40
Exa 2.9 Determination of current using a principle of
superposition . . . . . . . . . . . . . . . . . 42
Exa 2.10 Determination of current in all resistance us-
ing superposition principle . . . . . . . . . 45
Exa 2.11 Determination of current using Thevenins the-
orem . . . . . . . . . . . . . . . . . . . . . . 48
Exa 2.12 Determination of current using Norton theo-
rem . . . . . . . . . . . . . . . . . . . . . . 48
Exa 2.13 Determination of load resistance . . . . . . . 50
Exa 2.14 Determination of driving point resistance of
the voltage source . . . . . . . . . . . . . . . 53
Exa 2.15 Determination of driving point resistance at
the pair of terminals . . . . . . . . . . . . . 53
Exa 2.16 Determination of resistance value and amount
of power . . . . . . . . . . . . . . . . . . . . 55
Exa 3.1 Calculation of impedence and admittance . 58
Exa 3.3 Determination of voltage across resistance and
inductance and capacitance . . . . . . . . . 59
Exa 3.4 Determination of current through conductance
and capacitance and inductance . . . . . . 60
Exa 3.5 Determination of current and voltage across
inductance . . . . . . . . . . . . . . . . . . . 62
Exa 3.6 Determination of forced component of current 63
Exa 3.7 Determination of average and RMS value of
voltage . . . . . . . . . . . . . . . . . . . . 65
Exa 3.8 Determination of circuit current and voltage
using phasor method . . . . . . . . . . . . . 66
Exa 3.9 Determination of current through different el-
ements and voltage . . . . . . . . . . . . . . 69
6
Exa 3.10 Determination of voltage and current using
complex method . . . . . . . . . . . . . . . 71
Exa 3.11 Calculation of resonance frequency and qual-
ity factor and bandwidth . . . . . . . . . . . 74
Exa 3.12 Calculation of resonance frequency and qual-
ity factor and bandwidth . . . . . . . . . . . 75
Exa 3.13 Determination of current using nodal method 77
Exa 3.14 Determination of voltage using nodal method 80
Exa 3.15 Determination of current using mesh analysis 81
Exa 3.16 Determination of voltage using mesh analysis 83
Exa 3.17 Determination of voltage using Thevenins the-
orem . . . . . . . . . . . . . . . . . . . . . . 84
Exa 3.18 Determination of current using Thevenins the-
orem . . . . . . . . . . . . . . . . . . . . . . 86
Exa 3.19 Determination of current using Norton theo-
rem . . . . . . . . . . . . . . . . . . . . . . 87
Exa 3.20 Calculation of impedence and maximum power 90
Exa 3.21 Determination of voltage and power and re-
active power . . . . . . . . . . . . . . . . . . 91
Exa 3.22 Determination of capacitance and current of
alternator . . . . . . . . . . . . . . . . . . . 93
Exa 3.27 Plotting the four components from the given
circuit . . . . . . . . . . . . . . . . . . . . . 94
Exa 4.1 Determination of force between two spheres 97
Exa 4.3 Calculation of force . . . . . . . . . . . . . 98
Exa 4.4 Determination electric field intensity . . . . 100
Exa 4.5 Calculation of electric field intensity . . . . 101
Exa 4.7 Determination of distance between two charges
at which electric field strength is zero . . . . 102
Exa 4.11 Determination of maximum torque and work
done . . . . . . . . . . . . . . . . . . . . . . 103
Exa 4.14 Determination of charge . . . . . . . . . . . 104
Exa 4.15 Calculation of potential difference between two
points . . . . . . . . . . . . . . . . . . . . . 105
Exa 4.16 Calculation of net potential . . . . . . . . . 106
Exa 4.18 Calculation of electric field . . . . . . . . . . 108
Exa 4.19 Calculation of potential and field strength . 109
Exa 4.22 Determination of electric field strength . . . 111
7
Exa 4.24 Determination of capacitance of the capacitor
and potential difference across the capacitor 113
Exa 4.26 Calculation of electric field intensity and elec-
tric flux density . . . . . . . . . . . . . . . . 114
Exa 4.27 Calculation of capacitance of the line . . . . 116
Exa 4.28 Calculation of thickness of the dielectric . . 117
Exa 4.29 Determination of loss energy . . . . . . . . . 118
Exa 5.5 Determination of mmf and total flux and flux
density . . . . . . . . . . . . . . . . . . . . . 121
Exa 5.6 Determination of mmf . . . . . . . . . . . . 123
Exa 5.7 Calculation of reluctance and current . . . . 124
Exa 5.8 Calculation of reluctance and current . . . . 125
Exa 5.9 Calculation of mmf . . . . . . . . . . . . . . 127
Exa 5.10 Calculation of magnetizing current . . . . . 128
Exa 5.12 Calculation of inductance and time at pickup
value of current . . . . . . . . . . . . . . . 129
Exa 5.13 Calculation of cross sectional area of the core
and magnetizing current . . . . . . . . . . . 131
Exa 5.14 Determination of steady state value of current
and resistance and inductance of the coil and
stored energy . . . . . . . . . . . . . . . . . 132
Exa 5.15 Calculation of load current and impedence re-
ferred to primary and secondary side . . . . 134
Exa 5.16 Calculation of instantaneous values of induced
emf . . . . . . . . . . . . . . . . . . . . . . . 135
Exa 5.17 Determination of torque exerted on the coil 137
Exa 7.1 Calculation of current and number of turns
and maximum flux value . . . . . . . . . . . 139
Exa 7.2 Calculation of primary current and power fac-
tor . . . . . . . . . . . . . . . . . . . . . . . 141
Exa 7.3 Determination of primary current and power
factor and secondary terminal voltage . . . 143
Exa 7.4 Calculation of impedence and voltage regula-
tion . . . . . . . . . . . . . . . . . . . . . . 145
Exa 7.5 Calculation of efficiency . . . . . . . . . . . 147
Exa 7.6 Calculation of maximum efficiency . . . . . 150
Exa 7.7 Calculation of efficiency and voltage regula-
tion and secondary terminal voltage . . . . . 151
8
Exa 7.8 Calculation of primary line current and volt-
age and line to line transformation ratio . . 155
Exa 7.9 Determination of position of tapping point
and current in each part of winding and cop-
per saved . . . . . . . . . . . . . . . . . . . 156
Exa 7.10 Determination of ratio error . . . . . . . . . 158
Exa 8.1 Calculation of design parameters for a dc ma-
chine . . . . . . . . . . . . . . . . . . . . . . 160
Exa 8.2 Calculation of design parameters for a dc ma-
chine . . . . . . . . . . . . . . . . . . . . . . 161
Exa 8.3 Calculation of design parameters for a dc ma-
chine . . . . . . . . . . . . . . . . . . . . . . 163
Exa 8.4 Calculation of design parameters for a dc ma-
chine . . . . . . . . . . . . . . . . . . . . . . 164
Exa 8.5 Calculation of generated emf . . . . . . . . . 166
Exa 8.6 Calculation of number of conductors per slot 167
Exa 8.7 Calculation of number of demagnetizing and
cross ampere turns per pole . . . . . . . . . 168
Exa 8.8 Calculation of armature resistance and gen-
erated emf . . . . . . . . . . . . . . . . . . . 169
Exa 8.9 Calculation of armature generated voltage . 171
Exa 8.10 Calculation of generated emf . . . . . . . . . 172
Exa 8.11 Calculation of motor speed . . . . . . . . . . 173
Exa 8.12 Calculation of motor speed and gross torque
developed . . . . . . . . . . . . . . . . . . . 175
Exa 8.13 Calculation of motor speed and current and
speed regulation . . . . . . . . . . . . . . . 176
Exa 8.14 Calculation of current and kW input of the
motor . . . . . . . . . . . . . . . . . . . . . 178
Exa 8.15 Calculation of external resistance and electric
braking torque . . . . . . . . . . . . . . . . 179
Exa 8.16 Calculation of speed at full load torque . . . 181
Exa 8.17 Calculation of efficiency of generator at full
load and half load . . . . . . . . . . . . . . . 183
Exa 8.18 Calculation of efficiency of the generator . . 185
Exa 8.20 Determination of time . . . . . . . . . . . . 186
Exa 9.1 Calculation of distribution factor . . . . . . 188
9
Exa 9.2 Calculation of number of poles and flux per
pole . . . . . . . . . . . . . . . . . . . . . . 189
Exa 9.3 Determination of short circuit ratio and syn-
chronous reactance . . . . . . . . . . . . . . 191
Exa 9.4 Calculation of leakage reactance and field cur-
rent . . . . . . . . . . . . . . . . . . . . . . 193
Exa 9.5 Determination of excitation voltage . . . . . 194
Exa 9.6 Calculation of voltage regulation . . . . . . 195
Exa 9.7 Calculation of voltage regulation . . . . . . 197
Exa 9.8 Determination of capacity of the condenser . 199
Exa 9.9 Determination of capacity of the synchronous
condenser . . . . . . . . . . . . . . . . . . . 200
Exa 9.10 Determination of line current and power factor 202
Exa 9.11 Determination of increase in additional loss
and decrease in line current and final line cur-
rent . . . . . . . . . . . . . . . . . . . . . . 203
Exa 10.1 Calculation of synchronous speed and rotor
speed and rotor frequency . . . . . . . . . . 206
Exa 10.2 Calculation of flux per pole and rotor emf and
phase angle . . . . . . . . . . . . . . . . . . 207
Exa 10.3 Calculation of output power and mechanical
power developed and rotor copper loss and
efficiency . . . . . . . . . . . . . . . . . . . . 209
Exa 10.4 Determination of synchronous speed and slip
and maximum torque and rotor frequency . 211
Exa 10.5 Calculation of number of poles and slip and
rotor copper loss . . . . . . . . . . . . . . . 213
Exa 10.6 Determination of starting torque . . . . . . 215
Exa 10.7 Calculation motor parameters and slip and
pullout torque . . . . . . . . . . . . . . . . . 216
Exa 10.9 Determination ratio of starting current to full
load current . . . . . . . . . . . . . . . . . . 218
Exa 10.10 Calculation of starting torque and starting
current . . . . . . . . . . . . . . . . . . . . 219
Exa 10.11 Calculation of plugging torque . . . . . . . . 221
Exa 10.12 Calculation of external resistance . . . . . . 223
Exa 10.13 Calculation of speed and power ratio and fre-
quency . . . . . . . . . . . . . . . . . . . . . 224
10
Exa 11.1 Determination of motor parameters and sta-
tor current and power factor and speed and
torque . . . . . . . . . . . . . . . . . . . . . 226
Exa 11.2 Calculation of developed power and copper
loss . . . . . . . . . . . . . . . . . . . . . . . 228
Exa 11.3 Calculation of motor speed and torque . . . 230
Exa 11.4 Calculation of magnetic flux . . . . . . . . . 232
Exa 12.1 Calculation of line current of load and alter-
nator . . . . . . . . . . . . . . . . . . . . . . 233
Exa 12.2 Determination of phase and line current of
the load . . . . . . . . . . . . . . . . . . . . 236
Exa 12.3 Calculation of total KVA of capacitors and
capacitance value . . . . . . . . . . . . . . . 237
Exa 12.4 Calculation of total KVA of capacitors and
capacitance value . . . . . . . . . . . . . . . 239
Exa 12.5 Calculation of line current and neutral current 241
Exa 12.6 Determination of complex power and line cur-
rent . . . . . . . . . . . . . . . . . . . . . . 242
Exa 12.7 Calculation of line current and phase current
and total power dissipated . . . . . . . . . . 244
Exa 12.8 Calculation of total power and reactive power 248
Exa 12.9 Calculation of neutral current and power taken
by each phase . . . . . . . . . . . . . . . . 250
Exa 12.10 Determination of phase voltage and current 253
Exa 12.11 Calculation of each branch voltage and current 256
Exa 12.12 Calculation of line current or star phase cur-
rent . . . . . . . . . . . . . . . . . . . . . . 258
Exa 12.13 Calculation of line current . . . . . . . . . . 260
Exa 13.1 Calculation of resistance . . . . . . . . . . . 262
Exa 13.2 Determination of current and time . . . . . 264
Exa 13.5 Determination of time constant and damping
ratio and current . . . . . . . . . . . . . . . 264
Exa 13.6 Determination of current values . . . . . . . 266
Exa 13.7 Calculation of current ratio . . . . . . . . . 268
Exa 13.14 Determination of current . . . . . . . . . . . 269
Exa 14.1 Calculation of average load and energy con-
sumption and load factor . . . . . . . . . . 271
11
Exa 14.2 Determination of diversity factor and load fac-
tor and combined average load . . . . . . . 273
Exa 14.3 Calculation of annual bill of the consumer . 275
Exa 14.4 Calculation of overall cost per kWh . . . . . 276
Exa 14.5 Calculation of monthly bill of the consumer 277
Exa 14.6 Calculation of annual bill of the consumer . 279
Exa 15.1 Calculation of lamp efficiency and luminous
intensity and MSCP . . . . . . . . . . . . . 282
Exa 15.2 Calculation of average luminance of the sphere 283
Exa 15.3 Determination of illumination . . . . . . . . 285
Exa 15.4 Calculation of distance between two lamps . 286
Exa 15.5 Determination of size of the conductor . . . 287
12
List of Figures
13
2.6 Determination of voltage and current using mesh analysis method 37
2.7 Determination of voltage using nodal analysis method . . . . 39
2.8 Determination of current using mesh voltage method . . . . 41
2.9 Determination of current using a principle of superposition . 43
2.10 Determination of current in all resistance using superposition
principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.11 Determination of current using Thevenins theorem . . . . . 47
2.12 Determination of current using Norton theorem . . . . . . . 49
2.13 Determination of load resistance . . . . . . . . . . . . . . . . 51
2.14 Determination of driving point resistance of the voltage source 52
2.15 Determination of driving point resistance at the pair of termi-
nals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.16 Determination of resistance value and amount of power . . . 56
14
3.20 Determination of voltage and power and reactive power . . . 91
3.21 Determination of capacitance and current of alternator . . . 93
3.22 Plotting the four components from the given circuit . . . . . 95
5.1 Determination of mmf and total flux and flux density . . . . 122
5.2 Determination of mmf . . . . . . . . . . . . . . . . . . . . . 123
5.3 Calculation of reluctance and current . . . . . . . . . . . . . 124
5.4 Calculation of reluctance and current . . . . . . . . . . . . . 126
5.5 Calculation of mmf . . . . . . . . . . . . . . . . . . . . . . . 127
5.6 Calculation of magnetizing current . . . . . . . . . . . . . . 128
5.7 Calculation of inductance and time at pickup value of current 130
5.8 Calculation of cross sectional area of the core and magnetizing
current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.9 Determination of steady state value of current and resistance
and inductance of the coil and stored energy . . . . . . . . . 133
5.10 Calculation of load current and impedence referred to primary
and secondary side . . . . . . . . . . . . . . . . . . . . . . . 134
5.11 Calculation of instantaneous values of induced emf . . . . . . 136
15
5.12 Determination of torque exerted on the coil . . . . . . . . . 137
16
9.1 Calculation of distribution factor . . . . . . . . . . . . . . . 189
9.2 Calculation of number of poles and flux per pole . . . . . . . 190
9.3 Determination of short circuit ratio and synchronous reactance 191
9.4 Calculation of leakage reactance and field current . . . . . . 193
9.5 Determination of excitation voltage . . . . . . . . . . . . . . 194
9.6 Calculation of voltage regulation . . . . . . . . . . . . . . . . 196
9.7 Calculation of voltage regulation . . . . . . . . . . . . . . . . 198
9.8 Determination of capacity of the condenser . . . . . . . . . . 199
9.9 Determination of capacity of the synchronous condenser . . . 200
9.10 Determination of line current and power factor . . . . . . . . 201
9.11 Determination of increase in additional loss and decrease in
line current and final line current . . . . . . . . . . . . . . . 203
17
12.4 Calculation of total KVA of capacitors and capacitance value 239
12.5 Calculation of line current and neutral current . . . . . . . . 241
12.6 Determination of complex power and line current . . . . . . 243
12.7 Calculation of line current and phase current and total power
dissipated . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.8 Calculation of total power and reactive power . . . . . . . . 249
12.9 Calculation of neutral current and power taken by each phase 251
12.10Determination of phase voltage and current . . . . . . . . . 254
12.11Calculation of each branch voltage and current . . . . . . . . 256
12.12Calculation of line current or star phase current . . . . . . . 259
12.13Calculation of line current . . . . . . . . . . . . . . . . . . . 260
15.1 Calculation of lamp efficiency and luminous intensity and MSCP 283
15.2 Calculation of average luminance of the sphere . . . . . . . . 284
15.3 Determination of illumination . . . . . . . . . . . . . . . . . 285
15.4 Calculation of distance between two lamps . . . . . . . . . . 286
15.5 Determination of size of the conductor . . . . . . . . . . . . 288
18
Chapter 1
Fundamentals of Electrical
Energy
Scilab code Exa 1.1 Determination of Energy consumed and Electricity charge
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 1 . s c e .
7
8 clc ;
9 clear ;
10 P =200; // power r a t i n g o f lamp i n w a t t s
11 V =110; // v o l t a g e r a t i n g o f lamp i n v o l t s
12
13 // c a s e 1
14 printf ( ” \n ( a ) ” )
15 I =( P / V ) ;
16 printf ( ” \ n C u r r e n t i n t h e lamp=%f A” ,I )
17
19
Figure 1.1: Determination of Energy consumed and Electricity charge
18 // c a s e 2
19 printf ( ” \n ( b ) ” )
20 T =1; // t i m e i n h o u r f o r e l e c t r i c
c h a r g e f l o w t h r o u g h t h e lamp
21 t = T *60*60; // t i m e i n s e c o n d s f o r e l e c t r i c
c h a r g e f l o w t h r o u g h t h e lamp
22 q = I * t ;
23 printf ( ” \ n E l e c t r i c c h a r g e f l o w i n g t h r o u g h t h e lamp
f o r one h o u r=%f coloumb ” ,q )
24
25 // c a s e 3
26 printf ( ” \n ( c ) ” )
27 Numberofdaysinmay =31;
28 time =10; // on t i m e o f lamp i n
h o u r p e r day
29 unitcharge =1.20; // e l e c t r i c i t y c h a r g e i n
r u p e e s ( 1 kwhr = 1 u n i t )
30 t1 = time * Numberofdaysinmay ; // on t i m e o f lamp in
h o u r p e r month
31 Energyconsumed = P * t1 ; // c o n s u m p t i o n o f e n e r g y
20
Figure 1.2: Determination of resistance value of the resistor
i n watt−h o u r
32 Energyconsumedinkwhr = Energyconsumed /(1 e3 ) ; //
c o n s u m p t i o n o f e n e r g y i n k i l o w a t t −h o u r
33 charges = Energyconsumedinkwhr * unitcharge ;
34 printf ( ” \ nCharge f o r e l e c t r i c i t y =%f r u p e e s ” , charges )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 2 . s c e .
7
8 clc ;
9 clear ;
10 R25 =120; // r e s i s t a n c e o f c o p p e r w i r e a t 25
degree c e l s i u s
11 T1 =25; // t e m p e r a t u r e 1 i n d e g r e e c e l s i u s
12 T2 =55; // t e m p e r a t u r e i n d e g r e e c e l s i u s
21
Figure 1.3: Determination of resistance value of the resistor and its power
rating
Scilab code Exa 1.3 Determination of resistance value of the resistor and its powe
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
22
Figure 1.4: Calculation of equivalent resistances and power dissipation
4 // E d i t i o n : T h i r d ,2014
5
6 // Ex1 3 . s c e .
7
8 clc ;
9 clear ;
10 V =20; // v o l t a g e r a t i n g o f t h e b a t t e r y
in volts
11 I =0.2; // c u r r e n t r a t i n g o f t h e b a t t e r y
i n amphere
12 R = V / I ; // from ohm ’ s law
13 P =( I ^2) * R ;
14 printf ( ” \ nThe v a l u e o f r e s i s t a n c e =%d ohms ” ,R )
15 printf ( ” \ nPower r a t i n g o r h e a t d i s s i p a t e d =%d w a t t s ” ,
P)
23
Scilab code Exa 1.4 Calculation of equivalent resistances and power dissipation
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 4 . s c e .
7
8 clc ;
9 clear ;
10 R1 =10; // r e s i s t a n c e v a l u e i n ohms
11 R2 =15; // r e s i s t a n c e v a l u e i n ohms
12 R3 =20; // r e s i s t a n c e v a l u e i n ohms
13 V =15; // s u p p l y v o l t a g e i n v o l t s
14 Rs = R1 + R2 + R3 ;
15 Rp =( R1 * R2 * R3 ) /(( R2 * R3 ) +( R3 * R1 ) +( R1 * R2 ) ) ;
16 printf ( ” \ nThe s e r i e s e q u i v a l e n t r e s i s t a n c e =%2 . 0 f
ohms \n ” , Rs )
17 printf ( ” \ nThe p a r a l l e l e q u i v a l e n t r e s i s t a n c e =%1 . 3 f
ohms \n ” , Rp )
18 Ps =( V ^2) / Rs ;
19 Pp =( V ^2) / Rp ;
20 printf ( ” \ nPower d i s s i p a t e d i n s e r i e s c o n n e c t i o n=%1 . 0
f w a t t s \n ” , Ps )
21 printf ( ” \ nPower d i s s i p a t e d i n p a r a l l e l c o n n e c t i o n=%2
. 2 f w a t t s \n ” , Pp )
Scilab code Exa 1.5 Sketch the capacitance current and voltage and charge and powe
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
24
Figure 1.5: Sketch the capacitance current and voltage and charge and power
and stored energy
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 5 . s c e .
7
8 clc ;
9 clear ;
10 subplot (2 ,2 ,1)
11 t =[0:0.00001:2];
12 x = length ( t ) ;
13 i = ones (1 , x ) ;
14 for n =1: x ;
15 if t ( n ) <=1
16 i ( n ) =2
17 else
18 i ( n ) =0
19 end
20 end
21 xlabel ( ” Time i n s e c o n d s ” )
22 ylabel ( ” C u r r e n t i n amphere ” )
23 title ( ” c u r r e n t wavefrom ” )
24 plot (t , i )
25
25 subplot (2 ,2 ,2)
26 t =[0:0.00001:2];
27 x = length ( t ) ;
28 v = ones (1 , x ) ;
29 c =0.1;
30 for n =1: x ;
31 i ( n ) =2;
32 if t ( n ) <=1
33 v(n)=i(n)*t(n)/c;
34 else
35 v(n)=i(n)/c;
36 end
37 end
38 xlabel ( ” Time i n s e c o n d s ” )
39 ylabel ( ” v o l t a g e t i n v o l t s ” )
40 title ( ” v o l t a g e wavefrom ” )
41 plot (t , v )
42 subplot (2 ,3 ,4)
43 t =[0:0.00001:2];
44 x = length ( t ) ;
45 q = ones (1 , x ) ;
46 c =0.1;
47 for n =1: x ;
48 v ( n ) =20;
49 if t ( n ) <=1
50 q(n)=v(n)*t(n)*c;
51 else
52 q(n)=v(n)*c;
53 end
54 end
55 xlabel ( ” Time i n s e c o n d s ” )
56 ylabel ( ” c a p a c i t a n c e in coloumbs ”)
57 title ( ” c h a r g e waveform ” )
58 plot (t , q )
59 subplot (2 ,3 ,5)
60 t =[0:0.00001:2];
61 x = length ( t ) ;
62 p = ones (1 , x ) ;
26
63 for n =1: x ;
64 v ( n ) =20;
65 if t ( n ) <=1
66 i ( n ) =2;
67 p(n)=v(n)*t(n)*i(n);
68 else
69 i ( n ) =0;
70 p(n)=v(n)*i(n);
71 end
72 end
73 xlabel ( ” Time i n s e c o n d s ” )
74 ylabel ( ” power i n w a t t s ” )
75 title ( ” power waveform ” )
76 plot (t , p )
77 subplot (2 ,3 ,6)
78 t =[0:0.00001:2];
79 x = length ( t ) ;
80 e = ones (1 , x ) ;
81 c =0.1;
82 for n =1: x ;
83 v ( n ) =20;
84 if t ( n ) <=1
85 e ( n ) =(( v ( n ) * t ( n ) ) ^2* c ) /2;
86 else
87 e ( n ) =(( v ( n ) ^2) * c ) /2;
88 end
89 end
90 xlabel ( ” Time i n s e c o n d s ” )
91 ylabel ( ” Energy i n j o u l e s ” )
92 title ( ” Energy waveform ” )
93 plot (t , e )
Scilab code Exa 1.6 Plotting power waveform and calculate dissipated power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
27
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 6 . s c e .
7
8 clc ;
9 clear ;
10 t =[0:0.0001:4];
11 x = length ( t ) ;
12 p = ones (1 , x ) ;
13 for n =1: x ;
14 if t ( n ) <=2
15 v ( n ) =3;
16 i ( n ) =10;
17 p(n)=v(n)*t(n)*i(n);
18 else if t ( n ) >2
19 v ( n ) =12;
20 i ( n ) = -5;
21 p ( n ) =( v ( n ) -(3* t ( n ) ) ) * i ( n ) ;
22 else
23 p ( n ) =0;
24 end
25 end
26 end
27 xlabel ( ” Time i n s e c o n d s ” )
28 ylabel ( ” Power i n w a t t s ” )
29 title ( ” Power waveform ” )
30 plot (t , p )
31
32
33 // Case ( b )
34 printf ( ” \n ( b ) ” )
35 area_OAB =(1/2) * max ( p ) * max ( t ) /2;
36 area_BCD =(1/2) * abs ( min ( p ) ) * max ( t ) /2;
37 energy = area_OAB - area_BCD ;
38 avg_power = energy / max ( t ) ;
39 printf ( ” \n The a v e r a g e power=%1 . 1 f W \n ” , avg_power )
28
Figure 1.6: Plotting power waveform and calculate dissipated power
Scilab code Exa 1.7 Identification of electric device from the given plot
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 7 . s c e
7
8 clc ;
9 clear ;
10 printf ( ” \n From t h e g i v e n p l o t s t h e waveform o f
v o l t a g e i s t h e t i m e i n t e g r a l o f t h e c u r r e n t wave .
29
Figure 1.7: Plotting power waveform and calculate dissipated power
30
Figure 1.9: Calculation of capacitor voltage and current and energy dissi-
pated
So t h e e l e c t r i c d e v i c e must be c a p a c i t o r \n ” )
11
12 t =2; // t i m e i n s e c o n d s
13 V =100; // v o l t a g e o f e l e c r i c d e v i c e ( c a p a c i t o r )
in volts
14 I =5; // c a p a c i t a n c e ( e l e c t r i c d e v c e ) c u r r e n t
i n amphere
15 C =( I * t ) / V ;
16 printf ( ” \n So t h e v a l u e o f c a p a c i t a n c e=%1 . 1 f f a r a d s
” ,C )
31
Scilab code Exa 1.8 Calculation of capacitor voltage and current and energy dissip
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 8 . s c e .
7
8 clc ;
9 clear ;
10 V =200; // s u p l y v o l t a g e i n v o l t s
11 R1 =0.3 e6 ; // r e s i s t a n c e v a l u e i n ohms
12 R2 =0.5 e6 ; // r e s i s t a n c e v a l u e i n ohms
13 C =10 e -6; // c a p a c i t a n c e v a l u e i n f a r a d
14 t1 =5; // t i m e s e c o n d s
15 t2 =2.5; // t i m e i n s e c o n d s
16
17 // c a s e 1
18 printf ( ” \n ( a ) ” )
19 v = V *(1 - exp ( -( t1 /( R1 * C ) ) ) ) ;
20 printf ( ” \n The v o l t a g e a c r o s s c a p a c i t o r when k1 i s
o p e n e d=%3 . 3 f V” ,v )
21 // c a s e 2
22 printf ( ” \n ( b ) ” )
23 Im =( v / R2 ) ;
24 printf ( ” \n I n i t i a l v a l u e o f d i s c h a r g e c u r r e n t=%1 . 5 f
mA” , Im *1 e3 )
25 // c a s e 3
26 printf ( ” \n ( c ) ” )
27 i = - Im * exp ( -( t2 /( R2 * C ) ) ) ;
28 printf ( ” \n The v a l u e o f d i s c h a r g e c u r r e n t a t 2 . 5
s e c o n d s=%1 . 3 f mA” ,i *1 e3 )
29 // c a s e 4
30 printf ( ” \n ( d ) ” )
31 Vc = v /( R2 * C ) ;
32 printf ( ” \n I n i t i a l r a t e o f d e c a y o f c a p a c i t o r
v o l t a g e=%2 . 3 f V/ s ” , Vc )
32
Figure 1.10: Determination of equivalent capacitance value
33 // c a s e 5
34 printf ( ” \n ( e ) ” )
35 E =(1/2) *( C * v ^2) ;
36 printf ( ” \n The e n e r g y d i s s i p a t e d i n r e s i s t o r =%1 . 4 f
J ” ,E )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 9 . s c e .
7
8 clc ;
9 clear ;
33
Figure 1.11: Plotting voltage and power and energy waveform
10 C1 =100; // c a p a c i t a n c e v a l u e i n m i c r o f a r a d
11 C2 =150; // c a p a c i t a n c e v a l u e i n m i c r o f a r a d
12 C3 =200; // c a p a c i t a n c e v a l u e i n m i c r o f a r a d
13
14 //CASE1
15 printf ( ” \n ( a ) ” )
16 Cs =( C1 * C2 * C3 ) /(( C2 * C3 ) +( C1 * C2 ) +( C3 * C1 ) ) ;
17 printf ( ” \n The e q u i v a l e n t c a p a c i t a n c e i n s e r i e s
c o n n e c t i o n=%2 . 3 f m i c r o f a r a d ” , Cs )
18
19 //CASE2
20 printf ( ” \n ( b ) ” )
21 Cp = C1 + C2 + C3 ;
22 printf ( ” \n The e q u i v a l e n t capacitance in p a r a l l e l
c o n n e c t i o n=%3 . 0 f m i c r o f a r a d ” , Cp )
Scilab code Exa 1.10 Plotting voltage and power and energy waveform
34
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 10 . s c e .
7
8 clc ;
9 clear ;
10 subplot (2 ,2 ,1)
11 t =[0:0.001:8];
12 x = length ( t ) ;
13 v = ones (1 , x ) ;
14 for n =1: x ;
15 L =5;
16 if t ( n ) <=2
17 v ( n ) =6.25;
18 else if t ( n ) >=6 & t ( n ) <8
19 v ( n ) = -6.25;
20 else
21 v ( n ) =0;
22 end
23 end
24 end
25 xlabel ( ” Time i n s e c o n d s ” )
26 ylabel ( ” v o l t a g e i n v o l t s ” )
27 title ( ” v o l t a g e waveform ” )
28 plot (t , v )
29 subplot (2 ,2 ,2)
30 t =[0:0.001:8];
31 x = length ( t ) ;
32 p = ones (1 , x ) ;
33 for n =1: x ;
34 if t ( n ) <=2
35 v ( n ) =6.25;
36 i ( n ) =1.25;
37 p(n)=v(n)*t(n)*i(n);
38 else if t ( n ) >=6 & t ( n ) <8
35
39 v ( n ) = -6.25;
40 i ( n ) =10;
41 p ( n ) =( i ( n ) -(1.25* t ( n ) ) ) * v ( n ) ;
42 else
43 v ( n ) =0;
44 i ( n ) =2.5;
45 p(n)=v(n)*t(n)*i(n);
46 end
47 end
48 end
49 xlabel ( ” Time i n s e c o n d s ” )
50 ylabel ( ” power i n w a t t s ” )
51 title ( ” power waveform ” )
52 plot (t , p )
53 subplot (2 ,2 ,3)
54 t =[0:0.001:8];
55 x = length ( t ) ;
56 e = ones (1 , x ) ;
57 L =5;
58 for n =1: x ;
59 if t ( n ) <=2
60 i ( n ) =1.25;
61 e ( n ) =(1/2) * L *( t ( n ) * i ( n ) ) ^2;
62 else if t ( n ) >=6 & t ( n ) <8
63 i ( n ) =10;
64 e ( n ) =(1/2) * L *( i ( n ) -(1.25* t ( n ) ) ) ^2;
65 else
66 i ( n ) =2.5;
67 e ( n ) =(1/2) * L *( i ( n ) ) ^2;
68 end
69 end
70 end
71 xlabel ( ” Time i n s e c o n d s ” )
72 ylabel ( ” Energy i n j o u l e s ” )
73 title ( ” Energy waveform ” )
74 plot (t , e )
36
Figure 1.12: Determination of current and voltage and dissipated energy
Scilab code Exa 1.11 Determination of current and voltage and dissipated energy
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex1 11 . s c e .
7 clc ;
8 clear ;
9 R =10; // r e s i s t a n c e i n ohms
10 L =5; // i n d u c t a n c e i n h e n r y
11 V =100; // s u p p l y v o l t a g e i n v o l t s
12 t1 =2; // t i m e a t which k1 s w i t c h o p e n e d i n
37
seconds
13 //CASE1
14 printf ( ” \n ( a ) ” )
15 i =( V *(1 - exp ( -(( R * t1 ) / L ) ) ) ) / R ;
16 printf ( ” \n The i n d u c t i v e c u r r e n t a t t h e t i m e k1 i s
o p e n e d=%1 . 2 f A” ,i )
17
18 //CASE2
19 printf ( ” \n ( b ) ” )
20 v1 = V * exp ( -(( R * t1 ) ) / L ) ;
21 printf ( ” \n The v o l t a g e a c r o s s t h e i n d u c t o r a t t =2
s e c o n d=%1 . 2 f V” , v1 )
22
23 //CASE3
24 printf ( ” \n ( c ) ” )
25 t2 =3; // t i m e i n s e c o n d s
26 Imax =( V / R ) ;
27 v2 = Imax * R *( exp ( -(( R * t2 ) ) / L ) ) ;
28 printf ( ” \n The v o l t a g e a c r o s s t h e i n d u c t o r a t t =3
s e c o n d=%1 . 4 f V” , v2 )
29 // For v2 c a l c u l a t i o n , t h e a n s w e r i n t h e book i s
wrong
30
31 //CASE4
32 printf ( ” \n ( d ) ” )
33 t3 =0; // i n i t i a l t i m e i n s e c o n d s
34 it =( - R *( - Imax ) * exp ( -( R * t3 ) / L ) ) / L ;// r a t e o f d e c a y
o f i n d u c t o r c u r r e n t i n amphere p e r s e c o n d s
35 printf ( ” \n The i n i t i a l v a l u e o f r a t e o f d e c a y o f
i n d u c t o r c u r r e n t=%d A/ s ” , it )
36
37 //CASE5
38 printf ( ” \n ( e ) ” )
39 Energy =(1/2) * L * Imax ^2;
40 printf ( ” \n The e n e r g y d i s s i p a t e d i n t h e r e s i s t o r =%d
J ” , Energy )
38
Chapter 2
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 1 . s c e .
7
8 clc ;
9 clear ;
10 R1 =3; // R e s i s t a n c e in ohm
11 R2 =5; // R e s i s t a n c e in ohm
12 R3 =4; // R e s i s t a n c e in ohm
13 R4 =8; // R e s i s t a n c e in ohm
14
15 I2 =1/3;
16 I1 =4* I2 ;
17 I3 = I1 - I2 ;;
39
Figure 2.1: Determination of unknown currents and voltages
40
18 V1 = R1 * I1 ; // A p p l y i n g ohm ’ s law (V
=IR )
19 V2 = R2 * I1 ;
20 V3 = R3 * I2 ;
21 V4 = R4 * I3 ;
22 printf ( ” \n The unknown v o l t a g e s : ” )
23 printf ( ” \n\ t V1=%d V” , V1 )
24 printf ( ” \n\ t V2=%1 . 2 f V” , V2 )
25 printf ( ” \n\ t V3=%1 . 2 f V” , V3 )
26 printf ( ” \n\ t V4=%d V \n ” , V4 )
27 printf ( ” \n The unknown c u r r e n t s : ” )
28 printf ( ” \n\ t I 1=%1 . 2 f A” , I1 )
29 printf ( ” \n\ t I 2=%1 . 2 f A” , I2 )
30 printf ( ” \n\ t I 3=%d A” , I3 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 2 . s c e .
7
8 clc ;
9 clear ;
10 a1 =2; b1 =1; c1 =5; d1 =1; // t h e s e
are the c o e f f i c i e n t v a l u e s o f I1 , I2 , I 3 and s o u r c e
o b t a i n e d from l o o p ABDA i n t h e g i v e n c i r c u i t
11 a2 =4; b2 = -5; c2 = -3; d2 =0; // t h e s e
are the c o e f f i c i e n t v a l u e s o f I1 , I2 , I 3 and s o u r c e
o b t a i n e d from l o o p ABCA i n t h e g i v e n c i r c u i t
12 a3 =4; b3 =1; c3 = -9; d3 =0; // t h e s e
41
Figure 2.2: Determination of currents in the given network
42
a r e t h e c o e f f i c i e n t v a l u e s o f I1 , I2 , I 3 and s o u r c e
o b t a i n e d from l o o p BCDB i n t h e g i v e n c i r c u i t
13
14 del = det ([ a1 b1 c1 ; a2 b2 c2 ; a3 b3 c3 ]) ;
15 del1 = det ([ d1 b1 c1 ; d2 b2 c2 ; d3 b3 c3 ]) ;
16 del2 = det ([ a1 d1 c1 ; a2 d2 c2 ; a3 d3 c3 ]) ;
17 del3 = det ([ a1 b1 d1 ; a2 b2 d2 ; a3 b3 d3 ]) ;
18
19 I1 = del1 / del ; // U s i n g
Cramer ’ s r u l e
20 I2 = del2 / del ; // U s i n g
Cramer ’ s r u l e
21 I3 = del3 / del ; // U s i n g
Cramer ’ s r u l e
22
23 printf ( ” \n The c u r r e n t v a l u e s a r e , ” )
24 printf ( ” \n\ t I 1=%1 . 1 f A” , I1 )
25 printf ( ” \n\ t I 2=%1 . 1 f A” , I2 )
26 printf ( ” \n\ t I 3=%1 . 1 f A” , I3 )
Scilab code Exa 2.3 Conversion of current source into a voltage source and voltage
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 3 . s c e .
7
8 clc ;
9 clear ;
10 // c a s e 1
11 // v o l t a g e s o u r c e s e r i e s w i t h t h e r e s i s t a n c e
43
Figure 2.3: Conversion of current source into a voltage source and voltage
source into a current source
44
converted into current source p a r a l l e l to the
conductance
12 printf ( ” \n ( a ) ” )
13 Rs1 =5;
14 Vs1 =100;
15 Is1 = Vs1 / Rs1 ;
16 Gs1 =1/ Rs1 ;
17 printf ( ” \n I s 1=%d A \n ” , Is1 )
18 printf ( ” \n Gs1=%1 . 2 f mho \n ” , Gs1 )
19
20 // c a s e 2
21 // c u r r e n t s o u r c e p a r a l l e l t o t h e c o n d u c t a n c e
converted i n t o v o l t a g e s o u r c e s e r i e s with the
resistance
22 printf ( ” \n ( b ) ” )
23 Gs2 =10 e -3;
24 Is2 =500 e -3;
25 Vs2 = Is2 / Gs2 ;
26 Rs2 =1/ Gs2 ;
27 printf ( ” \n Vs2=%d V \n ” , Vs2 )
28 printf ( ” \n Rs2=%d ohm \n ” , Rs2 )
Scilab code Exa 2.4 Determination of voltage and current using nodal analysis meth
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 4 . s c e .
7
8 clc ;
9 clear ;
45
Figure 2.4: Determination of voltage and current using nodal analysis method
46
10 R5 =60;
11 a1 =9; b1 = -5; c1 =0; d1 =80; // t h e s e a r e
the c o e f f i c i e n t values of VA, VB, VC and t h e
s o u r c e o b t a i n e d from node A in the given c i r c u i t
12 a2 = -1; b2 =7; c2 = -2; d2 =24; // t h e s e a r e
the c o e f f i c i e n t values of VA, VB, VC and t h e
s o u r c e o b t a i n e d from node B in the given c i r c u i t
13 a3 =0; b3 = -3; c3 =4; d3 =36; // t h e s e a r e
the c o e f f i c i e n t values of VA, VB, VC and t h e
s o u r c e o b t a i n e d from node C in the given c i r c u i t
14
15 del = det ([ a1 b1 c1 ; a2 b2 c2 ; a3 b3 c3 ]) ;
16 del1 = det ([ d1 b1 c1 ; d2 b2 c2 ; d3 b3 c3 ]) ;
17 del2 = det ([ a1 d1 c1 ; a2 d2 c2 ; a3 d3 c3 ]) ;
18 del3 = det ([ a1 b1 d1 ; a2 b2 d2 ; a3 b3 d3 ]) ;
19
20 VA = del1 / del ; // U s i n g
Cramer ’ s r u l e
21 VB = del2 / del ; // U s i n g
Cramer ’ s r u l e
22 VC = del3 / del ; // U s i n g
Cramer ’ s r u l e
23 Vba = VA - VB ;
24 I5 = VC / R5 ; // from Ohm’ s
law
25 printf ( ” \n Vba=%1 . 3 f V \n ” , Vba )
26 // Answer v a r y d u e t o round o f f e r r o r
27 printf ( ” \n C u r r e n t t h r o u g h t h e 60 ohm r e s i s t o r =%1 . 3
f A \n ” , I5 )
Scilab code Exa 2.5 Determination of voltage and current using nodal method
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
47
Figure 2.5: Determination of voltage and current using nodal method
48
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 5 . s c e .
7
8 clc ;
9 clear ;
10 R1 =10;
11 R2 =30;
12 R3 =15;
13 R4 =45;
14
15 a1 =3; b1 = -1; c1 = -9;
// t h e s e a r e t h e c o e f f i c i e n t v a l u e s o f VA, VB and
t h e s o u r c e o b t a i n e d from node A i n the given
circuit
16 a2 = -3; b2 =4; c2 = -27;
// t h e s e a r e t h e c o e f f i c i e n t v a l u e s o f VA, VB and
t h e s o u r c e o b t a i n e d from node B i n the given
circuit
17 del = det ([ a1 b1 ; a2 b2 ]) ;
18 del1 = det ([ c1 b1 ; c2 b2 ]) ;
19 del2 = det ([ a1 c1 ; a2 c2 ]) ;
20
21 VA = del1 / del ; //
U s i n g Cramer ’ s r u l e
22 VB = del2 / del ; // U s i n g
Cramer ’ s r u l e
23 Vba = VA - VB ;
24 I2 = VA / R2 ; // from
Ohm’ s law
25 printf ( ” \n Vba=%d V \n ” , Vba )
26 printf ( ” \n C u r r e n t t h r o u g h t h e 30 ohm r e s i s t o r =%1 . 4
f A \n ” , I2 )
49
Figure 2.6: Determination of voltage and current using mesh analysis method
Scilab code Exa 2.6 Determination of voltage and current using mesh analysis metho
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 6 . s c e .
7
8 clc ;
9 clear ;
10 R1 =15;
50
11 R2 =20;
12 R3 =10;
13 R4 =5;
14
15 a1 =35; b1 = -20; c1 =2; //
these are the c o e f f i c i e n t v a l u e s o f I1 , I 2 and
s o u r c e o b t a i n e d from l o o p ABDA i n t h e g i v e n
circuit
16 a2 = -20; b2 =35; c2 =0.5; //
these are the c o e f f i c i e n t v a l u e s o f I1 , I 2 and
s o u r c e o b t a i n e d from l o o p BCDB i n t h e g i v e n
circuit
17 del = det ([ a1 b1 ; a2 b2 ]) ;
18 del1 = det ([ c1 b1 ; c2 b2 ]) ;
19 del2 = det ([ a1 c1 ; a2 c2 ]) ;
20
21 I1 = del1 / del ; //
U s i n g Cramer ’ s r u l e
22 I2 = del2 / del ; //
U s i n g Cramer ’ s r u l e
23 I20 = I1 - I2 ;
24 Vcb = R3 * I2 ;
25 printf ( ” \n C u r r e n t t h r o u g h t h e 20 ohm r e s i s t o r =%1 . 4
f A \n ” , I20 )
26 printf ( ” \n V o l t a g e a c r o s s t h e node B and C=%1 . 3 f V
\n ” , Vcb )
Scilab code Exa 2.7 Determination of voltage using nodal analysis method
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
51
Figure 2.7: Determination of voltage using nodal analysis method
52
5
6 // Ex2 7 . s c e .
7
8 clc ;
9 clear ;
10 R1 =5; // R e s i s t a n c e i n ohm
11 R2 =2; // R e s i s t a n c e i n ohm
12 R3 =3; // R e s i s t a n c e i n ohm
13
14 a1 =7; b1 = -5; c1 =50; //
these are the c o e f f i c i e n t values of VA, VB and t h e
s o u r c e o b t a i n e d from node A i n t h e given circuit
15 a2 =3; b2 =5; c2 =0; //
these are the c o e f f i c i e n t values of VA, VB and t h e
s o u r c e o b t a i n e d from node B i n t h e given circuit
16 del = det ([ a1 b1 ; a2 b2 ]) ;
17 del1 = det ([ c1 b1 ; c2 b2 ]) ;
18 del2 = det ([ a1 c1 ; a2 c2 ]) ;
19
20 VA = del1 / del ; //
U s i n g Cramer ’ s r u l e
21 VB = del2 / del ; //
U s i n g Cramer ’ s r u l e
22 Vba = VA - VB ;
23 printf ( ” \n V o l t a g e a c r o s s t h e 2 ohm r e s i s t o r =%d V \
n ” , Vba )
Scilab code Exa 2.8 Determination of current using mesh voltage method
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
53
Figure 2.8: Determination of current using mesh voltage method
54
5
6 // Ex2 8 . s c e .
7
8 clc ;
9 clear ;
10 R1 =3;
11 R2 =4;
12 R3 =2;
13 R4 =1;
14
15 a1 =7; b1 = -4; c1 =2; //
these are the c o e f f i c i e n t v a l u e s o f I1 , I 2 and
s o u r c e o b t a i n e d from t h e f i r s t loop in the given
circuit
16 a2 = -10; b2 =7; c2 =3; //
these are the c o e f f i c i e n t v a l u e s o f I1 , I 2 and
s o u r c e o b t a i n e d from t h e second loop in the
given c i r c u i t
17 del = det ([ a1 b1 ; a2 b2 ]) ;
18 del1 = det ([ c1 b1 ; c2 b2 ]) ;
19 del2 = det ([ a1 c1 ; a2 c2 ]) ;
20
21 I1 = del1 / del ; // U s i n g
Cramer ’ s r u l e
22 I2 = del2 / del ; // U s i n g
Cramer ’ s r u l e
23 I = I2 - I1 ;
24 printf ( ” \n C u r r e n t t h r o u g h t h e 4 ohm r e s i s t o r =%1 . 2 f
A( upward ) \n ” ,I )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
55
Figure 2.9: Determination of current using a principle of superposition
56
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 9 . s c e .
7
8 clc ;
9 clear ;
10 R1 =3;
11 R2 =4;
12 R3 =2;
13 R4 =1;
14
15 // c a s e ( a )
16 a1 =13; b1 = -6; c1 =20;
// t h e s e a r e t h e c o e f f i c i e n t v a l u e s o f VA, VB and
s o u r c e o b t a i n e d from t h e node A i n t h e g i v e n
circuit
17 a2 = -5; b2 =3; c2 = -20;
// t h e s e a r e t h e c o e f f i c i e n t v a l u e s o f VA, VB and
s o u r c e o b t a i n e d from t h e node B i n t h e g i v e n
circuit
18 del = det ([ a1 b1 ; a2 b2 ]) ;
19 del1 = det ([ c1 b1 ; c2 b2 ]) ;
20 VA1 = del1 / del ;
21 Idash = - VA1 / R2 ;
22
23 // c a s e ( b )
24 Vs =3;
25 a1 =13; b1 = -6; c1 =9;
// t h e s e a r e t h e c o e f f i c i e n t v a l u e s o f VA, VB and
s o u r c e o b t a i n e d from t h e node A i n t h e g i v e n
circuit
26 a2 = -5; b2 =3; c2 =0;
// t h e s e a r e
t h e c o e f f i c i e n t v a l u e s o f VA, VB and s o u r c e
o b t a i n e d from t h e node B i n t h e g i v e n c i r c u i t
27 del = det ([ a1 b1 ; a2 b2 ]) ;
57
Figure 2.10: Determination of current in all resistance using superposition
principle
28 del1 = det ([ c1 b1 ; c2 b2 ]) ;
29 VA2 = del1 / del ;
30 I_doubledash =( Vs - VA2 ) / R2 ;
31 I = Idash + I_doubledash ;
32 printf ( ” \n C u r r e n t t h r o u g h t h e 4 ohm r e s i s t o r =%1 . 2 f
A \n ” ,I )
Scilab code Exa 2.10 Determination of current in all resistance using superpositio
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
58
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 10 . s c e .
7
8 clc ;
9 clear ;
10 R1 =4;
11 R2 =3;
12 R3 =5;
13 R4 =6;
14
15 //CASE ( a )
16 Vs1 =80;
17 VA1 =( Vs1 / R3 ) /((1/ R1 ) +(1/ R2 ) +(1/ R3 ) +(1/ R4 ) ) ;
18 I1dash = VA1 / R1 ; // From ohm ’ s law (V=IR )
19 I2dash = VA1 / R2 ;
20 I3dash =( Vs1 - VA1 ) / R3 ;
21 I4dash = VA1 / R4 ;
22
23 //CASE ( b )
24 Vs2 =90;
25 VA2 =( Vs2 / R2 ) /((1/ R1 ) +(1/ R2 ) +(1/ R3 ) +(1/ R4 ) ) ;
26 I1doubledash = VA2 / R1 ;
27 I2doubledash =( Vs2 - VA2 ) / R2 ;
28 I3doubledash = VA2 / R3 ;
29 I4doubledash = VA2 / R4 ;
30
31 //CASE ( c )
32 Is =20;
33 VA3 = Is /((1/ R1 ) +(1/ R2 ) +(1/ R3 ) +(1/ R4 ) ) ;
34 I1tripledash = VA3 / R1 ;
35 I2tripledash = VA3 / R2 ;
36 I3tripledash = VA3 / R3 ;
37 I4tripledash = VA3 / R4 ;
38 I1 = I1dash + I1doubledash + I1tripledash ;
39 I2 = - I2dash + I2doubledash - I2tripledash ;
40 I3 = I3dash - I3doubledash - I3tripledash ;
59
Figure 2.11: Determination of current using Thevenins theorem
60
Scilab code Exa 2.11 Determination of current using Thevenins theorem
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 11 . s c e
7
8 clc ;
9 clear ;
10 R1 =30; // R e s i s t a n c e i n ohm
11 R2 =60; // R e s i s t a n c e i n ohm
12 R3 =60; // R e s i s t a n c e i n ohm
13 R4 =30; // R e s i s t a n c e i n ohm
14 R5 =10; // R e s i s t a n c e i n ohm
15 R =50; // R e s i s t a n c e i n ohm
16 I1 =5/110; // Loop1 c u r r e n t i n Ampere
17 I2 =5/110; // Loop2 c u r r e n t i n Ampere
18 Voc =( I2 * R2 ) -( I1 * R1 ) ; // Open c i r c u i t v o l t a g e i n
Volt
19 Isc =1/30; // Open c i r c u i t c u r r e n t i n
Ampere
20 Rs = Voc / Isc ; // S e r i e s r e s i s t a n c e i n ohm
21 I = Voc /( Rs + R ) ;
22 printf ( ” \n C u r r e n t t h r o u g h t h e 50 ohm r e s i s t o r =%1 . 3
f A \n ” ,I )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
61
Figure 2.12: Determination of current using Norton theorem
62
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 12 . s c e
7
8 clc ;
9 clear ;
10 R =50; // R e s i s t a n c e i n ohm
11 Is =1/30; // S o u r c e c u r r e n t i n Ampere
12 Rs =40.92; // P a r a l l e l r e s i s t a n c e i n ohm
13 Gs =1/ Rs ; // P a r a l l e l c o n d u c t a n c e i n mho
14 I =( Is * Rs ) /( Rs + R ) ;
15 printf ( ” \n C u r r e n t t h r o u g h t h e 50 ohm r e s i s t o r =%1 . 3
f A \n ” ,I )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 13 . s c e .
7
8 clc ;
9 clear ;
10 R1 =4; // R e s i s t a n c e i n ohm
11 R2 =4; // R e s i s t a n c e i n ohm
12 R3 =8; // R e s i s t a n c e i n ohm
13 R4 =10; // R e s i s t a n c e i n ohm
14 R5 =3; // R e s i s t a n c e i n ohm
15 R6 =8; // R e s i s t a n c e i n ohm
16 R7 =2; // R e s i s t a n c e i n ohm
17 R12 =1/((1/ R1 ) +(1/ R2 ) ) ; //R1 and R2 a r e i n
63
Figure 2.13: Determination of load resistance
64
Figure 2.14: Determination of driving point resistance of the voltage source
parallel
18 R34 =1/((1/ R4 ) +(1/( R3 + R12 ) ) ) ; // R12 and R3 a r e i n
p a r a l l e l w i t h R4
19 R56 =1/((1/ R6 ) +(1/( R5 + R34 ) ) ) ; // R34 and R5 a r e i n
p a r a l l e l w i t h R6
20 Rab = R7 + R56 ; // R56 and R7 a r e i n s e r i e s
21 RL = Rab ;
22 printf ( ” \n Load r e s i t a n c e t o t h e 10 v o l t s o u r c e=%d
ohm \n ” , RL )
65
Scilab code Exa 2.14 Determination of driving point resistance of the voltage sour
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 14 . s c e
7
8 clc ;
9 clear ;
10 I =5/31; // C i r c u i t c u r r e n t i n ampere
11 Vs =5; // S o u r c e v o l t a g e i n v o l t
12 R1 =3; // R e s i s t a n c e i n ohm
13 R2 =4; // R e s i s t a n c e i n ohm
14 driving_point_resistance = Vs / I ;
15 printf ( ” \n The d r i v i n g p o i n t r e s i s t a n c e o f t h e
v o l t a g e s o u r c e=%d ohm \n ” ,
driving_point_resistance )
Scilab code Exa 2.15 Determination of driving point resistance at the pair of term
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 15 . s c e .
7
8 clc ;
66
Figure 2.15: Determination of driving point resistance at the pair of terminals
67
9 clear ;
10 R_aB =5;
11 R_AB =6;
12 R_BC =6;
13 R_CD =5;
14 R_AE =25;
15 R_ED =10;
16 R_DA =5;
17 R_EC =50;
18
19 // For t r i a n g l e AED
20 R_OA =( R_AE * R_DA ) /( R_AE + R_ED + R_DA ) ;
21 R_OD =( R_ED * R_DA ) /( R_AE + R_ED + R_DA ) ;
22 R_OE =( R_AE * R_ED ) /( R_AE + R_ED + R_DA ) ;
23
24 // For t r i a n g l e OCD
25 R_OC = R_OE + R_EC ;
26 R_OdashO =( R_OC * R_OD ) /( R_OC + R_OD + R_CD ) ;
27 R_OdashD =( R_CD * R_OD ) /( R_OC + R_OD + R_CD ) ;
28 R_OdashC =( R_OC * R_CD ) /( R_OC + R_OD + R_CD ) ;
29
30 R_OB = R_OA + R_AB ;
31 R_BOdash =(( R_OB + R_OdashO ) *( R_BC +( R_OdashC ) ) ) /( R_OB +
R_OdashO + R_BC + R_OdashC ) ;
32 Rab =( R_aB +( R_BOdash ) +( R_OdashD ) ) ;
33 printf ( ” \n The d r i v i n g p o i n t r e s i s t a n c e =%2 . 1 f ohms
\n ” , Rab )
Scilab code Exa 2.16 Determination of resistance value and amount of power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
68
Figure 2.16: Determination of resistance value and amount of power
69
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex2 16 . s c e .
7
8 clc ;
9 clear ;
10 R1 =10;
11 I1 =2.5;
12 V2 =60;
13 R2 =30;
14 I2 = V2 / R2 ; //Ohm’ s law
15 Gs =(1/ R1 ) +(1/ R2 ) ;
16 Rs =1/ Gs ;
17 Isc = I1 + I2 ;
18 Voc = Isc * Rs ;
19
20 // c a s e ( a )
21 printf ( ” \n ( a ) ” )
22 R = Rs ;
23 printf ( ” \n The v a l u e o f R which a b s o r b s maximum
power from t h e c i r c u i t =%1 . 1 f ohm \n ” ,R )
24
25 // c a s e ( b )
26 printf ( ” \n ( b ) ” )
27 Pm = Voc ^2/(4* Rs ) ;
28 printf ( ” \n The amount o f power=%2 . 0 f W \n ” , Pm )
70
Chapter 3
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 1 . s c e
7
8 clc ;
9 clear ;
10 L =2.5;
11 s = -1; // c o m p l e x f r e q u e n c y , which i s t a k e n from t h e
c o e f f i c i e n t value o f time in the given
e x p o n e n t i a l term
12 Z=L*s;
13 printf ( ” \n I m p e d e n c e=%1 . 1 f ohm \n ” ,Z )
14 Y =1/ Z ;
15 printf ( ” \n A d m i t t a n c e=%0 . 1 f mho \n ” ,Y )
71
Figure 3.1: Calculation of impedence and admittance
16 // V o l t a g e c a n n o t be d e t e r m i n e d s i n c e i t i n v o l v e s
equation in the r e s u l t
Scilab code Exa 3.3 Determination of voltage across resistance and inductance and
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 3 ( b ) . s c e .
7
8 clc ;
9 clear ;
10 R =1;
11 L =1;
12 C =0.1;
13 // c a s e ( b )
72
Figure 3.2: Determination of voltage across resistance and inductance and
capacitance
14 s =0;
15 //Z=R+(L∗ s ) +(1/(C∗ s ) )
16 Z =0; //Z=s / ( s ˆ2+ s +10)
17 // v o l t a g e a c r o s s t h e r e s i s t a n c c e and i n d u c t a n c e a r e
zero
18
19 Vc =100/( s ^2+ s +10) ; // s i m p l i f i e d form o f ( 1 0 s / ( s ˆ2+ s
+10) ) / ( 0 . 1 s )
20 printf ( ” \n V o l t a g e a c r o s s t h e c a p a c i t a n c e=%d v o l t ” ,
Vc )
Scilab code Exa 3.4 Determination of current through conductance and capacitance a
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
73
Figure 3.3: Determination of current through conductance and capacitance
and inductance
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 4 ( b ) . s c e
7
8
9 // c a s e ( b )
10 clc ;
11 clear ;
12 R =1;
13 L =0.1;
14 C =1;
15 I =10;
16 s =0; // c o m p l e x f r e q u e n c y
17 V =(10* s ) /( s ^2+ s +10) ; // v o l t a g e a c r o s s t h e
parallel circuit
18 iG = V * R ;
19 printf ( ” \n C u r r e n t t h r o u g h c o n d u c t a n c e=%d A \n ” , iG )
20 iC = V * C ;
21 printf ( ” \n C u r r e n t t h r o u g h c a p a c i t a n c e=%d A \n ” , iC )
22 iL =100/( s ^2+ s +10) ; // s i m p l i f i e d form o f V/ Ls =(10 s
74
Figure 3.4: Determination of current and voltage across inductance
/ ( s ˆ2+ s +10) ) / ( 0 . 1 s )
23 printf ( ” \n C u r r e n t t h r o u g h i n d u c t a n c e=%d A \n ” , iL )
Scilab code Exa 3.5 Determination of current and voltage across inductance
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 5 . s c e
75
7
8 clc ;
9 clear ;
10 R =2;
11 L =2;
12 C =1/12;
13 omega =3;
14 XL = omega * L ;
15 XC =1/( omega * C ) ;
16 Z = complex (R , XL - XC ) ;
17 Vl =12* sqrt (2) ;
18 theta =30;
19 V = complex ( Vl * cosd ( theta ) , Vl * sind ( theta ) ) ;
20 I=V/Z;
21 I_mag = sqrt ( real ( I ) ^2+ imag ( I ) ^2) ;
22 I_angle = atand ( imag ( I ) / real ( I ) ) ;
23 printf ( ” \n C u r r e n t f l o w t h r o u g h t h e g i v e n c i r c u i t =%d
a n g l e : %d d e g r e e \n ” , I_mag , I_angle )
24
25 XL = complex (0 ,6) ;
26 V_L = I * XL ;
27 V_L_mag = sqrt ( real ( V_L ) ^2+ imag ( V_L ) ^2) ;
28 V_L_angle = atand ( imag ( V_L ) / real ( V_L ) ) ;
29 printf ( ” \n V o l t a g e a c r o s s t h e i n d u c t a n c e=%d a n g l e : %2
. 0 f d e g r e e \n ” , V_L_mag , V_L_angle )
30 // r e s u l t : Vl ( t ) =36 s i n ( wt +75) , i ( t ) =6 s i n ( wt −15)
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
76
Figure 3.5: Determination of forced component of current
77
5
6 // Ex3 6 . s c e
7
8 clc ;
9 clear ;
10 G =3; // c o n d u c t a n c e i n mho
11 L =1/4; // I n d u c t o r v a l u e i n h e n r y
12 C =3; // c a p a c i t o r v a l u e i n f a r a d
13 omega =2; // t a k e n from i ( t )
14 XL =1/( omega * L ) ;
15 XC =( omega * C ) ;
16 Y = complex (G , XC - XL ) ;
17 I = complex (15 ,0) ;
18 V=I/Y;
19 BL = complex (0 , -2) ;
20 I_L = V * BL ;
21 I_L_mag = sqrt ( real ( I_L ) ^2+ imag ( I_L ) ^2) ;
22 I_L_angle = atand ( imag ( I_L ) / real ( I_L ) ) -180;
23 printf ( ” \n The c u r r e n t t h r o u g h i n d u c t o r=%d a n g l e : %2
. 1 f d e g r e e \n ” , I_L_mag , I_L_angle )
24 // r e s u l t : i L ( t ) =6 c o s ( 2 t − 1 4 3 . 1 )
Scilab code Exa 3.7 Determination of average and RMS value of voltage
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 7 . s c e
7
8 clc ;
9 clear ;
78
Figure 3.6: Determination of average and RMS value of voltage
10
11 printf ( ” \n ( a ) ” )
12 T =(2* %pi ) ; // Time v a l u e f o r one c y c l e
13 V =15; //Maximum v o l t a g e i n v o l t
14 t0 = %pi /4; t1 = %pi ; // t i m e v a l u e s f o r p a r t i c u l a r
period
which i s t a k e n from t h e g i v e n v o l t a g e wave form
15 Vav =(1/ T ) * integrate ( ’V∗ s i n ( t ) ’ , ’ t ’ ,t0 , t1 ) ;
16 printf ( ” \n A v e r a g e v a l u e=%1 . 3 f v o l t \n ” , Vav )
17
18 printf ( ” \n ( b ) ” )
19 Vrms = sqrt ((( V ^2) / T ) * integrate ( ’ (1− c o s ( 2 ∗ t ) ) /2 ’ , ’ t ’ ,
t0 , t1 ) ) ; // s i n ˆ 2 ( t ) =(1− c o s ( 2 t ) ) /2
20 printf ( ” \n RMS v a l u e=%1 . 2 f v o l t \n ” , Vrms )
21 // Answer g i v e n i n t h e book f o r Vrms i s wrong
79
Figure 3.7: Determination of circuit current and voltage using phasor method
80
Scilab code Exa 3.8 Determination of circuit current and voltage using phasor meth
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // EX3 8 . s c e
7
8 clc ;
9 clear ;
10 R =2; // R e s i s t a n c e i n ohm
11 L =2; // I n d u c t o r v a l u e i n h e n r y
12 C =1/12; // c a p a c i t o r v a l u e i n f a r a d
13 omega =3; // Taken from v ( t ) v a l u e
14 // g i v e n v ( t ) =12 s i n ( 3 t +30) ;
15 Vm =12;
16 Vrms = Vm / sqrt (2) ;
17 theta =30;
18
19 Z = complex (R ,( omega * L ) -(1/( omega * C ) ) ) ;
20 V = complex ( Vrms * cosd ( theta ) , Vrms * sind ( theta ) ) ;
21 I=V/Z;
22 I_mag = sqrt ( real ( I ) ^2+ imag ( I ) ^2) ;
23 I_ang = atand ( imag ( I ) / real ( I ) ) ;
24 printf ( ” \n C i r c u i t c u r r e n t=%1 . 0 f a n g l e : %d d e g r e e \n ”
, I_mag , I_ang )
25
26 Vr = I * R ;
27 Vr_mag = sqrt ( real ( Vr ) ^2+ imag ( Vr ) ^2) ;
28 Vr_ang = atand ( imag ( Vr ) / real ( Vr ) ) ;
29 printf ( ” \n V o l t a g e a c r o s s t h e r e s i s t a n c e =%1 . 0 f angle
: %d d e g r e e \n ” , Vr_mag , Vr_ang )
30
31 theta1 =90;
32 Xl = complex ( omega * L * cosd ( theta1 ) , omega * L * sind ( theta1 )
);
33 Vl = I * Xl ;
81
34 Vl_mag = sqrt ( real ( Vl ) ^2+ imag ( Vl ) ^2) ;
35 Vl_ang = atand ( imag ( Vl ) / real ( Vl ) ) ;
36 printf ( ” \n V o l t a g e a c r o s s t h e i n d u c t a n c e=%1 . 0 f a n g l e
: %1 . 0 f d e g r e e \n ” , Vl_mag , Vl_ang )
37
38 theta2 = -90;
39 Xc = complex ( cosd ( theta2 ) /( omega * C ) , sind ( theta2 ) /(
omega * C ) ) ;
40 Vc = I * Xc ;
41 Vc_mag = sqrt ( real ( Vc ) ^2+ imag ( Vc ) ^2) ;
42 Vc_ang = atand ( imag ( Vc ) / real ( Vc ) ) -180;
43 printf ( ” \n V o l t a g e a c r o s s t h e c a p a c i t a n c e=%1 . 0 f
a n g l e : %d d e g r e e \n ” , Vc_mag , Vc_ang )
Scilab code Exa 3.9 Determination of current through different elements and voltag
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 9 . s c e
7
8 clc ;
9 clear ;
10 G =3; // C o n d u c t a n c e i n mho
11 L =1/4; // I n d u c t o r v a l u e i n h e n r y
12 C =3; // c a p a c i t o r v a l u e i n f a r a d
13 // Given i ( t ) =15 c o s 2 t ;
14 Im =15;
15 Irms = Im / sqrt (2) ;
16 omega =2;
17 theta =0;
82
Figure 3.8: Determination of current through different elements and voltage
83
18
19 Y = complex (G ,( omega * C ) -(1/( omega * L ) ) ) ;
20 I = complex ( Irms * cosd ( theta ) , Irms * sind ( theta ) ) ;
21 V = I / Y ;
22 V_mag = sqrt ( real ( V ) ^2+ imag ( V ) ^2) ;
23 V_ang = atand ( imag ( V ) / real ( V ) ) ;
24 printf ( ” \n V o l t a g e a c r o s s t h e e l e m e n t s=%1 . 2 f a n g l e :
%2 . 1 f d e g r e e \n ” , V_mag , V_ang )
25
26 Ig = V * G ;
27 Ig_mag = sqrt ( real ( Ig ) ^2+ imag ( Ig ) ^2) ;
28 Ig_ang = atand ( imag ( Ig ) / real ( Ig ) ) ;
29 printf ( ” \n C u r r e n t t h r o u g h t h e c o n d u c t o r=%1 . 2 f angle
: %2 . 1 f d e g r e e \n ” , Ig_mag , Ig_ang )
30
31 theta1 = -90;
32 Bl = complex ( cosd ( theta1 ) /( omega * L ) , sind ( theta1 ) /(
omega * L ) ) ;
33 Il = V * Bl ;
34 Il_mag = sqrt ( real ( Il ) ^2+ imag ( Il ) ^2) ;
35 Il_ang = atand ( imag ( Il ) / real ( Il ) ) -180;
36 printf ( ” \n C u r r e n t t h r o u g h t h e i n d u c t o r=%1 . 2 f a n g l e :
%3 . 1 f d e g r e e \n ” , Il_mag , Il_ang )
37
38 theta2 =90;
39 Bc = complex ( cosd ( theta1 ) * omega *C , sind ( theta1 ) * omega * C
);
40 Ic = V * Bc ;
41 Ic_mag = sqrt ( real ( Ic ) ^2+ imag ( Ic ) ^2) ;
42 Ic_ang = atand ( imag ( Ic ) / real ( Ic ) ) ;
43 printf ( ” \n C u r r e n t t h r o u g h t h e c a p a c i t o r=%2 . 3 f angle
: %2 . 1 f d e g r e e \n ” , Ic_mag , Ic_ang )
84
Figure 3.9: Determination of voltage and current using complex method
85
Scilab code Exa 3.10 Determination of voltage and current using complex method
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 10 . s c e
7
8 clc ;
9 clear ;
10 // d a t a s a r e t a k e n from e x a m p l e 3 . 8
11 R =2; // R e s i s t a n c e i n ohm
12 L =2; // I n d u c t o r v a l u e i n h e n r y
13 C =1/12; // c a p a c i t o r v a l u e i n f a r a d
14 omega =3; // Taken from v ( t ) v a l u e
15 // g i v e n v ( t ) =12 s i n ( 3 t +30) ;
16 Vm =12;
17 Vrms = Vm / sqrt (2) ;
18 theta =30;
19
20 Z = complex (R ,( omega * L ) -(1/( omega * C ) ) ) ;
21 V = complex ( Vrms * cosd ( theta ) , Vrms * sind ( theta ) ) ;
22 I = V / Z ; // from Ohm’ s law
23 disp (I , ’ c i r c u i t c u r r e n t i s ’ )
24
25 Vr = I * R ;
26 disp ( Vr , ’ V o l t a g e a c r o s s t h e r e s i s t a n c e i s ’ )
27
28 theta1 =90;
29 Xl = complex ( omega * L * cosd ( theta1 ) , omega * L * sind ( theta1 )
);
30 Vl = I * Xl ;
31 disp ( Vl , ’ V o l t a g e a c r o s s t h e i n d u c t a n c e i s ’ )
32
33 theta2 = -90;
34 Xc = complex ( cosd ( theta2 ) /( omega * C ) , sind ( theta2 ) /(
omega * C ) ) ;
86
Figure 3.10: Calculation of resonance frequency and quality factor and band-
width
35 Vc = I * Xc ;
36 disp ( Vc , ’ V o l t a g e a c r o s s t h e c a p a c i t a n c e i s ’ )
37
38 Vsum = Vr + Vl + Vc ;
39 disp ( Vsum , ’ The sum o f t h r e e e l e m e n t v o l t a g e s i s ’ )
40
41 // Answers a r e d i s p l a y e d i n a c o m p l e x mode ( r e a l and
imaginary ) because i t i s solved in complex
method
Scilab code Exa 3.11 Calculation of resonance frequency and quality factor and ban
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
87
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 11 . s c e
7
8 clc ;
9 clear ;
10 R =10 e3 ; // R e s i s t a n c e i n ohm
11 L =50.7 e -6; // I n d u c t o r v a l u e i n h e n r y
12 C =500 e -12; // c a p a c i t o r v a l u e in farad
13
14 fr =1/(2* %pi * sqrt ( L * C ) ) ;
15 printf ( ” \n R e s o n a n c e f r e q u e n c y=%1 . 0 f MHz \n ” , fr *1 e
-6)
16
17 Q =(1/ R ) * sqrt ( L / C ) ;
18 printf ( ” \n Q u a l i t y f a c t o r =%1 . 5 f \n ” ,Q )
19
20 f1 =( - fr /(2* Q ) ) +( fr * sqrt ((1/(2* Q ) ) ^2+1) ) ;
21 printf ( ” \n Lower h a l f power f r e q u e n c y=%2 . 1 f kHz \n ” ,
f1 *1 e -3)
22
23 f2 =( fr /(2* Q ) ) +( fr * sqrt ((1/(2* Q ) ) ^2+1) ) ;
24 printf ( ” \n Upper h a l f power f r e q u e n c y=%5 . 1 f kHz \n ” ,
f2 *1 e -3)
25
26 BW = f2 - f1 ;
27 printf ( ” \n Bandwidth=%5 . 0 f kHz \n ” , BW *1 e -3)
28
29 // Answer v a r y d u e t o round o f f e r r o r i n f r , Q
Calculation
88
Figure 3.11: Calculation of resonance frequency and quality factor and band-
width
89
Scilab code Exa 3.12 Calculation of resonance frequency and quality factor and ban
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 12 . s c e
7
8 clc ;
9 clear ;
10 R =10 e3 ; // R e s i s t a n c e i n ohm
11 L =50.7 e -6; // I n d u c t o r v a l u e in henry
12 C =500 e -12; // c a p a c i t o r v a l u e i n f a r a d
13
14 fr =1/(2* %pi * sqrt ( L * C ) ) ;
15 printf ( ” \n R e s o n a n c e f r e q u e n c y=%1 . 0 f MHz \n ” , fr *1 e
-6)
16
17 Q =( R ) * sqrt ( C / L ) ;
18 printf ( ” \n Q u a l i t y f a c t o r =%2 . 1 f \n ” ,Q )
19
20 f1 =( - fr /(2* Q ) ) +( fr * sqrt ((1/(2* Q ) ) ^2+1) ) ;
21 printf ( ” \n Lower h a l f power f r e q u e n c y=%3 . 0 f kHz \n ” ,
f1 *1 e -3)
22
23 f2 =( fr /(2* Q ) ) +( fr * sqrt ((1/(2* Q ) ) ^2+1) ) ;
24 printf ( ” \n Upper h a l f power f r e q u e n c y=%4 . 0 f kHz \n ” ,
f2 *1 e -3)
25
26 BW = f2 - f1 ;
27 printf ( ” \n Bandwidth=%2 . 0 f kHz \n ” , BW *1 e -3)
90
Figure 3.12: Determination of current using nodal method
91
Scilab code Exa 3.13 Determination of current using nodal method
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 13 . s c e
7
8 clc ;
9 clear ;
10
11 // from t h e f i g u r e 3 . 2 5 t h e b e l o w v a l u e s a r e t a k e n
12 Z1 = complex (1.2 ,1.6) ;
13 Z2 = complex (1.0 , -1.75) ;
14 Z12 = complex (6 ,8) ;
15
16 V1 = complex (110 ,0) ;
17 V2 = complex (110* cosd ( -5) ,110* sind ( -5) ) ;
18
19 //VA i s c a l c u l a t e d from t h e n o d a l e q u a t i o n o f node A
20 VA =(( V1 / Z1 ) +( V2 / Z2 ) ) /(1/ Z1 + 1/ Z2 + 1/ Z12 ) ;
21 VA_mag = sqrt ( real ( VA ) ^2+ imag ( VA ) ^2) ;
22 VA_ang = atand ( imag ( VA ) / real ( VA ) ) ;
23 printf ( ” \n V3=%3 . 0 f a n g l e : %1 . 2 f d e g r e e \n ” , VA_mag ,
VA_ang )
24
25 I1 =( V1 - VA ) / Z1 ;
26 I1_mag = sqrt ( real ( I1 ) ^2+ imag ( I1 ) ^2) ;
27 I1_ang = atand ( imag ( I1 ) / real ( I1 ) ) -180;
28 printf ( ” \n I 1=%1 . 2 f a n g l e : %3 . 2 f d e g r e e \n ” , I1_mag ,
I1_ang )
29
30 I2 =( V2 - VA ) / Z2 ;
31 I2_mag = sqrt ( real ( I2 ) ^2+ imag ( I2 ) ^2) ;
32 I2_ang = atand ( imag ( I2 ) / real ( I2 ) ) ;
33 printf ( ” \n I 2=%2 . 0 f a n g l e : %2 . 0 f d e g r e e \n ” , I2_mag ,
I2_ang )
92
Figure 3.13: Determination of voltage using nodal method
34
35 I3 =( VA ) / Z12 ;
36 I3_mag = sqrt ( real ( I3 ) ^2+ imag ( I3 ) ^2) ;
37 I3_ang = atand ( imag ( I3 ) / real ( I3 ) ) ;
38 printf ( ” \n I 3=%2 . 2 f a n g l e : %2 . 1 f d e g r e e \n ” , I3_mag ,
I3_ang )
39
40 // Answer v a r y d u e t o round o f f e r r o r
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
93
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 14 . s c e
7
8 clc ;
9 clear ;
10
11 // i ( t )=s q r t ( 2 ) ∗1 e −4∗ c o s ( 4 ∗ 1 0 ˆ 7 ∗ t ) ;
12 a1 = complex (5 ,4.04) ; b1 = complex (0 , -0.04) ; c1 =1/10;
// t h e s e a r e t h e
c o e f f i c i e n t v a l u e s o f VA, VB and s o u r c e o b t a i n e d
from t h e node A i n t h e g i v e n c i r c u i t
13 a2 = complex (200 , -0.04) ; b2 = complex (1.2 , -1.56) ; c2 =0;
// t h e s e a r e t h e
c o e f f i c i e n t v a l u e s o f VA, VB and s o u r c e o b t a i n e d
from t h e node B i n t h e g i v e n c i r c u i t
14 del = det ([ a1 b1 ; a2 b2 ]) ;
15 delB = det ([ a1 c1 ; a2 c2 ]) ;
16 VB = delB / del ;
17
18 VB_mag = sqrt ( real ( VB ) ^2+ imag ( VB ) ^2) ;
19 VB_ang = atand ( imag ( VB ) / real ( VB ) ) +180;
20 printf ( ” \n Vo=%1 . 1 f a n g l e : %3 . 1 f d e g r e e \n ” , VB_mag ,
VB_ang )
21
22 // Answer v a r y due t o roundoff error
23 // R e s u l t : Vo ( t )=s q r t ( 2 ) ∗ 1 . 5 ∗ c o s ( 4 ∗ 1 0 ˆ 7 ∗ t + 1 5 7 . 7 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
94
Figure 3.14: Determination of current using mesh analysis
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 15 . s c e
7
8 clc ;
9 clear ;
10 V1 = complex (12 ,0) ;
11 // c u r r e n t s o u r c e and i t s p a r a l l e l i m p e d a n c e g i v e s
the voltage source
12 V2 = complex (5* cosd ( -30) ,5* sind ( -30) ) * complex (6 , -3) ;
13 // f o r l o o p 1 , t h e c o e f f i c i e n t o f I 1 , I 2 and s o u r c e
i s g i v e n below
14 a1 = complex (10+6 ,15) ;
15 b1 = - complex (10 ,15) ;
16 c1 = V1 ;
17 // f o r l o o p 2 , t h e c o e f f i c i e n t o f I 1 , I 2 and s o u r c e
i s g i v e n below
18 a2 = - complex (10 ,15) ;
95
Figure 3.15: Determination of voltage using mesh analysis
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
96
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // EX3 16 . s c e
7
8 clc ;
9 clear ;
10 // from t h e mesh e q u a t i o n s c o e f f i c i e n t o f I1 , I2 , and
s o u r c e i s g i v e n below
11 a1 = complex (4 , -2) ;
12 b1 = - complex (3 , -2) ;
13 c1 = complex (12 ,0) ;
14 a2 = - complex (3 ,4) ;
15 b2 = complex (5 ,3) ;
16 c2 = complex (0) ;
17
18 del1 = det ([ c1 b1 ; c2 b2 ]) ;
19 del2 = det ([ a1 c1 ; a2 c2 ]) ;
20 del = det ([ a1 b1 ; a2 b2 ]) ;
21 I2 = del2 / del ;
22 I1 = del1 / del ;
23
24 V2 =(2* I2 ) +((3*( -2* %i ) ) *( I1 - I2 ) ) ;
25 V2_mag = sqrt ( real ( V2 ) ^2+ imag ( V2 ) ^2) ;
26 V2_ang = atand ( imag ( V2 ) / real ( V2 ) ) ;
27 printf ( ” \n V2=%1 . 2 f a n g l e : %2 . 2 f d e g r e e \n ” , V2_mag ,
V2_ang )
28 // Anawer v a r y d u e t o round o f f e r r o r
29 // R e s u l t : v2 ( t ) = 4.8 7 ∗ s q r t ( 2 ) s i n ( 2 t − 6 6 . 0 4 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
97
Figure 3.16: Determination of voltage using Thevenins theorem
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 17 . s c e
7
8 clc ;
9 clear ;
10 // Below v a l u e s a r e t a k e n from t h e g i v e n c i r c u i t ( fig
.3.29)
11 Z1 = complex (5 , -5) ;
12 Z2 = complex (5 , -5) ;
13 Z3 = complex (10 ,10) ;
14 V = complex (100 ,0) ;
15
16 I = V /( Z1 + Z2 ) ;
17 Vab = I * Z2 ;
18 Zs =( Z1 * Z2 ) /( Z1 + Z2 ) + Z3 ;
98
Figure 3.17: Determination of current using Thevenins theorem
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
99
6 // Ex3 18 . s c e
7
8 clc ;
9 clear ;
10 // Below v a l u e s a r e t a k e n from t h e g i v e n circuit ( fig
.3.27)
11 Z1 = complex (6 ,0) ;
12 Z2 = complex (10 ,15) ;
13 Z3 = complex (6 , -3) ;
14
15 Zs =( Z1 * Z2 ) /( Z1 + Z2 ) + Z3 ;
16 V =12;
17 Va =V -( V /( Z1 + Z2 ) ) * real ( Z3 ) ;
18 Is = complex (5* cosd ( -30) ,5* sind ( -30) ) ;
19 Vb = Is * Z3 ;
20 Voc = Va - Vb ;
21 I = Voc /( Zs +3) ;
22 I_mag = sqrt ( real ( I ) ^2+ imag ( I ) ^2) ;
23 I_ang = atand ( imag ( I ) / real ( I ) ) +180;
24 printf ( ” \n The r e q u i r e d c u r r e n t= %1 . 4 f a n g l e : %3 . 2 f
d e g r e e \n ” , I_mag , I_ang )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 19 . s c e
7
8 clc ;
9 clear ;
100
Figure 3.18: Determination of current using Norton theorem
10 // Below v a l u e s a r e t a k e n from t h e g i v e n c i r c u i t ( f i g
.3.27)
11 Z1 = complex (6 ,0) ;
12 Z2 = complex (10 ,15) ;
13 Z3 = complex (6 , -3) ;
14 Zs =( Z1 * Z2 ) /( Z1 + Z2 ) + Z3 ;
15 Vs = complex (12 ,0) ;
16 Is = complex (5* cosd ( -30) ,5* sind ( -30) ) ;
17
18 // f o r l o o p 1 , t h e c o e f f i c i e n t o f I 2 , I s c and s o u r c e
i s given below
19 a1 = Z1 + Z2 ;
20 b1 = Z1 ;
21 c1 = Vs ;
22 // f o r l o o p 2 , t h e c o e f f i c i e n t o f I 1 , I 2 and s o u r c e
i s given below
23 a2 = Z2 ;
24 b2 = - Z3 ;
101
Figure 3.19: Calculation of impedence and maximum power
25 c2 = Is * Z3 ;
26 del2 = det ([ a1 c1 ; a2 c2 ]) ;
27 del = det ([ a1 b1 ; a2 b2 ]) ;
28
29 Isc = del2 / del ;
30 Ys =1/ Zs ;
31 I =( Isc / Ys ) /((1/ Ys ) +3) ;
32 I_mag = sqrt ( real ( I ) ^2+ imag ( I ) ^2) ;
33 I_ang = atand ( imag ( I ) / real ( I ) ) +180;
34 printf ( ” \n C u r r e n t t h r o u g h t h e 3 ohm r e s i s t o r = %1 . 4 f
a n g l e : %3 . 2 f d e g r e e \n ” , I_mag , I_ang )
102
Scilab code Exa 3.20 Calculation of impedence and maximum power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 20 . s c e .
7
8 clc ;
9 clear ;
10
11 Vm =16* sqrt (2) ; //Maximum v o l t a g e v a l u e i n v o l t
12 Vrms = Vm / sqrt (2) ; //RMS v o l t a g e i n v o l t
13 R =1; // r e s i s t a n c e i n ohm
14 C = - %i ; // c a p a c i t a n c e i n ohm
15 R1 =2; // r e s i s t a n c e i n ohm
16 R2 =3; // r e s i s t a n c e i n ohm
17 C1 = - %i ; // c a p a c i t a n c e i n ohm
18 // A f t e r s i m p l i c a t i o n o f t h e n e t w o r k by s t a r −d e l t a
transformation
19 Za = complex (2 , -10) /26;
20 Zb = complex (3 , -15) /26;
21 Zc = complex (30 ,6) /26;
22 Voc =( Vrms *( Zc + C ) ) /( R + Za + Zc + C ) ;
23 Zs =(1/((1/( Za + R ) ) +(1/( Zc + C ) ) ) ) + Zb ;
24
25 printf ( ” \n ( a ) ” )
26 Zl = Zs ;
27 Zl_mag = sqrt ( real ( Zl ) ^2+ imag ( Zl ) ^2) ;
28 Zl_ang = atand ( imag ( Zl ) / real ( Zl ) ) ;
29 printf ( ” \n Z L=%1 . 2 f a n g l e : %2 . 2 f d e g r e e \n ” ,
Zl_mag , Zl_ang )
30
103
Figure 3.20: Determination of voltage and power and reactive power
31 printf ( ” \n ( b ) ” )
32 Voc_mag = sqrt ( real ( Voc ) ^2+ imag ( Voc ) ^2) ;
33 Pmax = Voc_mag ^2/(2* real ( Zl ) ) ;
34 printf ( ” \n Maximum power=%2 . 2 f w a t t \n ” , Pmax )
35 // There i s a m i s t a k e i n Zs c a l c u l a t i o n . Zs
= 0 . 7 5 5 5 − 0 . 8 5 3 9 i i s wrong . t h e c o r r e c t v a l u e o f
Zs = 0 . 6 8 2 9 − 0 . 8 5 3 6 i
36 // So t h e a n s w e r v a r y
Scilab code Exa 3.21 Determination of voltage and power and reactive power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
104
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 21 . s c e
7
8 clc ;
9 clear ;
10 P1 =7 e3 ; // s u p p l i e d power i n w a t t
11 pf1 =0.8; // l a g g i n g power f a c t o r
12 // b e l o w v a l u e s a r e t a k e n from t h e g i v e ncircuit ( fig
.3.39)
13 Z1 = complex (0.8 ,1) ;
14 Z2 = complex (1.4 ,1.6) ;
15 V1 =440; // t e r m i n a l v o l t a g e i n v o l t
16 PL =10 e3 ; // power r e q u i r e d by t h e l o a d i n w a t t
17 pf2 =0.8; // l a g g i n g power f a c t o r
18
19 I1 = P1 /( V1 * pf1 ) ;
20 Pr1 = P1 -( I1 ^2* real ( Z1 ) ) ;
21 Q1 = P1 * tand ( acosd ( pf1 ) ) ;
22 Qr1 = Q1 -( I1 ^2* imag ( Z1 ) ) ;
23 VA = sqrt ( Pr1 ^2+ Qr1 ^2) ;
24 VL = VA / I1 ;
25 printf ( ” \n V L=%3 . 1 f V \n ” , VL )
26
27 QL = PL * tand ( acosd ( pf2 ) ) ;
28 Pr2 = PL - Pr1 ;
29 Qr2 = QL - Qr1 ;
30 VA_load = sqrt ( Pr2 ^2+ Qr2 ^2) ;
31 I2 = VA_load / VL ;
32
33 P2 = Pr2 +( I2 ^2* real ( Z2 ) ) ;
34 Q2 = Qr2 +( I2 ^2* imag ( Z2 ) ) ;
35 V2 = sqrt ( P2 ^2+ Q2 ^2) / I2 ;
36 printf ( ” \n V2=%3 . 1 f V \n ” , V2 )
37 printf ( ” \n R e a c t i v e power : P2=%4 . 1 f W \ t Q2=%4 . 1 f Var
\n ” ,P2 , Q2 )
105
Figure 3.21: Determination of capacitance and current of alternator
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 22 . s c e .
7
8 clc ;
9 clear ;
10 V =230; // S u p p l y v o l t a g e i n v o l t
11 PL1 =10 E3 ; // s u p p l y power t o l o a a d 1 i n w a t t
12 pf1 =0.7; // l a g g i n g power f a c t o r v a l u e o f l o a d 1
106
13 P2 =10 E3 ; // s u p p l y power t o l o a d 2 i n w a t t
14 pf2 =0.5; // l a g g i n g power f a c t o r v a l u e o f l o a d 2
15
16 printf ( ” \n ( a ) ” )
17 PL2 = P2 * pf2 ;
18 QL1 = PL1 * tand ( acosd ( pf1 ) ) ;
19 QL2 = PL2 * tand ( acosd ( pf2 ) ) ;
20 PL = PL1 + PL2 ;
21 QL = QL1 + QL2 ;
22 QC = - QL ;
23 IC = QC / V ;
24 XC = QC / IC ^2;
25 f =50;
26 C =1/(2* %pi * f * - XC ) ;
27 printf ( ” \n The v a l u e o f c a p a c i t a n c e=%4 . 1 f micro −
f a r a d \n ” ,C *1 e6 )
28
29 printf ( ” \n ( b ) \ t ( i ) ” )
30 kVA = sqrt ( PL ^2+ QL ^2) ;
31 Ig = kVA / V ;
32 printf ( ” \n Magnitude a l t e r n a t o r current without
c a p a c i t o r=%3 . 1 f A \n ” , Ig )
33 printf ( ” \n\ t ( i i ) ” )
34 kVA = PL ;
35 Ig = kVA / V ;
36 printf ( ” \n Magnitude a l t e r n a t o r c u r r e n t with
c a p a c i t o r=%2 . 1 f A \n ” , Ig )
37 // Answer v a r y d u e t o r o u n d o f f e r r o r
Scilab code Exa 3.27 Plotting the four components from the given circuit
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
107
Figure 3.22: Plotting the four components from the given circuit
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex3 27 ( b ) . s c e
7
8 clc ;
9 clear ;
10 // c a s e ( b )
11 // from c a s e ( a ) r e s u l t v ( t ) =5+6.36 s i n ( t ) +2.12 s i n ( 3 t
) +1.27 s i n ( 5 t )
12 V0 =5
13 V1 =6.36/ sqrt (2) ;
14 V3 =2.12/ sqrt (2) ;
15 V5 =1.27/ sqrt (2) ;
16
17 omega0 =0;
18 omega1 =1;
19 omega3 =3;
20 omega5 =5;
21
22 Vdc =(2* V0 ) /(2+ %i * omega0 ) ;
23 V1 =(2* V1 ) /(2+ %i * omega1 )
108
24 V3 =(2* V3 ) /(2+ %i * omega3 )
25 V5 =(2* V5 ) /(2+ %i * omega5 )
26
27 Vdc_mag = sqrt ( real ( Vdc ) ^2+ imag ( Vdc ) ^2) ;
28 Vdc_ang = atand ( imag ( Vdc ) / real ( Vdc ) ) ;
29 V1_mag = sqrt ( real ( V1 ) ^2+ imag ( V1 ) ^2) ;
30 V1_ang = atand ( imag ( V1 ) / real ( V1 ) ) -180;
31 V3_mag = sqrt ( real ( V3 ) ^2+ imag ( V3 ) ^2) ;
32 V3_ang = atand ( imag ( V3 ) / real ( V3 ) ) ;
33 V5_mag = sqrt ( real ( V5 ) ^2+ imag ( V5 ) ^2) ;
34 V5_ang = atand ( imag ( V5 ) / real ( V5 ) ) ;
35
36
37 t =[0:0.1:2* %pi ];
38
39 Vc1 = V1_mag * sin (t - V1_ang ) ;
40 Vc3 = V3_mag * sin ((3* t ) - V3_ang ) ;
41 Vc5 = V5_mag * sin ((5* t ) - V5_ang ) ;
42 for tt =1: length ( t )
43 V ( tt ) = Vdc_mag * sin ( %pi /2) ;
44 end
45 V =V ’;
46 Vc = V + Vc1 + Vc3 + Vc5 ;
47
48 plot (t ,[ Vc1 ; Vc3 ; Vc5 ; V ; Vc ])
49
50 title ( ’ The dc , f u n d a m e n t a l , t h i r d and f i f t h
h a r m o n i c s co m p o n e n t s and r e s u l t a n t w a v e f o r m s ’ )
51 xlabel ( ’ Time ’ )
52 ylabel ( ’ V o l t a g e ’ )
53 legend ( ’ Fundamental component ’ , ’ 3 r d h a r m o n i c
component ’ , ’ 5 t h h a r m o n i c component ’ , ’DC component
’ , ’ output ’ )
109
Chapter 4
Electrostatics
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 1 . s c e .
7
8 clc ;
9 clear ;
10 Q1 =2 e -9; // S p h e r e 1 c h a r g e s i n coulomb
11 Q2 = -0.5 e -9; // S p h e r e 2 c h a r g e s i n coulomb
12 r =4 e -2; // D i s t a n c e b e t w e e n t h e two s p h e r e s i n m
13 epsilon_not =1/(36 e9 * %pi ) ;
14 printf ( ” \n ( a ) ” )
15 F = -( Q1 * Q2 ) /(4* %pi * epsilon_not * r ^2) ;
// Coulomb ’ s law
16 printf ( ” \n F o r c e b e t w e e n two s p h e r e s when t h e y a r e
d i s p l a c e d 4cm a p a r t=%1 . 4 f ∗10ˆ −5 N A t t r a c t i v e \n ” ,F
*1 e5 )
110
Figure 4.1: Determination of force between two spheres
17
18 printf ( ” \n ( b ) ” )
19 q =( Q1 + Q2 ) /2;
20 F =( q ^2) /(4* %pi * epsilon_not * r ^2)
21 printf ( ” \n F o r c e b e t w e e n two s p h e r e s i f they are
b r o u g h t i n t o c o n t a c t and s e p a r a t e d by 4cm =%1 . 4 f
∗10ˆ −5 N r e p u l s i v e \n ” ,F *1 e5 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 3 . s c e
7
8 clc ;
9 clear ;
111
Figure 4.2: Calculation of force
112
Figure 4.3: Determination electric field intensity
value
29 // So a n s w e r g i v e n i n t h e book i s wrong
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 4 . s c e .
7
8 clc ;
9 clear ;
10 q =1.6 e -19;
11 m =9.1 e -31;
12 g =9.8;
113
Figure 4.4: Calculation of electric field intensity
13 F = m * g ;
14 E = F / q ;
15 printf ( ” \n Magnitude o f e l e c t r i c field i n t e n s i t y E=
%1 . 1 f ∗10ˆ −11 N/C” ,E *1 e11 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 5 . s c e .
114
Figure 4.5: Determination of distance between two charges at which electric
field strength is zero
7
8 clc ;
9 clear ;
10 // from t h e g i v e n f i g u r e
11 q =1 e -8;
12 OB = sqrt (5^2 -4^2) ; // D i s t a n c e b e t w e e n p o i n t O and B
13 cos_theta =3/5;
14 sin_theta =4/5;
15 r =5 e -2;
16
17 epsilon_not =1/(36 e9 * %pi ) ;
18 modulus_E = q /(4* %pi * epsilon_not * r ^2) ;
19 E1 =(( modulus_E * cos_theta ) -( modulus_E * sin_theta * %i ) ) ;
20 E2 =(( - modulus_E * cos_theta ) -( modulus_E * sin_theta * %i ) )
;
21 E = E1 + E2 ;
22 disp (E , ’ The r e s u l t a n t f i e l d i n t e n s i t y i n N/C i s ’ )
Scilab code Exa 4.7 Determination of distance between two charges at which electri
115
Figure 4.6: Determination of maximum torque and work done
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 7 . s c e .
7
8 clc ;
9 clear ;
10 q1 =1 e -4;
11 q2 =2 e -4;
12 l =10 e -2;
13 x = l *1 e2 /(1+ sqrt ( q2 / q1 ) ) ;
14 printf ( ” \n D i s t a n c e b e t w e e n q1 and t h e p o i n t on t h e
l i n e j o i n i n g two c h a r g e s where t h e e l e c t r i c
f i e l d i s z e r o=%1 . 1 f cm” ,x )
Scilab code Exa 4.11 Determination of maximum torque and work done
116
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 11 . s c e .
7
8 clc ;
9 clear ;
10 q =1 e -6;
11 l =2 e -2;
12 E =1 e5 ;
13
14 printf ( ” \n ( a ) ” )
15 theta =90;
16 p=l*q;
17 T_max = p * E * sind ( theta ) ;
18 printf ( ” \n The maximum t o r q u e=%1 . 1 f ∗10ˆ −3 Nm\n ” ,
T_max *1 e3 )
19
20 printf ( ” \n ( b ) ” )
21 U_180 = - p * E * cosd (180) ; //U i s
t h e p o t e n t i a l e n e r g y f o r t h e t a =180 d e g r e e and 0
degree
22 U_0 = - p * E * cosd (0) ;
23 W =( U_180 ) -( U_0 ) ;
24 printf ( ” \n The work done=%1 . 1 f ∗10ˆ −3 J ” ,W *1 e3 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
117
Figure 4.7: Determination of charge
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 14 . s c e .
7
8 clc ;
9 clear ;
10 V =100;
11 epsilon_not =8.854 e -12;
12 r =10 e -2;
13 q =4* %pi * epsilon_not * r * V ;
14 printf ( ” \n Magnitude v a l u e o f i s o l a t e d p o s i t i v e
c h a r g e=%1 . 2 g ∗10ˆ −9 coulomb ” ,q *1 e9 )
Scilab code Exa 4.15 Calculation of potential difference between two points
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
118
Figure 4.8: Calculation of potential difference between two points
5
6 // Ex4 15 . s c e .
7
8 clc ;
9 clear ;
10 q =1 e -9;
11 r_p =10 e -2;
12 r_q =20 e -2;
13 epsilon_not =8.854 e -12;
14 V =( q /(4* %pi * epsilon_not ) ) *((1/ r_p ) -(1/ r_q ) ) ;
15 printf ( ” \n The p o t e n t i a l d i f f e r e n c e b e t w e e n t h e two
p o i n t s=%2 . 0 f v o l t ” ,V )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
119
Figure 4.9: Calculation of net potential
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 16 . s c e .
7
8 clc ;
9 clear ;
10 q1 = -2e -9;
11 q2 =3 e -9;
12 q3 =2 e -9;
13 q4 =1 e -9;
14 AB =1; // Given s q u a r e s i d e a s 1 m e t r e
15 BC =1;
16 epsilon_not =8.854 e -12;
17 AP = sqrt ( AB ^2+ BC ^2) /2; // f o r m u l a d e r i v e d
from t h e f i g u r e
18 Vp =(1/(4* %pi * epsilon_not * AP ) ) *( q1 + q2 + q3 + q4 ) ;
19 printf ( ” \n P o t e n t i a l a t t h e c e n t r e o f t h e s q u a r e=%2
. 2 f v o l t ” , Vp )
20
21 // Answer v a r y due t o r o u n d o f f e r r o r
120
Figure 4.10: Calculation of electric field
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 18 . s c e .
7 clc ;
8 clear ;
9 Q1 =3 e -6;
10 Q2 =2 e -6;
11 a =9 e9 ; // a = ( 1 / ( 4 ∗ %pi ∗ e p s i l o n n o t ) )
12
13 x =1; y =2; z =3;
14
15 //V=−a ∗ ( ( Q1 / ( s q r t ( ( x −1) ˆ2+( y −1) ˆ2+( z −1) ˆ 2 ) ) ) +(Q2 / (
121
s q r t ( ( x −1) ˆ2+( y −3) ˆ2+( z −2) ˆ 2 ) ) ) ) ;
16
17 dV_dx = - a *(( Q1 *( x -1) /(( x -1) ^2+( y -1) ^2+( z -1) ^2) ^(3/2) )
+( Q2 *( x -1) /(( x -1) ^2+( y -3) ^2+( z -2) ^2) ^(3/2) ) ) ;
// d i f f e r e n t i e t i o n o f p o t e n t i a l w i t h r e s p e c t t o x
18
19 dV_dy = - a *(( Q1 *( y -1) /(( x -1) ^2+( y -1) ^2+( z -1) ^2) ^(3/2) )
+( Q2 *( y -3) /(( x -1) ^2+( y -3) ^2+( z -2) ^2) ^(3/2) ) ) ;
// d i f f e r e n t i e t i o n o f p o t e n t i a l w i t h r e s p e c t t o y
20
21 dV_dz = - a *(( Q1 *( z -1) /(( x -1) ^2+( y -1) ^2+( z -1) ^2) ^(3/2) )
+( Q2 *( z -2) /(( x -1) ^2+( y -3) ^2+( z -2) ^2) ^(3/2) ) ) ;
// d i f f e r e n t i e t i o n o f p o t e n t i a l w i t h r e s p e c t
to z
22
23 //E=−( d e l V )
24 printf ( ” \n E=(%gi ) +(%4 . 0 f j ) +(%5 . 0 f k ) V/m” ,- dV_dx , -
dV_dy , - dV_dz )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 19 . s c e .
7
8 clc ;
9 clear ;
10 r1 =3 e -2;
11 r2 =6 e -2;
12 r3 =9 e -2;
122
Figure 4.11: Calculation of potential and field strength
13 q1 =9 e -12;
14 q2 = -6e -12;
15 q3 =3 e -12;
16 d1 =2 e -2;
17 d2 =4 e -2;
18 d3 =7 e -2;
19 d4 =12 e -2;
20 epsilon_not =8.854 e -12;
21 a =9 e9 ; // a =1/(4∗ %pi ∗ e p s i l o n n o t ) ;
22
23 printf ( ” \n F i e l d s t r e n g t h and p o t e n t i a l s f o r p o i n t a
, b , c , d are , ”)
24 Ea =0;
25 printf ( ” \n\ t Ea=%g N/C” , Ea )
26 Va = a *(( q1 / r1 ) +( q2 / r2 ) +( q3 / r3 ) ) ;
27 printf ( ” \n\ t Va=%g V \n ” , Va )
28
29 Eb = a *( q1 / d2 ^2) ;
30 printf ( ” \n\ t Eb=%g N/C” , Eb )
31 Vb = a *(( q1 / d2 ) +( q2 / r2 ) +( q3 / r3 ) ) ;
32 printf ( ” \n\ t Vb=%g V \n ” , Vb )
123
Figure 4.12: Determination of electric field strength
33
34 Ec = a *(( q1 / d3 ^2) +( q2 / d3 ^2) ) ;
35 printf ( ” \n\ t Ec=%1 . 2 f N/C” , Ec )
36 Vc = a *(( q1 / d3 ) +( q2 / d3 ) +( q3 / r3 ) ) ;
37 printf ( ” \n\ t Vc=%1 . 3 f V \n ” , Vc )
38
39 Ed =( a / d4 ^2) *( q1 + q2 + q3 ) ;
40 printf ( ” \n\ t Ed=%g N/C” , Ed )
41 Vd =( a / d4 ) *( q1 + q2 + q3 ) ;
42 printf ( ” \n\ t Vd=%g V \n ” , Vd )
43 // There i s a e r r o r i n book c a l c u l a t i o n on Vc . I n t h e
book Vc = 0 . 7 6 2 v o l t i n s t e a d o f 0 . 6 8 5 7 v o l t
124
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 22 . s c e .
7
8 clc ;
9 clear ;
10 V =2.5; // p o t e n t i a l d i f f e r e n c e o f t h e
p l a t e s i n kv
11 x =0.25; // d i s t a n c e b e t w e e n two
p a r a l l e l p l a t e s i n cm
12 x1 =0.02; // a i r g a p i n b e t w e e n t h e
p a r a l l e l p l a t e s i n cm
13 x2 =0.23; // t h i c k n e s s o f f i b r e s h e e t i n
t h e gap i n cm
14 epsilon_r =5;
15
16 // As t h e e l e t r i c d i s p l a c e m e n t i s p e r p e n d i c u l a r t o
t h e boundary
17 //D=D1=D2 ; , D1= e p s i l o n n o t ∗E1 ; , D2=
e p s i l o n n o t ∗ e p s i l o n r ∗E2 ;
18 // from t h i s E1=5∗E2 ;
19
20 //V=V1+V2 ; V1=x1 ∗E1 ; V2=x2 ∗E2 ;
21 // from t h i s we can f i n d t h e e q u a t i o n o f E2
22
23 E2 = V /(( x1 * epsilon_r ) +( x2 ) ) ;
24 E1 =5* E2 ;
25
26 printf ( ” \n E l e c t r i c f i e l d s t r e n g t h i n a i r , E1=%2 . 2 f
kV/cm \n ” , E1 )
27 printf ( ” \n E l e c t r i c f i e l d s t r e n g t h i n t h e f i b r e , E2
=%1 . 3 f kV/cm \n ” , E2 )
28
29 E =30; // D i e l e c t r i c s t r e n g t h o f a i r i n kV/cm
30 if ( E1 > E )
125
Figure 4.13: Determination of capacitance of the capacitor and potential
difference across the capacitor
31 printf ( ” \n The a i r w i l l b r e a k . ” )
32 else
33 printf ( ” \n The a i r w i l l n o t b r e a k . ” )
34 end
Scilab code Exa 4.24 Determination of capacitance of the capacitor and potential d
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 24 . s c e .
7
8 clc ;
9 clear ;
126
10 d =1 e -2;
11 l =15 e -2;
12 h =10 e -2;
13 Q =750 e -12;
14 epsilon_not =8.854 e -12;
15
16 A=l*h;
17 C =( epsilon_not * A ) / d ;
18 printf ( ” \n C a p a c i t a n c e=%2 . 3 f pF \n ” ,C *1 e12 )
19 V=Q/C;
20 printf ( ” \n P o t e n t i a l d i f f e r e n c e =%2 . 1 f v o l t \n ” ,V )
21
22 epsilon_r =4;
23 C =( epsilon_not * epsilon_r * A ) / d ;
24 printf ( ” \n New c a p a c i t a n c e=%2 . 3 f pF \n ” ,C *1 e12 )
25 V=Q/C;
26 printf ( ” \n New p o t e n t i a l d i f f e r e n c e =%2 . 3 f v o l t \n ” ,
V)
27
28 // There i s a e r r o r i n t h e book c a l c u l a t i o n f o r
f i n d i n g new p o t e n t i a l d i f f e r e n c e (V) , t h e a n s w e r
i s g i v e n V= 1 4 . 1 2 5 v o l t i n s t e a d o f 1 4 . 1 1 8 v o l t
Scilab code Exa 4.26 Calculation of electric field intensity and electric flux den
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 26 . s c e .
7
8 clc ;
127
Figure 4.14: Calculation of electric field intensity and electric flux density
9 clear ;
10 d_i =5 e -3; // D i a m e t e r o f i n n e r c y l i n d e r
i n metre
11 d_o =15 e -3; // D i a m e t e r o f o u t e r c y l i n d e r
i n metre
12 epsilon_r =4;
13 V =500;
14 epsilon_not =8.854 e -12;
15 epsilon = epsilon_r * epsilon_not ;
16 a = d_i /2;
17 b = d_o /2;
18 C =(2* %pi * epsilon ) /( log ( b / a ) ) ;
19 printf ( ” \n C a p a c i t a n c e o f t h e c a b l e=%3 . 2 f pF/m \n ” ,C
*1 e12 )
20
21 printf ( ” \n ( a ) ” )
22 p_l = C * V ; // E l e c t r i c d i s p l a c e m e n t
t h r o u g h a c y l i n d r i c a l a r e a o f u n i t l e n g t h i n C/m
23 D = p_l /(2* %pi * a ) ;
24 E = D / epsilon ;
25 printf ( ” \n The e l e c t r i c f l u x d e n s i t y a t t h e s u r f a c e
128
Figure 4.15: Calculation of capacitance of the line
o f i n n e r c o n d u c t o r=%1 . 3 f m i c r o C /mˆ2 ” ,D *1 e6 )
26 printf ( ” \n The e l e c t r i c f i e l d i n t e n s i t y a t t h e
s u r f a c e o f i n n e r c o n d u c t o r=%3 . 0 f kV/m \n ” ,E *1 e -3)
27
28 printf ( ” \n ( b ) ” )
29 D = p_l /(2* %pi * b ) ;
30 E = D / epsilon ;
31 printf ( ” \n The e l e c t r i c f l u x density at the inner
s u r f a c e o f o u t e r c o n d u c t o r=%1 . 3 f m i c r o C /mˆ2 ” ,D *1
e6 )
32 printf ( ” \n The e l e c t r i c f i e l d i n t e n s i t y a t t h e
i n n e r s u r f a c e o f o u t e r c o n d u c t o r=%2 . 3 f kV/m \n ” ,E
*1 e -3)
33 // Answer v a r y d u e t o round o f f e r r o r
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
129
Figure 4.16: Calculation of thickness of the dielectric
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 27 . s c e .
7
8 clc ;
9 clear ;
10 l =4 e3 ;
11 b =2*75 e -2;
12 a =2.5 e -2;
13 epsilon_not =8.854 e -12;
14 C =( %pi * epsilon_not * l ) / log ( b / a ) ;
15 printf ( ” \n C a p a c i t a n c e o f t h e t r a n s m i s s i o n l i n e =%1 . 4
f m i c r o f a r a d ” ,C *1 e6 )
130
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 28 . s c e .
7
8 clc ;
9 clear ;
10 t1 =1.5; // I n s u l a t i o n t h i c k n e s s o f
c o n d u c t o r i n cm
11 d_c =1.5; // D i a m e t e r o f c o n d u c t o r i n cm
12 a1 = d_c /2;
13 b1 = a1 + t1 ;
14 R1 =500; // I n s u l a t i o n r e s i s t a n c e i n
megaohm f o r a g i v e n t h i c k n e s s
15 R2 =700; // I n s u l a t i o n r e s i s t a n c e i n
megaohm f o r a unknown t h i c k n e s s
16
17 //R=(p / ( 2 ∗ %pi ∗ l ) ) ∗ l o g ( b / a ) R1=(p / ( 2 ∗ %pi ∗ l ) ) ∗
l o g ( b1 / a1 ) R2=(p / ( 2 ∗ %pi ∗ l ) ) ∗ l o g ( b2 /
a2 )
18
19 a2 = d_c /2;
20 b2 = a2 ; // b2 i s t h e sum o f a2 and unknown
thickness
21
22 t2 = a2 *( b1 / a1 ) ^( R2 / R1 ) - b2 ; // t h i c k n e s s o f 700
megaohm r e s i s t a n c e i n s u l a t i o n i n cm
23 printf ( ” \n I n s u l a t i o n t h i c k n e s s of the cable i f
i n s u l a t i o n r e s i s t a n c e i s 700 megaohm=%1 . 3 f cm” , t2
)
131
Figure 4.17: Determination of loss energy
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex4 29 . s c e .
7
8 clc ;
9 clear ;
10 Q1 =60 e -6; // C a p a c i t o r c h a r g e s i n coulomb
11 V1 =180; // V o l a t g e i n v o l t
12
13 C1 = Q1 / V1 ;
14 C2 =4* C1 ;
15 Q2 =0;
16 E1 =(1/2) * C1 * V1 ^2; // B e f o r e two
132
c a p a c i t a n c e a r e j o i n e d t h e e n e r g y s t o r e d i n C1
17 E2 =0; // Energy s t o r e d i n C2
18 Ea = E1 + E2 ; // T o t a l e n e r g y b e f o r e
two c a p a c i t o r s a r e j o i n e d
19 V =( Q1 + Q2 ) /( C1 + C2 ) ; // P o t e n t i a l i n v o l t
20
21 E1 =(1/2) * C1 * V ^2; // Energy s t o r e d i n C1 i n
joule
22 E2 =(1/2) * C2 * V ^2; // Energy s t o r e d i n C2 i n
joule
23 Eb = E1 + E2 ; // T o t a l e n e r g y a f t e r two
capacitors are joined
24
25 E_loss = Ea - Eb ;
26 printf ( ” \n L o s s o f e n e r g y=%2 . 1 f ∗10ˆ −4 j o u l e ” , E_loss
*1 e4 )
133
Chapter 5
Electromagnetism and
Electromechanical Energy
Conversion
Scilab code Exa 5.5 Determination of mmf and total flux and flux density
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 5 . s c e .
7
8 clc ;
9 clear ;
10 N =200;
11 A =5 e -4;
12 I =4;
13 l =60 e -2;
14
15 printf ( ” \n\ t ( a ) ” )
134
Figure 5.1: Determination of mmf and total flux and flux density
16 F=N*I;
17 printf ( ” \n Magnetomotive f o r c e =%d AT \n ” ,F )
18
19 printf ( ” \n\ t ( b ) ” )
20 mew_r =1;
21 mew_not =4 e -7* %pi ;
22 mew = mew_r * mew_not ;
23 R = l /( mew * A ) ;
24 phi =( F ) / R ;
25 printf ( ” \n T o t a l f l u x=%1 . 5 f microWb \n ” , phi *1 e6 )
26
27 printf ( ” \n\ t ( c ) ” )
28 B = phi / A ;
29 printf ( ” \n Flux d e n s i t y=%1 . 4 f mWb/mˆ2 ” ,B *1 e3 )
30 // Answer v a r y d u e t o round o f f e r r o r
31 // The u n i t f o r B( f l u x d e n s i t y ) i s Wbm/mˆ2
135
Figure 5.2: Determination of mmf
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 6 . s c e .
7
8 clc ;
9 clear ;
10 l =2.5 e -3;
11 A =200 e -4;
136
Figure 5.3: Calculation of reluctance and current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 7 . s c e .
7
137
8 clc ;
9 clear ;
10 A =5 e -4;
11 l =0.4;
12 N =200;
13 mew_r =380;
14 mew_not =4 e -7* %pi ;
15 mew = mew_r * mew_not ;
16
17 printf ( ” \n ( a ) ” )
18 R =( l *1 e -6) /( mew * A ) ;
19 printf ( ” \n R e l u c t a n c e o f t h e c o r e=%1 . 4 f ∗ 1 0 ˆ 6 AT/Wb
\n ” ,R )
20
21 printf ( ” \n ( b ) ” )
22 phi =800 e -6; // f l u x i n weber
23 F = phi *1 e6 * R ;
24 I = F / N ;
25 printf ( ” \n M a g n e t i z i n g c u r r e n t=%1 . 4 f A \n ” ,I )
26 // Answer v a r y d u e t o round o f f e r r o r
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 8 . s c e .
7
8 clc ;
9 clear ;
10 mew_rA =250;
138
Figure 5.4: Calculation of reluctance and current
11 mew_rB =320;
12 lA =40 e -2;
13 lB =25 e -2;
14 aA =5 e -4;
15 aB =7 e -4;
16 N =250;
17 printf ( ” \n ( a ) ” )
18 mew_not =4 e -7* %pi ;
19 mew_A = mew_rA * mew_not ;
20 mew_B = mew_rB * mew_not ;
21 R =(( lA /( mew_A * aA ) ) +( lB /( mew_B * aB ) ) ) ;
22 printf ( ” \n The t o t a l r e l u c t a n c e=%g∗ 1 0 ˆ 3 AT/Wb \n ” ,
R *1 e -3)
23
24 printf ( ” \n ( b ) ” )
25 phi =2.5 e -3;
26 F = phi * R ;
27 I = F / N ;
28 printf ( ” \n The m a g n e t i z i n g c u r r e n t=%2 . 2 f AT \n ” ,I )
139
Figure 5.5: Calculation of mmf
29 // Answer v a r y d u e t o r o u n d o f f e r r o r
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 9 . s c e .
7
8 clc ;
9 clear ;
10 // from t h e g i v e n f i g u r e
11 l_not =350 e -3;
12 lc =150 e -3;
13 la =1 e -3;
14 A_not =400 e -6;
140
Figure 5.6: Calculation of magnetizing current
15 Ac =800 e -6;
16 pi =1 e -3; // f l u x i n weber
17 mew_r =340;
18 mew_not =4 e -7* %pi ;
19
20 R_not = l_not /( mew_r * mew_not * A_not ) ;
21 Rc = lc /( mew_r * mew_not * Ac ) ;
22 Ra = la /( mew_not * Ac ) ;
23 F = pi *( R_not /2+ Rc + Ra ) ;
24 printf ( ” \n T o t a l mmf=%4 . 2 f AT” ,F )
25 // Answer v a r y d u e t o r o u n d o f f e r r o r
141
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 10 . s c e .
7
8 clc ;
9 clear ;
10 N =800;
11 Hi =50 e -3;
12 Wi =40 e -3;
13 l_not =2 e -3;
14 A_not =2500 e -6;
15 leakage_factor =1.2;
16 mew_not =4 e -7* %pi ;
17 mew_r =322;
18 pi_not =2.5 e -3;
19 lc =600 e -3; // from t h e f i g u r e
20
21 B_not = pi_not / A_not ;
22 H_not = B_not / mew_not ;
23 F_not = H_not * l_not ;
24 pi_T = pi_not * leakage_factor ;
25 Ac = Wi * Hi *0.92; // g i v e n 8 p e r c e n t i s
taken f o r i n s u l a t i o n . so (1 −0.08=0.92)
26 Bc = pi_T / Ac ;
27 Hc = Bc /( mew_r * mew_not ) ;
28 Fc = Hc * lc ;
29 F = Fc + F_not ;
30 Im = F / N ;
31 printf ( ” \n M a g n e t i z i n g c u r r e n t=%d A \n ” , Im )
142
Figure 5.7: Calculation of inductance and time at pickup value of current
Scilab code Exa 5.12 Calculation of inductance and time at pickup value of current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 12 . s c e .
7
8 clc ;
9 clear ;
10 N =20000;
11 R =5 e2 ;
12 V =250;
13 mmf =3471;
14 pi =0.04 e -3;
15
16 printf ( ” \n ( a ) ”)
17 I = mmf / N ;
143
Figure 5.8: Calculation of cross sectional area of the core and magnetizing
current
18 L =( N * pi ) / I ;
19 printf ( ” \n I n d u c t a n c e o f t h e c o i l =%1 . 2 f H \n ” ,L )
20
21 printf ( ” \n ( b ) ”)
22 t = log (1/(1 -(( I * R ) / V ) ) ) *( L / R ) ;
23 printf ( ” \n Time r e q u i r e d f o r t h e c u r r e n t t o r e a c h
p i c k u p v a l u e=%1 . 2 f ms” ,t *1 E3 )
24 // The book a n s w e r f o r t ( = 3 . 9 3 ms ) i s o b t a i n e d o n l y
i f R=500 ohm . O t h e r w i s e (R=5000) we c a n n o t g e t t h e
answer
25 // So t h e r e i s a m i s t a k e i n R v a l u e g i v e n
Scilab code Exa 5.13 Calculation of cross sectional area of the core and magnetizi
144
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 13 . s c e .
7
8 clc ;
9 clear ;
10 Bm =1.1;
11 V =2.2 e3 ;
12 f =50;
13 N =200;
14
15 printf ( ” \n\ t ( a ) ” )
16 stack_factor =0.9;
17 pi_m = V /(4.44* f * N ) ;
18 A = pi_m /( Bm * stack_factor ) ;
19 printf ( ” \n C r o s s s e c t i o n a l a r e a o f t h e c o r e=%3 . 1 f
cmˆ2 \n ” ,A *1 e4 )
20 // There i s a s m a l l ( p r i n t i n g ) m i s t a k e i n t h e f i n a l
a n s w e r o f A i n t h e book
21
22 printf ( ” \n\ t ( b ) ” )
23 l =250 e -2;
24 H =490; // from t h e g r a p h 5 . 2 1 H v a l u e is
t a k e n which i s c o r r e s p o n d i n g t o B=1.1 wb/mˆ2
25 mmf = H * l ;
26 Im = mmf / N ;
27 printf ( ” \n M a g n e t i z i n g c u r r e n t=%1 . 3 f A” , Im )
Scilab code Exa 5.14 Determination of steady state value of current and resistance
145
Figure 5.9: Determination of steady state value of current and resistance and
inductance of the coil and stored energy
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 14 . s c e .
7
8 clc ;
9 clear ;
10 V =200;
11 i =0.2;
12 T =3 e -3;
13 t =3 e -3;
14
15 R =( V / i ) *(1 - exp ( - t / T ) ) ;
16 I=V/R;
17 printf ( ” \n The f i n a l s t e a d y s t a t e v a l u e o f c u r r e n t=
%1 . 3 f A \n ” ,I )
146
Figure 5.10: Calculation of load current and impedence referred to primary
and secondary side
18
19 L = R * T ;
20 printf ( ” \n I n d u c t a n c e=%1 . 3 f H \n ” ,L )
21 printf ( ” \n R e s i s t a n c e=%3 . 0 f ohm \n ” ,R )
22
23 E =( L * I ^2) /2;
24 printf ( ” \n Energy s t o r e d when c u r r e n t r e a c h e d its
f i n a l v a l u e=%1 . 3 f J ” ,E )
Scilab code Exa 5.15 Calculation of load current and impedence referred to primary
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
147
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 15 . s c e .
7
8 clc ;
9 clear ;
10 P =50 e3 ;
11 V1 =2.2 e3 ;
12 V2 =220;
13
14 printf ( ” \n ( a ) ” )
15 I1 = P / V1 ;
16 I2 = P / V2 ;
17 printf ( ” \n Prima ry c u r r e n t=%2 . 2 f A \n ” , I1 )
18 printf ( ” \n S e c o n d a r y c u r r e n t=%3 . 1 f A \n ” , I2 )
19
20 printf ( ” \n ( b ) ” )
21 Zl2 = V2 / I2 ;
22 printf ( ” \n The l o a d i m p e d e n c e f o r t h e s e c o n d a r y s i d e
=%1 . 3 f ohm \n ” , Zl2 )
23
24 printf ( ” \n ( c ) ”)
25 Zl1 = V1 / I1 ;
26 printf ( ” \n The l o a d i m p e d e n c e f o r t h e p r i m a r y s i d e=
%2 . 1 f ohm \n ” , Zl1 )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
148
Figure 5.11: Calculation of instantaneous values of induced emf
5
6 // Ex5 16 . s c e .
7
8 clc ;
9 clear ;
10 N =100;
11 a =10 e -2;
12 n =20;
13 B =0.5;
14
15 omega =2* %pi * n ;
16 A = a ^2;
17 v = A * N * omega * B ;
18
19 printf ( ” \n ( a ) ” )
20 // t h e t a =40∗180∗ t=n ∗ 180 where n = 0 , 1 , 2 , 3 . . . . .
21 // i f we t a k e n=2
22 V = v * sind (180*2) ;
23 printf ( ” \n The i n s t a n t a n e o u s v a l u e o f i n d u c e d emf
when p l a n e o f t h e c o i l i s r i g h t a n g l e t o t h e
f i e l d =%d v o l t \n ” ,V )
24
25 printf ( ” \n ( b ) ” )
26 // t h e t a=n ∗ 1 8 0 / 2 where n = 1 , 3 , 5 , 7 . . . . . . . . .
149
Figure 5.12: Determination of torque exerted on the coil
27 // i f we t a k e n=3
28 V = v * sind (180*3/2) ;
29 printf ( ” \n The i n s t a n t a n e o u s v a l u e o f i n d u c e d emf
when t h e p l a n e o f t h e c o i l i s in the plane of the
f i e l d =%2 . 1 f v o l t ” ,V )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex5 17 . s c e .
150
7
8 clc ;
9 clear ;
10 l =7.5 e -2;
11 b =5 e -2;
12 N =100;
13 B =1.1;
14 i =5;
15 T=N*B*l*b*i;
16 printf ( ” \n Torque e x e r t e d on t h e c o i l =%1 . 4 f Nm” ,T )
151
Chapter 7
Transformer
Scilab code Exa 7.1 Calculation of current and number of turns and maximum flux va
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 1 . s c e .
7
8 clc ;
9 clear ;
10 p =175 e3 ; // power r a t i n g o f
t r a n s f o r m e r i n KVA
11 Ep =6600; // p r i m a r y v o l t a g e i n
volts
12 Es =440; // s e c o n d a r y v o l t a g e i n
volts
13 f =50;
14 Ns =100; // Number o f s e c o n d a r y
turns
15
152
Figure 7.1: Calculation of current and number of turns and maximum flux
value
153
16 // ( a )
17 printf ( ” \n ( a ) ”)
18 Ip = p / Ep ;
19 Is = p / Es ;
20 printf ( ” \n F u l l l o a d p r i m a r y c u r r e n t=%2 . 2 f A ” , Ip )
21 printf ( ” \n F u l l l o a d s e c o n d a r y c u r r e n t=%3 . 2 f A \n ” ,
Is )
22
23 // ( b )
24 printf ( ” \n ( b ) ”)
25 Np = Ns * Ep / Es ;
26 printf ( ” \n Number o f p r i m a r y t u r n s=%d \n ” , Np )
27
28 // ( c )
29 printf ( ” \n ( c ) ”)
30 max_flux = Es /(4.44* f * Ns ) ;
31 printf ( ” \n The maximum v a l u e o f f l u x=%1 . 5 f Wb \n ” ,
max_flux )
Scilab code Exa 7.2 Calculation of primary current and power factor
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 2 . s c e .
7
8 clc ;
9 clear ;
10 Np =1000; // number o f
Primary t u r n s
11 Ns =200; // number o f
154
Figure 7.2: Calculation of primary current and power factor
secondary turns
12 Io =3; //No l o a d c u r r e n t
in A
13 cos_phi_not =0.2; // l a g g i n g
14 Is =250; // s e c o n d a r y
current in A
15 cos_phi_s =0.8; // l a g g i n g
16
17 Is_dash = Ns * Is / Np ;
18 phi_s =( acosd (0.8) ) ;
19 phi_not =( acosd (0.2) ) ;
20 Ip_cos_phi_p =( Is_dash * cos_phi_s ) +( Io * cos_phi_not ) ;
21 Ip_sin_phi_p =( Is_dash *( sind ( phi_s ) ) ) +( Io *( sind (
phi_not ) ) ) ;
22 Ip = sqrt (( Ip_cos_phi_p ) ^2+( Ip_sin_phi_p ) ^2) ;
23 printf ( ” \n Prima ry c u r r e n t=%2 . 2 f A\n ” , Ip )
24
25 phi_p = atand (( Ip_sin_phi_p ) /( Ip_cos_phi_p ) ) ;
26 printf ( ” \n Power f a c t o r =%1 . 3 f l a g g i n g ” , cosd ( phi_p ) )
155
Figure 7.3: Determination of primary current and power factor and secondary
terminal voltage
Scilab code Exa 7.3 Determination of primary current and power factor and secondar
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 3 . s c e .
7
8 clc ;
9 clear ;
156
10 T1 =1000;
// number o f Primary t u r n s
11 T2 =200; //
number o f s e c o n d a r y t u r n s
12 Is =250; //
secodary load current in A
13 I0 =3; //No
load current in A
14 rp =0.72; //
p r i m a r y w i n d i n g r e s i s t a n c e i n ohms
15 rs =0.025; //
s e c o n d a r y w i n d i n g r e s i s t a n c e i n ohms
16 xp =0.92; //
p r i m a r y w i n d i n g l e a k a g e r e a c t a n c e i n ohms
17 xs =0.036; //
s e c o n d a r y w i n d i n g l e a k a g e r e a c t a n c e i n ohms
18 Vs =2.2 e3 ; //
supply voltage in v o l t s
19
20 N = T1 / T2 ;
// t u r n s r a t i o o f t r a n s f o r m e r
21 Is_dash = Is / N ;
22 rs_dash = N ^2* rs ;
23 xs_dash = N ^2* xs ;
24 cos_pi_s =0.8;
25 cos_pi_0 =0.2;
26 sin_pi_s = sind ( acosd (0.8) ) ;
27 sin_pi_0 = sind ( acosd (0.2) ) ;
28 Isdash =( Is_dash * cos_pi_s ) - %i *( Is_dash * sin_pi_s ) ;
29 Io =( I0 * cos_pi_0 ) - %i *( I0 * sin_pi_0 ) ;
30 Ip = Isdash + Io ;
31 a = real ( Ip ) ;
32 b = imag ( Ip ) ;
33 Ip_mag = sqrt ( a ^2+ b ^2) ;
34 printf ( ” \n Primary C u r r e n t=%2 . 2 f A \n ” , Ip_mag )
35
36 pi_p = atand ( b / a ) ;
37 printf ( ” \n Power f a c t o r =%1 . 3 f l a g g i n g \n ” , cosd ( pi_p
157
Figure 7.4: Calculation of impedence and voltage regulation
))
38
39 VL_dash = Vs -( Ip *( rp + %i * xp ) ) -( Isdash *( rs_dash + %i *
xs_dash ) ) ; // s e c o n d a r y t e r m i n a l
v o l t a g e r e f e r r e d to primary
40 VL_dash_mag = real ( VL_dash ) ;
41 VL = VL_dash_mag / N ;
42 printf ( ” \n S e c o n d a r y t e r m i n a l v o l t a g e=%3 . 1 f V \n ” ,
VL )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
158
5
6 // Ex7 4 . s c e .
7
8 clc ;
9 clear ;
10 P =75 e3 ; // power r a t i n g o f
t r a n s f o r m e r i n KVA
11 Np =500; // number o f
Primary t u r n s
12 Ns =100; // number o f
secondary turns
13 rp =0.4; // p r i m a r y
w i n d i n g r e s i s t a n c e i n ohms
14 rs =0.02; // s e c o n d a r y
w i n d i n g r e s i s t a n c e i n ohms
15 xp =1.5; // p r i m a r y w i n d i n g
l e a k a g e r e a c t a n c e i n ohms
16 xs =0.045; // s e c o n d a r y
w i n d i n g l e a k a g e r e a c t a n c e i n ohms
17 Vs =2200; // s u p p l y v o l t a g e
in volts
18
19 // c a s e 1
20 printf ( ” \n ( a ) ” )
21 Re = rp +( Np / Ns ) ^2* rs ; //
E q u i v a l e n t r e s i s t a n c e i n ohms
22 Xe = xp +( Np / Ns ) ^2* xs ; //
E q u i v a l e n t l e a k a g e r e a c t a n c e i n ohms
23 Ze = sqrt ( Re ^2+ Xe ^2) ;
24 printf ( ” \n E q u i v a l e n t impedance r e f e r r e d to
p r i n m a r y s i d e=%1 . 3 f ohms \n ” , Ze )
25
26 // c a s e 2
27 printf ( ” \n ( b ) . 1 ” )
28 I1 = P / Vs ; //
f u l l load primary c u r r e n t in A
29 cos_pi2 =0.8;
30 sin_pi2 = sind ( acosd (0.8) ) ;
159
31 percentage_voltage_reg =(( I1 *(( Re * cos_pi2 ) +( Xe *
sin_pi2 ) ) ) / Vs ) *100;
32 printf ( ” \n V o l t a g e r e g u l a t i o n f o r 0 . 8 power f a c t o r
l a g g i n g=%1 . 2 f p e r c e n t a g e \n ” ,
percentage_voltage_reg )
33 NL_secondary_voltage =( Ns / Np ) * Vs ;
//NL means ” no l o a d ”
34 del_V =( NL_secondary_voltage * percentage_voltage_reg )
/100;
35 FL_secondary_voltage =( NL_secondary_voltage ) -( del_V ) ;
36 printf ( ” \n S e c o d a r y t e r m i n a l v o l t a g e a t FL 0 . 8
power f a c t o r l a g g i n g=%3 . 3 f V \n ” ,
FL_secondary_voltage )
37
38 // c a s e 3
39 printf ( ” \n ( b ) . 2 ” )
40 percentage_voltage_reg =(( I1 *(( Re * cos_pi2 ) -( Xe *
sin_pi2 ) ) ) / Vs ) *100;
41 printf ( ” \n V o l t a g e r e g u l a t i o n f o r 0 . 8 power f a c t o r
l e a d i n g=%1 . 3 f p e r c e n t a g e \n ” ,
percentage_voltage_reg )
42 del_V =( NL_secondary_voltage * percentage_voltage_reg )
/100;
43 FL_secondary_voltage =( NL_secondary_voltage ) -( del_V ) ;
44 printf ( ” \n S e c o d a r y t e r m i n a l v o l t a g e a t FL 0 . 8
power f a c t o r l e a d i n g=%4 . 4 f V \n ” ,
FL_secondary_voltage )
45 // The a n w s e r v a r y d u e t o r o u n d o f f e r r o r
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
160
Figure 7.5: Calculation of efficiency
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 5 . s c e .
7
8 clc ;
9 clear ;
10 P =500 e3 ; //KVA r a t i n g of
the transformer
11 Vp =6600; // p r i m a r y
voltage in V
12 Vs =440; // s e c o n d a r y
voltage in V
13 rp =0.45; // p r i m a r y
w i n d i n g r e s i s t a n c e i n ohms
14 rs =0.0015; // s e c o n d a r y
w i n d i n g r e s i s t a n c e i n ohms
15 iron_loss =2.9 e3 ;
161
16 pf =0.8; // power f a c t o r
lagging
17
18 // c a s e 1
19 printf ( ” \n ( a ) ” )
20 Ip = P / Vp ; // p r i m a r y
current in A
21 Is = P / Vs ; //
secondary current in A
22 Ip_square_rp = Ip ^(2) * rp ;
// p r i m a r y
copper l o s s
23 Is_square_rs = Is ^(2) * rs ;
// s e c o n d a r y
copper l o s s
24 FL_copper_loss = Ip_square_rp + Is_square_rs ;
//FL means ” f u l l l o a d ”
25 FL_total_loss = iron_loss + FL_copper_loss ;
26 FL_output_power = P * pf ;
27 FL_input_power = FL_output_power + FL_total_loss ;
28 FL_efficiency =( FL_output_power / FL_input_power ) *100;
29 printf ( ” \n F u l l l o a d e f f i c i e n c y =%2 . 2 f p e r c e n t a g e \n
” , FL_efficiency )
30
31 // c a s e 2
32 printf ( ” \n ( b ) ” )
33 HL_copper_loss = FL_copper_loss *(0.5^2) ;
//HL means ”
half load ”
34 HL_total_loss = iron_loss + HL_copper_loss ;
35 HL_output_power = FL_output_power /2;
36 HL_input_power = HL_output_power + HL_total_loss ;
37 HL_efficiency =( HL_output_power / HL_input_power ) *100;
38 printf ( ” \n H a l f l o a d e f f i c i e n c y =%2 . 4 f p e r c e n t a g e \n
” , HL_efficiency )
162
Figure 7.6: Calculation of maximum efficiency
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 6 . s c e .
7
8 clc ;
163
9 clear ;
10 // t h e g i v e n d a t a a r e t a k e n from p r e v i o u s e x a m p l e (
Ex7 5 )
11
12 Vp =6600; //
primary v o l t a g e in V
13 Vs =440; //
secondary voltage in V
14 rp =0.45; // p r i m a r y
w i n d i n g r e s i s t a n c e i n ohms
15 rs =0.0015; // s e c o n d a r y
w i n d i n g r e s i s t a n c e i n ohms
16 Wi =2.9 e3 ; // i r o n
l o s s i n watt
17 pf =0.8; // power
factor lagging
18
19 Re = rp +( Vp / Vs ) ^2* rs ; // e q u i v a l e n t
r e s i s t a n c e r e f e r r e d to primary
20 Ip = sqrt ( Wi / Re ) ;
21 P_max = Vp * Ip * pf ;
22 total_loss =2* Wi ;
23 Max_efficiency =( P_max /( P_max + total_loss ) ) *100;
24 printf ( ” \n Maximum E f f i c i e n c y =%2 . 2 f p e r c e n t a g e \n ” ,
Max_efficiency )
Scilab code Exa 7.7 Calculation of efficiency and voltage regulation and secondary
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
164
Figure 7.7: Calculation of efficiency and voltage regulation and secondary
terminal voltage
6 // Ex7 7 . s c e
7 clc ;
8 clear ;
9 KVA =50 e3 ;
10
11 printf ( ” \n ( a ) ” )
12 PF =0.7;
13 iron_loss =430; // p r i m a r y power o f
t r a n s f o r m e r on open c i r c u i t t e s t i n w a t t i s
called iron loss
14 copper_loss_FL =525; // p r i m a r y power o f
t r a n s f o r m e r on s h o r t c i r c u i t t e s t i n w a t t i s
c a l l e d copper l o s s
15 total_loss_FL = iron_loss + copper_loss_FL ;
16 eta_FL =( KVA * PF ) /(( KVA * PF ) + total_loss_FL ) *100;
// f u l l l o a d e f f i c i e n c y
17 printf ( ” \n F u l l l o a d e f f i c i e n c y f o r 0 . 7 power
f a c t o r =%2 . 2 f p e r c e n t a g e \n ” , eta_FL )
18 copper_loss_HL =(0.5^2) * copper_loss_FL ;
19 total_loss_HL = iron_loss + copper_loss_HL ;
20 eta_HL =( KVA * PF *0.5) /(( KVA *0.5* PF ) + total_loss_HL )
165
*100;
21 printf ( ” \n Half load E f f i c i e n c y f o r 0 . 7 power
f a c t o r =%2 . 2 f p e r c e n t a g e \n ” , eta_HL )
22
23 printf ( ” \n ( b ) ” )
24 Vsc =124; // p r i m a r y
v o l t a g e on s h o r t c i r c u i t t e s t i n v o l t s
25 Isc =15.3; // p r i m a r y
c u r r e n t on s h o r t c i r c u i t t e s t i n amphere
26 Psc =525; // p r i m a r y power
o f t r a n s f o r m e r on open c i r c u i t t e s t i n w a t t
27 pi_e = acosd ( Psc /( Vsc * Isc ) ) ;
28 pi_2 = acosd ( PF ) ;
29 Voc =3300;
30 voltage_regulation1 = Vsc * cosd ( pi_e - pi_2 ) /( Voc ) *100;
31 printf ( ” \n The v o l t a g e r e g u l a t i o n f o r 0 . 7 l a g g i n g
power f a c t o r =%1 . 1 f p e r c e n t a g e \n ” ,
voltage_regulation1 )
32 pi_2 = - acosd ( PF ) ;
33 voltage_regulation2 = Vsc * cosd ( pi_e - pi_2 ) /( Voc ) *100;
34 printf ( ” \n The v o l t a g e r e g u l a t i o n f o r 0 . 7 l e a d i n g
power f a c t o r =%1 . 2 f p e r c e n t a g e \n ” ,
voltage_regulation2 )
35
36 printf ( ” \n ( c ) ” )
37 Voc =400;
38 decrease_in_voltage = voltage_regulation1 * Voc /100;
39 Vs1 = Voc - decrease_in_voltage ;
40 increase_in_voltage = voltage_regulation2 * Voc /100;
41 Vs2 = Voc - increase_in_voltage ;
42 printf ( ” \n The s e c o n d a r y t e r m i n a l v o l t a g e
c o r r e s p o n d i n g t o 0 . 7 p f l a g g i n g=%3 . 1 f V \n ” , Vs1 )
43 printf ( ” \n The s e c o n d a r y t e r m i n a l v o l t a g e
c o r r e s p o n d i n g t o 0 . 7 p f l e a d i n g=%3 . 1 f V \n ” , Vs2 )
166
Figure 7.8: Calculation of primary line current and voltage and line to line
transformation ratio
167
Scilab code Exa 7.8 Calculation of primary line current and voltage and line to li
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 8 . s c e .
7
8 clc ;
9 clear ;
10 Np =1000; // number o f
Primary t u r n s
11 Ns =100; // number o f
secondary turns
12 KVA =120 e3 ; //KVA
r a t i n g of the transformer
13 V_SL =440; // s u p p l y
voltage in V
14
15 K = Np / Ns ; // t r a n s f o r m e r
turns ratio
16 I_SL = KVA /( sqrt (3) * V_SL ) ;
17
18 printf ( ” \n ( a ) ” )
19 V_PL =( V_SL * K ) / sqrt (3) ;
20 I_PL =( sqrt (3) * I_SL ) / K ;
21 transformation_ratio = V_PL / V_SL ;
22 printf ( ” \n D e l t a s t a r c o n n e c t i o n : \ n ” )
23 printf ( ” \n Primary l i n e c u r r e n t=%2 . 1 f A ” , I_PL )
24 printf ( ” \n Primary l i n e v o l t a g e=%d V ” , V_PL )
25 printf ( ” \n T r a n s f o r m a t i o n r a t i o =%2 . 1 f \n ” ,
transformation_ratio )
26
168
Figure 7.9: Determination of position of tapping point and current in each
part of winding and copper saved
27 printf ( ” \n ( b ) ” )
28 V_PL = V_SL * K * sqrt (3) ;
29 I_PL = I_SL /( sqrt (3) * K ) ;
30 transformation_ratio = V_PL / V_SL ;
31 printf ( ” \n s t a r d e l t a c o n n e c t i o n : \ n ” )
32 printf ( ” \n Primary l i n e c u r r e n t=%1 . 1 f A ” , I_PL )
33 printf ( ” \n Primary l i n e v o l t a g e=%d V ” , V_PL )
34 printf ( ” \n T r a n s f o r m a t i o n r a t i o =%2 . 2 f ” ,
transformation_ratio )
Scilab code Exa 7.9 Determination of position of tapping point and current in each
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
169
6 // Ex7 9 . s c e .
7
8 clc ;
9 clear ;
10 Vp =220; //
primary v o l t a g e in V
11 Vs =250; //
secondary voltage in V
12 Ns =2000; //
number o f s e c o n d a r y t u r n s
13
14 printf ( ” \n ( a ) ” )
15 Np =( Vp / Vs ) * Ns ; //
number o f Primar y t u r n s
16 tapping_point = Ns - Np ; //
number o f t u r n s from C t o A i n f i g u r e
17 printf ( ” \n The p o s i t i o n o f t a p p i n g p o i n t=%d t u r n s \
n ” , tapping_point )
18
19 printf ( ” \n ( b ) ” )
20 Po =10 e3 ; // o u t p u t
power i n KVA
21 Is = Po / Vs ; //
secodary current in A
22 Ip =( Vs / Vp ) * Is ; //
primary c u r r e n t in A
23 approximate_current = Ip - Is ;
24 printf ( ” \n The a p p r o x i m a t e v a l u e o f c u r r e n t i n e a c h
p a r t o f the winding : \ n”)
25 printf ( ” \ t I s=%d A\n ” , Is )
26 printf ( ” \ t I p=%2 . 2 f A\n ” , Ip )
27 printf ( ” \ t Ip−I s=%1 . 2 f A\n ” , approximate_current )
28
29 printf ( ” \n ( c ) ” )
30 copper_saved = Vp / Vs ;
31 printf ( ” \n c o p p e r s a v e d=%1 . 2 f p . u ” , copper_saved )
170
Figure 7.10: Determination of ratio error
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex7 10 . s c e .
7
8 clc ;
9 clear ;
10 Ip =1000; // p r i m a r y c u r r e n t
in A
11 Is =5; // s e c o d a r y c u r r e n t
in A
12 Tp =1; // number o f
Primary t u r n s
13
14 printf ( ” \n ( a ) ” )
171
15 nominal_ratio = Ip / Is ;
16 Ie =7; // l o s s component
of current in A
17 actual_ratio = nominal_ratio +( Ie / Is ) ;
18 epsilon_r =(( nominal_ratio - actual_ratio ) / actual_ratio
) *100;
19 printf ( ” \n R a t i o e r r o r when t u r n s r a t i o e q u a l t o
n o m i n a l r a t i o =%1 . 3 f p e r c e n t a g e \n ” , epsilon_r )
20
21 printf ( ” \n ( b ) ” )
22 reducing_value =0.5/100;
23 Ts = nominal_ratio -( reducing_value * nominal_ratio ) ;
24 n = Ts / Tp ; //
transformer turns ratio
25 actual_ratio = n +( Ie / Is ) ;
26 epsilon_r =(( nominal_ratio - actual_ratio ) / actual_ratio
) *100;
27 printf ( ” \n R a t i o e r r o r when s e c o n d a r y t u r n s a r e
r e d u c e d by 0 . 5 p e r c e n t a g e=%1 . 1 f p e r c e n t a g e ” ,
epsilon_r )
172
Chapter 8
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 1 . s c e
7
8 clc ;
9 clear ;
10 p =4;
11 s =24;
12 com_seg =24;
13 // w i n d i n g d e t a i l c a l c u l a t i o n
14 pole_pitch = s / p ;
15 c = com_seg ;
16 printf ( ” \n Number o f c o i l s =%d \n ” ,c )
17 Cs =2* c ;
18 printf ( ” \n Number o f c o i l s i d e s =%d \n ” , Cs )
19 Yb1 = Cs / p +1;
173
Figure 8.1: Calculation of design parameters for a dc machine
20 Yb2 = Cs /p -1;
21 Yb = Yb1 ; // c h o o s i n g f u l l p i t c h c o i l
22 printf ( ” \n Back p i t c h=%d \n ” , Yb )
23 Yf1 = Yb -2; // For p r o g r e s s i v e w i n d i n g
24 Yf2 = Yb +2; // For r e t r o g r e s s i v e w i n d i n g
25 Yf = Yf1 ;
26 printf ( ” \n F u l l p i t c h=%d \n ” , Yf )
27 // f o r p r o g r e s s i v e w i n d i n g
28 Y =2;
29 Yc =1;
30 printf ( ” \n Winding p i t c h=%d \n ” ,Y )
31 printf ( ” \n Commutator p i t c h=%d \n ” , Yc )
174
Figure 8.2: Calculation of design parameters for a dc machine
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 2 . s c e
7
8 clc ;
9 clear ;
10 p =4;
11 s =30;
12 c =90;
13 Cs =2* c ;
14 printf ( ” \n Number o f c o i l s i d e s =%d \n ” , Cs )
15 Cs_per_slot = Cs / s ;
16 printf ( ” \n Number o f c o i l s i d e s p e r s l o t =%d \n ” ,
Cs_per_slot )
17 Yb1 = Cs / p +2; // Winding i s n o t s p l i t
18 Yb2 = Cs /p -2; // Winding i s s p l i t
175
Figure 8.3: Calculation of design parameters for a dc machine
19 Yb = Yb2 ;
20 printf ( ” \n Back p i t c h=%d \n ” , Yb )
21 Cs1 =1+ Yb ;
22 Cs3 =3+ Yb ;
23 Cs5 =5+ Yb ;
24 // Top c o i l s i d e s 1 , 3 , 5 a r e i n i n s l o t , w h i l e a l l t h e
c o r r e s p o n d i n g bottom c o i l s i d e s 4 4 , 4 6 , 4 8 a r e i n
slot 8.
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 3 . s c e
7
176
8 clc ;
9 clear ;
10 s =25;
11 c =25;
12 com_seg =25;
13 p =4;
14 Sp = s / p ; // s l o t p e r p o l e
15 printf ( ” \n S l o t s p e r p o l e=%d \n ” , Sp )
16 Cs =2* c ;
17 printf ( ” \n Number o f c o i l s i d e s =%d \n ” , Cs )
18 Cs_per_slot = Cs / s ;
19 printf ( ” \n Number o f c o i l s i d e s p e r s l o t =%d \n ” ,
Cs_per_slot )
20 Y1 =((2* c ) +2) /( p /2) ;
21 Y2 =((2* c ) -2) /( p /2) ;
22 Y = Y1 ; // For p r o g r e s s i v e w i n d i n g
23 printf ( ” \n Winding p i t c h=%d \n ” ,Y )
24 Yb = Y /2;
25 printf ( ” \n Back p i t c h=%d \n ” , Yb )
26 Yf = Yb ;
27 printf ( ” \n F u l l p i t c h=%d \n ” , Yf )
28 Yc =( c +1) /( p /2) ;
29 printf ( ” \n Commutator p i t c h=%d \n ” , Yc )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 4 . s c e
7
177
Figure 8.4: Calculation of design parameters for a dc machine
8 clc ;
9 clear ;
10 p =4;
11 s =21;
12 Cs_per_slot =4;
13 Cs = Cs_per_slot * s ;
14 printf ( ” \n Number o f c o i l s i d e s =%d \n ” , Cs )
15 C = Cs /2;
16 printf ( ” \n Number o f c o i l s =%d \n ” ,C )
17 Yc1 =( C +1) /( p /2) ;
18 Yc2 =( C -1) /( p /2) ;
19 C =41; // S i m p l e x wave w i n d i n g i s n o t p o s s i b l e w i t h 42
c o i l s . T h e r e f o r e a c t i v e c o i l s a r e 42
20 Yc =( C +1) /( p /2) ;
21 printf ( ” \n Commutator p i t c h=%d \n ” , Yc )
22 Y =((2* C ) +2) /( p /2) ;
23 printf ( ” \n Winding p i t c h=%d \n ” ,Y )
24 Yb = Y /2;
25 printf ( ” \n Back p i t c h=%d \n ” , Yb )
26 Yf = Yb ;
27 printf ( ” \n F u l l p i t c h=%d \n ” , Yf )
28 // T h i s v a l u e o f Yb a l s o s a t i s f i e s t h e c o n d i t i o n t o
178
Figure 8.5: Calculation of generated emf
avoid s p l i t winding
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 5 . s c e .
7
8 clc ;
9 clear ;
10 s =50;
11 c =8;
12 N =900;
179
Figure 8.6: Calculation of number of conductors per slot
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 6 . s c e .
7
8 clc ;
9 clear ;
10 N =360;
11 phi =45 e -3;
12 s =120;
180
Figure 8.7: Calculation of number of demagnetizing and cross ampere turns
per pole
13 E =260;
14 p =4;
15 n = N /60;
16 a =8;
17 Z =( E * a ) /(2* phi * p * n ) ;
18 coductors_per_slot = Z / s ;
19 total_no_of_conductors = coductors_per_slot * s ;
20 printf ( ” \n Number o f c o n d u c t o r s p e r s l o t =%d \n ” ,
coductors_per_slot )
21
22 phi =( E * a ) /(2*960* n * p )
23 printf ( ” \n Flux=%1 . 5 f Wb/ p o l e ” , phi )
Scilab code Exa 8.7 Calculation of number of demagnetizing and cross ampere turns
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
181
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 7 . s c e .
7
8 clc ;
9 clear ;
10 P =300 e3 ;
11 V =500;
12 a =8;
13 p =4;
14 Z =786;
15 theta =5;
16
17 I=P/V;
18 armature_AT =(1/2) *( I / a ) *( Z /(2* p ) ) ; //
T o t a l AT p e r p o l e
19 demagnetizing_AT = armature_AT *(4* theta /360) ; //
d e m a g n e t i z i n g AT p e r p o l e
20 distorting_AT = armature_AT - demagnetizing_AT ;
// d i s t o r t i n g AT p e r p o l e
21 printf ( ” \n D e m a g n e t i z i n g AT p e r p o l e=%d AT/ p o l e \n
” , demagnetizing_AT )
22 printf ( ” \n C r o s s AT p e r p o l e=%4 . 0 f AT/ p o l e \n ” ,
distorting_AT )
23
24 // There i s a e r r o r i n t h e s u b s t i t u t i o n o f number o f
c o n d u c t o r s ( Z ) i n t h e book
25 // I n t h e q u e s t i o n Z=786 but p r o b l e m i s s o l v e d by
s u b s t i t u t i n g Z=768
26 // But I make t h e c o d e s w i t h t h e g i v e n d a t a t h a t i s Z
=786
27 // So t h e book a n s w e r v a r y
182
Figure 8.8: Calculation of armature resistance and generated emf
Scilab code Exa 8.8 Calculation of armature resistance and generated emf
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 8 . s c e .
7
8 clc ;
9 clear ;
10 R =200;
11 P =100 e3 ;
12 V =500;
13 E =525;
14
15 printf ( ” \n ( a ) ” )
16 Il = P / V ;
17 If = V / R ;
18 Ia = Il + If ;
19 Ra =( E - V ) / Ia ;
20 printf ( ” \n The a r m a t u r e r e s i s t a n c e =%1 . 4 f ohm \n ” , Ra )
183
Figure 8.9: Calculation of armature generated voltage
21
22 printf ( ” \n ( b ) ” )
23 P =60 e3 ;
24 V =520;
25 Il = P / V ;
26 If = V / R ;
27 Ia = Il + If ;
28 E = V +( Ia * Ra ) ;
29 printf ( ” \n The g e n e r a t e d emf=%3 . 2 f v o l t ” ,E )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
184
Figure 8.10: Calculation of generated emf
6 // Ex8 9 . s c e .
7
8 clc ;
9 clear ;
10 Ra =0.8;
11 Rsh =45;
12 Rse =0.6;
13 P =5 e3 ;
14 V =250;
15 Il = P / V ;
16 If =( V +( Rse * Il ) ) / Rsh ;
17 Ia = Il + If ;
18 E = V +( Il * Rse ) +( Ia * Ra ) ;
19 printf ( ” \n Armature g e n e r a t e d v o l t a g e=%3 . 2 f v o l t \
n ” ,E )
185
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 10 . s c e .
7
8 clc ;
9 clear ;
10 Ra =0.1;
11
12 printf ( ” \n ( a ) ”)
13 Ia =80;
14 V =230;
15 E = V +( Ia * Ra ) ;
16 printf ( ” \n The g e n e r a t e d emf when r u n n i n g a s
g e n e r a t o r=%3 . 0 f v o l t \n ” ,E )
17
18 printf ( ” \n ( b ) ”)
19 Ia =60;
20 V =230;
21 E =V -( Ia * Ra ) ;
22 printf ( ” \n The g e n e r a t e d emf when r u n n i n g a s motor
=%3 . 0 f v o l t \n ” ,E )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 11 . s c e .
186
Figure 8.11: Calculation of motor speed
7
8 clc ;
9 clear ;
10 V1 =440;
11 V2 =220;
12 Ia =50;
13 Ra =0.3;
14 a =2;
15 p =2;
16 Z =850;
17 phi_1 =0.025;
18 phi_2 =0.02;
19
20 E = V1 -( Ia * Ra ) ;
21 n1 =( E * a ) /(2* Z * p * phi_1 ) ;
22 N1 = n1 *60;
23 n1_by_n2 =( V1 * phi_2 ) /( V2 * phi_1 ) ;
24 n2 = n1 /( n1_by_n2 ) ;
25 N2 = n2 *60;
26 printf ( ” \n Motor Speed : \ t N1=%d r . p .m \ t N2=%d r .
187
Figure 8.12: Calculation of motor speed and gross torque developed
p .m \n ” ,N1 , N2 )
Scilab code Exa 8.12 Calculation of motor speed and gross torque developed
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 12 . s c e .
7
8 clc ;
9 clear ;
10 V =480;
11 Ia =110;
12 Ra =0.2;
13 Z =864;
14 phi =0.05;
188
Figure 8.13: Calculation of motor speed and current and speed regulation
15 a =6;
16 p =3;
17
18 printf ( ” \n ( a ) ” )
19 E =V -( Ia * Ra ) ;
20 n =( E * a ) /(2* Z * p * phi ) ;
21 N =( n *60) ;
22 printf ( ” \n Speed=%d r . p .m \n ” ,N )
23
24 printf ( ” \n ( b ) ” )
25 Pm = E * Ia ;
26 T = Pm /(2* %pi * n ) ;
27 printf ( ” \n G r o s s t o r q u e d e v e l o p e d i n t h e a r m a t u r e=
%d Nm \n ” ,T )
Scilab code Exa 8.13 Calculation of motor speed and current and speed regulation
189
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 13 . s c e .
7
8 clc ;
9 clear ;
10 Il =2;
11 Z =864;
12 If =0.6;
13 V =220;
14 Ra =0.8;
15 a =2;
16 p =2;
17 phi =5.4 e -3;
18 T =25;
19
20 Ia = Il - If ;
21 E1 =V -( Ia * Ra ) ;
22 n1 =( E1 * a ) /(2* Z * phi * p ) ;
23 N1 = n1 *60;
24 printf ( ” \n Motor s p e e d a t no l o a d=%4 . 0 f r . p .m \n ” ,
N1 )
25
26 Ia =( T * a * %pi ) /( p * phi * Z ) ;
27 Il = Ia + If ;
28 printf ( ” \n Motor c u r r e n t a t f u l l l o a d t o r q u e=%2 . 3 f
A \n ” , Il )
29 E2 =V -( Ia * Ra ) ;
30 n2 =( E2 * a ) /(2* Z * phi * p ) ;
31 N2 = n2 *60;
32 printf ( ” \n Motor s p e e d a t f u l l l o a d=%4 . 0 f r . p .m \n ”
, N2 )
33
34 speed_reg =(( N1 - N2 ) / N2 ) *100;
35 printf ( ” \n Speed r e g u l a t i o n=%1 . 3 f p e r c e n t a g e ” ,
190
Figure 8.14: Calculation of current and kW input of the motor
speed_reg )
36 // There i s a e r r o r i n t h e r e g u l a t i o n c a l c u l a t i o n i n
t h e book
37 // The book a n s w e r 9 . 9 5% i s wrong
Scilab code Exa 8.14 Calculation of current and kW input of the motor
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 14 . s c e .
7
8 clc ;
9 clear ;
191
10 N =600;
11 V =500;
12 Il =32;
13 Ra =0.4;
14 Rf =250;
15
16 printf ( ” \n ( a ) ” )
17 P =( V * Il ) /1 e3 ;
18 N1 =450;
19 Ia = Il -( V / Rf ) ;
20 k_phi =( V -( Ia * Ra ) ) / N ;
21 R =( V -( k_phi * N1 ) ) / Ia - Ra ;
22 printf ( ” \n I n p u t power a t 600 r . p .m=%d kW \n ” ,P )
23 printf ( ” \n Armature c u r r e n t I a=%d A \n ” , Ia )
24 printf ( ” \n R=%1 . 2 f ohm \n ” ,R )
25
26 printf ( ” \n ( b ) ” )
27 //To i n c r e a s e t h e s p e e d t h e f i e l d c o n t r o l i s u s e d .
28 If1_by_If =0.856;
29 If = Il - Ia ;
30 If1 = If1_by_If * If ;
31 Rf1 = V / If1 ;
32 R = Rf1 - Rf ;
33 Ia1 = Ia / If1_by_If ;
34 Il = Ia1 + If1 ;
35 Pi =( V * Il ) /1 e3 ;
36 printf ( ” \n New a r m a t u r e c u r r e n t I a=%d A \n ” , Ia1 )
37 printf ( ” \n New I n p u t power=%2 . 1 f kW” , Pi )
Scilab code Exa 8.15 Calculation of external resistance and electric braking torqu
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
192
Figure 8.15: Calculation of external resistance and electric braking torque
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 15 . s c e .
7
8 clc ;
9 clear ;
10 P_in_HP =37.5;
11 V =220;
12 N =535;
13 Ra =0.086;
14 Ia1 =140;
15 I =200;
16
17 E =V -( Ia1 * Ra ) ;
18 R =( V + E ) / I ;
19 R_ext =R - Ra ;
20 P =( P_in_HP ) *736;
21 omega =(2* %pi * N ) /60;
22 FL_T = P / omega ;
23 initial_braking_T = FL_T *( I / Ia1 ) ;
24 Ia2 =( V +( E /2) ) / R ;
25 halfspeed_braking_T = FL_T *( Ia2 / Ia1 ) ;
193
Figure 8.16: Calculation of speed at full load torque
194
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 16 . s c e .
7
8 clc ;
9 clear ;
10 P_in_HP =20;
11 P =( P_in_HP ) *736;
12 N =450;
13 Ra =0.18;
14 Rf =0.12;
15 R =8.7+ Ra + Rf ;
16 omega =(2* %pi * N ) /60;
17 Tf = P / omega ;
18
19 // The v o l t a g e d e v e l o p e d f o r 450 rpm i s 289 v o l t
which i s t a k e n from t h e c u r v e
20 E =289;
21 P_not =( E * E ) / R ;
22 Pi =(2* %pi * N * Tf ) /60;
23
24 // The m e c h a n i c a l i n p u t i s g r e a t e r t h a n e l e c t r i c a l
o u t p u t , s o t h e motor s p e e d i n c r e a s e s
25 // The v o l t a g e d e v e l o p e d f o r 550 rpm i s 403 v o l t
which i s t a k e n from t h e c u r v e
26 N =550;
27 E =403;
28 P_not =( E * E ) / R ;
29 Pi =(2* %pi * N * Tf ) /60;
30
31 printf ( ” \n E l e c t r i c a l i n p u t=%5 . 2 f W \n ” , P_not )
32 printf ( ” \n M e c h a n i c a l i n p u t=%5 . 2 f W \n ” , Pi )
33 if Pi < P_not then
34 N1 =540;
35 else
195
Figure 8.17: Calculation of efficiency of generator at full load and half load
36 N1 > N
37 end
38 printf ( ” \n D e s i r e d s p e e d=%d rpm \n ” , N1 )
39 // Answer v a r y d u e t o r o u n d o f f e r r o r
40 // s i n c e m e c h a n i c a l i n p u t i s l e s s t h a n e l e c t r i c a l
o u t p u t t h e motor c a n n o t a t t a i n a s p e e d a s 550 rpm
41 // So t h e s p e e d i s 540 rpm which i s o b t a i n e d u s i n g
t r i a l and e r r o r method
Scilab code Exa 8.17 Calculation of efficiency of generator at full load and half
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 17 . s c e .
7
8 clc ;
196
9 clear ;
10 P =100 e3 ;
11 V =460;
12 It =9.8;
13 If =2.7;
14 R =0.11;
15
16 printf ( ” \n ( a ) ” )
17 I =( P /2) / V ;
18 Ia = I + If ;
19 Wa = Ia ^2* R ;
20 Wsh = V * If ;
21 Ian = It - If ;
22 W_not = V * Ian ;
23 NL_armature_loss = Ian ^2* R ;
24 other_loss = W_not - NL_armature_loss ; //
o t h e r l o s s e s i n c l u d e iron , f r i c t i o n , windage l o s s e s
25 T_loss_HL = Wa + Wsh + other_loss ;
26 Pi_HL =( P /2) + T_loss_HL ;
27 efficiency =(( P /2) / Pi_HL ) *100;
28 printf ( ” \n E f f i c i e n c y o f t h e g e n e r a t o r a t h a l f l o a d
=%2 . 1 f p e r c e n t a g e \n ” , efficiency )
29
30 printf ( ” \n ( b ) ” )
31 I=P/V;
32 Ia = I + If ;
33 Wa = Ia ^2* R ;
34 Wsh = V * If ;
35 Ian = It - If ;
36 W_not = V * Ian ;
37 NL_armature_loss = Ian ^2* R ;
38 other_loss = W_not - NL_armature_loss ; //
o t h e r l o s s e s i n c l u d e iron , f r i c t i o n , windage l o s s e s
39 T_loss_FL = Wa + Wsh + other_loss ;
40 Pi_FL = P + T_loss_FL ;
41 efficiency =( P / Pi_FL ) *100;
42 printf ( ” \n E f f i c i e n c y o f t h e g e n e r a t o r a t f u l l l o a d
=%2 . 2 f p e r c e n t a g e \n ” , efficiency )
197
Figure 8.18: Calculation of efficiency of the generator
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 18 . s c e .
7
8 clc ;
9 clear ;
10 P =1000 e3 ;
11 V =500;
12 I1 =2000;
13 I2 =400;
14 Ig =21; // s h u n t f i e l d c u r r e n t o f g e n e r a t o r
15 Im =17; // s h u n t f i e l d c u r r e n t o f motor
198
16 R =0.01;
17 I = P / V ;
18
19 printf ( ” \n ( a ) ” )
20 efficiency = sqrt ( I1 /( I1 + I2 ) ) *100;
21 printf ( ” \n E f f c i e n c y a t f u l l l o a d=%2 . 1 f percentage
\n ” , efficiency )
22
23 printf ( ” \n ( b ) ” )
24 Ia_G = I1 + Ig ;
25 copper_loss_G = Ia_G ^2* R ;
26 loss_G = V * Ig ;
27
28 Ia_M = I1 + I2 - Im ;
29 copper_loss_M = Ia_M ^2* R ;
30 loss_M = V * Im ;
31
32 total_loss = V * I2 ;
33 other_loss = total_loss -( copper_loss_G + loss_G +
copper_loss_M + loss_M ) ; // o t h e r
l o s s e s i n c l u d e iron , f r i c t i o n , windage l o s s e s
34 other_loss_each = other_loss /2;
35 total_loss_G = copper_loss_G + loss_G + other_loss_each ;
36 Pi_G = P + total_loss_G ;
37 efficiency =( P / Pi_G ) *100;
38 printf ( ” \n E f f i c i e n c y w i t h c o n s i d e r i n g l o s s e s =%2 . 1
f p e r c e n t a g e \n ” , efficiency )
39 // There i s a m i s t a k e i n t h e ( a ) p a r t c a l c u l a t i o n i n
t h e book .
40 // The e f f i c i e n c y i s 9 1 . 3% n o t 8 9 . 1%
199
Figure 8.19: Determination of time
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex8 20 ( c ) . s c e .
7
8 clc ;
9 clear ;
10 Ra =35;
11 J =6 e -5;
12 K =0.325;
13
14 T =( J * Ra ) / K ^2;
15 t = - T * log (1 -0.98) ; // ( 1 − 0 . 9 8 ) =0.02
16 printf ( ” \n Time f o r t h e motor t o run w i t h 2
p e r c e n t a g e o f i t s f i n a l s p e e d=%1 . 3 f s e c \n ” ,t )
200
Chapter 9
Synchronous Machines
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 1 . s c e .
7
8 clc ;
9 clear ;
10 slots =24;
11 pole =4;
12
13 printf ( ” \n ( a ) ”)
14 // when a l l s l o t s a r e wound
15 m = slots / pole ;
16 alpha =180/ m ;
17 Kd = sind ( m * alpha /2) /( m * sind ( alpha /2) ) ;
18 printf ( ” \n D i s t r i b u t i o n f a c t o r when a l l s l o t s a r e
wound=%1 . 3 f ” , Kd )
201
Figure 9.1: Calculation of distribution factor
19
20 printf ( ” \n ( b ) ”)
21 // o n l y 4 a d j a c e n t s l o t s a r e wound
22 m =4;
23 Kd = sind ( m * alpha /2) /( m * sind ( alpha /2) ) ;
24 printf ( ” \n D i s t r i b u t i o n f a c t o r when o n l y f o u r slots
p e r p o l e a r e wound=%1 . 3 f ” , Kd )
Scilab code Exa 9.2 Calculation of number of poles and flux per pole
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 2 . s c e
7
202
Figure 9.2: Calculation of number of poles and flux per pole
8 clc ;
9 clear ;
10 V =3.6 e3 ;
11 phase =3
12 f =50;
13 N =500;
14 m =3;
15 c =10;
16
17 printf ( ” \n ( a ) ” )
18 p =(120* f ) / N ;
19 printf ( ” \n The number o f p o l e s=%d” ,p )
20
21 printf ( ” \n ( b ) ” )
22 slots_per_phase = m * p ;
23 conductor_per_phase =( slots_per_phase ) * c ;
24 turns_per_phase = conductor_per_phase /2;
25 emf_per_phase = V / sqrt (3) ;
26 solts_per_pole = m * phase ;
27 alpha =180/ solts_per_pole ;
28
29 Kd = sind ( m * alpha /2) /( m * sind ( alpha /2) ) ;
30 betta = alpha ;
203
Figure 9.3: Determination of short circuit ratio and synchronous reactance
Scilab code Exa 9.3 Determination of short circuit ratio and synchronous reactance
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 3 . s c e
7
8 clc ;
9 clear ;
10 P =45 e3 ;
11 E =220;
12 phase =3;
13 p =6;
204
14 f =50;
15
16 I = P /( E * sqrt (3) ) ;
17 // From SCC , t h e e x c i t a t i o n c u r r e n t i s ,
18 Isc1 =118.1;
19 If =2.2;
20 // For t h i s I f , t h e c o r r e s p o n d i n g l i n e v o l t a g e from
t h e a i r gap l i n e i s ,
21 V1 =202;
22 I1 =1.0;
23 Vph = V1 / sqrt (3) ;
24 Xs_unsat = Vph / Isc1 ; // U n s a t u r a t e d r e a c t a n c e
i n ohm
25 V = V1 / E ;
26 Xs_unsat_pu = V / I1 ; // U n s a t u r a t e d
reactance in per unit
27 printf ( ” \n U n s a t u r a t e d v a l u e o f s y n c h r o n o u s
r e a c t a n c e =\ t %1 . 4 f ohm \ t %1 . 3 f p . u \n ” , Xs_unsat ,
Xs_unsat_pu )
28
29 // For 220 v o l t from f i g u r e ,
30 If =2.9;
31 Isc2 =157;
32 Vph = E / sqrt (3) ;
33 Xs_sat = Vph / Isc2 ;
34 Xs_sat_pu = I1 /( Isc2 / Isc1 ) ;
35 printf ( ” \n Saturated value of synchronous reactance
=\ t %1 . 3 f ohm \ t %1 . 3 f p . u \n ” , Xs_sat , Xs_sat_pu )
36
37 Ie2 =2.9;
38 Ie1 =2.2;
39 SCR = Ie2 / Ie1 ;
40 printf ( ” \n Short c i r c u i t r a t i o =%1 . 2 f \n ” , SCR )
205
Figure 9.4: Calculation of leakage reactance and field current
Scilab code Exa 9.4 Calculation of leakage reactance and field current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 4 . s c e .
7
8 clc ;
9 clear ;
10 // From f i g u r e 9 . 2 6
11 EG =25;
12 P =45 e3 ;
13 E =220;
14 I = P /( E * sqrt (3) ) ;
15 Xl = EG /( sqrt (3) * I ) ;
16 printf ( ” \n L e a k a g e r e a c t a n c e=%1 . 4 f ohm \n ” , Xl )
17
18 // From f i g 9 . 2 6 a r m a t u r e r e a c t i o n amphere i s e q u a l
to the f i e l d current
206
Figure 9.5: Determination of excitation voltage
19 If =1.925;
20 printf ( ” \n F i e l d amphere c u r r e n t=%1 . 3 f A \n ” , If )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 5 . s c e
7
8 clc ;
9 clear ;
10 V =1+ %i *0;
11 Xd =1.0;
207
12 Xq =0.6;
13 pf =0.8;
14 theta = acosd ( pf ) ;
15 Ia1 = pf - %i * sind ( acosd ( pf ) ) ;
16 Ia =1.0; // p h a s e m a g n i t u d e o f I a
17
18 tan_del =( Ia * Xq * cosd ( theta ) ) /( V +( Ia * Xq * sind ( theta ) ) ) ;
19 del = atand ( real ( tan_del ) ) ;
20 Ef_dash =(( V +( Ia * Xq * sind ( theta ) ) ) ^2+( Ia * Xq * cosd ( theta
) ) ^2) ^(1/2) ;
21
22 Ef = real ( Ef_dash ) +( Ia * sind ( theta + del ) *( Xd - Xq ) ) ;
23 disp ( Ef , ’ Magnitude e x c i t a t i o n v o l t a g e i n p . u i s ’ )
24
25 Ef_double_dash = V *(1+ %i *0) + %i *(( cosd ( theta ) - %i * sind (
theta ) ) * Xd ) ;
26 disp ( Ef_double_dash , ’ The r e c t a n g u l a r v a l u e o f d o u b l e
excited voltage in p . u i s ’)
27
28 Ef_double_dash_mag = sqrt ( real ( Ef_double_dash ) ^2+ imag (
Ef_double_dash ) ^2) ;
29 Ef_double_dash_ang = atand ( imag ( Ef_double_dash ) / real (
Ef_double_dash ) ) ;
30 printf ( ” \n The p o l a r form o f d o u b l e e x c i t e d v o l t a g e=
%1 . 2 f angle%2 . 3 f d e g r e e \n ” , Ef_double_dash_mag ,
Ef_double_dash_ang )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
208
Figure 9.6: Calculation of voltage regulation
5
6 // Ex9 6 . s c e .
7
8 clc ;
9 clear ;
10 P =500 e3 ;
11 Vl =3.3 e3
12 Il = P /( sqrt (3) * Vl ) ;
13 Vph = Vl / sqrt (3) ;
14 Iph = Il ;
15 Rph =0.4;
16 Xsyn =4.2;
17
18 printf ( ” \n ( a ) ”)
19 pf =1; // u n i t y
20 Ef =(( Vph +( Iph * Rph ) ) ^2+( Iph * Xsyn ) ^2) ^(1/2) ;
21 reg =(( Ef / Vph ) -1) *100;
22 printf ( ” \n V o l t a g e R e g u l a t i o n f o r u n i t y power
f a c t o r =%1 . 2 f p e r c e n t a g e \n ” , reg )
23
24 printf ( ” \n ( b ) ”)
209
25 pf =0.8; // l a g g i n g
26 theta = acosd ( pf ) ;
27 Ef =(( Vph +( Iph * Rph * cosd ( theta ) ) +( Iph * Xsyn * sind ( theta )
) ) ^2+(( Iph * Xsyn * cosd ( theta ) ) -( Iph * Rph * sind ( theta )
) ) ^2) ^(1/2) ;
28 reg =(( Ef / Vph ) -1) *100;
29 printf ( ” \n V o l t a g e R e g u l a t i o n f o r 0 . 8 l a g g i n g power
f a c t o r =%2 . 3 f p e r c e n t a g e \n ” , reg )
30
31 printf ( ” \n ( c ) ”)
32 pf =0.8; // l e a d i n g
33 theta = acosd ( pf ) ;
34 Ef =(( Vph +( Iph * Rph * cosd ( theta ) ) -( Iph * Xsyn * sind ( theta )
) ) ^2+(( Iph * Xsyn * cosd ( theta ) ) +( Iph * Rph * sind ( theta )
) ) ^2) ^(1/2) ;
35 reg =(( Ef / Vph ) -1) *100;
36 printf ( ” \n V o l t a g e R e g u l a t i o n f o r 0 . 8 l e a d i n g power
f a c t o r =%1 . 1 f p e r c e n t a g e \n ” , reg )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 7 . s c e .
7
8 clc ;
9 clear ;
10 // i n p u t d a t a a r e t a k e n from e x a m p l e 9 . 5
11 V =1+ %i *0;
12 Xd =1.0;
210
Figure 9.7: Calculation of voltage regulation
13 Xq =0.6;
14 pf =0.8;
15 theta = acosd ( pf ) ;
16 Ia1 = pf - %i * sind ( acosd ( pf ) ) ;
17 Ia =1.0; // p h a s e m a g n i t u d e o f I a
18
19 printf ( ” \n ( a ) ”)
20 // l a g g i n g power f a c t o r
21 tan_del =( Ia * Xq * cosd ( theta ) ) /( V +( Ia * Xq * sind ( theta ) ) ) ;
22 del = atand ( real ( tan_del ) ) ;
23 Ef_dash =(( V +( Ia * Xq * sind ( theta ) ) ) ^2+( Ia * Xq * cosd ( theta
) ) ^2) ^(1/2) ;
24 Ef = real ( Ef_dash ) +( Ia * sind ( theta + del ) *( Xd - Xq ) ) ;
25 reg =(( Ef - V ) /1.0) *100;
26 printf ( ” \n V o l t a g e R e g u l a t i o n f o r 0 . 8 l a g g i n g power
f a c t o r =%d p e r c e n t a g e \n ” , reg )
27
28 printf ( ” \n ( b ) ”)
29 tan_del =( Ia * Xq * cosd ( theta ) ) /( V -( Ia * Xq * sind ( theta ) ) ) ;
30 del = atand ( real ( tan_del ) ) ;
31 Ef =(( V -( Ia * Xq * sind ( theta ) ) ) ^2+( Ia * Xq * cosd ( theta ) ) ^2)
211
Figure 9.8: Determination of capacity of the condenser
^(1/2) ;
32 reg =(( Ef - V ) /1.0) *100;
33 printf ( ” \n V o l t a g e R e g u l a t i o n f o r 0 . 8 l e a d i n g power
f a c t o r =%2 . 0 f p e r c e n t a g e ” , reg )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 8 . s c e .
7
212
Figure 9.9: Determination of capacity of the synchronous condenser
8 clc ;
9 clear ;
10 VI1 =10 e6 ;
11 phi1 = acosd (0.75) ;
12 phip = acosd (0.9) ;
13 phic =90 - asind (7/100) ; // g i v e n l o s s i s 7%
o f KVA o u t p u t
14 KVAc = VI1 *((( sind ( phi1 ) * cosd ( phip ) ) -( cosd ( phi1 ) * sind (
phip ) ) ) /(( sind ( phic ) * cosd ( phip ) ) +( cosd ( phic ) * sind
( phip ) ) ) ) *1 e -3;
15 MVAc = KVAc *1 e -3;
16 printf ( ” \n The c a p a c i t y o f t h e s y n c h r o n o u s
c o n d e n s e r= %1 . 2 f MVA” , MVAc )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
213
Figure 9.10: Determination of line current and power factor
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 9 . s c e .
7
8 // i n p u t d a t a a r e t a k e n from e x a m p l e 9 . 8
9 clc ;
10 clear ;
11 VI1 =10 e6 ;
12 pf1 =0.75;
13 pfc = cosd (90 - asind (7/100) ) ;
14 KVAc = VI1 *(( sqrt (1 - pf1 ^2) ) /( sqrt (1 - pfc ^2) ) ) *1 e -3;
15 MVAc = KVAc *1 e -3;
16 printf ( ” \n The c a p a c i t y o f s y n c h r o n o u s c o n d e n s e r
which i s d e s i r e d t o r a i s e t h e power f a c t o r t o
u n i t y=%1 . 2 f MVA” , MVAc ) ;
214
Scilab code Exa 9.10 Determination of line current and power factor
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 10 . s c e .
7
8 clc ;
9 clear ;
10 Pl =1 e6 ;
11 Pd =360; // d e v e l o p i n g power
12 Pi =600 e3 ;
13 Vl =6600;
14 pf =0.8;
15 Pin =800 e3 ;
16 theta = acosd ( pf ) ;
17 Il = Pl /( Vl * sqrt (3) ) ;
18 Ps =( Pd *746) /0.9; // 1HP=746 w a t t and
e f f i c i e n c y i s assumed 90% ( i . e 0 . 9 )
19 phi_s = acosd ( Ps / Pi ) ;
20 Is = Pi /( Vl * sqrt (3) ) ;
21 lag_reactive_crt_load = Il * sind ( theta ) ;
22 lead_reacitve_crt_motor = lag_reactive_crt_load * sind (
phi_s ) ;
23 lag_reactive_crt_result = lag_reactive_crt_load -
lead_reacitve_crt_motor ;
24 resultant_active_crt =( Il * pf ) +( lag_reactive_crt_load *
cosd ( phi_s ) ) ;
25
26 resultant_line_crt = sqrt ( resultant_active_crt ^2+
lag_reactive_crt_result ^2) ;
27 printf ( ” \n R e s u l t a n t l i n e c u r r e n t=%2 . 2 f A \n ” ,
215
Figure 9.11: Determination of increase in additional loss and decrease in line
current and final line current
resultant_line_crt ) ;
28
29 final_power_factor = resultant_active_crt /
resultant_line_crt ;
30 printf ( ” \n F i n a l power f a c t o r =%1 . 0 f \n ” ,
final_power_factor ) ;
31
32 increase_of_crt =( resultant_line_crt - Il ) *100/ Il ;
33 printf ( ” \n The i n c r e a s e o f c u r r e n t=%2 . 1 f p e r c e n t a g e
\n ” , increase_of_crt )
34
35 increase_power_trans =(( Pin + Ps ) - Pin ) *100/ Pin ;
36 printf ( ” \n The i n c r e a s e o f power t r a n s m i t t e d=%2 . 1 f
p e r c e n t a g e \n ” , increase_power_trans )
Scilab code Exa 9.11 Determination of increase in additional loss and decrease in
216
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex9 11 . s c e
7
8 clc ;
9 clear ;
10 // The i n p u t d a t a a r e t a k e n from t h e p r e v i o u s e x a m p l e
9.10
11
12 Pl =1 e6 ;
13 Pd =360; // d e v e l o p i n g power
14 Pi =600 e3 ;
15 Vl =6600;
16 pf =0.1;
17 pf1 =0.8;
18 Pin =800 e3 ;
19 theta = acosd ( pf ) ;
20 Il = Pl /( Vl * sqrt (3) ) ;
21 Ps =( Pd *746) /0.9; // 1HP=746 w a t t and
e f f i c i e n c y i s assumed 90% ( i . e 0 . 9 )
22 phi_s = acosd ( Ps / Pi ) ;
23 Is = Pi /( Vl * sqrt (3) ) ;
24 lag_reactive_crt_motor =52.5;
25 lead_reacitve_crt_motor = lag_reactive_crt_motor * sind (
acosd ( pf ) ) ;
26 active_crt = lag_reactive_crt_motor * pf ;
27 lag_reactive_crt_result = lag_reactive_crt_motor -
lead_reacitve_crt_motor ;
28 resultant_active_crt =( Il * pf1 ) +( active_crt ) ;
29
30 resultant_line_crt = sqrt ( resultant_active_crt ^2+
lag_reactive_crt_result ^2) ;
31 printf ( ” \n R e s u l t a n t l i n e c u r r e n t= %2 . 3 f A \n ” ,
resultant_line_crt ) ;
32
217
33 pf = resultant_active_crt / resultant_line_crt ;
34 printf ( ” \n Power f a c t o r = %1 . 0 f \n ” , pf )
35
36 increase_of_crt =( Il - resultant_active_crt ) *100/ Il ;
37 printf ( ” \n The i n c r e a s e o f c u r r e n t= %2 . 0 f
p e r c e n t a g e \n ” , increase_of_crt )
38
39 increase_power_trans =( Pi * pf ) *100/ Pin ;
40 printf ( ” \n The i n c r e a s e o f power t r a n s m i t t e d= %2 . 0 f
p e r c e n t a g e ” , increase_power_trans )
218
Chapter 10
Scilab code Exa 10.1 Calculation of synchronous speed and rotor speed and rotor fr
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 1 . s c e
7
8 clc ;
9 clear ;
10 f =50;
11 p =4;
12
13 printf ( ” \n ( a ) ”)
14 Ns =(120* f ) / p ;
15 printf ( ” \n S y n c h r o n o u s s p e e d=%d r . p .m \n ” , Ns )
16
17 printf ( ” \n ( b ) ”)
18 s =0.04;
19 N = Ns -( s * Ns ) ;
219
Figure 10.1: Calculation of synchronous speed and rotor speed and rotor
frequency
Scilab code Exa 10.2 Calculation of flux per pole and rotor emf and phase angle
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 2 . s c e
220
Figure 10.2: Calculation of flux per pole and rotor emf and phase angle
7
8 clc ;
9 clear ;
10 T1 =120;
11 T2 =24;
12 R2 =0.013;
13 X2 =0.048;
14 V =400;
15 kd =0.96;
16 kp =1.0;
17 f =50;
18
19 printf ( ” \n ( a ) ” )
20 phi = V /(4.44* kd * kp * f * T1 ) ;
21 printf ( ” \n The f l u x p e r p o l e=%1 . 6 f Wb \n ” , phi )
22
23 printf ( ” \n ( b ) ” )
24 E2 =4.44* kd * kp * phi * f * T2 ;
25 printf ( ” \n The r o t o r emf i n d u c e d a t s t a n d s t i l l on
open c i r c u i t =%d V \n ” , E2 )
221
26
27 printf ( ” \n ( c ) ” )
28 s =0.04;
29 Er = s * E2 ;
30 printf ( ” \n R o t o r emf a t a s l i p =%1 . 1 f V” , Er )
31 Ir = Er / sqrt ( R2 ^2+( s * X2 ) ^2) ;
32 printf ( ” \n The r o t o r c u r r e n t=%3 . 2 f A \n ” , Ir )
33
34 printf ( ” \n ( d ) \ t ( i ) ” )
35 s =0.04;
36 phir = atand ( s *( X2 / R2 ) ) ;
37 printf ( ” \n The p h a s e d i f f e r e n c e b e t w e e n r o t o r emf
and c u r r e n t f o r 4 p e r c e n t a g e s l i p =%2 . 2 f d e g r e e ” ,
phir )
38 printf ( ” \n\ t ( i i ) ” )
39 s =1;
40 phir = atand ( s *( X2 / R2 ) ) ;
41 printf ( ” \n The p h a s e d i f f e r e n c e b e t w e e n r o t o r emf
and c u r r e n t f o r 100 p e r c e n t a g e s l i p =%2 . 2 f d e g r e e ”
, phir )
Scilab code Exa 10.3 Calculation of output power and mechanical power developed an
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 3 . s c e
7
8 clc ;
9 clear ;
10 Pin =40; // power i n kW
222
Figure 10.3: Calculation of output power and mechanical power developed
and rotor copper loss and efficiency
11 Ps =1.5; // power i n kW
12 Ns =100; // s p e e d p e r c e n t a g e v a l u e
13 N =40; // s p e e d p e r c e n t a g e v a l u e
14 power_loss =0.8; // power i n kW
15
16 printf ( ” \n ( a ) ” )
17 rotor_input_power = Pin - Ps ;
18 s =0.04;
19 rotor_copper_loss = s * rotor_input_power ;
20 mec_power_developed = rotor_input_power -
rotor_copper_loss ;
21 printf ( ” \n M e c h a n i c a l power d e v e l o p e d by t h e r o t o r=
%2 . 2 f kW” , mec_power_developed )
22 printf ( ” \n R o t o r c o p p e r l o s s =%2 . 2 f kW \n ” ,
rotor_copper_loss )
23
24 printf ( ” \n ( b ) ” )
25 motor_output_power = mec_power_developed - power_loss ;
26 printf ( ” \n Output o f t h e motor=%2 . 2 f kW \n ” ,
motor_output_power )
223
27
28 printf ( ” \n ( c ) ” )
29 motor_efficiency =( motor_output_power / Pin ) *100;
30 printf ( ” \n The motor e f f i c i e n c y =%2 . 1 f p e r c e n t a g e \n
” , motor_efficiency )
31
32 printf ( ” \n ( d ) ” )
33 new_slip =( Ns - N ) / Ns ;
34 total_rotor_copper_loss = new_slip * rotor_input_power ;
35 printf ( ” \n T o t a l r o t o r c o p p e r l o s s when s p e e d
r e d u c e d t o 40 p e r c e n t a g e o f s y n c h r o n o u s s p e e d=%2 . 1
f kW \n ” , total_rotor_copper_loss )
36
37 printf ( ” \n ( e ) ” )
38 total_rotor_loss = total_rotor_copper_loss + power_loss ;
39 motor_output_power = rotor_input_power -
total_rotor_loss ;
40 motor_efficiency =( motor_output_power / Pin ) *100;
41 printf ( ” \n E f f i c i e n c y o f motor when s p e e d r e d u c e d
t o 40 p e r c e n t a g e o f s y n c h r o n o u s s p e e d=%2 . 1 f
p e r c e n t a g e ” , motor_efficiency )
Scilab code Exa 10.4 Determination of synchronous speed and slip and maximum torqu
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 4 . s c e
7
8 clc ;
9 clear ;
224
Figure 10.4: Determination of synchronous speed and slip and maximum
torque and rotor frequency
10
11 f =50;
12 p =4;
13 V =400;
14 E2 =190;
15 R1 =0.5;
16 X1 =2.5;
17 R2 =0.06;
18 X2 =0.3;
19
20 printf ( ” \n ( a ) ” )
21 Ns =(120* f ) / p ;
22 printf ( ” \n S y n c h r o n o u s s p e e d=%d r . p .m \n ” , Ns )
23
24 printf ( ” \n ( b ) ” )
25 s =( R2 / X2 ) *100;
26 printf ( ” \n S l i p a t which maximum t o r q u e o c c u r s=%d
p e r c e n t a g e \n ” ,s )
27
28 printf ( ” \n ( c ) ” )
29 E = E2 / sqrt (3) ;
225
30 Ir =( s * E ) /( sqrt (2) * R2 *100) ;
31 pf =1/ sqrt (2) ;
32 Pi = sqrt (3) * E2 * Ir * pf ;
33 P0 =(1 - s /100) * Pi ;
34 Tm = Pi /(2* %pi * Ns /60) ;
35 printf ( ” \n Maximum Torque=%3 . 2 f s y n c h r o n o u s w a t t \n
” , Tm )
36
37 printf ( ” \n ( d ) ” )
38 Tfl =(1/2) * Tm ;
39 // ( 2 / 1 ) =(R2ˆ2+ s f ˆ2∗X2 ˆ 2 ) / ( 2 ∗ X2∗R2∗ s f )
40 // From t h i s e q u a t i o n we g e t s f ˆ2 −0.8∗ s f + 0 . 0 4 = 0 ;
41 a =1;
42 b = -0.8; // a , b , c a r e c o e f f i c i e n t v a l u e s t a k e n from t h e
above second o r d e r e q u a t i o n
43 c =0.04;
44 sf =( -b - sqrt ( b ^2 -(4* a * c ) ) ) /(2* a ) ;
45 sf_percentage = sf *100;
46 Nf = Ns *(1 - sf ) ;
47 Pf =2* %pi *( Nf /60) * Tfl ;
48 printf ( ” \n F u l l l o a d t o r q u e=%3 . 2 f s y n c h r o n o u s w a t t ”
, Tfl )
49 printf ( ” \n F u l l l o a d s l i p =%1 . 1 f p e r c e n t a g e ” ,
sf_percentage )
50 printf ( ” \n Speed a t f u l l l o a d=%d r . p .m” , Nf )
51 printf ( ” \n Power o u t p u t=%2 . 2 f kW \n ” , Pf /1000)
52 // Answer v a r y d u e t o round o f f e r r o r
53
54 printf ( ” \n ( e ) ” )
55 f_at_fullload = sf * f ;
56 printf ( ” \n The r o t o r f r e q u e n c y a t f u l l l o a d=%1 . 1 f
Hz” , f_at_fullload )
226
Figure 10.5: Calculation of number of poles and slip and rotor copper loss
Scilab code Exa 10.5 Calculation of number of poles and slip and rotor copper loss
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 5 . s c e
7
8 clc ;
9 clear ;
10 f =50;
11 N =285;
12 Ns =300; // which i s n e a r t h e v a l u e o f N a s s l i p lies
b /w 0 . 0 3 t o 0 . 0 5
13
14 printf ( ” \n ( a ) ” )
15 p =(120* f ) / Ns ;
16 printf ( ” \n Number o f p o l e s=%d \n ” ,p )
17
18 printf ( ” \n ( b ) ” )
227
Figure 10.6: Determination of starting torque
19 s =( Ns - N ) / Ns ;
20 s_percentage = s *100;
21 printf ( ” \n S l i p at f u l l l o a d=%d p e r c e n t a g e \n ” ,
s_percentage )
22
23 printf ( ” \n ( c ) ” )
24 // s l i p i s p r o p o r t i o n a l t o r o t o r r e s i s t a n c e
25 s =2* s_percentage ;
26 printf ( ” \n S l i p at f u l l load i f r o t o r r e s i s t a n c e is
d o u b l e d=%d p e r c e n t a g e \n ” ,s )
27
28 printf ( ” \n ( d ) ” )
29 // c o p p e r l o s s =I ˆ2∗R ; s o c o p p e r l o s s d o u b l e s i f r o t o r
r e s i s t a n c e doubles
30 Pcu =280;
31 Pcu_new =2* Pcu ;
32 printf ( ” \n The new v a l u e o f r o t o r c o p p e r l o s s =%d
w a t t \n ” , Pcu_new )
228
Figure 10.7: Calculation motor parameters and slip and pullout torque
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 6 . s c e
7
8 clc ;
9 clear ;
10 s =0.05; // F u l l l o a d s l i p o f 5 p e r c e n t a g e
11 Iss_by_Isf =5; // Taken from q u e s t i o n s t a t e m e n t
12 Ts_by_Tf = s *( Iss_by_Isf ) ^2;
13 printf ( ” \n Starting torque interms of f u l l load
t o r q u e=%1 . 2 f ∗ Tf ” , Ts_by_Tf )
Scilab code Exa 10.7 Calculation motor parameters and slip and pullout torque
229
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 7 . s c e
7
8 clc ;
9 clear ;
10 Vl_not =400; //No l o a d v o l t a g e i n v o l t
11 Vl_sc =50; // B l o c k e d r o t o r v o l t a g e i n v o l t
12 I_not =20; //No l o a d c u r r e n t i n Ampere
13 Isc =60; // B l o c k e d r o t o r c u r r n e t i n Ampere
14 W1_not =5 e3 ; // w a t t m e t e r r e a d i n g s f o r no l o a d
t e s t i n watt
15 W2_not = -3.2 e3 ; // w a t t m e t e r r e a d i n g s f o r no l o a d
t e s t i n watt
16 Wsc1 =2.3 e3 ; // w a t t m e t e r r e a d i n g s f o r b l o c k e d
r o t o r t e s t i n watt
17 Wsc2 =0.75 e3 ; // w a t t m e t e r r e a d i n g s f o r b l o c k e d
r o t o r t e s t i n watt
18 Vdc =18; // dc v o l t a g e i n v o l t
19 Idc =60; // dc l i n e c u r r e n t i n Ampere
20
21 printf ( ” \n ( a ) ” )
22 R1 =( Vdc / Idc ) /2;
23 printf ( ” \n R1=%1 . 2 f ohm” , R1 )
24 P_not = W1_not + W2_not ;
25 V_not = Vl_not / sqrt (3) ;
26 cos_phi_not = P_not /(3* V_not * I_not ) ;
27 R_not = V_not /( I_not * cos_phi_not ) ;
28 printf ( ” \n R0=%2 . 3 f ohm” , R_not )
29 // R not a n s w e r v a r y d u e t o round o f f
error in v not
and c o s p h i n o t
30 X_not = V_not /( I_not * sqrt (1 - cos_phi_not ^2) ) ;
31 printf ( ” \n X0=%2 . 3 f ohm” , X_not )
32 Psc = Wsc1 + Wsc2 ;
33 Vsc = Vl_sc / sqrt (3) ;
230
34 cos_phi_sc = Psc /(3* Vsc * Isc ) ;
35 R2_dash =(( Vsc / Isc ) * cos_phi_sc ) - R1 ;
36 printf ( ” \n R2dash=%1 . 3 f ohm” , R2_dash )
37 X1 =(( Vsc / Isc ) * sqrt (1 - cos_phi_sc ^2) ) /2;
38 printf ( ” \n X1=%1 . 3 f ohm” , X1 )
39 X2_dash = X1 ;
40 printf ( ” \n X2dash=%1 . 3 f ohm \n ” , X2_dash )
41
42 printf ( ” \n ( b ) ” )
43 ns =25;
44 s = R2_dash / X2_dash ; // S l i p f o r maximum t o r q u e
45 pf_max =1/ sqrt (2) ;
46 Ps =(3* V_not ^2) / sqrt (( R1 + R2_dash / s ) ^2+(2* X1 ) ^2) ;
47 Pc =(3* V_not ^2*( R1 + R2_dash ) ) /(( R1 + R2_dash / s ) ^2+(2* X1 )
^2) ; // S t a t o r c o p p e r l o s s i n kw
48 Pin = Ps - Pc ;
49 T = Pin /(2* %pi * ns ) ;
50 printf ( ” \n S l i p f o r p u l l o u t t o r q u e=%g” ,s )
51 printf ( ” \n Magnitude o f p u l l o u t t o r q u e=%3 . 2 f Nm” ,T )
52 // There i s a m i s t a k e i n t h e book s o l u t i o n i n p a r t ( b
)
53 // The c a l c u l a t e d Ps v a l u e i s wrong
54 // Hence T a n s w e r v a r y
Scilab code Exa 10.9 Determination ratio of starting current to full load current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex10 9 . s c e
7
231
Figure 10.8: Determination ratio of starting current to full load current
8 clc ;
9 clear ;
10 P_in_HP =10;
11 eta =0.9;
12 pf =0.8;
13 Vl =400;
14 Vsc =160;
15 Isc =7.2;
16 P_in_watt = P_in_HP *735.5;
17 If = P_in_watt /( sqrt (3) * Vl * pf * eta ) ;
18 Isc_400 = Isc * Vl / Vsc ;
19 Ist = Isc_400 /3;
20 Ist_by_If = Ist / If ;
21 printf ( ” \n The r a t i o v a l u e o f s t a r t i n g c u r r e n t t o
f u l l l o a d c u r r e n t=%1 . 3 f ” , Ist_by_If )
Scilab code Exa 10.10 Calculation of starting torque and starting current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
232
Figure 10.9: Calculation of starting torque and starting current
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // EX10 10 . s c e .
7 clc ;
8 clear ;
9 sf =0.04;
10 If =37.5;
11 f =50;
12 p =4;
13 V =400;
14 P_in_HP =25;
15 z =2.8;
16 P_in_watt = P_in_HP *735.5;
17 Nf =((120* f ) / p ) *(1 - sf ) ;
18 nf = Nf /60;
19 Tf = P_in_watt /(2* %pi * nf ) ;
20 Isc_phase = V / z ;
21 Isc = sqrt (3) * Isc_phase ;
233
22
23 printf ( ” \n ( i ) U s i n g D i r e c t s w i t c h i n g ” )
24 Ist = Isc ;
25 printf ( ” \n \ t The s t a r t i n g c u r r e n t=%3 . 2 f A” , Ist )
26 Tst =( Isc / If ) ^2* sf * Tf ;
27 printf ( ” \n \ t The s t a r t i n g t o r q u e=%3 . 1 f Nm \n ” , Tst )
28
29 printf ( ” \n ( i i ) U s i n g S t a r d e l t a c o n n e c t o r ” )
30 Ist =(1/3) * Isc ;
31 printf ( ” \n \ t The s t a r t i n g c u r r e n t=%3 . 2 f A” , Ist )
32 Tst =(1/3) *( Isc / If ) ^2* sf * Tf ;
33 printf ( ” \n \ t The s t a r t i n g t o r q u e=%3 . 1 f Nm \n ” , Tst )
34
35 printf ( ” \n ( i i i ) U s i n g a u t o t r a n s f o r m e r ” )
36 k =0.7;
37 Ist = k ^2* Isc ;
38 printf ( ” \n \ t The s t a r t i n g c u r r e n t=%3 . 2 f A” , Ist )
39 Tst = k ^2*( Isc / If ) ^2* sf * Tf ;
40 printf ( ” \n \ t The s t a r t i n g t o r q u e=%3 . 1 f Nm \n ” , Tst )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 0 1 1 . s c e
7
8 clc ;
9 clear ;
10
11
234
Figure 10.10: Calculation of plugging torque
12 P_in_HP =25;
13 s =0.04;
14 p =4;
15 f =50;
16 Ns =(120* f ) / p ;
17 ns = Ns /60;
18 nf =(1 - s ) * ns ;
19 P_in_watt = P_in_HP *735.5;
20 Tf = P_in_watt /(2* %pi * nf ) ;
21 sf = s ;
22 sp =2 - s ; // At t h e t i m e o f p l u g g i n g t h e s l i p
i s 200%
23 a =4;
24 X2_by_R2 = a ;
25 Tp =( sp / sf ) *((1+( sf ^2* X2_by_R2 ^2) ) /(1+( sp ^2* X2_by_R2
^2) ) ) * Tf ;
26 printf ( ” \n P l u g g i n g t o r q u e a t f u l l l o a d=%2 . 1 f Nm” , Tp
)
235
Figure 10.11: Calculation of external resistance
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 0 1 2 . s c e
7
8 clc ;
9 clear ;
10 p =4;
11 f =50;
12 R2 =0.25;
13 N1 =1425;
14 N2 =1275;
15
16 Ns =(120* f ) / p ;
17 s1 =( Ns - N1 ) / Ns ;
236
Figure 10.12: Calculation of speed and power ratio and frequency
18 s2 =( Ns - N2 ) / Ns ;
19 R =( R2 *( s2 / s1 ) ) - R2 ;
20 printf ( ” \n E x t e r n a l r e s i s t a n c e p e r p h a s e=%1 . 1 f ohm
p e r p h a s e ” ,R )
Scilab code Exa 10.13 Calculation of speed and power ratio and frequency
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 0 1 3 . s c e
7
8 clc ;
9 clear ;
10 p1 =12;
11 p2 =8;
237
12 f =50;
13 printf ( ” \n ( a ) ” )
14 printf ( ” \n \ t ( i ) Speed when c u m u l a t i v e l y c a s c a d e d : ” )
15 N1 =(120* f ) /( p1 + p2 ) ;
16 printf ( ” \n \ t N=%d r . p .m” , N1 )
17 printf ( ” \n \ t ( i i ) Speed when d i f f e r e n t i a l l y c a s c a d e d
: ”)
18 N2 =(120* f ) /( p1 - p2 ) ;
19 printf ( ” \n \ t N=%d r . p .m \n ” , N2 )
20
21 printf ( ” \n ( b ) ” )
22 printf ( ” \n The r a t i o o f power s h a r e d by t h e two
m o t o r s=%d/%d \n ” ,p1 , p2 )
23
24 printf ( ” \n ( c ) ” )
25 printf ( ” \n \ t ( i ) F i r s t motor : ” )
26 Ns1 =(120* f ) / p1 ;
27 s1 =( Ns1 - N1 ) / Ns1 ;
28 sf1 = s1 * f ;
29 printf ( ” \n Required frequency of v o l t a g e t o be
i n j e c t e d i n r o t o r o f f i r s t motor=%d Hz” , sf1 )
30 printf ( ” \n \ t ( i i ) S e c o n d motor : ” )
31 Ns2 =(120* f ) / p2 ;
32 s2 =( Ns2 - N1 ) / Ns2 ;
33 sf2 = s2 * f ;
34 printf ( ” \n R e q u i r e d f r e q u e n c y o f v o l t a g e t o be
i n j e c t e d i n r o t o r o f s e c o n d motor=%d Hz” , sf2 )
238
Chapter 11
Scilab code Exa 11.1 Determination of motor parameters and stator current and powe
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex11 1 . s c e
7
8 clc ;
9 clear ;
10 V_not =220;
11 I_not =4;
12 W_not =100;
13 Vsc =110;
14 Isc =10;
15 Wsc =400;
16 p =6;
17 V =220;
239
Figure 11.1: Determination of motor parameters and stator current and
power factor and speed and torque
18 f =50;
19
20 printf ( ” \n ( a ) ” )
21 r1 =( Wsc / Isc ^2) /2;
22 x1 = sqrt (( Vsc / Isc ) ^2 -(2* r1 ) ^2) /2;
23 r2_dash = r1 ;
24 x2_dash = x1 ;
25 phi_not = acosd ( W_not /( V_not * I_not ) ) ;
26 V_not_dash = V_not -(( I_not *( cosd ( phi_not ) - %i * sind (
phi_not ) ) ) *(( r1 + r2_dash /4) + %i *( x1 + x2_dash /2) ) ) ;
27 Wi = W_not -( I_not ^2*( r1 + r2_dash /4) ) ;
28 R_not_by_2 =( V_not_dash ^2) / Wi ;
29 Y_not =( I_not ) /( V_not_dash *2) ;
30 B_not = sqrt ((2* Y_not ) ^2 -(1/ R_not_by_2 ) ^2) /2;
31 X_not_by_2 =1/(2* B_not ) ;
32 printf ( ” \n P a r a m e t e r s o f t h e motor : ” )
33 printf ( ” \n \ t r 1=r 2 d a s h=%d ohm” , r1 )
34 printf ( ” \n \ t x1=x 2 d a s h=%1 . 3 f ohm” , x1 )
240
35 printf ( ” \n \ t R0/2=%3 . 2 f ohm” , sqrt ( real ( R_not_by_2 )
^2+ imag ( R_not_by_2 ) ^2) )
36 printf ( ” \n \ t X0/2=%2 . 2 f ohm” , sqrt ( real ( X_not_by_2 )
^2+ imag ( X_not_by_2 ) ^2) )
37
38 printf ( ” \n ( b ) ” )
39 // From t h e a p p l i e d p a r a m e t e r s o f e q u i v a l e n t c i r c u i t
o f t h e motor s t a t o r c u r r e n t is simplified
40 I1 = complex (1.096 , -0.526) * complex (6.36 , -1.92) ;
41 I1_mag = sqrt ( real ( I1 ) ^2+ imag ( I1 ) ^2) ;
42 I1_angle = atand ( imag ( I1 ) / real ( I1 ) ) ;
43 pf = cosd ( I1_angle ) ;
44 P_input =1075;
45 P_loss =102.87;
46 P_not = P_input - P_loss ;
47 Ns =1000;
48 s =0.04;
49 Nfl =(1 - s ) * Ns ;
50 T_net = P_not /(2* %pi * Nfl /60) ;
51 motor_input = V * I1_mag * pf ;
52 efficiency =( P_not / motor_input ) *100;
53 printf ( ” \n S t a t o r c u r r e n t : \n\ t m a g n i t u d e=%1 . 2 f V, \
n\ t a n g l e=%2 . 2 f d e g r e e ” , I1_mag , I1_angle )
54 printf ( ” \n Power f a c t o r =%0 . 3 f l a g g i n g ” , pf )
55 printf ( ” \n Power o u t p u t=%3 . 2 f w a t t ” , P_not )
56 printf ( ” \n Speed=%d r . p .m” , Nfl )
57 printf ( ” \n Torque=%1 . 2 f Nm” , T_net )
58 printf ( ” \n E f f i c i e n c y =%d p e r c e n t a g e ” , efficiency )
59 // Answer v a r y d u e t o r o u n d o f f e r r o r
Scilab code Exa 11.2 Calculation of developed power and copper loss
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
241
Figure 11.2: Calculation of developed power and copper loss
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex11 2 . s c e
7
8 clc ;
9 clear ;
10 t =0.5; // p o l e p i t c h
11 f =50;
12 vmp =162;
13 fd =100 e3 ;
14 vm = vmp *1 e3 /(60*60) ;
15 pd = fd * vm ;
16 vs =2* t * f ;
17 s =( vs - vm ) / vs ;
18 pcu = s * fd * vs ;
19 printf ( ” \n The d e v e l o p e d power by t h e motor=%d kw \
242
Figure 11.3: Calculation of motor speed and torque
n ” , pd /1000)
20 printf ( ” \n S e c o n d a r y c o p p e r l o s s =%d kw \n ” , pcu
/1000)
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex11 3 . s c e
7
8 clc ;
243
Figure 11.4: Calculation of magnetic flux
9 clear ;
10 Ra =0.8;
11 Va =40;
12 Td =1.2;
13 Ka =600;
14 phi_p =0.004;
15
16 printf ( ” \n ( a ) ” )
17 n =( Va /( Ka * phi_p ) ) -(2* %pi * Ra * Td /( Ka * phi_p ) ^2) ;
18 N = n *60;
19 printf ( ” \n The s p e e d o f t h e motor=%d r . p .m \n ” ,N )
20 // The book a n s w e r f o r p a r t ( a ) i s wrong v a l u e
21
22 printf ( ” \n ( b ) ” )
23 n =0;
24 Td =( Va * Ka * phi_p ) /(2* %pi * Ra ) ;
25 printf ( ” \n The b l o c k e d r o t o r t o r q u e=%d Nm \n ” , Td )
244
Scilab code Exa 11.4 Calculation of magnetic flux
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex11 4 . s c e
7
8 clc ;
9 clear ;
10 P =200;
11 V =100;
12 N =1500;
13 Ka =525;
14 Ra =2;
15 Pl =15;
16
17 Pd = P + Pl ;
18 n = N /60;
19 Td = Pd /(2* %pi * n ) ;
20 // n=(Va / ( Ka∗ p h i p ) ) −(2∗ %pi ∗Ra∗Td / ( Ka∗ p h i p ) ˆ 2 ) ;
21 // from t h i s e q u a t i o n we g e t p h i ˆ2−o − 0 . 0 0 7 6 ∗ p h i +2.5 e
−6=0;
22 a =1;
23 b = -0.0076; // a , b , c a r e c o e f f i c i e n t v a l u e s t a k e n from
the above second o r d e r e q u a t i o n
24 c =2.5 e -6;
25 phi_p =( - b + sqrt ( b ^2 -(4* a * c ) ) ) /(2* a ) ;
26 printf ( ” \n The m a g n e t i c f l u x=%1 . 3 f mWb \n ” , phi_p
*1000)
245
Chapter 12
Scilab code Exa 12.1 Calculation of line current of load and alternator
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 1 . s c e
7
8 clc ;
9 clear ;
10 z = complex (3 ,4) ;
11 Vl =120;
12 printf ( ” \n Line current of load : Magnitude \ t
A n g l e ( deg ) \n ” )
13 I_R = complex ( Vl * cosd (0) , Vl * sind (0) ) /( sqrt (3) * z ) ;
14 I_Y = complex ( Vl * cosd ( -120) , Vl * sind ( -120) ) /( sqrt (3) * z )
;
15 I_B = complex ( Vl * cosd (120) , Vl * sind (120) ) /( sqrt (3) * z ) ;
246
Figure 12.1: Calculation of line current of load and alternator
247
16 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
17 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
18 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
19 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
20 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) -180;
21 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) ;
22 printf ( ” \n\ t I r i n A: \ t %2 . 2 f \ t %2 . 2 f ” , I_R_mag ,
I_R_angle )
23 printf ( ” \n\ t I y i n A: \ t %2 . 2 f \ t %2 . 2 f ” , I_Y_mag ,
I_Y_angle )
24 printf ( ” \n\ t I b i n A: \ t %2 . 2 f \ t %2 . 2 f ” , I_B_mag ,
I_B_angle )
25 // The l i n e c u r r e n t o f a l t e r n a t o r i s same a s t h e
l i n e or phase c u r r e n t o f load
26
27 printf ( ” \n L i n e c u r r e n t o f a l t e r n a t o r : Magnitude
A n g l e ( deg ) \n ” )
28 I_R = complex ( Vl * cosd (0) , Vl * sind (0) ) /( sqrt (3) * z ) ;
29 I_Y = complex ( Vl * cosd ( -120) , Vl * sind ( -120) ) /( sqrt (3) * z )
;
30 I_B = complex ( Vl * cosd (120) , Vl * sind (120) ) /( sqrt (3) * z ) ;
31 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
32 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
33 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
34 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
35 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) -180;
36 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) ;
37 printf ( ” \n\ t I r i n A : \ t %2 . 2 f \ t %2 . 2 f ” ,
I_R_mag , I_R_angle )
38 printf ( ” \n\ t I y i n A : \ t %2 . 2 f \ t %2 . 2 f ” ,
I_Y_mag , I_Y_angle )
39 printf ( ” \n\ t I b i n A : \ t %2 . 2 f \ t %2 . 2 f ” ,
I_B_mag , I_B_angle )
248
Figure 12.2: Determination of phase and line current of the load
Scilab code Exa 12.2 Determination of phase and line current of the load
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 2 . s c e
7
8 clc ;
9 clear ;
10 z = complex (6 ,8) ;
11 Vl =110;
12 printf ( ” \ nPhase c u r r e n t o f t h e l o a d : Magnitude \ t
A n g l e ( deg ) \n ” )
13 I_YR = complex ( Vl * cosd (0) , Vl * sind (0) ) /( z ) ;
14 I_BY = complex ( Vl * cosd ( -120) , Vl * sind ( -120) ) /( z ) ;
15 I_RB = complex ( Vl * cosd (120) , Vl * sind (120) ) /( z ) ;
16 I_YR_mag = sqrt ( real ( I_YR ) ^2+ imag ( I_YR ) ^2) ;
17 I_BY_mag = sqrt ( real ( I_BY ) ^2+ imag ( I_BY ) ^2) ;
18 I_RB_mag = sqrt ( real ( I_RB ) ^2+ imag ( I_RB ) ^2) ;
249
19 I_YR_angle = atand ( imag ( I_YR ) / real ( I_YR ) ) ;
20 I_BY_angle = atand ( imag ( I_BY ) / real ( I_BY ) ) -180;
21 I_RB_angle = atand ( imag ( I_RB ) / real ( I_RB ) ) ;
22 printf ( ” \n\ t \ t I y r i n A \ t %d \ t %2 . 2 f ” , I_YR_mag ,
I_YR_angle )
23 printf ( ” \n\ t \ t I b y i n A \ t %d \ t %2 . 2 f ” , I_BY_mag ,
I_BY_angle )
24 printf ( ” \n\ t \ t I r b i n A \ t %d \ t %2 . 2 f ” , I_RB_mag ,
I_RB_angle )
25
26 printf ( ” \ n L i n e c u r r e n t o f t h e l o a d : Magnitude \ t
A n g l e ( deg ) \n ” )
27 I_LR_mag = sqrt (3) * I_YR_mag ;
28 I_LY_mag = sqrt (3) * I_BY_mag ;
29 I_LB_mag = sqrt (3) * I_RB_mag ;
30 I_LR_angle = I_YR_angle -30;
31 I_LY_angle = I_BY_angle -30;
32 I_LB_angle = I_RB_angle -30;
33 printf ( ” \n\ t \ t I l r i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_LR_mag ,
I_LR_angle )
34 printf ( ” \n\ t \ t I l y i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_LY_mag ,
I_LY_angle )
35 printf ( ” \n\ t \ t I l b i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_LB_mag ,
I_LB_angle )
Scilab code Exa 12.3 Calculation of total KVA of capacitors and capacitance value
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 3 . s c e
250
Figure 12.3: Calculation of total KVA of capacitors and capacitance value
7
8 clc ;
9 clear ;
10 P =36; // power i n k i l o w a t t
11 Vl =440;
12 f =50;
13 efficiency =0.89;
14 pf1 =0.85;
15 pf2 =0.95;
16 P_not = P /3;
17 P_input = P_not / efficiency ;
18 Q1 = P_input * tand ( acosd ( pf1 ) ) ;
19 Q2 = P_input * tand ( acosd ( pf2 ) ) ;
20 Qc = Q1 - Q2 ;
21 kVA =3* Qc ;
22 printf ( ” \n T o t a l kVA o f t h e c a p a c i t o r s f o r r a i s i n g
power f a c t o r t o 0 . 9 5 i s %2 . 2 f kVAR \n ” , kVA )
23 V = Vl / sqrt (3) ;
24 Xc = V ^2/( Qc *1 e3 ) ;
25
26 printf ( ” \n ( a ) ” )
27 C_star =1/(2* %pi * f * Xc ) ;
251
Figure 12.4: Calculation of total KVA of capacitors and capacitance value
28 printf ( ” \n R e q u i r e d c a p a c i t a n c e p e r p h a s e f o r s t a r
c o n n e c t e d c a p a c i t o r s=%3 . 3 f micro −f a r a d \n ” , C_star
/1 e -6)
29
30 printf ( ” \n ( b ) ” )
31 C_delta = C_star /3;
32 printf ( ” \n R e q u i r e d c a p a c i t a n c e p e r p h a s e f o r d e l t a
c o n n e c t e d c a p a c i t o r s=%2 . 2 f micro −f a r a d \n ” ,
C_delta /1 e -6)
33 // Answer v a r y d u e t o round o f f e r r o r
Scilab code Exa 12.4 Calculation of total KVA of capacitors and capacitance value
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
252
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 4 . s c e
7
8
9 // The i n p u t d a t a t a k e n from Example : 1 2 . 3
10 clc ;
11 clear ;
12 P =36;
13 Vl =440;
14 f =50;
15 efficiency =0.89;
16 pf1 =0.85;
17 pf2 =0.95;
18 Pm = P / efficiency ;
19 Qm = Pm * tand ( acosd ( pf1 ) ) ;
20 Qs = Pm * tand ( acosd ( pf2 ) ) ;
21 Qc = Qm - Qs ;
22 Qc_phase = Qc /3;
23 kVA = Qc_phase ;
24 printf ( ” \n T o t a l kVA o f t h e c a p a c i t o r s f o r r a i s i n g
power f a c t o r t o 0 . 9 5 i s %2 . 2 f kVAR \n ” , Qc )
25
26 printf ( ” \n ( a ) ” )
27 Vph = Vl / sqrt (3) ;
28 Iph = kVA *1 e3 / Vph ;
29 C = Iph /(2* %pi * f * Vph ) ;
30 printf ( ” \n R e q u i r e d c a p a c i t a n c e p e r p h a s e f o r star
c o n n e c t e d c a p a c i t o r s=%3 . 3 f micro −f a r a d \n ” ,C /1 e
-6)
31
32 printf ( ” \n ( b ) ” )
33 Vph = Vl ;
34 Iph = kVA *1 e3 / Vph ;
35 C = Iph /(2* %pi * f * Vph ) ;
36 printf ( ” \n R e q u i r e d c a p a c i t a n c e p e r p h a s e f o r delta
c o n n e c t e d c a p a c i t o r s=%3 . 3 f micro −f a r a d \n ” ,C /1 e
-6)
253
Figure 12.5: Calculation of line current and neutral current
37 // Answer v a r y d u e t o round o f f e r r o r
Scilab code Exa 12.5 Calculation of line current and neutral current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 5 . s c e
7
8 clc ;
9 clear ;
10 Vl =440;
254
11 z_mag =40;
12 z_angle = -30;
13 z = complex ( z_mag * cosd ( z_angle ) , z_mag * sind ( z_angle ) ) ;
14 Iph = Vl / z ;
15 Iph_mag = sqrt ( real ( Iph ) ^2+ imag ( Iph ) ^2) ;
16 Iph_angle = atand ( imag ( Iph ) / real ( Iph ) ) ;
17
18 printf ( ” \ n L i n e c u r r e n t o f l o a d : \ t Magnitude \ t
A n g l e ( deg ) \n ” )
19 I_R_mag = Iph_mag ;
20 I_Y_mag = Iph_mag ;
21 I_B_mag = Iph_mag ;
22 I_R_angle = Iph_angle -0;
23 I_Y_angle = Iph_angle -120;
24 I_B_angle = Iph_angle +120;
25 printf ( ” \n\ t \ t I r i n A \t%d \ t %2 . 2 f ” , I_R_mag ,
I_R_angle )
26 printf ( ” \n\ t \ t I y i n A \t%d \ t %2 . 2 f ” , I_Y_mag ,
I_Y_angle )
27 printf ( ” \n\ t \ t I b i n A \t%d \ t %2 . 2 f ” , I_B_mag ,
I_B_angle )
28
29 I_R = complex ( I_R_mag * cosd ( I_R_angle ) , I_R_mag * sind (
I_R_angle ) )
30 I_Y = complex ( I_Y_mag * cosd ( I_Y_angle ) , I_Y_mag * sind (
I_Y_angle ) )
31 I_B = complex ( I_B_mag * cosd ( I_B_angle ) , I_B_mag * sind (
I_B_angle ) )
32 I_N = I_R + I_Y + I_B ;
33 printf ( ” \n The n e u t r a l c u r r e n t i s %d A” , I_N )
Scilab code Exa 12.6 Determination of complex power and line current
255
Figure 12.6: Determination of complex power and line current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 6 . s c e
7
8 clc ;
9 clear ;
10 printf ( ” \n ( a ) ”)
11 Pi =8; // power i n k i l o w a t t
12 pf =0.8;
13 Vl =440;
14 Qi = Pi * tand ( acosd ( pf ) ) ;
15 P = complex ( Pi , Qi ) ;
16 P_mag = sqrt ( real ( P ) ^2+ imag ( P ) ^2) ;
17 P_angle = atand ( imag ( P ) / real ( P ) ) ;
18 Il =( P_mag *1 e3 ) /( sqrt (3) * Vl ) ;
256
19 printf ( ” \n Complex power= m a g n i t u d e \ t a n g l e ( deg ) \n\
t\t %1 . 0 f \ t %2 . 2 f ” , P_mag , P_angle )
20 printf ( ” \n L i n e c u r r e n t=%2 . 2 f A \n ” , Il )
21
22 printf ( ” \n ( b ) ”)
23 Pl =7.5;
24 pf =0.6;
25 P = Pi +( Pl * pf ) ;
26 Q = Qi -( P * sind ( acosd ( pf ) ) ) ;
27 kVA = P ;
28 Il =( kVA *1 e3 ) /( sqrt (3) * Vl ) ;
29 printf ( ” \n T o t a l l i n e c u r r e n t=%2 . 1 f A \n ” , Il )
Scilab code Exa 12.7 Calculation of line current and phase current and total power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 7 . s c e
7
8 clc ;
9 clear ;
10 z1 = complex (8 ,6) ;
11 z2 = complex (6 ,8) ;
12 z3 = complex (4 , -3) ;
13 R_YR = z1 ;
14 R_BY = z2 ;
15 R_RB = z3 ;
16 Vl =440;
17
18 printf ( ” \n ( a ) D e l t a c o n n e c t e d l o a d o f p h a s e s e q u e n c e
257
Figure 12.7: Calculation of line current and phase current and total power
dissipated
258
RYB: ” )
19 theta1 =0;
20 theta2 = -120;
21 theta3 =120;
22 V_YR = complex ( Vl * cosd ( theta1 ) , Vl * sind ( theta1 ) ) ;
23 V_BY = complex ( Vl * cosd ( theta2 ) , Vl * sind ( theta2 ) ) ;
24 V_RB = complex ( Vl * cosd ( theta3 ) , Vl * sind ( theta3 ) ) ;
25 I_YR = V_YR / z1 ;
26 I_BY = V_BY / z2 ;
27 I_RB = V_RB / z3 ;
28 I_YR_mag = sqrt ( real ( I_YR ) ^2+ imag ( I_YR ) ^2) ;
29 I_BY_mag = sqrt ( real ( I_BY ) ^2+ imag ( I_BY ) ^2) ;
30 I_RB_mag = sqrt ( real ( I_RB ) ^2+ imag ( I_RB ) ^2) ;
31 I_YR_angle = atand ( imag ( I_YR ) / real ( I_YR ) ) ;
32 I_BY_angle = atand ( imag ( I_BY ) / real ( I_BY ) ) -180;
33 I_RB_angle = atand ( imag ( I_RB ) / real ( I_RB ) ) +180;
34 printf ( ” \ nPhase c u r r e n t= \ t M a g n i t u d e \ t A n g l e ( deg )
\n ” )
35 printf ( ” \n\ t I y r i n A \ t %d \ t %2 . 2 f ” , I_YR_mag ,
I_YR_angle )
36 printf ( ” \n\ t I b y i n A \ t %d \ t %2 . 2 f ” , I_BY_mag ,
I_BY_angle )
37 printf ( ” \n\ t I r b i n A \ t %d \ t %2 . 2 f ” , I_RB_mag ,
I_RB_angle )
38
39 I_R = I_YR - I_RB ;
40 I_Y = I_BY - I_YR ;
41 I_B = I_RB - I_BY ;
42 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
43 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
44 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
45 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
46 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) +180;
47 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) +180;
48 printf ( ” \ n L i n e c u r r e n t= \ t M a g n i t u d e \ t A n g l e ( deg )
”)
49 printf ( ” \n\ t I r i n A \ t %2 . 2 f %2 . 2 f ” , I_R_mag ,
I_R_angle )
259
50 printf ( ” \n\ t I y i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_Y_mag ,
I_Y_angle )
51 printf ( ” \n\ t I b i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_B_mag ,
I_B_angle )
52
53 W_YR =( I_YR_mag ) ^2* real ( z1 ) ;
54 W_BY =( I_BY_mag ) ^2* real ( z2 ) ;
55 W_RB =( I_RB_mag ) ^2* real ( z3 ) ;
56 printf ( ” \n T o a t a l power d i s s i p a t e d : \ n ” )
57 printf ( ” \n\ t W YR=%d W” , W_YR )
58 printf ( ” \n\ t W BY=%d W” , W_BY )
59 printf ( ” \n\ t W RB=%d W” , W_RB )
60
61
62 printf ( ” \n\n ( b ) D e l t a c o n n e c t e d l o a d o f p h a s e
s e q u e n c e RBY: ” )
63 theta1 =0;
64 theta2 =120;
65 theta3 = -120;
66 V_YR = complex ( Vl * cosd ( theta1 ) , Vl * sind ( theta1 ) ) ;
67 V_BY = complex ( Vl * cosd ( theta2 ) , Vl * sind ( theta2 ) ) ;
68 V_RB = complex ( Vl * cosd ( theta3 ) , Vl * sind ( theta3 ) ) ;
69 I_YR = V_YR / z1 ;
70 I_BY = V_BY / z2 ;
71 I_RB = V_RB / z3 ;
72 I_YR_mag = sqrt ( real ( I_YR ) ^2+ imag ( I_YR ) ^2) ;
73 I_BY_mag = sqrt ( real ( I_BY ) ^2+ imag ( I_BY ) ^2) ;
74 I_RB_mag = sqrt ( real ( I_RB ) ^2+ imag ( I_RB ) ^2) ;
75 I_YR_angle = atand ( imag ( I_YR ) / real ( I_YR ) ) ;
76 I_BY_angle = atand ( imag ( I_BY ) / real ( I_BY ) ) ;
77 I_RB_angle = atand ( imag ( I_RB ) / real ( I_RB ) ) ;
78 printf ( ” \ nPhase c u r r e n t= \ t M a g n i t u d e \ t A n g l e ( deg )
\n ” )
79 printf ( ” \n\ t I y r i n A \ t %d \ t %2 . 2 f ” , I_YR_mag ,
I_YR_angle )
80 printf ( ” \n\ t I b y i n A \ t %d \ t %2 . 2 f ” , I_BY_mag ,
I_BY_angle )
81 printf ( ” \n\ t I r b i n A \ t %d \ t %2 . 2 f ” , I_RB_mag ,
260
I_RB_angle )
82
83 I_R = I_YR - I_RB ;
84 I_Y = I_BY - I_YR ;
85 I_B = I_RB - I_BY ;
86 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
87 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
88 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
89 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
90 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) +180;
91 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) -180;
92 printf ( ” \ n L i n e c u r r e n t= \ t M a g n i t u d e \ t A n g l e ( deg )
”)
93 printf ( ” \n\ t I r i n A \ t %2 . 2 f %2 . 2 f ” , I_R_mag ,
I_R_angle )
94 printf ( ” \n\ t I y i n A \ t %2 . 2 f \ t %2 . 2 f ” , I_Y_mag ,
I_Y_angle )
95 printf ( ” \n\ t I b i n A \ t %2 . 2 f %2 . 2 f ” , I_B_mag ,
I_B_angle )
96
97 W_YR =( I_YR_mag ) ^2* real ( z1 ) ;
98 W_BY =( I_BY_mag ) ^2* real ( z2 ) ;
99 W_RB =( I_RB_mag ) ^2* real ( z3 ) ;
100 printf ( ” \n T o a t a l power d i s s i p a t e d : \ n ” )
101 printf ( ” \n\ t W YR=%d W” , W_YR )
102 printf ( ” \n\ t W BY=%d W” , W_BY )
103 printf ( ” \n\ t W RB=%d W” , W_RB )
Scilab code Exa 12.8 Calculation of total power and reactive power
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
261
Figure 12.8: Calculation of total power and reactive power
262
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 8 . s c e
7
8 clc ;
9 clear ;
10 Vl =110;
11 f =50;
12
13 printf ( ” \n ( a ) ” )
14 R_YR =0;
15 R_BY =100;
16 R_RB =200;
17 W_YR =0; // s i n c e R YR v a l u e i s z e r o
18 W_BY = Vl ^2/ R_BY ;
19 W_RB = Vl ^2/ R_RB ;
20 printf ( ” \n Phase power=%3 . 1 f W \n ” , W_YR + W_BY + W_RB )
21
22
23 printf ( ” \n ( b ) ” )
24 X_YR =95;
25 X_BY =0;
26 X_RB =0;
27 W_YR = Vl ^2/ X_YR ;
28 W_BY =0; // s i n c e X BY v a l u e i s z e r o
29 W_RB =0; // s i n c e X RB v a l u e i s z e r o
30 printf ( ” \n R e a c t i v e power=%3 . 2 f VAR” , W_YR + W_BY +
W_RB )
Scilab code Exa 12.9 Calculation of neutral current and power taken by each phase
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
263
Figure 12.9: Calculation of neutral current and power taken by each phase
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex12 9 . s c e
7
8 clc ;
9 clear ;
10 z =10;
11 ang1 =0;
12 ang2 =37;
13 ang3 = -53;
14 Zr = complex ( z * cosd ( ang1 ) ,z * sind ( ang1 ) ) ;
15 Zy = complex ( z * cosd ( ang2 ) ,z * sind ( ang2 ) ) ;
16 Zb = complex ( z * cosd ( ang3 ) ,z * sind ( ang3 ) ) ;
17
18 printf ( ” \n ( a ) For p h a s e s e q u e n c e RYB: \ n ” )
19 V =220;
20 theta1 =0;
264
21 theta2 = -120;
22 theta3 =120;
23 Vr = complex ( V * cosd ( theta1 ) ,V * sind ( theta1 ) ) ;
24 Vy = complex ( V * cosd ( theta2 ) ,V * sind ( theta2 ) ) ;
25 Vb = complex ( V * cosd ( theta3 ) ,V * sind ( theta3 ) ) ;
26
27 Ir = Vr / Zr ;
28 Iy = Vy / Zy ;
29 Ib = Vb / Zb ;
30 In = Ir + Iy + Ib ;
31 In_mag = sqrt ( real ( In ) ^2+ imag ( In ) ^2) ;
32 In_angle = atand ( imag ( In ) / real ( In ) ) ;
33 printf ( ” \n The c u r r e n t t h r o u g h t h e n e u t r a l w i r e , \ n
−I n =\ t M a g n i t u d e \ t A n g l e ( deg ) \n\ t %2 . 2 f \ t %2 . 2 f
\n ” , In_mag , In_angle )
34
35 Ir_mag = sqrt ( real ( Ir ) ^2+ imag ( Ir ) ^2) ;
36 Iy_mag = sqrt ( real ( Iy ) ^2+ imag ( Iy ) ^2) ;
37 Ib_mag = sqrt ( real ( Ib ) ^2+ imag ( Ib ) ^2) ;
38 Pr =( Ir_mag ) ^2* real ( Zr ) ;
39 Py =( Iy_mag ) ^2* real ( Zy ) ;
40 Pb =( Ib_mag ) ^2* real ( Zb ) ;
41 printf ( ” \n Power t a k e n by e a c h l o a d : \ n\ t Pr=%d W \n
\ t Py=%4 . 1 f W \n\ t Pb=%4 . 1 f W \n ” , Pr , Py , Pb )
42
43
44
45 printf ( ” \n\n ( b ) For p h a s e s e q u e n c e RBY: \ n ” )
46 V =220;
47 theta1 =0;
48 theta2 =120;
49 theta3 = -120;
50 Vr = complex ( V * cosd ( theta1 ) ,V * sind ( theta1 ) ) ;
51 Vy = complex ( V * cosd ( theta2 ) ,V * sind ( theta2 ) ) ;
52 Vb = complex ( V * cosd ( theta3 ) ,V * sind ( theta3 ) ) ;
53
54 Ir = Vr / Zr ;
55 Iy = Vy / Zy ;
265
56 Ib = Vb / Zb ;
57 In = Ir + Iy + Ib ;
58 In_mag = sqrt ( real ( In ) ^2+ imag ( In ) ^2) ;
59 In_angle = atand ( imag ( In ) / real ( In ) ) ;
60 printf ( ” \n The c u r r e n t t h r o u g h t h e n e u t r a l w i r e , \ n
I n =\ t M a g n i t u d e \ t A n g l e ( deg ) \n\ t %2 . 2 f \ t %2 . 2 f
\n ” , In_mag , In_angle )
61
62 Ir_mag = sqrt ( real ( Ir ) ^2+ imag ( Ir ) ^2) ;
63 Iy_mag = sqrt ( real ( Iy ) ^2+ imag ( Iy ) ^2) ;
64 Ib_mag = sqrt ( real ( Ib ) ^2+ imag ( Ib ) ^2) ;
65 Pr =( Ir_mag ) ^2* real ( Zr ) ;
66 Py =( Iy_mag ) ^2* real ( Zy ) ;
67 Pb =( Ib_mag ) ^2* real ( Zb ) ;
68 printf ( ” \n Power t a k e n by e a c h l o a d : \ n\ t Pr=%d W \n
\ t Py=%4 . 1 f W \n\ t Pb=%4 . 1 f W \n ” , Pr , Py , Pb )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 2 1 0 . s c e
7
8 clc ;
9 clear ;
10 Z_R = complex (8 ,6) ;
11 Z_Y = complex (8 , -6) ;
12 Z_B = complex (5 ,0) ;
13 Z_N = complex (0.5 ,1) ;
14 Y_R =1/ Z_R ;
266
Figure 12.10: Determination of phase voltage and current
267
32 V_R_dash_mag = sqrt ( real ( V_R_dash ) ^2+ imag ( V_R_dash ) ^2)
;
33 V_Y_dash_mag = sqrt ( real ( V_Y_dash ) ^2+ imag ( V_Y_dash ) ^2)
;
34 V_B_dash_mag = sqrt ( real ( V_B_dash ) ^2+ imag ( V_B_dash ) ^2)
;
35 V_R_dash_angle = atand ( imag ( V_R_dash ) / real ( V_R_dash ) ) ;
36 V_Y_dash_angle = atand ( imag ( V_Y_dash ) / real ( V_Y_dash ) )
+180;
37 V_B_dash_angle = atand ( imag ( V_B_dash ) / real ( V_B_dash ) )
+180;
38 printf ( ” \n Load p h a s e v o l t a g e s : Magnitude \ t A n g l e ( deg
) ”)
39 printf ( ” \n For R p h a s e \ t%3 . 2 f \ t%0 . 3 f ” ,
V_R_dash_mag , V_R_dash_angle )
40 printf ( ” \n For Y p h a s e \ t%3 . 2 f \ t%3 . 2 f ” ,
V_Y_dash_mag , V_Y_dash_angle )
41 printf ( ” \n For B p h a s e \ t%3 . 2 f \ t%3 . 2 f ” ,
V_B_dash_mag , V_B_dash_angle )
42 // For V NN dash v a l u e , t h e a n s w e r g i v e n i n t h e book
i s wrong . So l o a d p h a s e v o l t a g e v a r y from t h e
book a n s w e r .
43 // A l s o V R dash a n g l e i s n o t 0 . 1 6 8 . I t i s n e g a t i v e
a n g l e t h a t i s −0.193
44 I_R = V_R_dash * Y_R ;
45 I_Y = V_Y_dash * Y_Y ;
46 I_B = V_B_dash * Y_B ;
47 I_N = V_NN_dash * Y_N ;
48 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
49 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
50 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
51 I_N_mag = sqrt ( real ( I_N ) ^2+ imag ( I_N ) ^2) ;
52 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
53 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) +360;
54 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) +180;
55 I_N_angle = atand ( imag ( I_N ) / real ( I_N ) ) +180;
56 printf ( ” \n\n Load p h a s e c u r r e n t : Magnitude \ t A n g l e (
deg ) ” )
268
Figure 12.11: Calculation of each branch voltage and current
Scilab code Exa 12.11 Calculation of each branch voltage and current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
269
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 2 1 1 . s c e
7
8 clc ;
9 clear ;
10 Vl =400;
11 V = Vl / sqrt (3) ;
12 Z_R = complex (20* cosd (30) ,20* sind (30) ) ;
13 Z_Y = complex (40* cosd (60) ,40* sind (60) ) ;
14 Z_B = complex (10* cosd ( -90) ,10* sind ( -90) ) ;
15 Y_R =1/ Z_R ;
16 Y_Y =1/ Z_Y ;
17 Y_B =1/ Z_B ;
18 theta1 =0;
19 theta2 = -120;
20 theta3 =120;
21 V_R = complex ( V * cosd ( theta1 ) ,V * sind ( theta1 ) ) ;
22 V_Y = complex ( V * cosd ( theta2 ) ,V * sind ( theta2 ) ) ;
23 V_B = complex ( V * cosd ( theta3 ) ,V * sind ( theta3 ) ) ;
24 V_NN_dash =(( V_R * Y_R ) +( V_Y * Y_Y ) +( V_B * Y_B ) ) /( Y_R + Y_Y +
Y_B ) ;
25 V_R_dash = V_R - V_NN_dash ;
26 V_Y_dash = V_Y - V_NN_dash ;
27 V_B_dash = V_B - V_NN_dash ;
28 V_R_dash_mag = sqrt ( real ( V_R_dash ) ^2+ imag ( V_R_dash ) ^2)
;
29 V_Y_dash_mag = sqrt ( real ( V_Y_dash ) ^2+ imag ( V_Y_dash ) ^2)
;
30 V_B_dash_mag = sqrt ( real ( V_B_dash ) ^2+ imag ( V_B_dash ) ^2)
;
31 V_R_dash_angle = atand ( imag ( V_R_dash ) / real ( V_R_dash ) ) ;
32 V_Y_dash_angle = atand ( imag ( V_Y_dash ) / real ( V_Y_dash ) ) ;
33 V_B_dash_angle = atand ( imag ( V_B_dash ) / real ( V_B_dash ) ) ;
34 printf ( ” \n\n Phase v o l t a g e s : Magnitude \ t A n g l e (
deg ) ” )
35 printf ( ” \n For R p h a s e \ t%3 . 2 f \ t%0 . 3 f ” ,
V_R_dash_mag , V_R_dash_angle )
270
36 printf ( ” \n For Y p h a s e \ t%3 . 2 f \ t%3 . 2 f ” ,
V_Y_dash_mag , V_Y_dash_angle )
37 printf ( ” \n For B p h a s e \ t%3 . 0 f \ t%3 . 2 f ” ,
V_B_dash_mag , V_B_dash_angle )
38
39 I_R = V_R_dash * Y_R ;
40 I_Y = V_Y_dash * Y_Y ;
41 I_B = V_B_dash * Y_B ;
42 I_R_mag = sqrt ( real ( I_R ) ^2+ imag ( I_R ) ^2) ;
43 I_Y_mag = sqrt ( real ( I_Y ) ^2+ imag ( I_Y ) ^2) ;
44 I_B_mag = sqrt ( real ( I_B ) ^2+ imag ( I_B ) ^2) ;
45 I_R_angle = atand ( imag ( I_R ) / real ( I_R ) ) ;
46 I_Y_angle = atand ( imag ( I_Y ) / real ( I_Y ) ) -180;
47 I_B_angle = atand ( imag ( I_B ) / real ( I_B ) ) +180;
48 printf ( ” \n Phase c u r r e n t : Magnitude \ t A n g l e ( deg ) ”
)
49 printf ( ” \n For R p h a s e \ t%2 . 2 f \ t%0 . 3 f ” , I_R_mag ,
I_R_angle )
50 printf ( ” \n For Y p h a s e \ t%1 . 2 f \ t%3 . 2 f ” , I_Y_mag ,
I_Y_angle )
51 printf ( ” \n For B p h a s e \ t%2 . 0 f \ t%3 . 2 f ” , I_B_mag ,
I_B_angle )
52
53 // Answer v a r y due t o r o u n d o f f e r r o r
Scilab code Exa 12.12 Calculation of line current or star phase current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 2 1 2 . s c e
271
Figure 12.12: Calculation of line current or star phase current
7
8 // The i n p u t d a t a t a k e n from Example : 1 2 . 1 1
9 clc ;
10 clear ;
11 Vl =400;
12 V = Vl / sqrt (3) ;
13 Z_R = complex (20* cosd (30) ,20* sind (30) ) ;
14 Z_Y = complex (40* cosd (60) ,40* sind (60) ) ;
15 Z_B = complex (10* cosd ( -90) ,10* sind ( -90) ) ;
16 Z_YR =(( Z_R * Z_Y ) +( Z_Y * Z_B ) +( Z_B * Z_R ) ) / Z_B ;
17 Z_BY =(( Z_R * Z_Y ) +( Z_Y * Z_B ) +( Z_B * Z_R ) ) / Z_R ;
18 Z_RB =(( Z_R * Z_Y ) +( Z_Y * Z_B ) +( Z_B * Z_R ) ) / Z_Y ;
19 theta1 =30;
20 theta2 = -90;
21 theta3 =150;
22 V_YR = complex ( Vl * cosd ( theta1 ) , Vl * sind ( theta1 ) ) ;
23 V_BY = complex ( Vl * cosd ( theta2 ) , Vl * sind ( theta2 ) ) ;
24 V_RB = complex ( Vl * cosd ( theta3 ) , Vl * sind ( theta3 ) ) ;
25 I_YR = V_YR / Z_YR ;
272
Figure 12.13: Calculation of line current
273
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 2 1 3 . s c e
7
8 // The i n p u t d a t a t a k e n from Example : 1 2 . 1 1
9 clc ;
10 clear ;
11 Vl =400;
12 V = Vl / sqrt (3) ;
13 Z_R = complex (20* cosd (30) ,20* sind (30) ) ;
14 Z_Y = complex (40* cosd (60) ,40* sind (60) ) ;
15 Z_B = complex (10* cosd ( -90) ,10* sind ( -90) ) ;
16 theta1 =30;
17 theta2 = -90;
18 theta3 =150;
19 V_YR = complex ( Vl * cosd ( theta1 ) , Vl * sind ( theta1 ) ) ;
20 V_BY = complex ( Vl * cosd ( theta2 ) , Vl * sind ( theta2 ) ) ;
21 V_RB = complex ( Vl * cosd ( theta3 ) , Vl * sind ( theta3 ) ) ;
22
23 I_R =(( V_YR * Z_B ) -( V_RB * Z_Y ) ) /(( Z_R * Z_Y ) +( Z_Y * Z_B ) +(
Z_B * Z_R ) ) ;
24 I_Y =(( V_BY * Z_R ) -( V_YR * Z_B ) ) /(( Z_R * Z_Y ) +( Z_Y * Z_B ) +(
Z_B * Z_R ) ) ;
25 I_B =(( V_RB * Z_Y ) -( V_BY * Z_R ) ) /(( Z_R * Z_Y ) +( Z_Y * Z_B ) +(
Z_B * Z_R ) ) ;
26 printf ( ” \n L i n e c u r r e n t I R , I Y , I B v a l u e s a r e , \
n”)
27 disp ( I_R )
28 disp ( I_Y )
29 disp ( I_B )
274
Chapter 13
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex13 1 . s c e .
7
8 clc ;
9 clear ;
10 Vc =60;
11 V_not =120;
12 t =20;
13 C =10 e -6;
14 R = - t /( C * log ( Vc / V_not ) ) ;
15 printf ( ” \n The v a l u e o f r e s i s t a n c e =%1 . 3 f mega ohm ” ,
R *1 e -6)
275
Figure 13.1: Calculation of resistance
276
Scilab code Exa 13.2 Determination of current and time
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex13 2 . s c e
7
8 clc ;
9 clear ;
10 R1 =60;
11 R2 =80;
12 C =100 e -6;
13 V =12;
14 t1 =6 e -3;
15 i_S =300 e -3;
16 i_R = V / R1 ;
17 i_C =( V / R2 ) * exp ( - t1 /( R2 * C ) ) ;
18 i = i_R + i_C ;
19 printf ( ” \n The c u r r e n t drawn from t h e s o u r c e=%3 . 0 f
mA \n ” ,i *1 e3 )
20 I_C = i_S - i_R ;
21 t2 =( R2 * C ) * log ( V /( R2 * I_C ) ) ;
22 printf ( ” \n Time f o r draw t h e c u r r e n t o f 300 mA from
t h e s o u r c e=%1 . 3 f ms \n ” , t2 *1 e3 )
Scilab code Exa 13.5 Determination of time constant and damping ratio and current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
277
Figure 13.3: Determination of time constant and damping ratio and current
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex13 5 . s c e
7
8 clc ;
9 clear ;
10 V =100;
11 R =2;
12 L =10;
13 t =8;
14 T=L/R;
15 printf ( ” \n Time c o n s t a n t=%d s e c \n ” ,T )
16 del = R / L ;
17 printf ( ” \n Damping r a t i o =%1 . 1 f \n ” , del )
18 I =( V / R ) *(1 - exp ( - t / T ) ) ;
19 printf ( ” \n The v a l u e o f c u r r e n t o f a f t e r 8 s e c o n d s
o f s w i t c h i n g=%2 . 1 f A \n ” ,I )
278
Figure 13.4: Determination of current values
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex13 6 . s c e
7
8 clc ;
9 clear ;
10 R =20;
279
Figure 13.5: Calculation of current ratio
11 L =0.5;
12 V =100;
13 R_S =10;
14 t1 =0;
15 t2 =50 e -3;
16 Req = R + R_S ;
17 T1 = L / Req ; // Time c o n s t a n t 1
18 T2 = L / R ; // Time c o n s t a n t 2
19 I = V / Req ;
20 printf ( ” \n S t e a d y s t a t e c u r r e n t=%1 . 3 f A \n ” ,I )
21 i = I * exp ( - t2 / T2 ) ;
22 printf ( ” \n The v a l u e o f c u r r e n t a f t e r 50 ms=%0 . 2 f A
\n ” ,i )
280
Scilab code Exa 13.7 Calculation of current ratio
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex13 7 . s c e
7
8 clc ;
9 clear ;
10 R =10;
11 L =0.1;
12 t1 =0.01;
13 omega =100* %pi ;
14 phi = omega * t1 ;
15 t =( asin (1) + atan (( omega * L ) / R ) ) / omega ;
16 Imax =(( - omega * L * exp ( - R * t / L ) ) /( R ^2+( omega * L ) ^2) ) -( sin
((100* %pi * t ) -( atan ( omega * L / R ) ) ) / sqrt ( R ^2+( omega * L
) ^2) ) ;
17 t =0;
18 Iss =(( - omega * L * exp ( - R * t / L ) ) /( R ^2+( omega * L ) ^2) ) -( sind
((100* %pi * t ) -( atan ( omega * L / R ) ) ) / sqrt ( R ^2+( omega * L
) ^2) ) ;
19 a = Imax / Iss ;
20 printf ( ” \n R a t i o o f maximum v a l u e o f c u r r e n t t o
s t e a d y s t a t e v a l u e o f c u r r e n t=%1 . 2 f \n ” ,a )
21 // Answer v a r y d u e t o round o f f e r r o r i n ’ t ’
calculation
281
Figure 13.6: Determination of current
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // E x 1 3 1 4 . s c e
7
8 clc ;
9 clear ;
10 // From Ex 13 . 2
11 Id =300 e -3;
12 t =6 e -3;
13 V =12;
14 R =60;
15 Ir = V / R ;
282
16 Ic1 =0.15* exp ( -125* t ) ; // i t Obtain , a f t e r the
s i m p l i f i c a t i o n of loop equation
17 I = Ir + Ic1 ;
18 printf ( ” \n C u r r e n t drawn from t h e l o a d a f t e r 6 ms=%3
. 0 f mA \n ” ,I *1 e3 )
19 Ic2 = Id - Ir ;
20 t = log ( Ic2 /0.15) / -125;
21 printf ( ” \n The t i m e when c u r r e n t drawn from t h e
s o u r c e i s 0 . 3 A=%1 . 3 f ms \n ” ,t *1 e3 )
283
Chapter 14
Scilab code Exa 14.1 Calculation of average load and energy consumption and load f
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 1 . s c e .
7
8 clc ;
9 clear ;
10 maximum_demand =1.5 e3 ;
11 total_lamps =10;
12 lamps_on =7;
13 lamp_ontime =5;
14 lamp_power =100;
15 heater_on =2;
16 heater_ontime =3;
17 heater_power =1 e3 ;
18 printf ( ” \n ( a ) ” )
19 actual_energy_consumed =( lamps_on * lamp_power *
284
Figure 14.1: Calculation of average load and energy consumption and load
factor
285
Figure 14.2: Determination of diversity factor and load factor and combined
average load
Scilab code Exa 14.2 Determination of diversity factor and load factor and combine
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 2 . s c e .
7
8 clc ;
286
9 clear ;
10 // Loads a r e i n k i l o w a t t
11 avg_load1 =1;
12 avg_load2 =0.3;
13 avg_load3 =0.5;
14 avg_load4 =2.5;
15 max_load1 =5;
16 max_load2 =2;
17 max_load3 =2;
18 max_load4 =10;
19 max_demand1 =5;
20 max_demand2 =1.6;
21 max_demand3 =1;
22 max_demand4 =5;
23
24 printf ( ” \n ( a ) ” )
25 sumof_individualmax_dem = max_load1 + max_load2 +
max_load3 + max_load4 ;
26 max_demandof_wholegroup = max_demand1 + max_demand2 +
max_demand3 + max_demand4 ;
27 diversity_factor = sumof_individualmax_dem /
max_demandof_wholegroup ;
28 printf ( ” \n D i v e r s i t y f a c t o r =%1 . 4 f \n ” ,
diversity_factor )
29
30
31 printf ( ” \n ( b ) ” )
32 LF_of_consumer1 = avg_load1 / max_load1 ;
33 printf ( ” \n Load f a c t o r o f c o n s u m e r 1 =%1 . 2 f \n ” ,
LF_of_consumer1 )
34 LF_of_consumer2 = avg_load2 / max_load2 ;
35 printf ( ” \n Load f a c t o r o f c o n s u m e r 2 =%1 . 2 f \n ” ,
LF_of_consumer2 )
36 LF_of_consumer3 = avg_load3 / max_load3 ;
37 printf ( ” \n Load f a c t o r o f c o n s u m e r 3 =%1 . 2 f \n ” ,
LF_of_consumer3 )
38 LF_of_consumer4 = avg_load4 / max_load4 ;
39 printf ( ” \n Load f a c t o r o f c o n s u m e r 4 =%1 . 2 f \n ” ,
287
Figure 14.3: Calculation of annual bill of the consumer
LF_of_consumer4 )
40
41 printf ( ” \n ( c ) ” )
42 combined_avg_load =( avg_load1 + avg_load2 + avg_load3 +
avg_load4 ) ;
43 printf ( ” \n Combined a v e r a g e l o a d =%1 . 1 f kW \n ” ,
combined_avg_load )
44 combined_load_factor = combined_avg_load /
max_demandof_wholegroup ;
45 printf ( ” \n Combined l o a d f a c t o r =%1 . 3 f \n ” ,
combined_load_factor )
288
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 3 . s c e .
7
8 clc ;
9 clear ;
10 average_demand =33.75; // i n
kilowatt
11 time_duration =24*365; // i n h o u r s
12 tariff =1.25; // i n r u p e e s
per kilowatthour
13 annualenergy_consumption = average_demand *
time_duration ;
14 C = annualenergy_consumption * tariff ;
15 printf ( ” \n Annual b i l l o f t h e c o n s u m e r=%6 . 1 f r u p e e s
\n ” ,C )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 4 . s c e .
7
8 clc ;
9 clear ;
10 max_demand =75; // i n k i l o w a t t
11 time_duration =24*365; // i n h o u r
289
Figure 14.4: Calculation of overall cost per kWh
12 load_factor =0.45;
13 tariff1 =650;
14 tariff2 =1.30;
15 annual_energy_consump = max_demand * time_duration *
load_factor ;
16 Ce = tariff2 * annual_energy_consump ;
17 Cf = tariff1 * max_demand ;
18 total_annualcharge = Ce + Cf ;
19 overall_costperkwhr = total_annualcharge /
annual_energy_consump ;
20 printf ( ” \n O v e r a l l c o s t p e r kWh= %1 . 2 f r u p e e s \n ” ,
overall_costperkwhr )
290
Figure 14.5: Calculation of monthly bill of the consumer
291
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 5 . s c e
7
8 clc ;
9 clear ;
10 tariff1 =3.50; // t a r i f f i n r u p e e s p e r
k i l o w a t t h o u r f o r f i r s t 500 k i l o w a t t h o u r
11 tariff2 =3.00; // t a r i f f i n r u p e e s p e r
k i l o w a t t h o u r f o r n e x t 500 k i l o w a t t h o u r
12 tariff3 =2.50; // t a r i f f i n r u p e e s p e r
k i l o w a t t h o u r f o r usage e x c e e d i n g 1000 k i l o w a t t h o u r
13 days_in_a_month =31;
14 time_duration =24* days_in_a_month ;
15 average_demand =2.5; //
in kilowatt
16 monthly_consumption = time_duration * average_demand ;
17 a1 =500; //kWh f o r t a r i f f 1
18 a2 =500; //kWh f o r t a r i f f 2
19 a3 = monthly_consumption - a1 - a2 ; //kWh f o r
tariff3
20 monthly_charge =( a1 * tariff1 ) +( a2 * tariff2 ) +( a3 * tariff3
);
21 printf ( ” \n Monthly Charge=%d r u p e e s . ” , monthly_charge
)
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
292
Figure 14.6: Calculation of annual bill of the consumer
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex14 6 . s c e .
7
8 clc ;
9 clear ;
10 average_demand =450;
11 load_factor =0.65;
12 power_factor =0.8;
13 tariff1 =75; // i n r u e e s p e r month p e r kVA
14 tariff2 =1.30; // i n r u p e e s p e r k i l o w a t t h o u r
15 working_time =8*300;
16 maximum_kw_demand = average_demand / load_factor ;
17 maximum_kVA_demand = maximum_kw_demand / power_factor ;
18 annual_energy_charge = tariff2 * average_demand *
working_time ;
19 annual_max_demand_charge = tariff1 *12*
293
maximum_kVA_demand ;
20 annual_charge = annual_energy_charge +
annual_max_demand_charge ;
21 disp ( annual_charge , ’ Annual b i l l o f t h e c o n s u m e r i n
rupees ’)
22 // The a n s w e r v a r y d u e t o r o u n d o f f e r r o r .
294
Chapter 15
Domestic Lighting
Scilab code Exa 15.1 Calculation of lamp efficiency and luminous intensity and MSC
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex15 1 . s c e
7
8 clc ;
9 clear ;
10 W =100;
11 V =250;
12 light_flux =3000;
13 printf ( ” \n ( a ) ” )
14 mew = light_flux / W ;
15 printf ( ” \n Lamp e f f i c i e n c y =%d Lumens / w a t t \n ” , mew )
16
17 printf ( ” \n ( b ) ” )
18 total_solid_angle =(4* %pi ) ;
19 I = light_flux / total_solid_angle ;
295
Figure 15.1: Calculation of lamp efficiency and luminous intensity and MSCP
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex15 2 . s c e
296
Figure 15.2: Calculation of average luminance of the sphere
7
8 clc ;
9 clear ;
10 d =40 e -2;
11 light_flux =5000;
12 absorption_factor =0.2;
13 transmission_factor =0.8;
14 F = light_flux * transmission_factor ;
15 A = %pi * d ^2;
16 L=F/A;
17 printf ( ” \n A v e r a g e l u m i n a n c e o f t h e s p h e r e=%4 . 1 f
l u m e n s /mˆ2 \n ” ,L )
18 // Answer v a r y due t o r o u n d o f f e r r o r i n s u r f a c e a r e a
(A) c a l c u l a t i o n
297
Figure 15.3: Determination of illumination
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex15 3 . s c e
7
8 clc ;
9 clear ;
10 M . S . C . P =1000;
11 h =2.8;
12 x =2.5;
298
Figure 15.4: Calculation of distance between two lamps
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
299
6 // Ex15 4 . s c e .
7
8 clc ;
9 clear ;
10 // There i s a m i s t a k e i n t h e q u e s t i o n , given height
is 5 instead of 4
11 h =4;
12 x =[2:2:14];
13 for i =1: length ( x )
14
15 Ed ( i ) =(64/(4^2+ x ( i ) ^2) ^(3/2) ) +1;
16 Eb ( i ) =(256/(4^2+( x ( i ) /2) ^2) ^(3/2) ) ;
17
18 end
19 xlabel ( ”x−a x i s ” )
20 ylabel ( ”y−a x i s ” )
21 title ( ” C u r v e s o f L . H . S and R . H . S f o r different
v a l u e s of x”)
22 plot (x ,[ Ed Eb ])
23
24 legend ( ’ LHS ’ , ’RHS ’ )
1 // Book Name : F u n d a m e n t a l s o f E l e c t r i c a l E n g i n e e r i n g
2 // Author : R a j e n d r a P r a s a d
3 // P u b l i s h e r : PHI L e a r n i n g P r i v a t e L i m i t e d
4 // E d i t i o n : T h i r d , 2 0 1 4
5
6 // Ex15 5 . s c e
7
8 clc ;
9 clear ;
300
Figure 15.5: Determination of size of the conductor
10 I =25;
11 V =230;
12 l =45;
13 d =(0.02* V ) +1; // P e r m i s s i b l e v o l t a g e d r o p
14 // R e f e r r i n g t a b l e 1 5 . 1 0 ,
15 d1 =( l /3.4) *( I /27) ; // v o l t a g e f o r s e l e c t e d v a l u e s
from t h e t a b l e
16 if (d < d1 ) then
17 I_refer =43;
18 l_refer =5.4;
19 A =16;
20 d2 =( l / l_refer ) *( I / I_refer ) ;
21 else
22 d1 = d2
23 end
24
25 printf ( ” \n V o l t a g e d r o p=%1 . 3 f V \n ” , d2 )
301
26 printf ( ” \n S i z e o f t h e c o n d u c t o r=%d mmˆ2 \n ” ,A )
302