Scilab Textbook Companion for Basic Electrical Engineering by A. Mittle and V. N. Mittle 1 Created by Idris Manaqibwala Electrical Technology Civil Engineering VNIT Nagpur College Prof. V. B.Teacher Borghate Cross-Checked by Bhavani Jalkrish May 30, 2016
1 Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab codes written in it can be downloaded from the ”Textbook Companion Project” section at the website http://scilab.in
Book Description Title: Basic Electrical Engineering Author: A. Mittle and V. N. Mittle Publisher: Tata McGraw Hill Edition: 2 Year: 2005 ISBN: 9780070593572
1
Scilab numbering policy used in this document and the relation to the above book. Exa Example (Solved example) Eqn Equation (Particular equation of the above book) AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of 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 List of Scilab Codes
4
1 DC Circuits
6
2 Electrostatics
15
3 Electromagnetism
19
4 Magnetic Circuit
22
5 Electromagnetic Induction
34
6 Fundamentals of Alternating Current
45
7 AC Series Circuit
61
8 AC Parallel Circuit
73
9 Three Phase Systems
90
10 Measuring Instruments
100
13 Temperature Rise and Ventilation in Electrical Machines
104
14 Single Phase Transformers
106
15 Three Phase Transformers
120
16 Electromechanical Energy Conversion
123
3
17 Fundamentals of DC Machines
125
18 DC Generators
133
19 DC Motors
143
20 Testing of DC Machine
153
21 Three Phase Alternators
160
22 Synchronous Motors
169
23 Three Phase Induction Motor
178
24 Single Phase Induction Motor
197
4
List of Scilab Codes Exa 1.1 Exa 1.2 Exa 1.3 Exa 1.4 Exa 1.5 Exa 1.6 Exa 1.7 Exa 1.8 Exa 1.9 Exa 1.10 Exa 1.11 Exa 1.12
Example on Ohms Law . . . . . . . . . . . . . . . . . 6 Example on Ohms Law . . . . . . . . . . . . . . . . . 6 Example on Ohms Law . . . . . . . . . . . . . . . . . 7 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 7 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 8 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 8 Example on Kirchhoffs Law . . . . . . . . . . . . . . . 9 Example on Superposition Theorem . . . . . . . . . . 9 Example on Superposition Theorem . . . . . . . . . . 10 Example on Thevenin Theorem . . . . . . . . . . . . . 10 Example on Norton Theorem . . . . . . . . . . . . . . 11 Example on Nodal Analysis . . . . . . . . . . . . . . . 11
Exa 1.13 Exa 1.14
Example on Maximum Power Transfer Theorem . . . 12 Example on Delta to St ar and Sta r to Delta Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Example on Delta to St ar and Sta r to Delta Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Example on Coulombs Law . . . . . . . . . . . . . . . 15 Example on Electric Intensity . . . . . . . . . . . . . 15 Example on Electric Potential . . . . . . . . . . . . . . 16 Example on charging and discharging of capacitor . . 17 Example on charging and discharging of capacitor . . 17 Example on charging and discharging of capacitor . . 18 Example on Field Strength and Flux Density . . . . . 19 Example on Field Strength and Flux Density . . . . . 19 Example of Force on on Current Carrying Conductor . 20 Example of Force on on Current Carrying Conductor . 20 Example on Series Magnetic Circuit . . . . . . . . . . 22
Exa 1.16 Exa 2.1 Exa 2.2 Exa 2.3 Exa 2.4 Exa 2.5 Exa 2.6 Exa 3.2 Exa 3.3 Exa 3.4 Exa 3.5 Exa 4.1
5
Exa 4.2 Exa 4.3 Exa 4.4 Exa 4.5 Exa 4.6 Exa 4.7
Example Example Example Example Example Example
Exa 4.8 Exa 4.9 Exa 4.10 Exa 4.11 Exa 4.12 Exa 4.13 Exa 5.1 Exa 5.2 Exa 5.3 Exa 5.4 Exa 5.5 Exa 5.6 Exa 5.7 Exa 5.8 Exa 5.9
Example on Series Magnetic Circuit . . . . . . . . . . 27 Example on Series Magnetic Circuit . . . . . . . . . . 28 Example on Series Magnetic Circuit . . . . . . . . . . 29 Example on Series Magnetic Circuit . . . . . . . . . . 30 Example on Series Parallel Magnetic Circuit . . . . . . 31 Example on Series Parallel Magnetic Circuit . . . . . . 32 Example on Induced EMF . . . . . . . . . . . . . . . . 34 Example on Induced EMF . . . . . . . . . . . . . . . . 34 Example on Induced EMF . . . . . . . . . . . . . . . . 35 Example on Induced EMF . . . . . . . . . . . . . . . . 35 Example on Induced EMF . . . . . . . . . . . . . . . . 36 Example on Induced EMF . . . . . . . . . . . . . . . . 37 Example on Induced EMF . . . . . . . . . . . . . . . . 37 Example on Induced EMF . . . . . . . . . . . . . . . . 38 Example on Induced EMF . . . . . . . . . . . . . . . . 38
Exa 5.11 5.10 Exa Exa 5.12
Example on on Induced Induced EMF EMF .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 39 Example 39 Example on Growth and Decay of Current in Inductive Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Example on Growth and Decay of Current in Inductive Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Example on Growth and Decay of Current in Inductive Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Example on Growth and Decay of Current in Inductive Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Example on Energy Stored in Magnetic Field . . . . . 42 Example on Energy Stored in Magnetic Field . . . . . 42 Example on Energy Stored in Magnetic Field . . . . . 43 Example on AC Wave Shapes . . . . . . . . . . . . . . 45 Example on AC Wave Shapes . . . . . . . . . . . . . . 47 Example on AC Wave Shapes . . . . . . . . . . . . . . 47 Example on AC Wave Shapes . . . . . . . . . . . . . . 48
Exa 5.13 Exa 5.14 Exa 5.15 Exa 5.16 Exa 5.17 Exa 5.18 Exa 6.1 Exa 6.2 Exa 6.3 Exa 6.4
on on on on on on
Series Magnetic Series Magnetic Series Magnetic Series Magnetic Series Magnetic Series Magnetic
6
Circuit Circuit Circuit Circuit Circuit Circuit
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
23 23 24 25 26 26
Exa 6.5 Exa 6.6 Exa 6.7 Exa 6.8 Exa 6.9 Exa 6.10
Example on AC Wave Shapes Example on AC Wave Shapes Example on AC Wave Shapes Example on AC Wave Shapes Example on AC Wave Shapes Example on AC Wave Shapes
Exa 6.11 Exa 6.13 Exa 6.14 Exa 7.1 Exa 7.2 Exa 7.3 Exa 7.4 Exa 7.5 Exa 7.6 Exa 7.7 Exa 7.8 Exa 7.9 Exa 7.10 Exa 7.11 Exa 7.12
Example on Phase Difference . . Example on Simple AC Circuits Example on Simple AC Circuits Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit . Example on AC Series Circuit .
Exa 7.14 7.13 Exa Exa 7.15 Exa 8.1 Exa 8.2 Exa 8.3 Exa 8.4 Exa 8.5 Exa 8.6 Exa 8.7 Exa 8.8 Exa 8.9 Exa 8.10 Exa 8.11 Exa 8.12 Exa 8.13 Exa 9.1
Example on on AC AC Series Series Circuit Circuit .. .. .. .. .. .. .. .. .. .. .. .. .. Example Example on AC Series Circuit . . . . . . . . . . . . . Example on Phasor Method . . . . . . . . . . . . . . . Example on Phasor Method . . . . . . . . . . . . . . . Example on Phasor Method . . . . . . . . . . . . . . . Example on Phasor Method . . . . . . . . . . . . . . . Example on Admittance Method . . . . . . . . . . . . Example on Symbolic Method . . . . . . . . . . . . . Example on Symbolic Method . . . . . . . . . . . . . Example on Symbolic Method . . . . . . . . . . . . . Example on Symbolic Method . . . . . . . . . . . . . Example on Series Parallel Circuit . . . . . . . . . . . Example on AC Network Theorems . . . . . . . . . . Example on Resonance in Parallel Circuits . . . . . . . Example on Resonance in Parallel Circuits . . . . . . . Example on Three Phase Circuits . . . . . . . . . . . 7
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............ ............
49 49 53 54 57 57 59 59 60 61 61 62 63 64 64 66 66 67 68 69 69 70 71 72 73 74 76 77 79 80 81 82 83 84 85 86 88 90
Exa Exa Exa Exa Exa Exa
9.2 9.3 9.4 9.5 9.6 9.7
Example Example Example Example Example Example
on on on on on on
Three Phase Three Phase Three Phase Three Phase Three Phase Three Phase
Circuits Circuits Circuits Circuits Circuits Circuits
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
91 92 93 94 94 95
Exa 9.8 Exa 9.9 Exa 9.10 Exa 9.11 Exa 9.12 Exa 10.1 Exa 10.2 Exa 10.3 Exa 10.4 Exa 10.5 Exa 10.6 Exa 13.1 Exa 13.2 Exa 14.1 Exa 14.2
Example on Power Measurement . . . . . . . . . . . . 96 Example on Power Measurement . . . . . . . . . . . . 96 Example on Power Measurement . . . . . . . . . . . . 97 Example on Power Measurement . . . . . . . . . . . . 98 Example on Power Measurement . . . . . . . . . . . . 98 Example on Moving Coil Instruments . . . . . . . . . 100 Example on Moving Coil Instruments . . . . . . . . . 100 Example on Moving Coil Instruments . . . . . . . . . 101 Example on Moving Coil Instruments . . . . . . . . . 102 Example on Moving Coil Instruments . . . . . . . . . 102 Example on Moving Coil Instruments . . . . . . . . . 103 Example on Heating and Cooling of Electrical Machines 104 Example on Heating and Cooling of Electrical Machines 105 Example on EMF Equation . . . . . . . . . . . . . . . 106 Example on EMF Equation . . . . . . . . . . . . . . . 106
Exa 14.4 14.3 Exa Exa 14.5 Exa 14.6 Exa 14.7 Exa 14.8 Exa 14.9 Exa 14.10 Exa 14.11 Exa 14.12 Exa 14.13 Exa 14.14 Exa 14.15 Exa 14.16 Exa 14.17 Exa 14.18 Exa 15.1
Example on on Equivalent Equivalent Circuit Circuit .. .. .. .. .. .. .. .. .. .. .. .. .. Example Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efiiciency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Regulation and Efficiency . . . . . . . . . Example on Testing of Transformer . . . . . . . . . . . Example on Testing of Transformer . . . . . . . . . . . Example on Testing of Transformer . . . . . . . . . . . Example on Parallel Operation . . . . . . . . . . . . . Example on Parallel Operation . . . . . . . . . . . . . Example on three phase transformer . . . . . . . . . . 8
107 108 109 109 110 111 112 113 113 114 114 115 116 117 117 118 120
Exa 15.2 Exa 15.3 Exa 15.4 Exa 16.2 Exa 16.3
Example on three phase transformer . . . . . . . . . . 121 Example on three phase transformer . . . . . . . . . . 121 Example on three phase transformer . . . . . . . . . . 122 Example on Electromechanical Energy Conversion Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Example on Electromechanical Energy Conversion De-
Exa 17.1 Exa 17.2 Exa 17.3 Exa 17.4 Exa 17.5 Exa 17.6 Exa 17.7 Exa 17.8 Exa 17.9 Exa 17.10 Exa 17.11 Exa 17.12 Exa 17.13 Exa 17.14
vices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Example on DC Winding . . . . . . . . . . . . . . . . 125 Example on DC Winding . . . . . . . . . . . . . . . . 125 Example on EMF Equation . . . . . . . . . . . . . . . 126 Example on EMF Equation . . . . . . . . . . . . . . . 126 Example on EMF Equation . . . . . . . . . . . . . . . 127 Example on EMF Equation . . . . . . . . . . . . . . . 127 Example on Types of DC Machines . . . . . . . . . . . 128 Example on Types of DC Machines . . . . . . . . . . . 128 Example on Types of DC Machines . . . . . . . . . . . 129 Example on Types of DC Machines . . . . . . . . . . . 129 Example on Types of DC Machines . . . . . . . . . . . 130 Example on Types of DC Machines . . . . . . . . . . . 130 Example on Types of DC Machines . . . . . . . . . . . 131 Example on Types of DC Machines . . . . . . . . . . . 132
Exa 18.2 18.1 Exa Exa 18.3 Exa 18.4 Exa 18.5 Exa 18.6 Exa 18.7 Exa 19.1 Exa 19.2 Exa 19.3 Exa 19.4 Exa 19.5 Exa 19.6 Exa 19.7 Exa 19.8 Exa 19.9 Exa 19.10
Example on on Magnetization Magnetization Characteristics Characteristics .. .. .. .. .. .. Example Example on Magnetization Characteristics . . . . . . Example on Magnetization Characteristics . . . . . . Example on Parallel Operation . . . . . . . . . . . . . Example on Parallel Operation . . . . . . . . . . . . . Example on Parallel Operation . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Torque and Speed . . . . . . . . . . . . . Example on Speed Control of DC Motors . . . . . . Example on Speed Control of DC Motors . . . . . . Example on Speed Control of DC Motors . . . . . . 9
.. . .
133 135 136 138 140 141 142 143 144 144 145 146 147 148 . 148 . 149 . 150
Exa 19.11 Exa 19.12 Exa 19.13 Exa 20.1 Exa 20.2 Exa 20.3
Example on Speed Control of DC Motors . . . . . . . 150 Example on Speed Control of DC Motors . . . . . . . 151 Example on Speed Control of DC Motors . . . . . . . 152 Example on losses in DC Machine . . . . . . . . . . . 153 Example on losses in DC Machine . . . . . . . . . . . 153 Example on losses in DC Machine . . . . . . . . . . . 154
Exa 20.4 Exa 20.5 Exa 20.6 Exa 20.7 Exa 20.8 Exa 21.1 Exa 21.2 Exa 21.3 Exa 21.4 Exa 21.5 Exa 21.6 Exa 21.7 Exa 21.8 Exa 21.9 Exa 21.10
Example on losses in DC Machine . . . . . . . . . . Example on losses in DC Machine . . . . . . . . . . Example on losses in DC Machine . . . . . . . . . . Example on losses in DC Machine . . . . . . . . . . Example on losses in DC Machine . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on Regulation . . . . . . . . . . . . . . . . . Example on emf Equation . . . . . . . . . . . . . . . . Example on Regulation . . . . . . . . . . . . . . . . . Example on Regulation . . . . . . . . . . . . . . . . . Example on Regulation . . . . . . . . . . . . . . . . .
Exa 22.1 Exa 22.2
Example teristics .on . . .Phaso . . . . . r Diagram . . . . . . and . . .Power . . . . angle . . . . Charac169 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 170 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 171 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 172 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 173 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 174 Example on Phaso r Diagram and Power angle Characteristics . . . . . . . . . ...... ...... ..... 175 Example on Variation of Excitation . . . . . . . . . . 176 Example on Slip and Rotor Frequency . . . . . . . . . 178 Example on Slip and Rotor Frequency . . . . . . . . . 178
Exa 22.3 Exa 22.4 Exa 22.5 Exa 22.6 Exa 22.7 Exa 22.8 Exa 23.1 Exa 23.2
10
. . . . .
155 156 157 158 159 160 161 161 162 163 164 165 166 167 167
Exa 23.3 Exa 23.4 Exa 23.5 Exa 23.6 Exa 23.7 Exa 23.8
Example on Slip and Rotor Frequency . . . . . . . . . Example on Equivalent Circuit . . . . . . . . . . . . . Example on Equivalent Circuit . . . . . . . . . . . . . Example on Equivalent Circuit . . . . . . . . . . . . . Example on Equivalent Circuit . . . . . . . . . . . . . Example on Losses in Induction Motor . . . . . . . . .
Exa 23.9 Exa 23.10 Exa 23.11 Exa 23.12 Exa 23.13 Exa 23.14 Exa 23.15 Exa 23.16 Exa 23.17 Exa 23.18 Exa 23.19 Exa 23.20 Exa 24.1 Exa 24.2 Exa 24.3
Example on Losses in Induction Motor . . . . . . . . . 186 Example on Losses in Indu ction Motor . . . . . . . . . 187 Example on Losses in Indu ction Motor . . . . . . . . . 187 Example on Losses in Indu ction Motor . . . . . . . . . 188 Example on Torque . . . . . . . . . . . . . . . . . . . 189 Example on Torque . . . . . . . . . . . . . . . . . . . 190 Example on Torque . . . . . . . . . . . . . . . . . . . 191 Example on Torque . . . . . . . . . . . . . . . . . . . 192 No load and Block Rotor Test . . . . . . . . . . . . . . 193 Example on Circle Diagram . . . . . . . . . . . . . . . 194 Example on starting . . . . . . . . . . . . . . . . . . . 195 Example on starting . . . . . . . . . . . . . . . . . . . 195 Example on Equivalent Circuit . . . . . . . . . . . . . 197 Example on Equivalent Circuit . . . . . . . . . . . . . 198 Example on Equivalent Circuit . . . . . . . . . . . . . 199
Exa 24.5 24.4 Exa
Example on on No No Load Load and and Block Block Rotor Rotor Test Test .. .. .. .. .. .. Example
11
180 181 181 182 184 186
201 202
List of Figures 4.1 Example on Series Magnetic Circuit . . . . . . . . . . . . . . 4.2 Example on Series Magnetic Circuit . . . . . . . . . . . . . . 6.1 6.2 6.3 6.4
Example Example Example Example
on AC on AC on AC on AC
18.1 18.2 18.3 18.4
Example Example Example Example
on on on on
Wave Wave Wave Wave
Shapes Shapes Shapes Shapes
Magnetization Magnetization Magnetization Magnetization
.. .. .. ..
.. .. .. ..
.. .. .. ..
.. .. .. ..
.. .. .. ..
Characteristics Characteristics Characteristics Characteristics
12
.. .. .. ..
.... .... .... ....
.. .. .. ..
.. .. .. .. .. .. .. ..
27 30
. . . . .. .. .. ..
46 50 53 58 .. .. .. ..
134 135 137 139
Chapter 1 DC Circuits
Scilab code Exa 1.1 Example on Ohms Law
1 2 3 4 5 6
//B y K CL, I1 + I2 =2.25 I1=10/(2+8) I2=2.25-I1 r=(10-5*I2)/I2 mprintf ( ” r=%d o hm , cu rr en t in branch ABC=%d A and cu rr en t in branch ADC=%f A ” , r, I1, I2)
Scilab code Exa 1.2 Example on Ohms Law
1 2 //i1 , i2 , i3 be th e curre nts
in th e br an ch es C D, EF
and G H res pect ive ly 3 // i 1+i2+i 3 =1.5 4 5 6 7 8
i2=(20-1.5*10)/15 i3=(20-1.5*10)/15 i1=1.5-i2-i3 r=(20-1.5*10)/i1 mprintf ( ” r=%f ohm” , r )
13
Scilab code Exa 1.3 Example on Ohms Law
1 2 3 4 5
// points
A,E,F, G are
Rab=20 Reb=50 R1=Rab*Reb/(Rab+Reb)
at th e same poten tial
// equiv alent
resist
ance
of Rab
and Reb 6 7 8 9
Rbc=25 R2=R1+Rbc // equivalent res ist anc e of R1 a nd R bc Rfc=50 R3=Rfc*R2/(Rfc+R2) // equiva lent resist ance of R 2
an d Rf c 10 Rcd=30 11 R4=R3+Rcd // equivalent res ist anc e of R3 a nd R cd 12 R=R4*50/(50+R4) // equivalent resi sta nce be tw ee n A
and D 13 i=200/R //Ohm’ s Law 14 mprintf ( ”Curre nt draw n by ci rc u i t=%f A ” , i )
Scilab code Exa 1.4 Example on Kirchhoffs Law
1 2 3 4 5 6 7 8
// refe r F ig . 1.1 0 in th e te xt bo ok // ap pl yi ng KCL, I1+I2 =20; −I2+I3=30 // ap pl yi ng KVL // f o r mesh ABGHA, −0.1∗ I2 +2 0∗R1=108 // f o r me sh B CFGB, 0. 3 ∗ I2 +20∗R1−30∗R2=0 // f o r me sh C DEFC, 0. 2 ∗ I2 +30∗R2=114 a=[-0 .1 20 0; 0. 3 20 -3 0; 0. 2 0 30 ]
9 b=[108;0;114]
14
10 11 12 13 14 15
x = inv (a)*b I2=x(1,1) R1=x(2,1) R2=x(3,1) I1=20-I2 I3=30+I2
16 mprintf ( ”R1=%f o hm , R2=%f o hm , I1= %f A, %f A” , R1, R2, I1, I2, I3)
I2= %f A,
I3=
Scilab code Exa 1.5 Example on Kirchhoffs Law
1 2 // refe r F ig .1.11 in th e te xt bo ok 3 // ap pl yi ng KVL ove r lo op s ABEFA an d BCDEB, I2 =3.5
I 1 ; −2∗ I1+7 ∗ I2=10 4 5 6 7
a=[3 .5 -1 ;-2 7] b=[0;10] i = inv (a)*b I1=i(1,1)
8 I2=i(2,1) 9 I=I2-I1 10 mprintf ( ”Curr en t th rou gh 8 ohm re si st an ce= %f A fr om E to B” , I )
Scilab code Exa 1.6 Example on Kirchhoffs Law
1 2 3 4 5 6 7
// refe r F ig .1.12 in th e te xt bo ok // Applyin g KVL // f o r mesh AHGBA, −23∗ i1+20 ∗ i2+3 ∗ i4=0 // f o r mes h GFCBG, 20 ∗ i 1 −43∗ i2+20 ∗ i3+3 ∗ i4=0 // f o r me sh F EDCF, 20 ∗ i 2 −43∗ i3+3 ∗ i4=0 // f o r me sh ABCDJIA, 3 ∗ i1 +3∗ i2+3 ∗ i 3 −9∗ i4+50=0 15
∗
8 9 10 11 12 13
a=[ -23 20 0 3;20 -43 20 3;0 20 -43 3;3 3 3 -9] b=[0;0;0;-50] i = inv (a)*b i1=i(1,1) i2=i(2,1) i3=i(3,1)
14 15 16 17 18
i4=i(4,1) V1=3*(i4-i1) V2=3*(i4-i2) V3=3*(i4-i3) mprintf ( ”Voltage
acr oss bra nch A B=%f V, Voltage ac ro ss bran ch B C=%f V , Voltage ac ro ss bran ch C D= %f V” , V1, V2, V3)
Scilab code Exa 1.7 Example on Kirchhoffs Law
1 2 3 4 5 6 7 8 9 10 11 12 13
// refe r F ig .1.13 in th e te xt bo ok //b y apply ing KVL // f o r me sh A BCDA, 7. 45 ∗ i 1 − 3.25 ∗ i 2 =10 // f o r me sh E FBAE, 8. 55 ∗ i 2 −5 .3∗ i 3 −3.25 ∗ i 1 =10 // f o r mes h HGBFEAH, 11 .3 ∗ i 3 − 5 .3∗ i2 =80 a=[7. 45 -3 .2 5 0;-3 .2 5 8. 55 -5 .3 ;0 -5 .3 11 .3 ] b=[10;10;80] i = inv (a)*b i1=i(1,1) i2=i(2,1) i3=i(3,1) mprintf ( ”Cu rr e nt in 6 o hm res is to r=%f A , curr ent 3 ohm re si st or= %f A ” , i3, i2-i1 )
Scilab code Exa 1.8
Example on Superposition Theorem 16
in
1 2 3 4 5 6 7 8 9 10 11 12 13
// using Sup erpo siti on Theorem // consi der E1 alone E1=1.5 R1=(1+1)*2/(1+1+2)+2 I1=E1/R1 // current
// total supplied
resistance
i1=I1/2 // current in br an ch A B fr om B to A // consi der E2 alone E2=1.1 R2=(1+1)*2/(1+1+2)+1+1 // total resistance I2=E2/R2 // current supplied i2=I2/2 // current in br an ch A B fr om B to A mprintf ( ”Curr en t th rou gh 2 ohm re si st or= %f A ” , i1 +i 2 )
Scilab code Exa 1.9 Example on Superposition Theorem
1 2 // refe r F ig .1.20 3 4 5 6 7 8 9 10 11
in th e te xt bo ok
// ap pl yi ng KVL // fo r me sh BAEFB, 4 ∗ I1 +2∗ I2 =1.5 // f o r me sh BACDB, 2 ∗ I1 +4∗ I2 =1.1 a=[ 4 2; 2 4] b=[1.5;1.1] i = inv (a)*b I1=i(1,1) I2=i(2,1) mprintf ( ”Curr en t th rou gh 2 ohm re si st or= %f A fr om B to A” , I1+I 2)
Scilab code Exa 1.10 Example on Thevenin Theorem
1
17
2 3 4 5 6 7
// ref er Fi g .1. 22( a) in th e te xt boo k // re si st an ce be tw ee n A and B is remo ved // I1 be current in br an ch C D // ap pl yi ng KCL //100 − I1 is th e cu rre nt in b r a n c h A F //I1 −50 is th e cur ren t in b r an c h DE
8 9 10 11 12
//70 − I1 is t he cu rr en t in b r a n c h F E // ap pl yi ng KVL fo r me sh C DEFC, we get , I1=56 V=.1*I1+.15*(I1-50) // theve nin ’ s volt age r=(.1+.15)*(.1+.15)/(.25+.25) // thev eni n ’ s
equ iva len t resistance 13 I=V/(r+.05) 14 mprintf ( ”Cur re nt flowing
ohm resist
ance
in th e br an ch AB of is %f A” , I )
0.05
Scilab code Exa 1.11 Example on Norton Theorem
1 2 3 4 5 6 7 8
//by Nort on ’ s Th eo re m I=2*10 // tota l current pr od uc ed by curren t sourc e r=2*2/(2+2) // resulta nt resistance of cu rr en t so ur ce In=20*r/(r+1) // norto n curren t Rn=1+r // no rt on resi sta nce I=In*Rn/(Rn+8) mprintf ( ”C ur r e nt t h r ou gh th e lo ad resistance ohm=%f A from A to B” , I )
Scilab code Exa 1.12 Example on Nodal Analysis
1 2 // cir cui t h as 4 no d es , vi z , A, B, C a nd D 3 //n ode D is ta ke n as reference node
18
of 8
4 // volta ges 5 6 7 8 9 10 11 12 13 14 15 16
at A, B an d C be Va, Vb and Vc respectively // ap pl yi ng KCL // at no de A, 7 ∗Va−Vb−Vc=25 // at nod e B, −4∗Va+19 ∗Vb−10∗Vc=0 // at nod e C, −4∗Va−10∗Vb+19 ∗Vc=−40 a=[ 7 -1 -1;- 4 19 -1 0;-4 -10 19 ] b=[25;0;-40] v = inv (a)*b Va=v(1,1) Vb=v(2,1) Vc=v(3,1) I=(Va-Vc)/5 mprintf ( ”Curre nt in 5 ohm AC bra nch =%f A fr om A to C ” , I)
17 // error
in tex tb ook an sw er
Scilab code Exa 1.13 Example on Maximum Power Transfer Theorem
1 2 3 4 5 6
V=3*20/(2+3) // theve nin ’ s volt age r=1+2*3/(2+3) // th ev en in ’ s equivalent resi sta nce R=r Pmax=V^2/(4*r) mprintf ( ”Max po wer transferred to th e lo ad is %f W when loa d resi sta nce is %f o hm” , Pmax, R)
Scilab code Exa 1.14 Example on Delta to Star and Star to Delta Trans-
formation 1 2 // inne r delta D EF is
tr an sf or me d to equiv alent con nec tio n ha vi ng resis tance s Ra, Rb, Rc 19
star
3 4 5 6
Ra=1.5*2.5/(1.5+2.5+1) Rb=1.5*1/(1.5+2.5+1) Rc=1*2.5/(1.5+2.5+1)
// inner portion of obt aine d star ne tw or k A BC is co nv er te d int o equ iva len t del ta w i t h resistances R1, R2, R3
7 8 9 10
R1=4+5.05+4*5.05/5 R2=4+5+4*5/5.05 R3=5+5.05+5*5.05/4
12 13 14 15 16
Rac=5*R1/(5+R1) Rbc=5*R2/(5+R2) Rab=5*R3/(5+R3) R=(Rac+Rbc)*Rab/(Rac+Rbc+Rab) mprintf ( ”Equivalent res is ta nc e be tw ee n A and B=%f ohm” ,R )
// now th e ne tw or k redu ces to th e for m in whi ch th e resistanc es acr oss a b r a n c h ar e in parallel 11 // let equivalent res ist anc es be Rac , Rbc and Rab
Scilab code Exa 1.16 Example on Delta to Star and Star to Delta Trans-
formation 1 2 //b y Sup erpo siti on Theorem 3 // conside r 2 V bat ter y alo ne 4 R1 =(3+ 1)*2/(3+1 +2) // equiv alent
resis tance
of Raf ,
Rfg , Rab 5 R2 =(1 +R1)*12/(1
Rad , R1 , Rde 6 R=1+2+R2 // total 7 8 9 10
+R1+12)
resist
// equ iva len t resistance ance
of t h e circuit
I1=2/R I2=I1*12/(1+R1+12) I3=I2*4/(2+4) // curren t thr ough
// conside
11 I4=34/71
r 4 V bat ter y alo ne // curren t thr ough
2 o hm 20
2 o hm
of
12 I=I3+I4 13 mprintf ( ”By Supe rpos itio n Theorem , curren t thro ugh t he 2 o hm resistance is %f A f ro m A to B \n ” , I ) 14 //by Theve nin ’ s Th eo re m 15 // ap pl yi ng KCL 16 // f o r me sh CDHIC, 15 ∗ i1 +12∗ i2=2 17 18 19 20 21 22 23 24
// f o r mes h DEGHD, 12 ∗ i1 +17∗ i2=4 a=[1 5 12 ;1 2 17 ] b=[2;4] i = inv (a)*b i1=i(1,1) i2=i(2,1) Vab=4-3*i2-i2 R1=(1+2)*12/(1+2+12)
// R1 is
equ iva len t resistance
of Rcd , Rc i , Rdh 25 R=(1+R1)*(3+1)/(1+R1+3+1)
// theve nin ’ s equi val ent
resistance 26 I=Vab/(R+2) 27 mprintf ( ”By The ven in Theorem , cur ren t through resist ance is %f A f ro m A to B \n ” , I ) 28 //by Ma xw el l Mesh Ana lys is 29 30 31 32 33 34 35 36 37 38 39
2 ohm
// fap yi ngh CDEHC, KVL // o rpl mes 15 ∗ I1 −12∗ I2=2 // f o r mesh DABED, −12∗ I1+15 ∗ I2+2 ∗ I3=0 // f o r mes h AFGBA, 2 ∗ I2 +6∗ I3=4 a=[ 15 -12 0;- 12 15 2;0 2 6] b=[2;0;4] i = inv (a)*b I1=i(1,1) I2=i(2,1) I3=i(3,1) mprintf ( ”By Ma xw el l Mesh Analysis
ohm resistance
, curren t thro ugh 2 is %f A f ro m A to B ” , I2+I 3)
21
Chapter 2 Electrostatics
Scilab code Exa 2.1 Example on Coulombs Law
1 2 3 4 5 6 7 8 9 10 11
epsilon=8.854D-12 r = sqrt (.1^2+.1^2) // dis tan ce b/ w A and C Fca=(2D-6)*(4D-6)/(4*%pi*epsilon*r^2) //from A to C Fcb=(4D-6)*(2D-6)/(4*%pi*epsilon*.1^2) //from C to B Fcd=(4D-6)*(4D-6)/(4*%pi*epsilon*.1^2) //from C to D
//F r h as horizontal and Fry respect
and vert ica l co m p o ne nt s as Frx ively
Frx=Fcd-Fca* cos (45*%pi/180) Fry=Fcb-Fca* sin (45*%pi/180) Fr = sqrt (Frx^2+Fry^2) mprintf ( ”Result ant force acting , Fr)
12 // error
on cha rge at C =%f N ”
in tex tb ook an sw er
Scilab code Exa 2.2 Example on Electric Intensity
1
22
2 epsilon=8.854D-12 3 E1=(4D-8)/(4*%pi*epsilon*.05^2)
// f i e l d in te ns it y du e to ch ar ge at A , direction is fro m D to A 4 r = sqrt (2*.05^2) // dis tan ce b/ w B an d D 5 E2=(4D-8)/(4*%pi*epsilon*r^2) // f i e l d in te ns it y du e t o ch ar ge at B, direction is fro m B t o D al on g diago nal BD
// f i e l d in te ns it y du e to ch ar ge at C , direction is fro m D to C 7 //E r h as horizontal and vert ica l co m po n e nt s as Erx and Ery respect ively 6 E3=(8D-8)/(4*%pi*epsilon*.05^2)
8 9 10 11 12
Erx=E3-E2* cos (45*%pi/180) Ery=-E1+E2* sin (45*%pi/180) Er = sqrt (Erx^2+Ery^2) theta=atand(Ery/Erx) mprintf ( ”Result ant int ensi ty on cha rge at C =%f N/C at angle %f degrees ” , Er/1 0^ 4, -theta)
∗ 10ˆ4
Scilab code Exa 2.3 Example on Electric Potential
1 2 3 4 5 6
epsilon=8.854D-12 AB=.05 BC=.07 AC = sqrt (.05^2+.07^2) V1=2D-10/(4*%pi*epsilon*.05)
// potential
at A due to
// potential
at A due to
// potential
at A due to
ch ar ge at B 7 V2=-8D-10/(4*%pi*epsilon*AC)
ch ar ge at C 8 V3=4D-10/(4*%pi*epsilon*.07)
ch ar ge at D 9 V=V1+V2+V3 10 mprintf ( ” Potenti =%f V” , V )
al at A d ue to cha rge s at B,
23
C a nd D
Scilab code Exa 2.4 Example on charging and discharging of capacitor
1 2 3 4 5 6 7 8 9 10 11 12 13
C=30D-6 R=500 T=C*R mprintf ( ”T ime con sta nt T=%f sec \ n” , T )
// at t =0s ec , volta ge across capacito r is ze ro V=100 // aplied voltage I=V/R //Ohm’ s Law mprintf ( ” I n i t i a l cu rr en t=%f A \ n ” , I )
t=.05 Q=C*V q=Q*(1- exp (-t/T)) mprintf ( ”C ha rg e o n t he capa cito r after 0. 05 se c is %f C\ n” , q ) 14 i1=I* exp (-t/T) 15 mprintf ( ”C h a r g i n g cu rr ent after 0. 05 se c is %f A \n ” , i1 ) 16 t=.015 17 i2=I* exp (-t/T) 18 mprintf ( ”C h a r g i n g cu rr ent after 0. 01 5 se c is %f A \ n ” ,i2) 19 V=i1*R 20 mprintf ( ”Vo lt ag e acr oss 50 0 o hm resi stor after 0. 05 se c is %f V” , V ) 21 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 2.5 Example on charging and discharging of capacitor
1
24
2 3 4 5 6 7
C=100D-6 V=200 Q=C*V Ct=100D-6+50D-6 // tota l capacitan ce Vt=Q/Ct mprintf ( ”P.D . acros s the com bina tio n = %f V \n ” , Vt)
8 EE1=100D-6*V^2/2 9 mprintf ( ” Electrostatic
en er gy bef ore capac itors co nn ec te d in par all el= %f J \n ” , EE 1)
10 EE2=Ct*Vt^2/2 11 mprintf ( ” Electrostatic
en er gy after capac itors co nne ct ed in pa ra ll el= %f J” , EE2)
ar e
ar e
Scilab code Exa 2.6 Example on charging and discharging of capacitor
1 2 C1=100D-6
// capacitan ce of f i r s t capacitor to be ch ar ge d 3 V=200 // voltage across C1
whic h is
4 Q=C1*V 5 //Le t Q1, Q2, Q3, Q4 be
capac itors 6 7 8 9 10 11 12 13
after
th e cha rge s on respective co nn ec ti on
Q2=4000D-6 Q3=5000D-6 Q4=6000D-6 Q1=Q-(Q2+Q3+Q4) C2=C1*(Q2/Q1) C3=C1*(Q3/Q1) C4=C1*(Q4/Q1) mprintf ( ”Th ree capacit
mic roF , %d microF
ors ha ve capacitances % d an d %d microF \n ” , C2* 10 ^6,C3
*10^6,C4*10^6) 14 Vt=Q1/C1 15 mprintf ( ”Voltag e across
the com bin ati on = %f V ” , Vt)
25
Chapter 3 Electromagnetism
Scilab code Exa 3.2 Example on Field Strength and Flux Density
1 2 3 4 5 6 7
mu_not=4D-7*%pi N=150 //n o . of I =4 // cur ren t l=.3 // len gth Bc=mu_not*N*I/l mprintf ( ”Fl ux Bc*10^3)
tu rn s of coil carried by coi l of solenoid in m t rs density
at centre = %f ∗10 ˆ −3 Wb/mˆ2 ” ,
Scilab code Exa 3.3 Example on Field Strength and Flux Density
1 2 mu_not=4D-7*%pi 3 / / calculating flux
de nsi ty at ce ntr e of coil
mu not ∗ I /(2 ∗R) 4 I=50 5 R=4D-2 6 B=mu_not*I/(2*R)
26
B=
7 mprintf ( ”F l ux dens ity at cent re of coi l=%f ∗10 ˆ −6 Wb/ mˆ2( Te sl a ) \ n ” , B*10 ^6 ) 8 // calculating flux de nsi ty per pen dic ula r t o pl an e of
coil
a t a di st anc e of 10 c m f ro m it
9 z=10D-2 10 B=mu_not*I*R^2/(2*(R^2+z^2)^1.5) 11 mprintf ( ”F l ux de nsi ty per pen dic ula r t o pl an e of
at a distanc e of 10 c m fr o m it= %f Tesla )” , B*10 ^6)
coil ∗10ˆ −6 Wb/mˆ 2 (
Scilab code Exa 3.4 Example of Force on on Current Carrying Conductor
1 2 3 4 5 6 7 8
mu_not=4D-7*%pi I1=30 // curren t in wir e A I2=30 // curren t in wir e B R=10D-2 // distance b/ w 2 wires F=mu_not*I1*I2/(2*%pi*R) mprintf ( ”Fo rc e pe r me t r e len gth
bo th cases attractive
is %d ∗10 ˆ −4 N/m in ( i )an d ( i i ) . However in case ( i ) , it is and in ca se ( i i ) , it is repulsive ” , F
*10^4)
Scilab code Exa 3.5 Example of Force on on Current Carrying Conductor
1 2 3 4 5 6
B=.06 // flux density I=40D-3 // curr ent in coi l l=4D-2 // le ng th of coil sid e F=B*I*l N=50
//n o . of turn s 27
7 mprintf ( ”Fo rc e acti ng on ea c h coi l side =%f F*N*10^3)
28
∗10 ˆ −3 N” ,
Chapter 4 Magnetic Circuit
Scilab code Exa 4.1 Example on Series Magnetic Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
mu_not=4D-7*%pi a=(3D-2)^2 // cro ss − sectional ar ea La=(20-1.5-1.5)*1D-2 // le ng th of flux p a t h in pa rt A mu_r=1000 // relati ve per mea bil ity for pa rt A Sa=La/(mu_not*mu_r*a) mprintf ( ” Reluctance of part A =%f ∗ 10ˆ4AT/Wb\n ” , Sa /10^4) Lb=(17+8.5+8.5)*1D-2 // le ng th of flux p a t h in pa rt B mu_r=1200 // relati ve per mea bil ity for pa rt B Sb=Lb/(mu_not*mu_r*a) mprintf ( ” Reluctance of part B =%f ∗ 10ˆ4AT/Wb\n ” , Sb /10^4) Lg=(2+2)*1D-3 // le ng th of flux pa th in air gap Sg=Lg/(mu_not*a) mprintf ( ”Relu cta nce of 2 air ga ps =%f ∗ 1 0ˆ 4 AT/Wb\n ” , Sg/10^4) S=Sa+Sb+Sg mprintf ( ”To ta l reluctanc e of ma gn et ic cir cui t= %f
∗ 1 0 ˆ 4 AT/Wb\n ” , S/10 ^4 ) 29
18 19 20 21 22 23
N=1000 //n o . of tu rn s on e a c h coil I =1 // cur ren t in coi l mmf=2*N*I mprintf ( ”mmf=%d AT\n ” , mm f) flux=mmf/S mprintf ( ”Fl ux in ma gn et ic ci rc ui t=%f ∗10ˆ −4 Wb\n ” ,
flux*10^4) 24 flux_density=flux/a 25 mprintf ( ”Flu x dens ity= %f Tesla”
, flux_ dens ity)
Scilab code Exa 4.2 Example on Series Magnetic Circuit
1 2 3 4 5 6 7 8 9 10 11
Bg=.7 // flux den sit y in air gap Lg=3D-3 // len gth of air gap ATg=.796*Bg*Lg*1D+6 Bs=Bg // flux dens ity in iron p a th H=660 //am pere tur ns corre spondin g to Bs from B
cur ve ( Fi g .4 .2 ) of tex tbook
−H
Li=40D-2 // le ng th of flux pa th in iro n por tio n ATs=H*Li AT = round (ATg)+ round (ATs) mprintf ( ”Tot al ampere tur ns to be pro vid ed on th e el ec tr om ag ne t=%d AT” , AT)
12 //an sw er va ry fro m th e te xtb ook
due to rou nd of f
error
Scilab code Exa 4.3 Example on Series Magnetic Circuit
1 2 mu_not=4D-7*%pi 3 N=700 //n o . of tu rn s on steel
30
rin g
4 5 6 7 8 9
I =2 // cur ren t carried by th e wi nd in g on th e ring AT=N*I mprintf ( ”mmf pr od uc ed=%d AT\ n ” ,AT) ATi=.35*AT // iron portion take s 35% of tota l mmf ATg=AT-ATi l=1.5D-3 // le ng th of flux p a t h in air gap
10 11 12 13 14 15 16 17 18
B=mu_not*ATg/l mprintf ( ” Flux de n s it y=%f Wb/mˆ2 \ n” , B ) d=3D-2 // di am et e r of circular secti on of rin g A=%pi*d^2/4 // cro ss − section al ar e a of ri ng flux=B*A mprintf ( ”Magneti c fl ux= %f milli Wb \n ” , flu x*10^3) S=AT/flux // Ohm’ s la w for mag ne tic ci rc ui ts mprintf ( ”Reluctance=%f ∗ 1 0 ˆ 6 AT/Wb\n ” , S/10 ^6 ) l=%pi*25D-2 // len gth of mean flux pat h in ste el
ring 19 H=ATi/l 20 mu_r=B/(H*mu_not) 21 mprintf ( ”Re l . permeability mu_r ) )
of st eel
ring =%d” , round (
Scilab code Exa 4.4 Example on Series Magnetic Circuit
1 2 3 4 5 6
phi=.26D-3 // fl ux d=2D-2 // di am et er of circ ula r cr oss −sec tio n of ri ng A=%pi*d^2/4 B=phi/A H=740 //a mpere tu rns pe r len gth of flux p a t h
cor res pond ing to B as obt ain ed fro m B −H cu rv e of ca st steel 7 L=90D-2 // le ng th of mean flux p a t h in th e cas t steel ring 8 AT=H*L 9 N=800 //n o . of tu rns
of th e coi l wound o n th e ring 31
10 11 12 13 14 15
I=AT/N mprintf ( ”Cur re nt in th e co il= %f A \n ” ,I ) Lg=2D-3 // len gth of air gap Li=L-Lg // len gth of mean flux p a t h in ring mu=B/H Bg=AT/(Li/mu+.796*Lg*1D+6)
16 flux=Bg*A 17 mprintf ( ”Magneti c fl ux produ ced =%f ∗10ˆ −4 Wb\n ” ,flux *1D+4) 18 // calculat ing va lue of cur rent wh ich will pr od uc e
th e same flux 19 20 21 22 23
as in ( i )
ATi=H*Li ATg=.796*B*Lg*1D+6 AT=ATi+ATg I=AT/N mprintf ( ”C ur r e nt in th e coil
sam e flu x as in ( i )=%f A ”
whi ch will
giv e th e
,I )
Scilab code Exa 4.5 Example on Series Magnetic Circuit
1 2 mu_not=4D-7*%pi 3 N=400 //n umber of turn s on th e co il wound o n iron
ring 4 5 6 7 8 9 10
I=1.2 // current th ro ug h th e co il AT=N*I l =1 //m ean flux p a t h in ring in mt rs H=AT/l B=1.15 // flux Den sity mu_r=B/(H*mu_not) mprintf ( ”Re l permeability of iron ring round (mu_r))
11 // error
in tex tb ook an sw er
32
mu r=%d”
,
Scilab code Exa 4.6 Example on Series Magnetic Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
mu_not=4D-7*%pi Li=50d-2 // le ng th of flux pa th in iro n mu_r=1300 // rel ati ve perme abili ty a=12D-4 // cros s sectional ar ea Si=Li/(mu_not*mu_r*a) mprintf ( ”Re lu ct an ce of iro n pa rt of ma g ne t i c circu it =%f ∗ 1 0 ˆ 3 AT/Wb\ n” ,Si/10^3) Lg=.4D-2 // le ng th of flux pa th in air gap Sg=Lg/(mu_not*a) mprintf ( ”Re lu ct an ce of air gap of m ag ne t i c circu it= %f ∗ 10 ˆ 3 AT/Wb\n ” ,Sg/10^3) S=Si+Sg mprintf ( ”To ta l reluctanc e of ma gn et ic cir cui t= %f ∗ 1 0 ˆ 3 AT/Wb\n ” ,S/10^3) N=400+400 // total no . of tur ns I =1 // curren t th ro ug h ea ch co il mmf=N*I flux=mmf/S mprintf ( ”Total flu x=%f mil liW b \n ” , flu x*10^3) B=flux/a mprintf ( ”Flux den sit y in ai r ga p=%f Wb/mˆ2” , B )
// an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 4.7 Example on Series Magnetic Circuit
1 2 mu_not=4D-7*%pi 3 N=300 //n o . of tu rn s in coil
33
Figure 4.1: Example on Series Magnetic Circuit 4 5 6 7 8 9 10 11
I=.7 // current th ro ug h co il AT=N*I L=60D-2 // len gth of ring Lg=2D-3 // len gth of air gap Li=L-Lg // le ng th of flux p a t h in rin g mu_r=300 // rel per me abi lit y of iro n B=AT/(Li/(mu_not*mu_r)+.796*Lg*1D+6) mprintf ( ” Flux de n s it y=%f Wb/mˆ2” , B )
Scilab code Exa 4.8 Example on Series Magnetic Circuit
34
1 2 3 4 5 6
mu_not=4D-7*%pi phi=.0006 // fl ux A=5.5D-4 // cro ss − section al ar e a of ri ng B=phi/A h=[ 0 20 0 40 0 50 0 60 0 80 0 10 00 ]
7 b=[ 0 .4 .8 1 1.0 9 1. 17 1. 19 ] 8 plot2d (h,b) 9 xtitle ( ”B−H cu rv e for ex am pl e 4.8 ” , ”H(ampe re tur ns per met re )” , ”B(Wb/mˆ 2 ) ” ) 10 H=600 // corresponding to B fr om B −H curve 11 L=270D-2 // len gth of ring 12 Lg=4.5D-3 // len gth of air gap 13 Li=L-Lg // le ng th of flux p a t h in iro n por ti on of rin g 14 ATi=H*Li 15 ATg=.796*B*Lg*1D+6 16 AT = round (ATi)+ round (ATg) 17 mprintf ( ” Total amp er e tur ns= %d” , AT) 18 // error in tex tb ook an sw er
Scilab code Exa 4.9 Example on Series Magnetic Circuit
1 2 3 4 5 6 7 8 9 10 11 12
mu_not=4D-7*%pi flux=1.1D-3 A=4*4*1D-4 // cro ss − sectional B=flux/A mu_r=2000 // rel permeability H=B/(mu_not*mu_r)
// calculat ing l=.25 // length
ar ea
ampere tur ns requi red of mean flux pa th
for
pot ion C
// calculat ing ampere tur ns requi red l=.3 // length of mean flux pa th
for
pot ion D
ATc=H*l
13 ATd=H*l
35
14 15 16 17 18
// calculat
ing
ampere tur ns requi red
for
air
gap
ATg=.796*B*.002*10^6 AT = round (ATc)+ round (ATd)+ round (2*ATg) mprintf ( ”Total am pe re turns requ ired= %d” , AT)
//an sw er va ry fro m th e te xtb ook due to rou nd of f error
Scilab code Exa 4.10 Example on Series Magnetic Circuit
1 2 3 4 5 6 7
mu_not=4D-7*%pi flux=.018
// consider
par t A
a=205D-4 // cros s sectional ar ea Ba=flux/a H=760 // corre spondin g to Ba as obt aine d from Fi g .
4.2
in th e te xt bo ok // len gth por ti on of pa rt A
8 l=(38-.25)*1D-2 9 10 11 12 13 14 15
of mean flux
p a t h in iron
ATi=H*l ATg=.796*Ba*2.5D-3*10^6 ATa=ATi+ATg
// consider
par t B
a=255D-4 Bb=flux/a H=670 // corresponding
to Bb as obtaine d fr om Fi g . in th e te xt bo ok 16 l=.25 // len gth of m ean flux p a t h in iron port ion of part B 4.2
17 ATb=H*l 18 AT = round (ATa)+ round (ATb) 19 mprintf ( ”Tot al ampere tur ns required magn etic ci rc u i t=%d” , AT)
36
for
co mp le te
Figure 4.2: Example on Series Magnetic Circuit
Scilab code Exa 4.11 Example on Series Magnetic Circuit
1 2 3 4 5 6
mu_not=4D-7*%pi b=[ .5 1 1. 2 1. 4] mu _r=[2 50 0 20 00 15 00 10 00 ] plot2d (b,mu_r,rect=[0,0,1.5,3000]) xtitle ( ”B−mu r cu rv e for ex am pl e 4.11 ” ”mu r” )
7
37
, ”B(Wb/mˆ 2 ) ” ,
8 9 10 11
phi=.38D-3 // flux in ring A=3D-4 // cro ss − sectional B=phi/A mu_r=1300 // corr espon dng
ar ea to B fr om B
−mu r cur ve
plotted //am pere turn s pe r me tr e of flux
12 H=B/(mu_not*mu_r)
pa th length
13 l=%pi*58D-2 // length of mean flux pa th 14 AT_iron=H*l 15 mprintf ( ”Total am pe re turns required by iron \ n ” , round (AT_iron)) 16 // af te r saw cut of 1 mm wi dt h ha s be en made 17 l=l-.1D-2 // len gth of mean flux p a th in iron
ring= %d
por ti on of rin g 18 19 20 21
ATi=H*l ATg=.796*B*1D-3*1D+6 AT = round (ATi)+ round (ATg) mprintf ( ”Extr a am pe re turns - round (AT_iron))
requ ired
=%d” , round (AT)
Scilab code Exa 4.12 Example on Series Parallel Magnetic Circuit
1 2 // two para llel
m ag n e t ic circ uits
h ave eq ua l
reluctances 3 4 5 6 7 8
// flux in centr al co re // flux in ea c h out er li m b // calculat ing AT for central cor e a=9D-4 // cro ss − sectional ar ea phi_cc=1.2D-3 phi_ol=phi_cc/2
B_cc=phi_cc/a H=1600 / / cor res pond ing
textbook 9 l=.15 // length
to B c c fro m F ig 4.2
of mean flux
pa th
10 AT_cc=H*l 11 // calculat
ing AT for
out er li mb s 38
in th e
12 a=5D-4 // cro ss − sectional ar ea 13 B_ol=phi_ol/a 14 H=1200 // cor res pon din g to B ol from F ig 4.2
textbook 15 l=.35 // length
of mean flux
in th e
pa th
16 AT_ol=H*l 17 AT=AT_cc+AT_ol 18 N=400 19 mprintf ( ”Cur re nt required
in th e co il= %f A” , AT/N )
Scilab code Exa 4.13 Example on Series Parallel Magnetic Circuit
1 2 3 4 5 6 7 8
mu_not=4D-7*%pi phi_cc=1.2D-3 phi_ol=phi_cc/2
// flux in centr al co re // flux in ea c h out er li m b // conside r central cor e a=9D-4 // cro ss − sectional ar ea B_cc=phi_cc/a // flux density H=1600 // cor res pon din g to B c c from Fi g 4.2 in th e textbook 9 l=(15-.2)*1D-2 // len gth of mean flux p a th of cast steel 10 11 12 13 14 15
AT_cc=H*l ATg=.796*B_cc*2D-3*10^6
// consider oute r li mb a=5D-2 // cro ss −sectional
ar ea
B_ol=phi_ol/a H=1200 // cor res pon din g to B ol from F ig 4.2
textbook 16 l=.35 // length
of mean flux
in th e
pa th
17 AT_ol=H*l 18 AT=AT_cc+ATg+AT_ol 19 N=400 20 mprintf ( ” Exciti ng
curren t in th e co il= %f A ” 39
,AT/N)
40
Chapter 5 Electromagnetic Induction
Scilab code Exa 5.1 Example on Induced EMF
1 2 3 4 5 6
N=1000 //n o . of tu rn s in t h e coil dphi=-2*900D-6 //ch an ge in flux in W b dt=.2 //ti me in sec in whi ch c ha n ge tak es plac e emf=-N*dphi/dt mprintf ( ”Ave ra ge emf induc ed in the co i l=%d V” (emf))
, round
Scilab code Exa 5.2 Example on Induced EMF
1 2 3 4 5
l=80D-2 // length of cond ucto r B=1.2 // flux density of uni for m mag net ic f i e l d v=30 // velo city of con duc tor in m /s
//w hen the field
direction
of m o t ion is perp endic ular
6 e=B*l*v 7 mprintf ( ”e mf ind uce d in the
41
cond uct or when the
to
dire ctio n of mo ti on is perpendicular to f i e l d= %f V\n ” ,e ) 8 / /w hen t he direction of m o t io n is inclined 45 degree s to f i e l d 9 e=B*l*v* sin (%pi/4) 10 mprintf ( ”e mf in du ce d in th e coi l when th e direction
of mo ti on is
)
incl ined
45 degree s to f i e l d= %f V ”
Scilab code Exa 5.3 Example on Induced EMF
1 2 N=120 //n o . of tu rn s in coil 3 dphi=(.3-.8)*1D-3 //ch an g e in flux
conductor 4 dt=.08 //ti me ta ke n for
due to m o ti o n of
c ha n ge in flux
5 e=-N*dphi/dt 6 mprintf ( ”Ind uc ed emf in th e co il= %f V \ n ” ,e ) 7 R=200 // resist ance offe red by t h e coil 8 I=e/R 9 mprintf ( ” Induced
cu rr en t=%f mA” ,I*1000)
Scilab code Exa 5.4 Example on Induced EMF
1 2 3 4 5 6 7 8 9
mu_not=4D-7*%pi N=3500 //n o . of tu rns on iron r od I=.6 // current th ro ug h co il AT=N*I B=.45 // fl ux den si ty in Wb/mˆ2 l=25D-2 // length of mean mag net ic flux H=AT/l mu_r=B/(H*mu_not)
42
pa th
,e
10 11 12 13 14 15
mprintf ( ” Relative permeabil ity of me ta l=%f \n ” ,mu_r) A=%pi*2.5D-2^2/4 // cr oss section al ar ea of ri ng phi=B*A L=N*phi/I mprintf ( ” Self ind uc ta nc e of coi l=%f H \ n ” ,L )
16 17 18 19
dphi=.08*phi-phi //ch an ge in flux dt=.0015 //tim e ta ke n for ch an ge e=-N*dphi/dt mprintf ( ”e mf in du c e d in t he coil when va lu e of flux
// so lv in g part ( i i i )
f a l l s to 8 per ce nt its
valiue
in 0.0 015
sec =%f V ”
,e )
Scilab code Exa 5.5 Example on Induced EMF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mu_not=4D-7*%pi H=3500 //am pere turn s pe r me tr e of flux pa th length l=%pi*40D-2 // len gth of mean flux p a th in ring AT=H*l N=440 //n o . of tu rn s on coil I=AT/N // excit ing curren t mprintf ( ” Exc iti ng cur ren t=%d A \n ” , round (I)) B=.9 // flux density A=15D-4 // cro ss − sectio nal ar e a of ri ng phi=B*A L=N*phi/I mprintf ( ” Se lf −indu cta nce of co il= %f H \ n ” ,L )
// so lv in g part ( i i i ) l=(l-1/10^2) // le ng th of mean flux p a t h in steel rin g ATi=H*l //a mpere tur ns requi red for iron port ion ATg=.796*B*1D-2*1D+6 //a mpere tu rns for air gap AT=ATi+ATg I=AT/N
20 mprintf ( ”When a n air
gap 1 c m lo ng is cu t in th e 43
ri ng , excit ing curren t I=%f A and s e l f indu cta nce of co il= %f H \n ” ,I,N*phi/I)
Scilab code Exa 5.6 Example on Induced EMF
1 2 3 4 5 6 7 8 9 10 11
N=800 //n o . of tur ns dI=10-5 //ch an ge in curre nt dB=1.2-.8 // corre spondin g ch an ge in flux density A=15D-4 // cros s sectional ar ea L=A*N*dB/dI mprintf ( ” Se lf inductanc e of coil ,L =%f H \ n ” ,L ) di=5-10 //ch an ge in curre nt dt=.04 //tim e ta ke n for ch an ge e=-L*di/dt mprintf ( ”Induc ed emf when the curren t f a l l s
unif orml y from 10 A to 5 A in 0.04
sec =%d V”
round (e))
Scilab code Exa 5.7 Example on Induced EMF
1 2 3 4 5 6 7 8 9 10 11 12
mu_not=4D-7*%pi N=1200 //n o . of tu rn s in t h e coil on sol eno id l=80D-2 // len gth of solenoid A=%pi/4*(5D-2)^2 // cro ss −sectional ar ea L=N*(mu_not*N*A/l) mprintf ( ” Se lf indu ctance= %f mH \n ” ,L*1000)
// calc ulat ing
in du ce d emf
di=-5-5 dt=.03 e=-L*di/dt mprintf ( ” Induce d em f=%f V ” ,e )
44
,
Scilab code Exa 5.8 Example on Induced EMF
1 2 3 4 5 6
N=1500 //n o . of tu rn s in coil A phi=.04D-3 // flux linking coil A in W b I =4 // cur ren t in coi l La=N*phi/I mprintf ( ” Se lf inductanc e of co il A=%f mH. As the
co il s ar e ide nti cal , coil B will als o h ave t h e same sel f −induc tance . He nc e , se lf −indu ctan ce of c o i l B=%f mH \ n ” ,La*1000,La*1000) 7 k=.7 8 M=N*k*phi/I 9 mprintf ( ”Mu tu al indu ctance of arrange ment =%f mH \n ” ,M *1000) 10 di=-8 11 dt=.02 12 e=-M*di/dt 13 mprintf ( ”Emf in du ce d in th e coi l B d ue to a c h an ge of cur ren t in coi l A=%f V \ n ” ,e )
Scilab code Exa 5.9 Example on Induced EMF
1 2 3 4 5 6
mu_not=4D-7*%pi Ns=400 //n o . of tu rn s on se ar ch coil N=1000 //n o . of tu rn s of wi re on solen oid M=mu_not*Ns*N*25D-4/80D-2 mprintf ( ”Mu tu al indu ctance of arrange ment =%f mH \n ” ,M *1000)
7 // di / dt=2 00
45
8 e=-M*200 9 mprintf ( ”e mf in du ce d in searc h co il= %f V ”
,e )
Scilab code Exa 5.10 Example on Induced EMF
1 2 3 4 5
mu_not=4D-7*%pi N=800 //n o . of tu rn s for e a c h sole noid l=90D-2 // len gth of e ac h solenoid Ax=%pi*(3D-2)^2/4 // cro ss − sectio nal ar e a of sol eno id
X 6 Ay=%pi*(6D-2)^2/4
// cro ss − sectio
nal
ar e a of sol eno id
Y 7 M=N*N*mu_not*Ax/l 8 mprintf ( ”Mu tu al indu ctance of arrange ment =%f mH \n ” ,1000*M) 9 // calculat ing cou plin g co − e f f i c i e n t 10 Lx=N*mu_not*N*Ax/l 11 Ly=N*mu_not*N*Ay/l 12 k=M/ sqrt (Lx*Ly) 13 mprintf ( ”Couplin
g co − e f f i c i e n t =%f” ,k )
Scilab code Exa 5.11 Example on Induced EMF
1 2 3 4 5 6 7 8 9
mu_not=4D-7*%pi Nb=500 //n o . of tu rn s in coil B l=120D-2 //m ean le ng th of flux pa th in iro n circu Na=50 //n o . of tu rn s in coil A mu_r=2000 // relati ve per mea bil ity of iro n A=80*10^-4 // cro ss − sectional ar ea M=Nb*mu_not*mu_r*Na*A/(l) mprintf ( ”Mut ua l ind uct anc e M=%f H \n ” ,M )
46
it
10 11 12 13
di=12 dt=.015 e=-M*di/dt mprintf ( ”E mf induc ed in
co i l B=%f V ” ,e )
Scilab code Exa 5.12 Example on Growth and Decay of Current in In-
ductive Circuits 1 2 3 4 5 6 7 8 9 10 11
V=110 // applied voltage L=.5 // ind uc tan ce of coi l r=V/L mprintf ( ”Ra te of cha nge of curren t=%d A/s \ n” ,r ) R =8 // resist ance of coil I=V/R mprintf ( ” Final steady curren t=%f A \ n ” ,I ) T=L/R mprintf ( ”T ime cons tant= %f sec \ n ” ,T )
// so lvi ng part ( iv )
12 t = - log (.5)*T 13 mprintf ( ” Time ta k e n for
t he cu rr ent it s fin al val ue =%f sec ” ,t )
t o rise
t o half
Scilab code Exa 5.13 Example on Growth and Decay of Current in In-
ductive Circuits 1 2 // calcu lating
t i m e it will t a k e cu rr en t t o re ac h .8 of its final s t e ad y v al u e 3 L =5 // inductan ce of wi nd ing 4 R=50 // resist ance of wi nd in g 5 T=L/R 6 V=110 // applied
voltage 47
7 8 9 10
I=V/R // fin al st ea dy cur ren t i=.8*I t=-T* log (1-i/I) mprintf ( ”C ur r e nt gr o w s to .8 ti me s its
fina l st ea dy v a lu e , %f se c after th e sw it ch is clos ed \ n ” ,t ) 11 // calcu lating t i m e it will t a k e for t h e cu rr en t t o r e a c h .9 of its
final
12 i=.9*I 13 t=-T* log (1-i/I) 14 mprintf ( ”T ime ta ke n for
steady value
th e cur rent to grow to .9 t i m e its final s t e a d y v a lu e is %f sec \ n ” ,t ) 15 // calc ulat ing ave rag e emf in du ce d 16 e=-L*(-2.2/.05) 17 mprintf ( ”emf ind uced= %d V \n ” , round (e))
Scilab code Exa 5.14 Example on Growth and Decay of Current in In-
ductive Circuits 1 2 // calculating in du ct an ce and resistance of t he rela y 3 T=.004 //ti me con st ant whi ch is t im e ta ke n for th e
cu rr en t t o rise 4 5 6 7 8
t o .6 3 2 of its
final
steady value
I=.35/.632 // fin al st ea dy va lu e V=200 // applied voltage R=V/I L=T*R mprintf ( ” Resistan ce of relay ci rc ui t=%f o hm \ nI nd uc ta nc e of relay cir cui t=%f H \n ” ,R,L)
9 // calculat ing i n i t i a l rate of ris e of cur rent 10 r=V/L 11 mprintf ( ” I n i t i a l rate of ri se of current =%f A/s ”
48
,r )
Scilab code Exa 5.15 Example on Growth and Decay of Current in In-
ductive Circuits 1 2 R=.5+40+15 // total resistance 3 L =1 // tota l indu cta nce 4 5 6 7 8 9
T=L/R V=12 //e mf of batte ry I=V/R // final st ea dy cu rr en t in t h e circuit i=.04 // cu rr en t a t t i m e t after clos ing t h e circuit t=-T* log (1-i/I) mprintf ( ” The rela y will be gi n t o op er at e %f se c aft er t h e re la y circuit is cl os ed \ n ” ,t )
Scilab code Exa 5.16 Example on Energy Stored in Magnetic Field
1 2 mu_not=4*%pi*1D-7 3 // calc ulat ing indu cta nce 4 5 6 7 8 9 10 11 12 13 14
N=4000 //n umber of turns I =2 // cur ren t flow ing in th e solenoid d=8D-2 // dia met er of solenoid As=%pi/4*d^2 l=80D-2 // len gth of solenoid in m tr s phi=mu_not*N*I*As/l L=N*phi/I mprintf ( ”Inductance=%f H \ n ” ,L )
// calc ulat ing
en er gy stored
in th e ma gn et ic f i e l d
E=L*I^2/2 mprintf ( ”Ene rg y stor ed in the )
magn etic
f i e l d= %f J”
Scilab code Exa 5.17 Example on Energy Stored in Magnetic Field
49
,E
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
mu_not=4D-7*%pi
// calculating exciting cu rr ent B=1.2 // flux density mu_r=500 // rel per me abi lit y for
iro n
H=B/(mu_not*mu_r) D=10D-2 //m ean diam eter l=%pi*D // le ng th of flux p a t h in th e rin g AT=H*l N=300 //n umber of tur ns on th e ring I=AT/N mprintf ( ” Exc iti ng cur ren t=%d A \n ” , round (I))
// calc ulat ing indu cta nce As=8D-4 // cro ss − sectional
ar ea
phi=B*As L=N*phi/I mprintf ( ”Inductance=%f H
// calculat
ing
\ n ” ,L ) en er gy stor ed
E=L*I^2/2 mprintf ( ”Ener gy sto red= %f J \ n ” ,E )
// conside
r th e cas e in wh ich an air
gap of 2 mm i n
th e ring// leisngt made li=l-2D-3 h of flux p a t h in iro n por ti on lg=2D-3 // len gth of air gap ATi=H*li //a mpere tu rns for iron port ion ATg=.796*B*lg*10^6 //a mpere tu rns for air gap AT=ATi+ATg I=AT/N mprintf ( ”When there is an air gap of 2mm i n th e ring \ nExciting curren t=%f A \n ” ,I ) L=N*phi/I mprintf ( ” Ind uct an ce= %f mH\n ” ,L*1000) E=L*I^2/2 mprintf ( ”Ener gy sto red= %f J \ n ” ,E )
50
Scilab code Exa 5.18 Example on Energy Stored in Magnetic Field
1 2 mu_not=4D-7*%pi 3 // calculat ing pull on th e ar ma t ur e 4 mu_r=300 // rel per me abi lit y of iro n 5 6 7 8 9 10
AT=2000 // tot al am pe re turns li=50D-2 // lengt h of iron pat h lg=1.5D-3 // len gth of air gap B=AT/(li/(mu_not*mu_r)+.796*lg*10^6) A=3D-4 // are a of ea ch pole sh oe x=B^2*A/(2*mu_not) // pull on th e ar ma tu re at ea ch
11 12 13 14 15 16 17 18
p=2*x mprintf ( ”Tot al pull
pole
// considering
due to bo th th e poles =%f N th e gap closes to .2 m m
lg=.2*1D-3 B=AT/(li/(mu_not*mu_r)+.796*lg*10^6) x=B^2*A/(2*mu_not) p=2*x mprintf ( ”When the gap closes to .2 m m, total
force
ne edatu e d redueaway=%f to b o t hN”th,p e )po le s , to pull th e arm 19 //an sw er va ry fro m th e te xtb ook due to rou nd of f error
51
\ n” ,p )
Chapter 6 Fundamentals of Alternating Current
Scilab code Exa 6.1 Example on AC Wave Shapes
1 2 3 4 5 6 7 8 9 10 11 12 13
// plotting
gr a ph for
i1
theta= linspace (0,2*%pi ,100) i1=50* sin (theta)+50* sin (theta-%pi/4) plot (theta,i1)
// plotting
gr a ph for
i2
theta= linspace (0,2*%pi ,100) i2=50* cos (theta)+50* cos (theta+%pi/4) plot (theta,i2, ” o ” )
// plotting
gr a ph for
i3
i3=50* cos (theta)-20* sin (theta) plot (theta,i3, ”−∗” ) xtitle ( ”Gr ap hs of i1 ( −) , i2 ( oo) an d i3 ( −∗) ” , ” th et a ” , ” cur ren t ” )
14 / /r o un d off
error
wh il e plotting
52
gr ap hs
Figure 6.1: Example on AC Wave Shapes
53
Scilab code Exa 6.2 Example on AC Wave Shapes
1 2 3 4 5 6 7 8 9 10 11 12 13
// i=Imax ∗ si n ( 2 ∗ %p i ∗ f ∗ t ) Imax=100 //max val ue of curren t f=25 // frequenc y in Hz // calculat ing ti me after whi ch curr ent beco mes 20 A i=20 t = asin (i/Imax)/(2*%pi*f) mprintf ( ”T ime af te r wh ic h curren t be co me s 20 A =%f s e c \n ” ,t )
// calculat
ing
ti me after
whi ch curr ent beco mes 50 A
i=50 t = asin (i/Imax)/(2*%pi*f) mprintf ( ”T ime af te r wh ic h curren t be co me s 50 A =%f s e c \n ” ,t )
14 // calc ulat ing
ti me aft er whic h current
becom es 100 A
15 i=100 16 t = asin (i/Imax)/(2*%pi*f) 17 mprintf ( ”T ime af te r wh ic h curren t be co me s 10 0 A=%f s e c \n ” ,t )
Scilab code Exa 6.3 Example on AC Wave Shapes
1 2 // calculating
in sta nta ne ous vol tag e a t .0 05 se c after t he w ave pas se s t h r ou gh ze ro in positive direction 3 f=50 // frequ ency 4 Emax=350 //max val ue of voltage 5 t=.005
54
6 e1=Emax* sin (2*%pi*f*t) 7 mprintf ( ”Vo lt ag e at .0 05 se c after
th e wave pas ses th ro ug h zer o in positi ve direction= %d V \ n” ,e1) 8 // calculating in sta nta ne ous vol tag e a t .0 08 se c after th e wave pass es th ro ug h zer o in nega tive direction 9 t=.008 10 e2=-Emax* sin (2*%pi*f*t) 11 mprintf ( ”Vo lt ag e at .0 08 se c after
th ro ug h zero
in negative
th e wave pas ses dire ctio n=%f V” ,e2)
Scilab code Exa 6.4 Example on AC Wave Shapes
1 2 //e=100 ∗ si n ( 100 ∗ %p i ∗ t ) 3 // calculat ing rate of c h an ge of volt age
at t = . 0 0 2 5
sec 4 t=.0025 5 r1=10000*%pi* cos (100*%pi*t) 6 mprintf ( ”R ate of c ha ng e of volt age at .00 25 sec =%f V / se c \ n” ,r1) 7 // calculat ing rate of c h an ge of volt age at t =. 0 05
sec 8 t=.005 9 r2=10000*%pi* cos (100*%pi*t) 10 mprintf ( ”R ate of ch an ge of voltage at .005 sec =%d V/ s e c \n ” ,r2) 11 // calculating rat e of c h a n g e of vol tag e at t=.0 1 se c 12 t=.01 13 r3=10000*%pi* cos (100*%pi*t) 14 mprintf ( ”R ate of ch an ge of voltage at .01 sec =%f V/ s e c \n ” ,r3) 15 // error in tex tb ook an sw er in f i r s t and las t case
55
Scilab code Exa 6.5 Example on AC Wave Shapes
1 2 3 // calculating greate st rat e of c h a n g e of cur re nt 4 // i =50 ∗ sin (100 ∗ %p i ∗ t ) 5 mprintf ( ” Greates t rate of ch an ge of current =%f A / sec \ n ” ,5 0*100*%pi ) 6 // calculat ing av er age val ue of curr ent 7 f=50 // frequenc y of the wave 8 T=1/f integrate ( ” 50 ∗ si n (100 ∗ %p i ∗ t ) ” , ” t ” ,0,T/2) 9 Imean=1/.01* 10 mprintf ( ”Av er ag e valu e of th e giv en current =%f A \n ” , Imean) 11 Irms= sqrt ( integrate ( ”(50 ∗ s in ( the ta ) ) ˆ2” , ” th et a ” ,0,2* %pi)/(2*%pi)) 12 mprintf ( ”RMS value of cur ren t=%f A \ n ” ,Irms) 13 // cal cul at in g ti me in te rva l be tw ee n a m aximum value
and ne xt zero
val ue
14 t=(%pi/2)/(100*%pi) 15 mprintf ( ”T ime in te rv al
be tw ee n a maximum value an d t he ne x t ze ro va lu e is %f se c t o %f se c ” ,t,2*t) 16 / / va lu e of greate st rat e of c h a n g e of cu rr ent is give n wrong in th e tex tb ook due to ap pro xi mat io n
Scilab code Exa 6.6 Example on AC Wave Shapes
1 2 i = linspace (0,0,2) 3 t = linspace (0,1,2)
56
Figure 6.2: Example on AC Wave Shapes
57
4 plot2d (t,i) 5 for j=0:3 6 i = linspace (40+20*j,40+20*j,2) t = linspace (j+1,j+2,2) 7 8 plot2d (t,i) if j==0 then 9 10 t = linspace (j+1,j+1,2) i = linspace (0,40,2) 11 12 plot2d (t,i) 13 else 14 t = linspace (j+1,j+1,2) 15 i = linspace (40+20*(j-1) ,40+20*j,2) plot2d (t,i) 16 17 end 18 end 19 for j=1:3 i = linspace (100-20*j,100-20*j,2) 20 21 t = linspace (j+4,j+5,2) plot2d (t,i) 22 23 i = linspace (100-20*(j-1) ,100-20*j,2) 24 t = linspace (j+4,j+4,2) 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
end plot2d (t,i) i = linspace (40,0,2) t = linspace (8,8,2) plot2d (t,i) i = linspace (0,0,2) t = linspace (8,9,2) plot2d (t,i) for j=0:3 i = linspace ( -(40+ 20*j), -(4 0+20 *j) ,2 ) t = linspace (j+9,j+10,2) plot2d (t,i) if j==0 then t = linspace (j+9,j+9,2) i = linspace (0,-40,2) plot2d (t,i) else
58
42 t = linspace (j+9,j+9,2) i = linspace (-40 -20 *(j-1), -40-2 0*j,2) 43 44 plot2d (t,i) 45 end 46 end 47 for j=1:3 48 49 50 51 52 53 54 55 56 57 58
i = linspace (-(100-20*j),-(100-20*j),2) t = linspace (j+12,j+13,2) plot2d (t,i) i = linspace ( -100+2 0*(j-1) ,-100+2 0*j,2) t = linspace (j+12,j+12,2) plot2d (t,i) end i = linspace (0,-40,2) t = linspace (16,16,2) plot2d (t,i) xtitle ( ” Periodic curren t wave for in se co nds” , ” cu rr en t ” )
59 60 // calculat ing av er age val ue for 61 Iavg=(0+40+60+80+100+80+60+40)/8
exa mp le 6.6 ”
this
62 mprintf ( ”A A v e rag val ue of curr ent \ n ”e,Iavg) shape=%f
, ”time
wave sh ap e
of giv en wave
63 // calc ulat ing RMS val ue for th e give n wave sh ap e 64 Irms= sqrt ((0^2+40^2+60^2+80^2+100^2+80^2+60^2+40^2) /8) 65 mprintf ( ”RMS value of curren t of given wave shap e=%f A\ n ” ,Irms) 66 // calculat ing fo rm factor 67 x=Irms/Iavg 68 mprintf ( ”F orm fa ct or of given wave fo rm =%f \n ” ,x ) 69 // calculat ing pea k factor 70 Imax=100 // maximum value of cur ren t wav e 71 y=Imax/Irms 72 mprintf ( ”P eak fac tor of given wave=%f \ n ” ,y ) 73 // calc ulat ing ave rag e and RMS val ue of curren t
considering th e wave to be sinusoi va lu e of 10 0 A 59
dal
ha vi ng pea k
Figure 6.3: Example on AC Wave Shapes 74 Iavg= integrate ( ’ 100 / %pi ∗ si n ( th et a ) ’ , ’ the ta ’ ,0,%pi) 75 mprintf ( ”Av er ag e value of sine wave=%f A \n ” ,Iavg) 76 Irms= sqrt ( integrate ( ’ (10 0 ∗ s i n ( th et a ) ) ˆ2/ %p i ’ , ’ the ta ’ ,0,%pi)) 77 mprintf ( ”RMS val ue of si ne wa ve=%f A ” ,Irms)
Scilab code Exa 6.7 Example on AC Wave Shapes
1 2 theta= linspace (0,2*%pi ,100) 3 i=10+10*
sin (theta) // expre ssion
60
for
th e resultant
wave 4 plot2d (theta,i) 5 xtitle ( ”Wave sha pe fo r ex am pl e 6.7 ” , ” th et a ” , ” cur ren t ”) 6 7 // calculat ing av er age val ue of th e resultant wave 8 Iavg= integrate ( ’ 10+1 0∗ si n ( th et a ) ’ , ’ the ta ’ ,0,2*%pi) /(2*%pi) 9 mprintf ( ”A v e rag e val ue of th e resultant cur ren t wave =%d A\ n ” ,Iavg) 10 // calculat ing RMS val ue of cur ren t of th e resultant
wave 11 Irms= sqrt ( integrate ( ’ (10 +10 ∗ si n ( th et a ) ) ˆ2 ’ , ’ the ta ’ ,0,2*%pi)/(2*%pi)) 12 mprintf ( ”RMS value of the res ult ant current wave=%f A” ,Irms)
Scilab code Exa 6.8 Example on AC Wave Shapes
1 2 3 4 5 6 7 8 9 10 11 12 13 14
theta= linspace (0,2*%pi ,100) i=50* sin (theta) xset ( ’ wind ow ’ ,0) plot2d (theta,i) xtitle ( ”Curre nt wave sha pe fo r ex am pl e 6.8 −− >(a)” , ” the ta ” , ” cu rr en t ” ) xset ( ’ wind ow ’ ,1) theta= linspace (0, %pi ,100) i=50* sin (theta) plot2d (theta,i) theta= linspace (%pi ,2*%pi ,100) i=-50* sin (theta) plot2d (theta,i)
15 xtitle ( ”Curre nt wave sha pe fo r ex am pl e 6.8 −− >(b)” , ”
61
the ta ” , ” cu rr en t ” ) 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
xset ( ’ wind ow ’ ,2) theta= linspace (0,0,2) i = linspace (0,50,2) plot2d (theta,i) theta= linspace (0,%pi,2) i = linspace (50,50,2) plot2d (theta,i) theta= linspace (%pi,%pi,2) i = linspace (50,-50,2) plot2d (theta,i) theta= linspace (%pi,2*%pi,2) i = linspace (-50,-50,2) plot2d (theta,i) i = linspace (-50,0,2) theta= linspace (2*%pi,2*%pi,2) plot2d (theta,i) xtitle ( ”Curre nt wave sha pe fo r ex am pl e 6.8 −− >(c ) ” , ” the ta ” , ” cu rr en t ” )
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
xset ( ’ linspace wind ow ’ ,3) theta= (0,%pi/2,2) i = linspace (0,50,2) plot2d (theta,i) theta= linspace (%pi/2,%pi,2) i = linspace (50,0,2) plot2d (theta,i) theta= linspace (%pi,3*%pi/2,2) i = linspace (0,-50,2) plot2d (theta,i) theta= linspace (3*%pi/2,2*%pi,2) i = linspace (-50,0,2) plot2d (theta,i) xtitle ( ”Curre nt wave sha pe fo r ex am pl e 6.8 −− >(d)” , ” the ta ” , ” cu rr en t ” )
49 50 // consi der
wave sh ap e (a ) 62
\ nAs th e negative and positive par ts of th e wave ar e e q u al , re ad in g of moving co il ammeter is zero \ n ” ) 52 Irms= sqrt ( integrate ( ’ (5 0 ∗ s in ( th et a ) ) ˆ2 ’ , ’ the ta ’ ,0,2* 51 mprintf ( ”F or wa ve sh ap e (a)
%pi)/(2*%pi)) 53 mprintf ( ”Readi ng of mo vi ng iro n am me te r=%f A \ n ” ,Irms ) 54 55 // consi der wave sh ap e (b) 56 Iavg= integrate ( ’ 5 0 ∗ si n ( th et a ) ’ , ’ the ta ’ ,0,%pi)/%pi 57 mprintf ( ”F or wave sh ap e (b) \ nRe adi ng on the mo vi ng c o i l am me te r=%f A \ n ” ,Iavg) 58 Irms= sqrt ( integrate ( ’ (5 0 ∗ s in ( th et a ) ) ˆ2 ’ , ’ the ta ’ ,0,2* %pi)/(2*%pi)) 59 mprintf ( ”Reading on mo vi ng ir on am me te r=%f A \ n ” ,Irms ) 60 61 // consi der case ( c ) 62 mprintf ( ”For wav e shape ( c ) \ nA ve ra ge value ove r on e
co mp le te per iod is clear ly ze ro . Thus rea din g on moving co il ammeter is zero . As th e val ue of cur ren t lsre, ma in sval con ant l at vari ous interva RMS uest wil be 50 50AAdur onl in y .g Hence , reading on mo vi ng iron ammeter= 50 A \n ” ) 63 64 // consi der case (d) 65 Iavg=(0+10+20+30+40+50++40+30+20+10+0+(-10)+(-20) +(-30)+(-40)+(-50)+(-40)+(-30)+(-20)+(-10)+0)/20 66 mprintf ( ”F or wave sh ap e (d) \ nR ea di ng on mo vi ng co il ammeter=%d \ n ” ,Iavg) 67 Irms= sqrt ((0^2+10^2+20^2+30^2+40^2+50^2+40^2+30^2+20^2+10^2+0^2+(-10) ^2+(-20)^2+(-30)^2+(-40)^2+(-50)^2+(-40)^2+(-30) ^2+(-20)^2+(-10)^2+0^2)/20) 68 mprintf ( ”Reading on mo vi ng ir on am me te r=%f A \ n ” ,Irms )
63
Scilab code Exa 6.9 Example on AC Wave Shapes
1 2 3 4 5 6 7
// l et us ass um e V=1 V, T=1 sec //e=V ∗ t /T
V =1 T =1 Erms= sqrt ( integrate ( ” (V∗ t/T)ˆ2” , ” t ” ,0, T)/T ) mprintf ( ”RMS value of volt age is %f times maximum voltage \ n ” ,Erms/V) 8 Emean= integrate ( ”V∗ t/T” , ” t ” ,0,T)/T 9 k=Erms/Emean 10 mprintf ( ”F orm fa ct or of th is wave=%f” ,k )
Scilab code Exa 6.10 Example on AC Wave Shapes
1 2 3 4 5 6 7
// the gra ph is drawn con sid eri ng R=%pi R=%pi theta= V = sqrt plot2d xtitle
linspace (-%pi ,%pi ,100) (R^2-theta^2) (theta,V) ( ”Wave sha pe fo r ex am pl e 6.10 ” , ” th et a ” , ” Voltage” ) 8 theta= linspace (%pi ,3*%pi ,100) 9 V = - sqrt (R^2-(theta -2*%pi)^2) 10 plot2d (theta,V) 11 12 Vrms= sqrt ( integrate ( ’ (Rˆ2 −xˆ 2) /(2 ∗R) ’ , ’ x ’ ,-R,R))
64
Figure 6.4: Example on AC Wave Shapes
65
13 mprintf ( ”RMS value
of su ch a wave sh ap e wil l be %f of i t s maximum volt age ” ,Vrms/R)
Scilab code Exa 6.11 Example on Phase Difference
1 2 // consi der part ( i ) 3 phi=%pi/12 4 mprintf ( ”F or part ( i ) \ nV ol ta ge leads th e curr ent wav e by % d deg rees \n ” , round (phi*180/%pi)) 5 f=377.16/(2*%pi) 6 mprintf ( ”Freque ncy of the wav e shape =%d H z \n ” ,f ) 7 // consi der part ( i i ) 8 phi=%pi/3 9 mprintf ( ”Fo r part ( i i ) \ nV ol ta ge leads th e cur ren t by %d degrees \n ” , round (phi*180/%pi)) 10 mprintf ( ”Freque ncy of the wav e shape =ome ga/(2 ∗ p i ) \ n ” ) 11 // con sid er part ( i i i ) 12 phi=0-(-%pi/2) 13 mprintf ( ”Fo r part
( i i i ) \ nV ol ta ge leads th e cur rent wav e by % d deg rees \n ” , round (phi*180/%pi)) 14 mprintf ( ”Freque ncy of the wav e shape =ome ga/pi \n ” ) 15 // consi der part ( iv ) 16 mprintf ( ”F or part ( iv ) \ nC ur re nt wave lags the volt age by an angle= alpha +ata n (x/ R) and the freq uenc y of this wave sh ap e is omega/(2 ∗ pi )” )
Scilab code Exa 6.13 Example on Simple AC Circuits
1 2 V=230 // applied voltage 3 L=60D-3 // in duc ta nc e of
coi l 66
4 5 6 7 8 9
f=50 // frequency Xl=2*%pi*f*L I=230/Xl
of supp ly
// i f freq uenc y is re du ce d to 20 Hz Xl=2*%pi*20*L I1=V/Xl
10 mprintf ( ”Cu rr e nt th ro ug h th e coi l i f fre que ncy reduced to 20 Hz=%f A \n ” ,I1) 11 // i f fre que ncy is increas ed to 60 Hz 12 Xl=2*%pi*60*L 13 I2=V/Xl 14 mprintf ( ”Cu rr e nt th ro ug h th e coi l i f fre que ncy increa sed to 60 Hz=%f A \n ” ,I2) 15 // i f fre que ncy is increas ed to 1 0 0 Hz 16 Xl=2*%pi*100*L 17 I3=V/Xl 18 mprintf ( ”Cu rr e nt th ro ug h th e coi l i f fre que ncy inc rea sed to 10 0 Hz=%f A \ n” ,I3)
is
is
is
Scilab code Exa 6.14 Example on Simple AC Circuits
1 2 3 4 5 6 7 8 9 10 11 12
// calculating
re act anc e of capa cit or
C=100D-6 Xc=1/(2*%pi*50*C) mprintf ( ” Ca pa cit iv e rea ctan ce ,X c=%f ohm \ n ” ,Xc)
// calc ulat ing RMS val ue of curren t V=200 Irms=V/Xc mprintf ( ”RMS value
// calc ulat ing
of cur ren t=%f A \ n ” ,Irms) max curren t
Imax=Irms* sqrt (2) mprintf ( ”Maximum c u r r e n t=%f A” ,Imax)
67
Chapter 7 AC Series Circuit
Scilab code Exa 7.1 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13
/ / calculating cur re nt flo wi ng in t he circu it L=0.1 // induc tance f=50 // frequ ency Xl=2*%pi*f*L R=15 // tota l resista nce in t h e circuit Z = sqrt (R^2+Xl^2) V=230 // vo lt ag e ap pl ie d t o series circuit I=V/Z mprintf ( ”Cu rr e nt flow ing in th e cir cui t=%f A \ n ” ,I )
// calculat
ing
power factor
pf=R/Z mprintf ( ”P ower factor
of th e circu it is %f( lag gin g ) nVo lta ge acros s react or= %f V \ nV ol ta ge across re si st or= %f V” ,pf,I*Xl,I*R)
Scilab code Exa 7.2 Example on AC Series Circuit
68
\
1 2 3 4 5
V1=200 // voltage applied to non −induct ive lo ad I1=20 // curren t flowing th ro ug h th e loa d R=V1/I1 V=230 // app lie d vol tag e to serie s co nn ec ti on of R a nd
L 6 7 8 9 10 11
I=I1 Z=V/I Xl = sqrt (Z^2-R^2) L=Xl/(2*%pi*50) phi=atand(Xl/R) mprintf ( ”Induc tan ce of th e reactor=
b e tw e en appl ied deg ree s ” ,L,phi)
%f H, ph as e angl e volt age and th e cur ren t is %f
Scilab code Exa 7.3 Example on AC Series Circuit
1 2 // calc ulat ing
resistan ce , reactanc e and im pe da nc e of ch ok e coi l 3 I=7.5 // cur ren t flow ing th ro ug h th e cir cui t 4 V1=110 // voltage across non −in du ct iv e resistor 5 6 7 8 9 10 11
R=V1/I V2=180 // volta ge across ch ok e coi l Z=V2/I Zt=230/I //im pe da nc e of wh ol e ci rc ui t r=(Zt^2-R^2-Z^2)/(2*R) Xl = sqrt (Z^2-r^2) mprintf ( ”Reacta nce of co il= %f o hm \ nResi stanc e of coil=%f ohm \ nIm pe dan ce of c o i l=%f o hm \ n ” ,Xl,r,Z)
12 // calculat
ing
total
resist
ance
and i m p e d a n c e of th e
circuit 13 Rt=r+R 14 Zt = sqrt (Rt^2+Xl^2) 15 mprintf ( ”To ta l resist
ance
of cir cui t=%f o hm \ nTotal 69
16 17 18 19 20 21 22 23 24
imp ed anc e of ci rc ui t=%f o hm \ n ” ,Rt,Zt) // calculat ing power ab so rb ed by th e coi l P1=I^2*r mprintf ( ”P ower absorb ed by the
// calc ulat ing
co i l=%f W \n ” ,P1) power drawn by ci rc ui t
P2=I^2*(r+R) mprintf ( ”P ower drawn by the ci rc u it= %f W \n ” ,P2) // calculating power factor of w h o l e circu it pf=Rt/Zt mprintf ( ”P ower facto r of th e who le ci rc ui t=%f lag gin g ” ,pf)
25 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 7.4 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// calc ulat ing current drawn at 50 Hz V=220 // volt age appl ied to c ho ke coi l f=50 // frequenc y of supp ly I1=12 // curren t ta ke n by ch ok e co il R1=0 // res ist anc e of coil is negligi ble Xl=V/I1 I2=16.5 // curr ent ta ke n by th e res is tor R=V/I2 Z = sqrt (R^2+Xl^2) I=V/Z mprintf ( ”Cur re nt ta ke n by th e ci rc ui t at 50 Hz=%f A n ” ,I )
// calc ulat ing
current
\
drawn at 30 Hz
Xl_dash=30/50*Xl Z_dash= sqrt (Xl_dash^2+R^2) I=V/Z_dash mprintf ( ”Curr en t drawn by the
n ” ,I ) 70
ci rc ui t at 30 H z=%f A
\
Scilab code Exa 7.5 Example on AC Series Circuit
1 2 // let
resistance and in du ct an ce of th e coil L respectively 3 V=220 // vol tag e app lie d to coil 4 f=50 // frequenc y of supp ly 5 I=60 // current indic ated by ammeter 6 7 8 9 10 11 12 13
Z1=V/I
// when th e fr equ enc y is increase d to 10 0 H z I=40 // current indic ated by ammeter Z2=V/I
/ /o n sol vin g for L L = sqrt ((Z2^2-Z1^2)/3)/(100*%pi) R = sqrt (Z1^2-(100*%pi*L)^2) mprintf ( ” Resistance of co il= %f ohm \ nInd uct anc e of coil=%f H” ,R,L)
Scilab code Exa 7.6 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10
be R and
// calculat ing pa ra me te rs of e ac h coi l I =3 // cur ren t th ro ug h th e cir cui t // for coil A Ra=12/3 // res ist anc e Va=15 // volt age dr op Za=Va/I Xa = sqrt (Za^2-Ra^2)
// for
coil
B
Rb=6/3 // res ist anc e
11 Vb=9 // volt age
dr op 71
12 13 14 15 16 17
Zb=Vb/I Xb = sqrt (Zb^2-Rb^2)
// for
coil
C
Rc=9/3 // res ist anc e Vc=12 // volt age dr op Zc=Vc/I
18 Xc = sqrt (Zc^2-Rc^2) 19 mprintf ( ”Para met er s of \ nCo ilA : Ra=%f ohm , Xa=%f ohm \
nC oi l B: Rb=%f oh m , Xb=%f oh m \ nCo il C: Rc=%f ohm , Xc=%f ohm\ n ” ,Ra,Xa,Rb,Xb,Rc,Xc) 20 // calculating power factor of e a c h coil 21 22 23 24
pf_a=Ra/Za pf_b=Rb/Zb pf_c=Rc/Zc mprintf ( ”p ower factor
25 26 27 28
// calculating
of th e coi ls ar e \ npf a=%f( laggi ng ) \ npf b=%f( la gg in g ) \ npf c=%f( la gg in g ) \ n” ,
pf_a,pf_b,pf_c)
power dissipate
d for
e a c h coil
Pa=I^2*Ra Pb=I^2*Rb Pc=I^2*Rc
co il s : \ nPa=%f W \ of w h o l e circu it
29 mprintf ( ”P ower dissiW\ pated in these nPb=%f W\ nPc=%f n ” ,Pa,Pb,Pc) 30 31 32 33 34 35
// calculating
power factor
Rt=Ra+Rb+Rc Xt=Xa+Xb+Xc Zt = sqrt (Rt^2+Xt^2) pf=Rt/Zt mprintf ( ”P ower facto r of th e who le ci rc ui t=%f lagging \ n ” ,pf)
36 // calculat
ing
volt age
appl ied
across
th e w h ol e
circuit 37 V=I*Zt 38 mprintf ( ”Vol ta ge appl ied V” ,V )
across
72
th e w h ol e cir cui t=%f
Scilab code Exa 7.7 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10
//r 1 be th e variab le resistance X=10 // total indu cti ve re ac tan ce of circu it V=200 //r ms va lu e of appl ied volta ge //RMS val ue of cu rr en t I =2 00 / sq rt ((2 + r1 ) ˆ2+1 0ˆ2) //powe r co nsu me d i s P=I ˆ2 ∗ r 1 //For max pow er , dP/dr= 0 //o n solving r1 = sqrt (104) mprintf ( ”V a l u e of var iab le
resistor a t t h e ins tan t of max pow er con sum ed in it is %f o hm \ n ” ,r1) 11 // solving pa rt ( i i ) , let r2 be th e variable resistance −I =200/ s q r t ((200 + r2 ) ˆ2+1 0ˆ2) ,P=I ˆ2 ∗(2+ r2 ) 12 // f o r max pow er , dP/dr= 0 13 //o n solving 14 r2=10-2 15 mprintf ( ”V a l u e of variable
condition 16 17 18 19 20
res is tor= %d ohm for th e of max po wer consumed by th e ci rc ui t \ n ”
, round (r2)) I1=200/ sqrt ((2+r1)^2+10^2) I2=200/ sqrt ((2+r2)^2+10^2) pf1=(2+r1)/ sqrt ((2+r1)^2+10^2) pf2=(2+r2)/ sqrt ((2+r2)^2+10^2) mprintf ( ”Curr en t in case ( i )=%f A at %f pf laggi ng
nC ur re nt in case ( i i )=%f A at %f pf laggi ng pf1,I2,pf2)
Scilab code Exa 7.8 Example on AC Series Circuit
73
\ \ n ” ,I1,
1 2 //bo th th e co il s draw lagging
curr ents , he nc e bo th
ar e induct ive 3 // for coil A 4 Va=10 // voltage applied 5 Ia=2 // cur ren t dr aw n 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Za=Va/Ia pf=.8 //p ow er fac tor Ra=pf*Za Xa = sqrt (Za^2-Ra^2)
// for
coil
B
Vb=5 // voltage applied Ib=2 // cur ren t dr aw n Zb=Vb/Ib pf=.7 //p ow er fac tor Rb=pf*Zb Xb = sqrt (Zb^2-Rb^2) Rt=Ra+Rb // total resist ance of circuit Xt=Xa+Xb // total re act anc e of circu it Z = sqrt (Rt^2+Xt^2)
21 V=Ia*Z 22 pf=Rt/Z 23 mprintf ( ”V ol t ag e t o be ap pl ie d t o t h e circuit
of co il s A and B in se ri es= %f V and pf =%f laggi ng ”
,pf)
Scilab code Exa 7.9 Example on AC Series Circuit
1 2 3 4 5
// calculat ing capa cita nce Xc=4 // capaci tive reactan ce f=50 omega=2*%pi*f
6 C=1/(omega*Xc)
74
,V
7 8 9 10 11 12 13 14 15 16 17 18
mprintf ( ” Capac itan ce C=%f micr oF \ n ” ,C*1D+6) // cal cul at in g im pe da nc e R =5 // resist ance of circuit Z = sqrt (R^2+Xc^2) mprintf ( ”Imp ed an ce of
ci rc ui t=%f o hm \ n” ,Z ) cur re nt t ak e n by circu it
// calculating
V=200 I=V/Z mprintf ( ”Curr en t drawn by ci rc ui t=%f A \n ” ,I )
// calculating
vol tag e d r o p acr oss
Vr=I*R mprintf ( ”Vol ta ge d r o p across Vr )
t he resistance
th e resist
ance= %f V \n ” ,
19 // calculat ing volt age d r o p across th e reac tanc e 20 Vc=I*Xc 21 mprintf ( ”Volt age dr op across th e reactanc e=%f V \n ” , Vc ) 22 // calculat ing power factor 23 pf=R/Z 24 mprintf ( ”P ower factor of th e cir cui t=%f leadi ng ” ,pf)
Scilab code Exa 7.10 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10
// rating
of bu lb is 1 00 W,11 0 V
P=100 V=110 I=P/V //no rm al curre nt of bu lb
// volt age
across
bu lb sh ou ld be 11 0 V
Vc = sqrt (230^2-V^2) // volt age across th e capa cita nce Xc=Vc/I C=1/(100*%pi*Xc) mprintf ( ”Capacit ance of %f mi cro F must be conn ect ed in series w i t h t h e b u l b” ,C*1D+6)
75
Scilab code Exa 7.11 Example on AC Series Circuit
1 2 3 4 5
C=35D-6 // capac itan ce f=50 // frequ ency Xc=1/(2*%pi*f*C) Z=2*Xc // volta ge appl ied
eq ua l t o half
across th e capa cit ance of tota l vo lt ag e ap pl ie d
6 R = sqrt (Z^2-Xc^2) 7 mprintf ( ” Resistance R)
is
of vari abl e re si st or , R =%f o hm”
Scilab code Exa 7.12 Example on AC Series Circuit
1 32 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// calc // ulat ing current V=230 voltage applied drawn R=15+10 // tota l resist ance of t h e circuit L=.04+.1 // tota l indu cta nce Xl=2*%pi*50*L C=100D-6 // capa citan ce Xc=1/(2*%pi*50*C) X=Xl-Xc Z = sqrt (R^2+X^2) I=V/Z mprintf ( ” Curren t dr aw n=%f A \ n ” ,I )
// calc ulat ing
voltages
V1 and V2
Z1 = sqrt (15^2+(2*%pi*50*.04)^2) V1=I*Z1 phi1=atand(2*%pi*50*.04/15) mprintf ( ”V1=%f V a nd leads the \ n ” ,V1, round (phi1))
76
current
by %f degrees
,
18 19 20 21
Z2 = sqrt (10^2+(2*%pi*50*.1-1/(2*%pi*50*100D-6))^2) V2=I*Z2 phi2=acosd(10/Z2) mprintf ( ”V2=%f V a nd lags the current by %f degrees n ” ,V2,phi2)
22 // calcu lating
power fac tor
of overa ll circuit
23 pf=R/Z 24 mprintf ( ”P ower factor of overall cir cui t=%f lagging ,pf) 25 //T he ans we rs va ry fro m the text book due to ro un d
off
er ro r
Scilab code Exa 7.13 Example on AC Series Circuit
1 2 3 4 5 6
// so lvi ng part ( i ) Rb=5 // resist ance of coil B Xb=2*%pi*50*.02 // indu cti ve re ac tan ce of coil B Zb = sqrt (Rb^2+Xb^2) phi_b=atand(Xb/Rb) //ph as e diffe renc e of V b wi t h
cu rr en t as referen
ce ph as or // Va and V b are
7 phi_a=90*%pi/180-phi_b*%pi/180
quadrature 8 //Xc/R =tan ( p h i a ) 9 //Vb=2 ∗Va−−>Rˆ2+Xcˆ2=Zbˆ2/4 10 //o n solving for R a nd X c 11 12 13 14 15 16 17 18
R = sqrt ((Zb^2/4)/(1+ tan (phi_a)^2)) Xc = tan (phi_a)*R C=1/(2*%pi*50*Xc) mprintf ( ”R=%f ohm\nC=%f mic roF \n ” ,R,C*1D+6)
// so lv in g part ( i i ) Rt=5+R // total resist ance of circuit Xt=Xb-Xc // result ant re ac tan ce of circu it Zt = sqrt (Rt^2+Xt^2)
19 V=220 // applied
\
voltage 77
in
”
20 21 22 23 24 25
I=V/Zt mprintf ( ”Curr en t drawn by the
ci rc ui t=%f A \n ” ,I ) // so lv in g part ( i i i ) / /a s t h e re ac ta nc e is pos iti ve , circuit is in duc ti ve pf=Rt/Zt // lag gin g mprintf ( ”P ower facto r of th e ci rc ui t=%f( lagging ) \n ” ,
pf ) 26 // the ans we rs va ry fr om the
off
text book
due to ro un d
er ro r
Scilab code Exa 7.14 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// calculat
ing
fr equ enc y of appl ied
volt age
C=25.5D-6 // capa citan ce I=.4 // current th ro ug h ci rc ui t V=50 // volt age across capacitor Xc=V/I f=1/(2*%pi*C*Xc) mprintf ( ”Frequency=%d Hz \ n ” , round (f))
// calculat V=35 // volt Z=V/I //im // r ˆ2+(100
ing pa ra me te rs of c h ok e coi l age across c h ok e coi l pe da nc e of ch ok e co il ∗ %p i ∗L)ˆ2=Zˆ2
R=20/.4 Vac=45 // vol tag e acr oss a c por tio n of Zac=Vac/I //im pe da nc e of ac portion
circu it
// (R+r ) ˆ2+ (10 0 ∗ %p i ∗L)ˆ2=Zacˆ2 // solvi ng for r and L r=(Zac^2-Z^2-R^2)/(2*R) L = sqrt (Z^2-r^2)/(100*%pi) Xl=2*%pi*50*L mprintf ( ”Par am et er s of ch ok e co il : \ nRes is ta nce= %f
ohm\ nIndu ctance= %f H \ nInductiv n ” ,r,L,Xl) 78
e reacta nce= %f ohm \
22 23 24 25 26 27
// calculat
ing
appl ied
volt age
Z = sqrt ((R+r)^2+(Xl-Xc)^2) V=I*Z mprintf ( ”Vol ta ge appl ied
// calcu lating
to th e cir cui t=%f V \ n ” ,V ) in c h o k e coil
losses
W=I^2*r
28 mprintf ( ” Losses
in ch ok e co il= %d W \ n ” , round (W))
Scilab code Exa 7.15 Example on AC Series Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// calculat
ing
capa cita nce
to give
re son anc e
Xl=2*%pi*50*.4 Xc=Xl C=1/(2*%pi*50*Xc) mprintf ( ” Capac itan ce= %f mic roF \n ” ,C*1D+6)
// calculat
ing
curr ent
R =5 Z=R V=110 I=V/Z mprintf ( ” cu rr en t dr aw n=%f A \ n ” ,I )
// calculat
ing
volt age
across
in duc ta nc e
Xl=2*%pi*50*.4 Vl=I*Xl mprintf ( ”Voltag
// calculat
ing
e across inductanc e=%f V \ n ” ,Vl) volt age across capa cita nce
Xc=Xl Vc=I*Xc mprintf ( ”Voltag
// calculat
e across ing Q −factor
Q_factor=Vl/V mprintf ( ”Q−factor
capacitance=
%f V \n ” ,Vc)
of t he circu it= %f” ,Q_factor)
79
Chapter 8 AC Parallel Circuit
Scilab code Exa 8.1 Example on Phasor Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction
// calculat ing curr ent of la g o r le ad
in e ac h br an c h and its
19 V=230 20 f=50
80
ang le
21 22 23 24 25 26 27 28 29 30 31 32 33
// fo r br anc h A Ra=10 // res ist anc e L=.04 // induc tance Xl=2*%pi*f*L // inductive reactan Za = sqrt (Ra^2+Xl^2) //impedance
ce
Ia=V/Za phi_a=atand(Xl/Ra)
// for
br an ch B
R=25 // res ist anc e Zb=R //impedance Ib=V/Zb phi_b=0 mprintf ( ”Cur re nt in br an ch A , Ia =%f A lagging
th e appl ied volt age by % f deg ree s \ nCu rre nt in bra nch B, Ib =%f A in ph as e wi th applied voltage \ n ” ,Ia, phi_a,Ib)
34 35 36 37 38
// calculat
ing
curr ent drawn by th e cir cui t
Ia=pol2rect(Ia,phi_a) Ib=pol2rect(Ib,0) I=Ia+Ib mprintf ( ”Tot al curren t drawn by th e ci rc ui t=%f A
\n ” ,
mag ( I ) )imag (I)/ real (I)) 39 phi=atand( 40 mprintf ( ”Ph as e angle of com bin ati on =%f degrees and po wer fac tor =%f laggi ng ” ,phi, cos (phi*%pi/180))
Scilab code Exa 8.2 Example on Phasor Method
1 2 function [r,theta]=rect2pol(A) 3 x = real ( A ) 4 y = imag ( A ) 5 r = sqrt (x^2+y^2) 6 theta=atand(y/x) 7 endfunction
81
8 function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) 9 10 y=r* sin (theta*%pi/180) z=x+y*%i 11 12 endfunction 13 function [r]=mag(A) 14 15 16 17 18 19 20 21 22
x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction
// solving
par t ( i )
Xa=2*%pi*50*.1 // inductive Za = sqrt (50^2+Xa^2) Ia=230/Za phi_a=atand(Xa/50) // angle
appl ied
reactanc
of lag
e of br an ch A
of Ia w. r . t .
volt age
23 Ia=pol2rect(Ia,-phi_a) 24 Xb=1/(2*%pi*50*100D-6)
// capacitive
rea ctan ce of
branch B 25 Zb = sqrt (45^2+Xb^2) 26 Ib=230/Zb 27 phi_b=atand(Xb/45) appl ied volt age // angle
of lead
of Ib w. r . t .
28 Ib=pol2rect(Ib,phi_b) 29 I=Ia+Ib 30 mprintf ( ”Curr en t drawn by the ci rc ui t=%f A \n ” , ma g(I )) 31 // calculat ing power factor 32 phi= atan ( imag (I)/ real (I)) //ph as e ang le of th e
circuit 33 pf = cos (phi) 34 mprintf ( ”P ower facto r of th e ci rc ui t=%f( leading ) \n ” , pf ) 35 // calculating power t ak e n by t he para llel circu it 36 P=230*mag(I)*pf 37 mprintf ( ”P ower tak en by the pa ra ll el ci rc ui t=%d W” , round (P)) 38 //T he ans we rs va ry fro m the text book due to ro un d
82
off
er ro r
Scilab code Exa 8.3 Example on Phasor Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction
// calcu lating
cu rr en t in coil
A
Xa=2*%pi*50*.02 // indu cti ve re ac tan ce of coil A Za = sqrt (12^2+Xa^2) Ia=200/Za phi_a=atand(Xa/12) // angle of lag of Ia w. r . t .
appl ied
volt age
24 mprintf ( ”Ia =%f A , laggin g th e appl ied volta ge by % f degrees \ n ” , Ia, ph i_ a) 25 // calcu lating cu rr en t in coil B 26 Xb=2*%pi*50*.03 // indu cti ve re ac tan ce of coil B 27 Zb = sqrt (6^2+Xb^2) 28 Ib=200/Zb 29 phi_b=atand(Xb/6)
// angl e of lag 83
of Ib w. r . t . applied
voltage 30 mprintf ( ”Ib =%f A, lagging th e applied voltage degrees \ n ” , Ib, ph i_ b) 31 // calcu lating tota l cu rr en t in t h e circuit 32 Ia=pol2rect(Ia,-phi_a) 33 Ib=pol2rect(Ib,-phi_b)
by % f
34 I=Ia+Ib 35 mprintf ( ”Tot al curren t drawn by ci rc ui t=%f A lagging th e appl ied volt age by % f deg ree s \ n” , ma g(I),atand( imag (I)/ real (I))) 36 // calculating total cu rr en t when addit ional circu it
is ad de d 37 38 39 40
Xc=1/(2*%pi*50*120D-6) // capaci tive reactan ce Zc = sqrt (15^2+Xc^2) Ic=200/Zc phi_c=atand(Xc/15) // angle of lag of Ic w. r . t .
41 42 43 44
Ic=pol2rect(Ic,phi_c) I=Ia+Ib+Ic phi=atand( imag (I)/ real (I)) mprintf ( ”F or th e new circu it , tota l current
appl ied
volt age
drawn=%f
volt age i by %f(phi*%pi/180)) de gr ee s , i . e ma g(I),-ph , cos . Apflaggin =%f( lag ggthine g appl )” , ied
Scilab code Exa 8.4 Example on Phasor Method
1 2 function [r,theta]=rect2pol(A) 3 x = real ( A ) 4 y = imag ( A ) 5 r = sqrt (x^2+y^2) 6 theta=atand(y/x) 7 endfunction 8 function [z]=pol2rect(r,theta) 9
x=r* cos (theta*%pi/180)
84
10 y=r* sin (theta*%pi/180) z=x+y*%i 11 12 endfunction 13 function [r]=mag(A) 14 x = real ( A ) y = imag ( A ) 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
r = sqrt (x^2+y^2) endfunction
// for
coil
A
Ia=5 // curren t take n Va=110 // voltage applied Pa=300 //po wer diss ipate d Ra=Pa/Ia^2 Za=Va/Ia Xa = sqrt (Za^2-Ra^2)
// for
coil
B
Ib=5 // curren t take n Vb=110 // voltage applied Pb=400 //po wer diss ipate d Rb=Pb/Ib^2 Zb=Vb/Ib
31 // Xbcalc = sqrt (Zb^2-Rb^2) 32 ulat ing current
drawn and power facto r when co il s co ne ct ed in seri es
33 34 35 36 37 38
R=Ra+Rb Xl=Xa+Xb Z = sqrt (R^2+Xl^2) //i m p e d a n c e of serie s circu it I=Va/Z pf=R/Z mprintf ( ”Cu rr e nt in th e ser ies cir cui t=%f A at lagging \ n ” , I,pf)
pf =%f
39 // calc ulat ing
current drawn and power facto r when co il s co ne ct ed in para llel
40 41 42 43 44
Ia=pol2rect(Ia,-acosd(Ra/Za)) Ib=pol2rect(Ib,-acosd(Rb/Zb)) I=Ia+Ib phi= atan ( imag (I)/ real (I)) mprintf ( ”To ta l cu rr en t drawn b y th e para llel
85
circu it
=%f A at pf =%f( la gg in g )” , ma g(I), cos (phi))
Scilab code Exa 8.5 Example on Admittance Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// solving // for coil
par t ( i ) 1
Z1=5+2*%pi*50*.03*j Y1=1/Z1 G1 = real (Y1) B1 = imag (Y1) mprintf ( ”F or coil
//impedance
1 , \ nCon duct ance= %f mho \ nSu spe cta nce= %f mho \ nAd mitt ance= %f mho \n ” , G1,-B 1
,mag(Y1)) 15 16 17 18 19 20
// for
coil
2
21 22 23 24 25 26
// so lv in g part ( i i ) Y=Y1+Y2 // tot al adm itt anc e
Z2=3+2*%pi*50*.04*j Y2=1/Z2 G2 = real (Y2) B2 = imag (Y2) mprintf ( ”F or coil
//impedance
2 , \ nCon duct ance= %f mho \ nSu spe cta nce= %f mho \ nAd mitt ance= %f mho \n ” , G2,-B 2
,mag(Y2))
I=200*Y phi= atan ( imag (I)/ real (I)) pf = cos (phi) mprintf ( ”Tot al curren t drawn by th e ci rc ui t=%f A at
pf of %f( laggi ng ) \ n ” ,mag(I),pf) 86
27 28 29 30 31 32
// cal cul at in g po wer P=200*mag(I)*pf mprintf ( ”P ower abso rbe d by the
ci rc ui t=%f W \n ” ,P )
// so lvi ng part ( iv ) Z=1/Y R = real ( Z )
33 Xl = imag ( Z ) 34 L=Xl/(2*%pi*50) 35 mprintf ( ”R=%f o hm, L=%f H of
si ng le co il wh ic h wi ll ta ke th e same current and power as ta ke n by th e srcinal circuit ” ,R,L) 36 // an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 8.6 Example on Symbolic Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// volt age V is ta ke n as reference ph as or Z1=5+10*j //imp ed an ce of induct ive br an ch Z2=10-15*j //im pe da nc e of capaci tive br an ch I=20 // tota l curren t V=I/mag(1/Z1+1/Z2) mprintf ( ”Applied
// calculating
volt age= %f V \ n ” ,V ) power factor of total cur re nt
I1=V/Z1 I2=V/Z2 I=I1+I2 phi= atan ( imag (I)/ real (I)) // ang le of lag
19 pf = cos (phi)
87
20 mprintf ( ”P ower factor of th e total cir cui t=%f( laggi ng ) \n ” ,pf) 21 // cal cul at in g po wer tak en by ea ch br an ch 22 R1=5 // resist ance of br an c h 1 23 P1=mag(I1)^2*R1 24 R2=10 // resis tance of b r an c h 2 25 P2=mag(I2)^2*R2 26 mprintf ( ”P ower take n by ind ucti ve bra nch =%f W \ nPower take n by ca pa ci ti ve bra nch =%f W” , P1,P2 ) 27 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 8.7 Example on Symbolic Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction
// for
coil
A
Va=10 // voltage applied Ia=2 // curren t take n pf=.8 // lagging power facto r Ia=pol2rect(Ia,-acosd(pf)) Za=Va/Ia //impedance
// for
coil
B
Vb=5 // voltage applied Ib=2 // curren t take n
21 pf=.7 // lagging
power facto r 88
22 Ib=pol2rect(2,-acosd(pf)) 23 Zb=Vb/Ib //impedance 24 // calculat ing volt age requi red
to pr od uc e a cur ren t
of 2 A w i t h A a nd B in series 25 I =2 26 Z=Za+Zb //i m p ed a n ce of
seri es
circu it
27 V=I*mag(Z) 28 mprintf ( ”Vo lt ag e req uir ed t o p r od u c e a cu rr en t of 2 A wit h A an d B in se ri es= %f V \ n” , V ) 29 // calculat ing volt age requi red to pr od uc e a cur ren t
of 2 A w i t h A a nd B in parallel 30 Z=Za*Zb/(Za+Zb) //i m p ed a n ce of para llel circu it 31 V=I*mag(Z) 32 mprintf ( ”Vo lt ag e req uir ed t o p r od u c e a cu rr en t of 2 A w it h A a nd B in par all el= %f V \n ” , V ) 33 //T he ans we rs va ry fro m the text book due to ro un d
off
er ro r
Scilab code Exa 8.8 Example on Symbolic Method
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// calc ulat ing val ue of unknown capacitanc V=110 // applied voltage R=30 // res is ta nc e of r e s i s t i v e ci rc ui t Ir=V/R //Ohm’ s Law I =5 // tot al current drawn
e
Xc=V/ sqrt (I^2-Ir^2) f=50 // frequenc y of supp ly C=1/(2*%pi*f*Xc) mprintf ( ” Capac itan ce= %f mic roF \n ” ,C*10^6)
// cal cul at in g unknown frequency I =4 // tot al current drawn f = sqrt (I^2-Ir^2)/(V*2*%pi*C) mprintf ( ”To dec re ase t he total
cur re nt t o 4 A , th e
fr equ en cy of th e su pp ly sh ou ld be adj ust ed to % f 89
Hz ” ,f ) 15 //T he ans we rs va ry fro m the off
text book
due to ro un d
er ro r
Scilab code Exa 8.9 Example on Symbolic Method
1 2 3 4 5 6 7 8 9 10
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i R1=12 // res ist ance of series circuit X1=2*%pi*50*.025 // ind uct ive re act anc e of t he seri es
circuit 11 Z1=R1+X1*j 12 pf1=R1/mag(Z1)
//p ower fac tor of t h e series circuit ( laggi ng ) 13 // th e im pe da nc es and power factor of th e par all el circuit ar e t o be s ame as t h a t of series circuit 14 //o n solving , we ge t , R ∗ Xl/ sq r t (Rˆ2+Xl ˆ2 )=mag( Z1) ; Xl /( sq r t (Rˆ2+Xlˆ 2) ) =pf1 15 16 17 18 19 20 21 22 23 24
R=mag(Z1)/pf1
// solving
for
Xl
Xl=pf1*R/ sqrt (1-pf1^2) L=Xl/(2*%pi*50) mprintf ( ” Res is ta nc e=%f ohm;
Ind ucta nce= %f H \n ” ,R,L) // calculat ing curr ent in e ac h cas e V=230 // applied voltage I1=V/mag(Z1) mprintf ( ”C ur r e nt in seri es I2=V/mag(Z1)
circu it= %f A \ n ” ,I1)
25 mprintf ( ”Cur re nt drawn by pa ra ll el
90
ci rc ui t=%f A” ,I2)
26 //T he ans we rs va ry fro m the
off
text book
due to ro un d
er ro r
Scilab code Exa 8.10 Example on Series Parallel Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// calculating i m p ed a n ce of overall circu it Za=2+0*j //imp ed an ce of bra nch A Zb=3+4*j //imp ed an ce of bra nch B Zab=Za*Zb/(Za+Zb) // equiva lent im pe da nc es of bran che s A and B
23 Zc=2-2*j 24 Z1=Zab*Zc/(Zab+Zc)
// equivalent im pe da nc e of pa ra ll el circuit 25 Zd=1+1*j //imp ed an ce of bra nch D 26 Z=Z1+Zd 27 [Z the ta]=rect2
pol(Z)
28 mprintf ( ”Tot al im pe da nc e of
91
over all
ci rc ui t=%f o hm
29 30 31 32
at ang le %f deg ree s \ n” , Z,the ta) // calculating cur re nt t ak e n by overall V=110 // vol tag e app lie d to t he overall I=V/Z mprintf ( ”Cu rr e nt ta ke n by th e overall ” , I)
circu it circu it cir cui t=%f A
\n
33 // Calc ulat ing 34 35 36 37 38 39 40 41 42 43 44 45 46
po we r con su me d in eac h bra nc h and to ta l po we r co ns um ed Id=I // cur rent in th e ser ies br an ch Rd=1 // resist ance of br an c h D Pd=I^2*Rd //po we r co ns um ed by bran ch D Ia=I*mag(Z1)/mag(Za) // current in br an ch A Ib=I*mag(Z1)/mag(Zb) // current in br an ch B Ic=I*mag(Z1)/mag(Zc) // current in br an ch C Ra=2 Pa=Ia^2*Ra Rb=3 Pb=Ib^2*Rb Rc=2 Pc=Ic^2*Rc P=Pa+Pb+Pc+Pd
47 mprintf ( ”Powe consume d by W, bran chowA=%f W,ume \ nPower \ nP consume d byr bran ch B=%f er cons d by
br an ch C=%f W, \nPo wer consume d by bran ch D=%f W, \ nTo tal power consume d=%f W” ,Pa,Pb,Pc,Pd,P) 48 //T he ans we rs va ry fro m the text book due to ro un d off er ro r
Scilab code Exa 8.11 Example on AC Network Theorems
1 2 function [r,theta]=rect2pol(A) 3 x = real ( A ) 4 y = imag ( A ) 5
r = sqrt (x^2+y^2)
92
6 theta=atand(y/x) 7 endfunction 8 function [r]=mag(A) x = real ( A ) 9 10 y = imag ( A ) r = sqrt (x^2+y^2) 11 12 13 14 15 16 17 18 19 20 21 22 23 24
endfunction j=%i
// using Max we ll ’ s mesh an al ys is // refe r F ig .8.14 in th e te xt bo ok // co ns id er in g me sh F DCEF, (18 +8 ∗ j ) ∗ I 1 −(10+8 ∗ j ) ∗ I2=24 // co ns i de r in g me sh A BCDA, (10+ 8 ∗ j ) ∗ I 1 −(14+10 ∗ j ) ∗ I2=0 a=[18+8 *j -( 10+ 8*j);10+ 8*j -(1 4+1 0*j)] b=[24;0] x = inv (a)*b I1=x(1,1) I2=x(2,1) [I2 the ta]=rect2p ol(I2) mprintf ( ”By Max we ll Me sh Analysis , curren t in br anc h
AB of t he circu it shown is %f A, lag ging t he appl ied volt age by % f deg ree s \ n” ,I 2, -th et a) 25 // thevenin s ,(b) the oreand m (c) 26 // usin re fe gr Fi g .8 .1 4(’ a) 27 Zth=8*(10+8*j)/(8+10+8*j)+(-4*j)
// the veni n ’ s impedance 28 // for calc ula ting th e equivalent Thevenin ’ s voltage Vth , I1 be th e cur ren t flow ing in th e br an c h C D 29 30 31 32 33
I1=24/(8+10+8*j) Vth=I1*(10+8*j) // equiva lent the ven in ’ s voltage I=Vth/((4+6*j+Zth)) [I the ta]=rect2 pol(I) mprintf ( ”By Th ev en in Theorem , curren t in the bra nc h
AB is %f A lagging
th e volt age by % f deg ree s
,-theta)
93
\ n” ,I
Scilab code Exa 8.12 Example on Resonance in Parallel Circuits
1 2 function [r]=mag(A) 3 x = real ( A ) y = imag ( A ) 4 5 6 7 8 9 10 11 12 13 14 15 16 17
r = sqrt (x^2+y^2) endfunction j=%i V=200
// calc ulat ing sup ply fre quen cy L=.1 // inductan ce of br an ch A //Xa=2 ∗%p i ∗ f ∗ . 1 Ra=10 // resis tance of b r an c h A C=150D-6 // capacitan ce of br an ch B //Xb=1/(2 ∗ %p i ∗ f ∗ 150D −6) Rb=0 // resist ance of br an c h B //Zb=−Xb∗ j // total cur ren t I=Ia +Ib , total curr ent is in ph as e wi th voltage −−> j component o f I =0 18 // on solvi ng for f , 19 mprintf f = sqrt ((V*2*%pi*L)*(1/(2*%pi*C))/V-Ra^2)/(2*%pi*L) 20 ( ”Fr e qu e nc y of th e su pp ly wh ich is also th e resonant freque ncy , f=%f Hz \ n ” , f ) 21 Xa=2*%pi*f*.1 22 Za=Ra+Xa*j 23 Ia=V/Za 24 Xb=1/(2*%pi*f*150D-6) 25 Zb=-Xb*j 26 Ib=V/Zb 27 I=Ia+Ib 28 mprintf ( ”Tot al curren t drawn by th e ci rc ui t=%f A ” , mag ( I ) ) 29 //T he ans we rs va ry fro m the text book due to ro un d
off
er ro r
94
Scilab code Exa 8.13 Example on Resonance in Parallel Circuits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// calc ulat ing br an ch currents Z1=15+12*j //im pe da nc e of br an ch 1 I1=200/Z1
17 18 19 20 21
phi1=atand(12/15) Z2=25-17*j //im pe da nc e of br an ch 2 I2=200/Z2 phi2=atand(17/25) mprintf ( ”I1 =%f A at angle of %f degree s \ nI2= %f A at ang le of %f degr ees \ n” ,mag(I1),phi1,mag(I2),phi2)
22 23 24 25
// calculating
total
cu rr en t
I=I1+I2 [I phi] =rect2po l(I) mprintf ( ”Tot al curren t drawn by th e ci rc ui t I=%f A,
angle of lag= %f degrees and po wer fac tor= %f lagging \ n ” ,I,-phi, cos (phi*%pi/180)) 26 / /p ower factor is to b e raised t o u n it y −a capa cit or h a s t o be co nn e ct ed in para llel 27 // at uni ty power factor , im agi na ry par t of I must be zero 95
28 29 30 31
Xc=-200/ imag (I1+I2) f=40 C=1/(2*%pi*f*Xc) mprintf ( ” If power fac tor
is t o be rai sed t o u n i t y capacit or of %f mi croF h as to be co nn ec te d in parallel t o gi v en circuit ” , C*1D+ 6)
96
−a
Chapter 9 Three Phase Systems
Scilab code Exa 9.1 Example on Three Phase Circuits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// considering Vl=400 // line
co i ls to be star volta ge
co nn ec te d
Vph=Vl/ sqrt (3) Rph=15 // resistance of lo ad Xl=2*%pi*50*.03 // induct ive rea ctan ce of e ac h coi l Zph=Rph+Xl*j Iph=Vph/mag(Zph) Il=Iph pf=Rph/mag(Zph) //p ow er fac tor P = sqrt (3)*Vl*Il*pf mprintf ( ”I n star co nn e ct ed circuit , \ nP ha se curren t=
%f A, \ nLine
cur ren t=%f A, \ nPo wer ab so rbe d=%f k W \ n
” , Ip h, Il,P/10 ^3 ) 97
20 21 22 23 24 25
// considering
co i ls to be delta
Vph=Vl Iph=Vph/mag(Zph) Il = sqrt (3)*Iph P = sqrt (3)*Vl*Il*pf mprintf ( ”In delta
co nn ec te d
, \ nP ha se curren t=
co nn ec te d circuit
%f A, \ nLine cur ren t=%f A, \ nPo wer ab so rbe d=%f k W \ n ” , Ip h, Il,P/10 ^3 ) 26 // an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 9.2 Example on Three Phase Circuits
1 2 3 4 5 6 7 8 9 10
// calculat ing ph as e cur ren t Vl=440 // line volta ge Vph=Vl Pout=200D+3 //output e=.91 // eff ici enc y Pin=Pout/e // in put pf=.86 //p ow er fac tor Iph=Pin/(3*Vph*pf) mprintf ( ” Curre nt dr aw n by each Iph)
line
mo to r phase =%f A \n ” ,
11 12 13 14
// calculating
cu rr en t
15 16 17 18
phi= acos (pf) Iact=Iph*pf Ireact=Iph* sin (phi) mprintf ( ” Active co mp on en t of phas e curren t=%f A \ nReactive co mp on en t of pha se curren t=%f A ” ,Iact,
Il = sqrt (3)*Iph mprintf ( ”Line curre nt= %f A \ n” , Il)
// calculat ing active ph ase current
and reactive
Ireact)
98
co m p o n en ts of
Scilab code Exa 9.3 Example on Three Phase Circuits
1 2 3 4 5 6 7 8 9 10 11
Vl=400 // line volta ge across alternator and motor Vph=Vl //as th e motor is delta co nn ec te d Pout=112D+3 //out pu t of mo tor e=.88 // eff ici enc y of motor Pin=Pout/e // input to mo to r pf=.86 phi= acos (pf) Il=Pin/( sqrt (3)*Vl*pf) Iph=Il/ sqrt (3) mprintf ( ”Curre nt in eac h mo to r ph as e , Ip h=%f A \ n” , Iph)
12 // alternator is star co nn ec te d 13 mprintf ( ”Cur re nt in ea ch alter nator ph as e=%f A \ n” , Il ) 14 // calculat ing active and reactive co m p o n en ts of
cur ren t in e ac h ph as e of motor 15 Iact=Iph*pf 16 Ireact=Iph* sin (phi) 17 mprintf ( ”Acti ve component of curren t in ea ch ph as e
of motor =%f A \ nRe acti ve com po nen t of current in each phase of mo to r=%f A \ n” , Ia ct,Ire ac t) 18 //ph as e angle be tw een th e ph as e voltage and ph as e cur ren t will be th e same for b o t h motor and alternator i f we neglect line i m p ed an ce 19 20 21 22
Iph=Il Iact=Iph*pf Ireact=Iph* sin (phi) mprintf ( ”Acti ve component of curren t in ea ch ph as e
of alter nator= %f A \ nRe acti ve com po nen t of current in e ac h ph as e of alternator= %f A \n ” , Ia ct, Irea ct )
99
23 //T he ans we rs va ry fro m the
off
text book
due to ro un d
er ro r
Scilab code Exa 9.4 Example on Three Phase Circuits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25
function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction
// calculating Vl=400 // line
cur re nt in e a c h line volta ge Vph=Vl/ sqrt (3) //pha se voltage Ir=8D+3/Vph Iy=6D+3/Vph Ib=4D+3/Vph mprintf ( ”Cur re nt in R −phase , I r=%f A \ nC ur re nt in Y − phas e , Iy= %f A \ nC ur re nt in B −phas e , Ib= %f A \n ” ,Ir, Iy,Ib)
//Loa ds on thr ee phases
are
Ir=pol2rect(Ir,0) Iy=pol2rect(Iy,-120) Ib=pol2rect(Ib,-240) In=Ir+Iy+Ib mprintf ( ”Curr en t in the
resistive
neutral= %f A ” , ma g(In))
100
Scilab code Exa 9.5 Example on Three Phase Circuits
1 2 Pout=30D+3 //output 3 e=.86 // eff ici enc y 4 Pin=Pout/e // in put 5 6 7 8 9 10
Vl=440 // line volta ge pf=.83 //p ow er fac tor Il=Pin/( sqrt (3)*Vl*pf) mprintf ( ”Line curre nt= %f A \ n” , Il) Iph=Il/ sqrt (3) //mo tor is delta con ne ct ed mprintf ( ”Phase cu rr en t=%f A” , Iph )
Scilab code Exa 9.6 Example on Three Phase Circuits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// calc ulat ing
20 Vl=440 // line
ph as e curr ents volta ge 101
− le t the sequ ence
be RYB
21 Vph=Vl // delta conn ect ed load 22 Zph1=150 //im pe da nc e of the ph ase
be tw ee n A an d B(
resistive ) 23 I1=Vph/Zph1 24 mprintf ( ” I1 =%f A at 0 degree s w. r . t . Vry \n ” , I1) 25 Zph2=30+50*j //imp ed an ce of the ph as e be tw ee n B and C 26 I2=Vph/mag(Zph2) 27 / /a s t h e lo ad is
voltage
in du ct iv e , cu rr en t will Vyb by phi 2
la g t h e
28 phi2=atand(50/30) 29 mprintf ( ”I2=%f A at −%f deg ree s w. r . t . Vyb \n ” , I2, phi2) 30 C=20D-6 31 f=50 32 Xc=-(1/(2*%pi*f*C))*j 33 I3=Vph/mag(Xc) 34 / /a s t h e lo ad is ca pa ci ti ve , cu rr en t will le ad t h e
voltage
Vbr by 90
degree s
35 mprintf ( ” I3 =%f A at 90 degree s w. r . t . Vbr 36 37 // calculating line cu rr en ts − 38 39 40 41 42 43 44 45 46 47 48
\ n” , I3)
Vry=pol2rect(440,0) Vyb=pol2rect(440,-120) Vbr=pol2rect(440,-240) I1=Vry/Zph1 I2=Vyb/Zph2 I3=Vbr/Xc
// us in g KCL Ir=I1-I3 Iy=I2-I1 Ib=I3-I2 mprintf ( ”Cur re nt in lin e R, Ir= %f A,
\ nCu rre nt in li ne Y, Iy =%f A , \nC ur re nt in li ne B, Ib =%f A , \ n ” , mag ( Ir ) , mag ( Iy ) , mag ( Ib ) )
102
Scilab code Exa 9.7 Example on Three Phase Circuits
1 2 Vl=1100 // line volt age 3 Vph=Vl/ sqrt (3) // star conn ect ed load 4 Il=80 // current th rou gh load 5 6 7 8 9 10 11 12 13 14
Iph=Il Zph=Vph/Iph P=100D+3 //pow er dr aw n by load pf=P/( sqrt (3)*Vl*Il) //p ow er fac tor Rph=Zph*pf Xc = sqrt (Zph^2-Rph^2) f=50 C=1/(2*%pi*f*Xc) mprintf ( ” Capacitance per phase =%f mi cr oF” , C*10 ^6 )
//A nswer va ry fro m the text book error
due to ro un d of f
Scilab code Exa 9.8 Example on Power Measurement
1 2 3 4 5
W1=15D+3 // reading of f i r s t wat tme ter W2=-1.5D+3 // reading of sec ond wa tt me te r W=W1+W2 // total power fed to th e lo ad mprintf ( ”Total po we r fed to the load =%f kW \n ” ,W /10^3) 6 phi=atand( sqrt (3)*(W1-W2)/W) 7 mprintf ( ”P ower fac tor ang le , phi =%f degrees \ nPower facto r of loa d=%f” , phi, cos (phi*%pi/180))
Scilab code Exa 9.9 Example on Power Measurement
1
103
2 3 4 5 6 7
W1=115D+3 W2=50D+3
// calc ulat ing
inp ut to motor
W=W1+W2 mprintf ( ”Po we r inpu t to the
// calculat
ing
mot or =%f kW \ n ” , W/10 00 )
power factor
8 phi=atand( sqrt (3)*(W1-W2)/(W1+W2)) 9 mprintf ( ”P ower fac tor ang le , phi =%f degrees \ nPower facto r of loa d=%f A \ n” , phi, cos (phi*%pi/180)) 10 // calculating line cu rr en t 11 Il=W/( sqrt (3)*440* cos (phi*%pi/180)) 12 mprintf ( ”Line curre nt dr aw n by the mo to r=%f A \n ” ,Il) 13 // calculating effic ienc y 14 Pout=150D+3 //out pu t of mo tor 15 e=Pout/W*100 16 mprintf ( ” Effi cien cy of th e inductio n motor=%f perc ent ” ,e )
Scilab code Exa 9.10 Example on Power Measurement
1 2 3 4 5 6 7 8
// calculat ing ph as e volt age Vl=440 // line volta ge Vph=Vl/ sqrt (3) // star co nn ec te d cir cui t mprintf ( ”Phas e vol tag e=%f V \ n ” , Vph) Iph=20 //ph as e current Zph=Vph/Iph //im pe da nc e of load per ph as e // calc ulat ing loa d pa ra me te rs −cur ren t in e ac h ph as e lags b e h i n d its vol tag e by 40 de gr ee s 9 // on sol vin g for R 10 R=Zph/ sqrt (1+( tan (40*%pi/180))^2) 11 X=R* tan (40*%pi/180) 12 mprintf ( ”L oad paramete rs are \nR=%f ohm\nX=%f ohm\n ” , R,X) 13 // calculat
ing
total
power 104
14 P=3*Vph*Iph* cos (40*%pi/180) 15 mprintf ( ” Tota l powe r con sume d=%f kW \n ” ,P*10^-3) 16 // ca lc ul at in g W1 an d W2 −−>W1+W2=P, W1−W2=P∗ tan ( ph i )/
sqr t (3) 17 a=[ 1 1; 1 -1] 18 b=[P;P* tan (40*%pi/180)/
sqrt (3)]
19 w = inv (a)*b 20 mprintf ( ”W1=%f kW,\ nW2=%f kW” , w(1,1 )/1 00 0, w(2, 1) /1000)
Scilab code Exa 9.11 Example on Power Measurement
1 2 3 4 5 6 7
Pout=37.3D+3 //pow er output e=.88 // eff ici enc y Pin=Pout/e // inpu t pow er pf=.82 //p ow er fac tor phi=acosd(pf)
// ca lc ul at in g W1 an d W2 −−>W1+W2=Pin , W1−W2=Pin ∗ tan ( phi )/ sq rt (3 )
a=[ 1 1; 1 -1] b=[Pin;Pin* tan (phi*%pi/180)/ sqrt (3)] w = inv (a)*b mprintf ( ”Read in gs of two wat tme ter s are : \ nW1=%f kW,\ nW2=%f kW\ n” , w(1,1)/1 000, w(2,1)/10 00) 12 Vl=440 // line volta ge 13 Il=Pin/( sqrt (3)*Vl*pf) 14 mprintf ( ” Full load li ne current =%f A ” , Il) 8 9 10 11
Scilab code Exa 9.12 Example on Power Measurement
1 2 // considering
star
co nn ec te d cir cui t 105
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Rph=20 // resist ance of coil Xph=15 // reac tanc e of coi l Vl=400 // line volta ge Vph=Vl/ sqrt (3) //pha se voltage Zph= sqrt (Rph^2+Xph^2) //imp ed an ce per Iph=Vph/Zph //ph as e current
phas e
Il=Iph // li ne curren t pf=Rph/Zph //p ow er fac tor phi=acosd(pf) Pin= sqrt (3)*Vl*Il*pf // inpu t pow er
// ca lc ul at in g W1 an d W2 −−>W1+W2=Pin , W1−W2=Pin ∗ tan ( phi )/ sq rt (3 ) a=[ 1 1; 1 -1] b=[Pin;Pin* tan (phi*%pi/180)/ sqrt (3)] w = inv (a)*b mprintf ( ”Re ad in gs of two wa tt me te rs in cas e of star conne ction are \nW1=%f W, \ nW2=%f W\n ” , w(1,1), w (2,1))
18 // considering delta co nn ec te d cir cui t 19 Iph=Vl/Zph //ph ase current 20 Il = sqrt (3)*Iph // lin e current 21 // Pin= sqrt // inpu t pow er 22 −−>W1+W2=Pin ca lc ul at(3)*Vl*Il*pf in g W1 an d W2 , W1−W2=Pin ∗ tan (
phi )/ sq rt (3 ) 23 24 25 26
a=[ 1 1; 1 -1] b=[Pin;Pin* tan (phi*%pi/180)/ sqrt (3)] w = inv (a)*b mprintf ( ”Re ad in gs of two wa tt me te rs in cas e of delta conn ecti on are \nW1=%f W, \ nW2=%f W” , w(1,1), w (2,1))
27 //T he ans we rs va ry fro m the
off
text book
er ro r
106
due to ro un d
Chapter 10 Measuring Instruments
Scilab code Exa 10.1 Example on Moving Coil Instruments
1 2 3 4 5 6 7 8 9 10 11 12 13
// calculating resistance of t he sh u n t i=20D-3 // current th rou ght th e co il r =4 // resist ance of coil V=i*r I =2 // tota l curren t to be me as ur ed Is=I-i // curren t thro ugh shu nt R=V/Is //Ohm’ s law mprintf ( ” Resis tance of the shun t=%f ohm \ n ” , R )
// sol ving part V=30 // voltage
( ii ) to be me as ur ed
R=V/i-r mprintf ( ” Res ista nce
to be co nn ec te d in ser ies mov ing c o i l=%d oh m” , R )
Scilab code Exa 10.2 Example on Moving Coil Instruments
1
107
w it h
2 3 4 5
i=20D-3 // current th rou ght th e co il r =4 // resist ance of coil V=30 // voltage to be me as ur ed R=(V-r*i)/i // resistance in seri es t o re ad up t o 30
V 6 // to re ad up to 60 V 7 V=60 8 R1=V/i-r 9 mprintf ( ” Add iti ona l resist 60 V=%d ohm \n ” , R1-R) 10 // to re ad up to 90 V 11 V=90 12 R2=V/i-r 13 mprintf ( ” Add iti ona l resist 90V=%d ohm” ,R2-R1)
ance
n e e de d to re ad u p to
ance
n e e de d to re ad u p to
Scilab code Exa 10.3 Example on Moving Coil Instruments
1 2 3 4 5 6 7 8 9 10 11 12
i=20D-3 // current r =4 // resist ance V=i*r
th rou ght th e co il of coil
//w hen tot al current to be me as ur ed =2 A Is=2-i //sh un t current R1=V/Is mprintf ( ” Resis tance R1 )
of shu nt fo r 2A range =%f o hm
\n ” ,
//w hen tot al current to be me as ur ed =4 A Is=4-i //sh un t current R2=V/Is mprintf ( ” Resis tance R2 )
of shu nt fo r 4A range =%f o hm
13 //w hen tot al current to be me as ur ed =6 A 14 Is=6-i //sh un t current 15 R3=V/Is
108
\n ” ,
16 mprintf ( ” Resis tance )
of shu nt fo r 6A range =%f o hm”
Scilab code Exa 10.4 Example on Moving Coil Instruments
1 2 3 4 5 6 7 8 9 10 11 12 13
// calculating deflecting to rq ue N=50 //n o . of tu rn s in coil B=.12 // fl ux den sit y in W b/mˆ2 A=5D-4 // ar ea of coi l in mˆ2 I=15D-3 // current th ro ug h co il Td=N*B*A*I mprintf ( ” De fl ec ti ng
torque= %fD −6 N−m\ n” ,Td*10^6) / / calculating deflection of poi nte r C=18D-7 // con sta nt for spri ng in N −m pe r deg ree Tc=Td // contro lling to rq ue theta=Tc/C mprintf ( ” De fl ec ti on= %d deg rees ” , th et a)
Scilab code Exa 10.5 Example on Moving Coil Instruments
1 2 3 4 5
N=80 //n o . of tu rn s in coil B=.5 // flux density A=15D-4 // ar ea of coil Tc=2D-4 // contro lling to rq ue at f u l l scale
deflection 6 7 8 9 10 11
Td=Tc //un d e r fin al st ea dy condi tion I=Td/(N*B*A) n=100 //n o . of divisions v =2 // voltage me as ur ed pe r divi sio n V=n*v // at f u l l scale defle ction R=V/I
109
, R3
12 mprintf ( ” Ser ies
re si st an ce= %f ohm” ,R )
Scilab code Exa 10.6 Example on Moving Coil Instruments
1 2 // calculat
ing resis tance of manganin sh un t to ex te nd r an ge t o 1 A 3 R=10 // resistance of in st ru me nt coil 4 I=10D-3 // current th ro ug h co il 5 6 7 8
V=I*R Is=1-I //sh un t current r=V/Is mprintf ( ” Resistance of man ga nin shu nt to ex te nd range to 1 A=%f ohm \ n” , r )
9 // calcu lating
va lu e of series resist ance t o e x t e n d t he r an ge t o 15 V 10 v=15-V // vo lt ag e ac ro ss series resist ance 11 Rs=v/I 12 mprintf ( ” Series
resist ance to be co nn ec te d to ex te nd ran ge to 15 V=%d o hm” , Rs)
110
Chapter 13 Temperature Rise and Ventilation in Electrical Machines
Scilab code Exa 13.1 Example on Heating and Cooling of Electrical Ma-
chines 1 2 //t emp . ris e at any ti me t is
the ta =theta f −(theta f 1 ) ∗ exp( − t/T) 3 theta_1=0 // i n i t i a l tem per atu re 4 // theta =25 degree C w hen t= 1 hr ; theta =3 7. 5 degree C wh en t= 2 hr 5 // on sol vin g for T −theta
6 7 8 9 10
T=1/ log (2) mprintf ( ”Heating
/ /o n sol vin g for
tim e constant= thet a f
%f hr \ n” , T )
theta_f=25/(1exp (-1/T)) mprintf ( ” Fina l ste ady f u l l loa d te mpe ra tur e ri se the ta f=%f degree C \ n” , th eta _f)
11 // Temp.
theta 2
f a l l at any tim e t is thet a ’= the ta f ’+( −thet a f ’) ∗ exp( − t/T’)
12 //A s th e transfo
rmer
is disconne 111
cted
now , theta f
’=0
13 14 15 16 17 18
theta_2=theta_f theta_dash=40-30 t=1.5 T=t/ log (theta_2/theta_dash) mprintf ( ”Cooling ti me constant =
%f hr” , T ) //T he ans we rs va ry fro m the text book due to ro un d off
er ro r
Scilab code Exa 13.2 Example on Heating and Cooling of Electrical Ma-
chines 1 2 // temp . ris e of th e motor at any t im e t is
−(theta f −theta 1 ) ∗ exp( − t/T) theta_f=50 // fin al st ea dy temp ris e T=100 // heat ing ti me cons tant in min t=20 // f u l l load wo rk in g period in min // dur ing cooling pro ces s , temp . decreases =theta ∗ exp( − t/T’) t=40 // stationar y period in min T=140 // cooling ti me cons tant in min // solving simu ltan eous equat ions
the ta =
theta f
3 4 5 6 7 8 9 10 11 12 13 14
to theta 1
a=[ 1 - exp (-20/100);- exp (-40/1 40) 1] b=[50-50* exp (-20/100);0] c = inv (a)*b theta=c(1,1) mprintf ( ”Maximum te mp at ta in ed= %f de gr ee C” , th et a)
112
Chapter 14 Single Phase Transformers
Scilab code Exa 14.1 Example on EMF Equation
1 2 3 4 5 6 7 8 9 10 11 12
// cal cul at in g Bm Ep=400 // induc ed emf in pri mar y wind ing Np=350 //n o . of tur ns in pr im ar y Ai=55D-4 // cro ss − sectional ar ea f=50 // frequenc y in Hz Bm=Ep/(4.44*f*Ai*Np) mprintf ( ”Maximum valu e of flux %f Te s l a (Wb/mˆ2 ) \n ” ,Bm)
// calc ulat ing
voltage
density
in th e core =
in du ce d in se con dar y wi nd in g
Ns=1050 Es=Ep*Ns/Np mprintf ( ”Voltag e ind uce d in the V” , round (Es))
seco ndary
Scilab code Exa 14.2 Example on EMF Equation
1
113
wi ndi ng =%d
2 3 4 5 6 7 8 9 10 11
// calculat ing no . of tur ns in se co nd ar y wi nd in g Es=500 //n o lo ad volt age of lo w volt age w in di ng phi=.06 // fl ux f=50 // frequenc y in Hz Ns = round (Es/(4.44*f*phi)) mprintf ( ”No. of turn s in low voltage Ns )
// calculat
ing
wi nd in g=%f
\n ” ,
no . of tur ns in pr im ar y wi nd in g
Np=Ns*6600/500 mprintf ( ”Np=%f( not
p os s i bl e ) \n ” ,Np) //H ere , the no . of turns f i n a l l y tak en is 50 0 and no t 50 2 12 mprintf ( ”No. of turns f i n a l l y tak en is 50 0 , bec ause t he hi gh vol tag e w in di n g will be spl it up int o a no . of co i ls ” )
Scilab code Exa 14.3 Example on Equivalent Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13
Rp=.8 Xp=3.2 Rs=.009 Xs=.03 Rs_dash=(2200/220)^2*Rs mprintf ( ”Equ iva le nt resist ance referred %f ohm \n ” ,Rp+Rs_dash) Xs_dash=(2200/220)^2*Xs mprintf ( ”Equiva len t reactan ce refe rred ohm\ n” ,Xp+Xs_dash) Rp_dash=(220/2200)^2*Rp mprintf ( ”Eq ui va le nt resistance referred =%f ohm \ n ” ,Rp_dash+Rs) Xp_dash=(220/2200)^2*Xp mprintf ( ”Equ iva le nt rea ctan ce referred
%f ohm” ,Xp_dash+Xs) 114
to pr im ar y=
to pr im ar y=%f
to se co nd ar y
to se co nd ar y=
Scilab code Exa 14.4 Example on Equivalent Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// calculat ing curr ent in pr im ar y Is=10 // at 0.8 pf lagging Ip_dash=Is*400/200 // at 0.8 pf laggin g Ip_dash=pol2rect( Ip_d ash ,-acosd(.8)) Im=200/300 // magnetizing curren t Iw=200/600 // active component of no loa d curren t I0=Iw-Im*j //n o loa d curren t Ip=Ip_dash+I0 [Ip the ta]=rect2p ol(Ip) mprintf ( ”Cu rr e nt in pr im ar y is %f A, lagging at an ang le of %f degr ees \ n” ,Ip,-theta)
29 // calculat ing ter mina l volta ge 30 Ip=pol2rect(Ip,-theta) 31 Ep=Ip_dash*(.15+.37*j)
115
32 33 34 35
Es_dash=200-Ep [Es_da sh the ta]=rect2p ol(Es_das h) Es=Es_dash*400/200 mprintf ( ”Se co nd ar y termin al voltage =%f V , lagging an ang le of %f degr ees ” ,Es,-theta)
at
Scilab code Exa 14.5 Example on Regulation and Efficiency
1 2 // calculat
ing volt age regulation at f u l l lo ad w it h 0. 8 pf la ggi ng 3 Ip=2000/400 //pr im ar y current at f u l l load 4 5 6 7 8 9
Rp=3 Xp=4 phi= acos (.8) Vp=400 VR=Ip*(Rp* cos (phi)+Xp* sin (phi))/Vp*100 mprintf ( ”Vol ta ge regulation at f u l l lo ad w it h 0.8 lag gin g=%f percent \ n” ,VR)
10 // calculat
ing volt age 0. 8 pf le ad in g
regulation
pf
at f u l l lo ad w it h
11 VR=Ip*(Rp* cos (phi)-Xp* sin (phi))/Vp*100 12 mprintf ( ”Vol ta ge regulation at f u l l lo ad w it h 0.8 lead ing= %f percent \ n” ,VR) 13 // calcu lating reg ula tio n a t half l oa d w i t h 0. 8 p f
pf
lagging 14 Ip=Ip/2 // half loa d pr im ar y curren t 15 VR=Ip*(Rp* cos (phi)+Xp* sin (phi))/Vp*100 16 mprintf ( ”Vo lt ag e regul ation at half lo ad wi t h 0.8 la gg in g=%f perce nt ” ,VR)
Scilab code Exa 14.6
Example on Regulation and Efficiency 116
pf
1 2 3 4 5
// I s ∗ Rs=.02 ∗ Vs , I s ∗ Xs=.05 ∗ Vs // calcu lating reg ula tio n a t .8 pf la ggi ng VR=(.02*.8+.05*.6)*100 mprintf ( ”Vol ta ge regulation percent \ n ” ,VR)
at .8 pf lagging
=%f
6 // calcu lating reg ula tio n a t .8 pf le ad in g 7 VR=(.02*.8-.05*.6)*100 8 mprintf ( ”Vol ta ge regulation at 0.8 pf leadi ng =%f perc ent ” ,VR)
Scilab code Exa 14.7 Example on Regulation and Efiiciency
1 2 3 4 5 6 7 8 9 10 11 12
// co pp er lo ss es at f u l l loa d effic ienc y at f u l l l oa d , un it y pf Pout=50*1000*1 //output
Wcu_fl=425
// calculating
e=Pout/(Pout+350+425)*100 mprintf ( ” Eff ici enc y at percent \ n ” ,e )
// calcu lating
efficiency
f u l l lo ad , unity a t half
pf =%f
l o a d , un it y p f
Pout=Pout/2 //output Wi=350 // iron los ses Wcu=Wcu_fl/2^2 // co pp er lo ss es e=Pout/(Pout+Wi+Wcu)*100 mprintf ( ” Efficienc y at half l oa d , uni ty pf =%f percent \ n ” ,e )
13 // calculating
effic ienc y at f u l l l oa d , 0.8
pf
lagging 14 Pout=(50D+3)*.8 //output 15 e=Pout/(Pout+Wi+Wcu_fl)*100 16 mprintf ( ” Effi cien cy at f u l l lo ad , .8 pf lagging percent \ n ” ,e ) 17 // cal cul at in g maximum ef fi ci en cy 18 Wcu=Wi // co pp er lo ss es
117
=%f
// load at wh ic h maximum ef fi ci en cy occurs 20 mprintf ( ”A t %f percent of the f u l l loa d , maximum efficiency will o c c u r \n ” ,x*100) 19 x = sqrt (Wcu/Wcu_fl)
21 Pout=(x*50D+3*1) 22 e_max=Pout/(Pout+2*Wi)*100 23 mprintf ( ”Maximum e f f i c i e n c y=%f perce nt \ nL oa d at maximum e f f i c i e n c y=%f k VA” ,e_max,Pout/1000)
Scilab code Exa 14.8 Example on Regulation and Efficiency
1 2 3 4 5 6 7 8 9 10
Wi=1100 // iron los ses Wcu=400 // co pp er lo ss es at 50% load Is=100*1000/10000 // secondary f u l l load
curren t // calculating effic ienc y at 25% l o a d , un it y pf Is1=Is/4 // secondary curren t Wcu1=(25/50)^2*400 // co pp er lo ss es Pout=.25*100*1000 //output e=Pout/(Pout+Wcu1+Wi)*100 mprintf ( ” Effi cien cy at 25 perc ent percent \ n ” ,e )
lo ad , uni ty pf =%f
11 // calculating effic ienc y at 25% l o a d , 0.8 pf 12 e=(Pout*.8)/(Pout*.8+Wcu1+Wi)*100 13 mprintf ( ” Efficienc y at 25 per ce nt lo ad , .8 pf =%f percent \ n ” ,e ) 14 // calculat ing eff ici enc y at 50% lo ad , un it y pf 15 Pout=.5*100*1000 //output 16 e=Pout/(Pout+Wi+Wcu)*100 17 mprintf ( ” Effi cien cy at 50 perc ent lo ad , uni ty pf =%f percent \ n ” ,e ) 18 // calculating effic ienc y at 50% l o a d , 0.8 pf 19 e=Pout*.8/(Pout*.8+Wi+Wcu)*100 20 mprintf ( ” Efficienc y at 50 per ce nt lo ad , 0.8 pf =%f
percent
\ n ” ,e ) 118
21 22 23 24 25
// calculating
effic ienc y at f u l l l oa d , un it y pf
Pout=100*1000 //output Wcu3=(10/5)^2*400 // co pp er lo ss es e=Pout/(Pout+Wcu3+Wi)*100 mprintf ( ” Eff ici enc y at f u l l lo ad , unity percent \ n ” ,e )
pf =%f
26 // calculating effic ienc y at f u l l l oa d , .8 pf 27 e=(Pout*.8)/(Pout*.8+Wcu3+Wi)*100 28 mprintf ( ” Effi cien cy at f u l l lo ad , 0.8 pf =%f perc ent n ” ,e ) 29 // calculating lo ad for m ax effi cien cy at un it y pf 30 x = sqrt (Wi/Wcu3) 31 mprintf ( ”L oad fo r max ef fi ci en cy= %f kVA \ nLoad fo r
max effic ienc y will r e m a i n t he s ame irrespe ctive of power facto r ” ,x*Pout/1000) 32 // error in t he te xt bo ok a n s we r for effi cien cy a t 50 % l o a d a t un i t y p f a s we ll a s a t .8 p f
Scilab code Exa 14.9 Example on Regulation and Efficiency
1 2 3 4 5
e=.9 // eff ici enc y at f u l l lo ad Pout=500 //out put at f u l l load
//we get , .9= 500 /(50 0+W i+Wcu) // efficiency a t half lo ad is als o t h e same − − > .9=(500/2)/(500/2+Wi+Wcu/4) 6 // sol ving for Wi and Wcu at f u l l load 7 8 9 10 11 12 13
a=[.9 .9 ;. 9 .2 25 ] b=[50;25] z = inv (a)*b Wi=z(1,1) Wcu=z(2,1)
// calculating Pout=.75*500
14 Wcu1=.75^2*Wcu
effic ienc y at 75% lo ad //output // co pp er lo ss es 119
\
15 e=Pout/(Pout+Wi+Wcu1)*100 16 mprintf ( ” Eff ici enc y at 75 percent perc ent ” ,e )
f u l l load =%f
Scilab code Exa 14.10 Example on Regulation and Efficiency
1 2 e_max=.98 //m ax ef fi ci en cy 3 Pout=.75*500*1000 //out pu t of transfo
rmer
at m ax
efficiency Wi=Pout*(1-e_max)/(2*e_max) Wcu1=Wi // co pp er lo ss es at 3/ 4 f u l l loa d Wcu=Wcu1/(.75)^2 // co pp er lo ss es at f u l l loa d Is=500*1000/500 // secondary curren t Vs=500 // seco ndary voltage VR=(Wcu/(Vs*Is)*.8+ sqrt (.1^2-(Wcu/(Vs*Is))^2)*.6) *100 10 mprintf ( ”Regula tion at f u l l lo ad , 0.8 pf lagging =%f perc ent ” ,VR) 4 5 6 7 8 9
Scilab code Exa 14.11 Example on Regulation and Efficiency
1 2 e1=.985 // effic 3 //.985=100D+3
ienc y at f u l l l oa d , .8 pf lag gin g ∗ .8/(100D+3 ∗.8+Wi+Wcu) −− >.985 ∗Wi+.985 ∗
Wcu=1200 4 e2=.99 // effi cien cy at half l o a d , un it y pf 5 // .9 9 =( (1 0 0D+3) /2 ) / ( (1 0 0D+3)/2 +Wi+Wcu/ 4) −− >.99∗Wi 6 7 8 9
+.2475 ∗Wcu=500 // so lvi ng fo r Wi an d Wcu a=[.98 5 .985 ;.99 b=[1200;500] w = inv (a)*b
.24 75]
120
10 Wi=w(1,1) 11 Wcu=w(2,1) 12 mprintf ( ”Iron lo ss es= %f W \ nF ul l lo ad co pp er los ses= %f W” ,Wi,Wcu)
Scilab code Exa 14.12 Example on Regulation and Efficiency
1 2 // calculat
ing
regulation
at f u l l lo ad , 0.8
pf
lagging 3 4 5 6 7 8 9 10 11 12 13
Pout1=.75*500D+3 //ou tp ut Wi=375D+3*(1-.97)/(2*.97) Wcu1=Wi // co pp er lo ss es at Wcu=(4/3)^2*Wcu1 // co pp er Is=500D+3/220 Rs=Wcu/Is^2 Vs=220 // seco ndary voltage Zs=220*.1/Is Xs = sqrt (Zs^2-Rs^2) VR=(Is*Rs*.8+Is*Xs*.6)/Vs*100 mprintf ( ”Reg ula ti on at .8 VR )
14 // calculat
ing
regulation
at m ax eff ici enc y 3/ 4th f u l l loa d lo ss es at f u l l loa d
pf lagging
=%f per ce nt
at f u l l lo ad , 0.8
\n ” ,
pf
leading 15 VR=(Is*Rs*.8-Is*Xs*.6)/Vs*100 16 mprintf ( ”Reg ula ti on at .8 pf leadin VR )
g=%f per ce nt
Scilab code Exa 14.13 Example on Regulation and Efficiency
1 2 e_max=.98
// max eff ici enc y of tran sfo rme r 121
\n ” ,
3 P=15D+3 // lo ad at whi ch max eff ici enc y occ urs
at
uni ty pf 4 5 6 7 8 9 10 11 12 13 14 15
Wi=P*(1-e_max)/(2*e_max) Wcu=Wi
// in the
f i r s t in ter va l // loa d on th e transf ormer
P1=3D+3/0.6
Wcu1=Wcu*(P1/P)^2
// in th e se co nd interva l P2=10D+3/0.8 // loa d on th e transf ormer Wcu2=Wcu*(P2/P)^2
// in th e thi rd interval P3=18D+3/0.9 // loa d on th e transf ormer Wcu3=Wcu*(P3/P)^2
// lo ad on th e tra nsfo rme r du ri ng last interva l=0 co pp er los ses =0, iron los ses= 0 16 Wi=Wi*24 // total ir on losses 17 Wcu=10*Wcu1+5*Wcu2+5*Wcu3 // total co pp er los ses 18 Pout=(3*10+10*5+18*5)*10^3 // tot al out put 19 e=Pout/(Pout+Wi+Wcu)*100 20 mprintf ( ” All day ef fi ci en cy= %f perc ent ”
−−>
,e )
Scilab code Exa 14.14 Example on Testing of Transformer
1 2 3 4 5 6 7 8 9 10
// for
no lo ad test
V0=400 // applied voltage I0=1 // cur ren t W0=60 //power con sume d Iw=W0/V0 R0=V0/Iw Im = sqrt (I0^2-Iw^2) Xm=V0/Im mprintf ( ”No load paramete n ” ,R0,Xm)
11 // for
sh or t circuit
rs : \ nR0=%f ohm , \ nXm=%f ohm\
test 122
12 13 14 15 16 17
Vsc=15 // applied voltage Isc=12.5 // cur ren t Wsc=50 //power cons ume d Zp=Vsc/Isc Rp=Wsc/Isc^2 Xp = sqrt (Zp^2-Rp^2)
18 mprintf ( ”Equ iva le nt resist
refe rred
) 19 // calculat
ance and reac tanc e to pr im ar y is %f o hm an d %f o hm \n ” ,Rp,Xp
ing
regulation
at f u l l lo ad , 0.8
pf
lagging 20 21 22 23 24 25 26 27
Vp=400 Ip=5D+3/400 VR=Ip*(Rp*.8+Xp*.6)/Vp*100 mprintf ( ”Voltag e regu lat ion= %f percent
// calculat
ing
iron
\n ” ,VR)
and co pp er los ses
Wi=W0 Wcu=Wsc mprintf ( ”Iron
lo ss es= %f W \ nC op per lo ss es at f u l l lo ad= %f W \ n” ,Wi,Wcu) 28 // calculating effic ienc y at f u l l lo ad and 0. 8 pf lagging 29 e=5D+3*.8/(5D+3*.8+Wi+Wcu)*100 30 mprintf ( ” Efficienc y at f u l l lo ad and .8 pf laggin %f percent ” ,e )
Scilab code Exa 14.15 Example on Testing of Transformer
1 2 W0=1300 //po we r con sum ed in no load tes t 3 Wsc=2400 //p ower consumed in shor t cir cui t test
pe rf or me d at f u l l loa d curren t 4 Wi=W0 5 Wcu=Wsc 6 Pout=(8*200*.8+10*.5*200*1)*10^3
123
// tot al out put
g=
7 8 9 10
Wit=1300*24 // total ir on losses Wcut=2400*8+2400/4*10 // total co pp er los ses e=Pout/(Pout+Wit+Wcut)*100 mprintf ( ” All day ef fi ci en cy= %f perc ent ” ,e )
Scilab code Exa 14.16 Example on Testing of Transformer
1 2 Woc=60 //p ow er cons umed in O C tes t at 22 0 V 3 // iro n losses in tr ans fo rm er ar e prop ort iona l t o
sq ua re of app lie d vol tag e // iro n losses a t n o r ma l vol tag e of 200 V Is=5D+3/400 // f u l l load current on HV side // for SC test Isc=10 // cur ren t Wsc=120 //power con sume d Wcu=(Is/Isc)^2*Wsc // f u l l loa d co pp er lo ss es
4 Wi=60*(200/220)^2
5 6 7 8 9 10 e=(5D+3*.8)/(5D+3*.8+Wi+Wcu)*100 11 mprintf ( ” Eff ici enc y at
f u l l load =%f percent ”
Scilab code Exa 14.17 Example on Parallel Operation
1 2 function [r,theta]=rect2pol(A) 3 x = real ( A ) 4 y = imag ( A ) 5 r = sqrt (x^2+y^2) 6 theta=atand(y/x) 7 endfunction 8 function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) 9 10 y=r* sin (theta*%pi/180)
124
,e )
11 z=x+y*%i 12 endfunction 13 14 j=%i 15 I=pol2rect(300,-acosd(.8))
// total lo ad to be sh ar ed by tra nsf orm er s A a nd B at .8 pf lag gin g
16 17 18 19 20 21 22 23 24 25 26 27
Za=.011+.042*j Zb=.044+.072*j
// calculat
ing
//imp ed an ce of transformer A //imp ed an ce of transformer B lo ad sh ar ed by tran sfo rme r A
Ia=Zb*I/(Za+Zb) [Ia the ta]=rect2p ol(Ia) mprintf ( ”L oad shar ed by transformer A=%f A, by an ang le of %f deg ree s \ n ” ,Ia,-theta)
// calculat
ing
laggi ng
lo ad sh ar ed by tran sfo rme r B
Ib=Za*I/(Za+Zb) [Ib the ta]=rect2p ol(Ib) mprintf ( ”L oad shar ed by transformer B=%f A , laggi ng by an ang le of %f deg ree s ” ,Ib,-theta)
28 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 14.18 Example on Parallel Operation
1 2 3 4 5 6 7 8 9
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i Zl=8+6.2*j
10 // for
// loa d impedan ce
transf ormer A 125
11 Ea=6600 // secondary induc ed emf 12 Za=.3+3.2*j // equivalent im pe da nc e refe rred
to
secondary 13 // for transf ormer B 14 Eb=6400 // secondary induc ed emf 15 Zb=.2+1.2*j // equivalent im pe da nc e refe rred
to
secondary
16 Ia=(Ea*Zb+(Ea-Eb)*Zl)/(Za*Zb+(Za+Zb)*Zl) 17 Ib=(Eb*Za-(Ea-Eb)*Zl)/(Za*Zb+(Za+Zb)*Zl) 18 mprintf ( ”Cu rr e nt delivered by tra nsf orme r A is %f A \ nC ur re nt deliver ed by transfo rmer B is %f A” ,mag( Ia),mag(Ib))
126
Chapter 15 Three Phase Transformers
Scilab code Exa 15.1 Example on three phase transformer
1 2 3 4 5 6 7 8 9
10 11 12 13 14
P=50D+3 //p ow er per pha se Power_rating=3*P Vpp=2300 //pr im ar y phas e voltage Vsp=230 // seco ndar y ph as e voltage Vpl= sqrt (3)*Vpp //pri ma ry no rm al lin e voltage Vsl=Vsp // se con dar y no rma l li ne voltage mprintf ( ”Ra ti ng of 3 − ph as e tra nsf orm er will be −\n3− pha se , %d k VA, %d/%d V, st ar / de lt a conn ecti on \n ” , Power_rating/1D+3, round (Vpl), round (Vsl)) Ipp=P/Vpp Ipl=Ipp Isp=P/Vsp Isl= sqrt (3)*Isp mprintf ( ”Pri ma ry phas e curren t=%f A \ nP ri ma ry li ne
current=%f A \ nSe con dar y pha se curren t=%f A \ nS ec on da ry li ne current =%f A \n ” ,Ipp,Ipl,Isp,Isl) 15 // calculating vol tag e regul ation 16 Rp_dash=1.2 // equ iva len t resistance referred to primary 127
// equiv alent
17 Xp_dash=1.6
reac tanc e referred
to
primary 18 VR=Ipp*(Rp_dash*.8+Xp_dash*.6)*100/Vpp 19 mprintf ( ”Voltage Regulation= %f percent ” , VR)
Scilab code Exa 15.2 Example on three phase transformer
1 2 3 4 5 6 7 8
// calculat
ing
no . of tur ns pe r ph as e
Vsp=440/ sqrt (3) // seco ndar y ph ase voltage Et=8 //e mf per tur n in volt Ts = round (Vsp/Et) Vpp=1100 //pr im ar y phas e voltage Tp=Ts*Vpp/Vsp mprintf ( ”No. of turn s pe r ph as e on pr im ar y wi nd in g=
%d\nNo. of turn s pe r ph as e on sec ond ary wi nd in g= %d\ n ” , Tp, Ts) 9 // calculat ing ne t cro ss −section al ar ea of co re 10 f=50 // frequ ency 11 Bm=1.3 // flux density 12 Ai=Et/(4.44*f*Bm) 13 mprintf ( ”N et cross −se ct io na l area ˆ2 ” , round (Ai*1D+4))
of cor e , Ai=%d cm
Scilab code Exa 15.3 Example on three phase transformer
1 2 // calculat
ing curre nts in th e main and teaser transformer 3 P2=600D+3 //output 4 V2=110 // applied voltage 5 pf=.707 // lagging power facto r 6 I2=P2/(pf*V2)
128
7 I1t=1.15*I2*110/6600 8 I1m=I2*110/6600 9 mprintf ( ”Curren ts in pr im ar y wi ndi ng of main and
\
tease r tr ans fo rm er is %f A a nd %f A respectively n ” , I1 m,I1t) 10 // calculating line cur ren ts 11 12 13 14
Ic=I1t Ib = sqrt (I1m^2+(I1t/2)^2) Ia=Ib mprintf ( ”Lin e currents Ib,Ic)
are %f A , %f A a nd %f A ”
, Ia,
Scilab code Exa 15.4 Example on three phase transformer
1 2 3 4 5 6 7 8 9 10
function [r, the ta]=rect2p ol(x,y) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction Q=750 // total lo ad to be sh ar ed pf=.8 // lagging power facto r theta=-acosd(.8) Q=rect2pol(Q* cos (theta),Q* sin (theta)) Zb=rect2pol(.35,3.3) // per pha se im pe dan ce of
transformer B 11 Za=rect2pol(.2,1.8)
// per pha se im pe da nc e of
transformer A 12 Qa=Zb*Q/(Za+Zb) 13 Qb=Za*Q/(Za+Zb) 14 mprintf ( ”Tra ns fo rm er A of
50 0 k VA rating shares a load of %f k VA wh er eas transformer B of 25 0 k VA rating shar es a lo ad of %f kVA” , Qa,Qb )
129
Chapter 16 Electromechanical Energy Conversion
Scilab code Exa 16.2
Example on Electromechanical Energy Conversion
Devices 1 2 3 4 5 6 7 8 9 10 11
i =3 // cur ren t in coi l x=5D-2 // len gth of air gap lambda= sqrt (i/(121*x^2))
// cal cul at in g f i e l d ene rgy W f W_f= integrate ( ”121 ∗ lambda ˆ2 ∗ .05ˆ2” , ”lambda” , 0 , lambda) mprintf ( ” Field
energy stor ed= %f wa tt −s e c \n ” , W_f ) coe ner gy W_f_dash= integrate ( ” i ˆ.5/ (11 ∗ .0 5) ” , ” i ” ,0, i) mprintf ( ”Co−ener gy= %f wat t −s e c \n ” , W_ f_d as h) // calc ulat ing me ch ani cal force on moving pa rt − keeping la mb da constant // calc ulat ing
12 function y=f(x) y=121*x^2*lambda^3/3 13 14 endfunction 15 F_f=-1* derivative (f,x) 16 mprintf ( ”Mech ani cal
for ce deve loped 130
F f =%d N −m” ,
round (F_f))
Scilab code Exa 16.3
Example on Electromechanical Energy Conversion
Devices 1 2 3 4 5 6 7 8 9 10 11 12
mu_not=4D-7*%pi i=120/6 // cur re nt flo wi ng in coil N=300 //n o . of turn s x=.005 // len gth of air gap Ag=36D-4 // cro ss − sectional ar ea at g ap
// calc ulat ing
stored
f i e l d en er gy
W_f=mu_not*N^2*Ag*i^2/(4*x) mprintf ( ” Stor ed f i e l d energy= %f wa tt
// calc ulat ing
me ch ani cal
F_f=mu_not*N^2*i^2*Ag/(4*x^2) mprintf ( ”Mech ani cal for ce
force
−s e c \n ” , W_f ) dev elo ped
deve loped =%f N −m” , F_f )
131
Chapter 17 Fundamentals of DC Machines
Scilab code Exa 17.1 Example on DC Winding
1 2 3 4 5 6 7 8 9 10 11 12
P =6 //n o . of poles a = P //n o . of parallel circuits n=150 //n o . of slots c =8 //n o . of co nd uc tor s pe r slot Z=n*c // tota l no . of con duct ors T=Z/2 //n o . of tur ns Lmt=250D-2 // mean length of on e tur n S=10*2.5*1D-6 // cross sectional ar ea rho=2.1D-8 // r e s i s t i v i t y at 80 de gr ee C R=(rho*Lmt*T)/(a^2*S) mprintf ( ” Re si st an ce= %f ohm \ n” ,R )
Scilab code Exa 17.2 Example on DC Winding
1 2 P =4 //n o . of poles 3 n=24 //n o . of
slots 132
4 5 6 7 8 9
c =2 // con duct ors pe r slo t Z=n*c // tota l no . of con duct ors p=Z/4 // pole pitch Ybp=p+1 //bac k pitch Yfp=p-1 // front pitch Y=Ybp-Yfp
10 mprintf ( ” Resultant
pitch= %f” ,Y )
Scilab code Exa 17.3 Example on EMF Equation
1 2 3 4 5 6 7 8
P =6 //n o . of poles A = P //n o . of paral lel pa t hs phi=.018 // flux pe r pole N=600 // sp ee d of rotation in rpm Z=840 // tota l no . of con duct ors Eg=P*phi*N*Z/(60*A) mprintf ( ”E mf gen era ted= %f V \ n ” ,Eg)
Scilab code Exa 17.4 Example on EMF Equation
1 2 3 4 5 6 7 8
P =6 //n o . of poles A =2 //n o . of paral lel pa t hs Z=300 //n o . of conduct ors on ar ma tu re N=1000 // sp ee d of rotation in rpm Eg=400 //e mf gene rate d on open ci rc ui t phi=60*Eg*A/(P*N*Z) mprintf ( ”Flux per pole= %f Wb \n ” , ph i)
133
Scilab code Exa 17.5 Example on EMF Equation
1 2 Eg=400 //e mf generated 3 n=80 //n o . of slo ts on ar ma tu r e 4 c=10 // cond uct ors pe r sl ot 5 6 7 8 9 10
Z=n*c // tota l no . of con duct ors on ar ma tu re N=1000 // speed in rpm phi=60*Eg/(N*Z) Eg=220 // desired va lu e of gen er ate d volta ge N=60*Eg/(phi*Z) mprintf ( ”Sp ee d of rota tion to generate 22 0 V=%f r pm n ” , round (N))
Scilab code Exa 17.6 Example on EMF Equation
1 2 3 4 5 6 7 8 9 10 11 12
n=60 //n o . of slo ts on ar ma tu r e c =6 // con duct ors pe r slo t Z=n*c // tota l no . of con duct ors A =2 //n o . of par all el pa th s in ar ma tu r e w in di ng N=750 // sp ee d of rotation P =4 //n o . of poles Eg=230 //e mf gene rate d on open ci rc ui t phi=60*Eg*A/(P*N*Z) mprintf ( ” Useful fux per pole= %f Wb \ n ” ,phi) Eg=115 //e mf to be gen er ate d at no lo ad A=P*N*Z*phi/(60*Eg) // requ ired no . of par all el pa th s
in arm atu re win ding ma ch in e ha s equal number of poles and par all el pa th s in ar ma t ur e w i n d in g , th e ar ma tu r e will be la p co nn ec te d to gen era te 1 15 V at th e same sp ee d” )
13 mprintf ( ”A s the
134
\
Scilab code Exa 17.7 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// calculat
ing
ter mina l volta ge
P=10D+3 // load supplied Vl=220 // volta ge at lo ad term inals Il=P/Vl R=.1 // resistance of feeder s Vd=Il*R // voltage dr op on feeder s V=Vd+Vl mprintf ( ”Te rm in al voltage across terminals=%f V \ n” ,V )
th e ar ma tu re
// Calculat ing sh un t f i e l d current Rsh=100 //sh un t resist ance Ish=V/Rsh mprintf ( ”Shunt
f i e l d cu rre nt= %f A \n ” ,Ish) // Calculat ing generat ed emf Ra=.05 // res ist anc e of ar ma tu re
16 Eg=V+Il*Ra 17 mprintf ( ” Generate d em f Eg=%f V ” ,Eg)
Scilab code Exa 17.8 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9
// calculat ing total ar ma tu r e cur ren t V=200 // termin al voltage across ar ma tu re Rsh=80 //sh un t f i e l d res is ta nc e Ish=V/Rsh //shun t f i e l d curren t Il=100 // load current Ia=Il+Ish mprintf ( ”Arma tur e cu rr en t=%f A \n ” ,Ia)
// calc ulat ing
current
pe r ar ma tu re pat h 135
10 11 12 13 14 15
A =4 //n o . of paral lel pa t hs mprintf ( ” Curre nt per armat ure pat h=%f A \ n ” ,Ia/A)
// calc ulat ing emf gene rate d Ra=.1 //arm at ur e res ist anc e e =2 //br us h contact dr op Eg=V+Ia*Ra+e
16 mprintf ( ”E mf gen era ted= %f V \ n ” ,Eg)
Scilab code Exa 17.9 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9
V=100 // terminal voltage Il=200 // load current Rse=.03 // resis tance of ser ies f i e l d wi nd in g Ra=.04 // res ist anc e of ar ma tu re wi nd in g Rsh=60 // resist ance of sh un t Vd=Il*Rse // voltage dr op in se ri es f i e l d wi nd in g V_dash=V+Il*Rse // termin al voltage across ar ma tu re Ish=V_dash/Rsh
10 Ia=Il+Ish 11 Eg=V+Il*Rse+Ia*Ra 12 mprintf ( ” Generate d em f=%f V ” ,Eg)
Scilab code Exa 17.10 Example on Types of DC Machines
1 2 3 4 5 6 7 8
V=250 // terminal voltage Il=450 // load current Rsh=50 //sh un t f i e l d res is ta nc e Ish=V/Rsh Ia=Ish+Il Ra=.05 //arm at ur e resi sta nce Eg=V+Ia*Ra
136
9 10 11 12 13 14
P =4 //n o . of poles phi=.05 // flux pe r pole in W b n=120 //n o . of slo ts on ar ma tu re c =4 // con duct ors pe r slo t Z=n*c // tota l no . of con duct ors A = P //n o . of paral lel pa t hs
15 N=60*Eg*A/(P*phi*Z) 16 mprintf ( ”Spe ed of
ro tat io n=%f r pm” , round (N))
Scilab code Exa 17.11 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//w hen the dc sh un t ma ch in e wo rk s as a generator V=250 // terminal voltage Il=80 // load current Rsh=100 // f i e l d re si st an ce Ra=.12 //arm at ur e resi sta nce Ish=V/Rsh Ia=Il+Ish Eg=V+Ia*Ra
// when the dc sh un t ma ch in e wo rk s as a mo tor V=250 // applied voltage to motor Il=80 // li ne current drawn by the mot or Ia=Il-Ish Eb=V-Ia*Ra
// fo r a ma ch in e , P ∗ p h i ∗Z/(60 ∗A) is a co ns ta nt x=Eg/Eb mprintf ( ”speed
as gener ator /speed
as mo to r=%f” ,x )
Scilab code Exa 17.12 Example on Types of DC Machines
1
137
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// calc ulat ing bac k emf V=120 // applied voltage Il=200 // li ne curren t Rsh=30 //sh un t f i e l d res is ta nc e Ra=.02 //arm at ur e wi nd in g resi sta nce Ish=V/Rsh Ia=Il-Ish Eb=V-Ia*Ra mprintf ( ”Back emf =%f V \ n ” ,Eb) n=90 //n o . of slo ts on ar ma tu r e c =4 // con duct ors pe r slo t Z=n*c // tota l no . of con duct ors on ar ma tu re phi=.04 N=60*Eb/(phi*Z) mprintf ( ”Sp eed at whi ch motor wil l run when flux po le i s .0 4 Wb=%d r pm” , round (N))
Scilab code Exa 17.13 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// calculat ing lo ad cur ren t i=30 // curren t drawn by eac h mo to r I=5*i // curren t drawn by 5 mot ors P=150*60 // total lighting lo ad V=110 // applied voltage I1=P/V // cur ren t ta ke n by light ing lo ad I=I1+I mprintf ( ”Total
load curren t=%d A \ n ” , round (I)) ing ter mina l volta ge V_dash=110 // volt age at term inals of lo ad R=.04 // resistance of feeder s Vd=I*R // volta ge d rop in feeders
// calculat
V=V_dash+Vd mprintf ( ”Te r mi na l volta ge across
terminals=%f V
\ n” ,V ) 138
th e gene rat or
pe r
16 17 18 19 20 21
// calc ulat ing emf gene rate d Rsh=55 // res is ta nc e of shu nt f i e l d Ish=V/Rsh Ia=I+Ish Ise=Ia Rse=.04 // se ri es
f i e l d resi sta nce
22 Ra=.03 //arm at ur e resi sta nce 23 Eg=V+Ia*(Ra+Rse) 24 mprintf ( ” Generate d em f , Eg=%f V” ,Eg)
Scilab code Exa 17.14 Example on Types of DC Machines
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// when the ma ch in e is wo rk in g as generator V=240 // ter mina l volt age across th e lo ad P=40D+3 // load on generator Il=P/V // load current Rsh=60 // res is ta nc e of shu nt f i e l d Ish=V/Rsh Ia=Il+Ish Ra=.03 //arm at ur e resi sta nce e=2*1 // voltage dr op at bru she s Eg=V+Ia*Ra+e N=450 //sp e e d as a gen er ato r at this
lo ad
// l e t k=P ∗ p h i ∗Z/(60 ∗A) k=Eg/N
//w hen the ma ch in e is wo rk in g as mo tor Ia=Il-Ish Eb=V-Ia*Ra-e N=Eb/k mprintf ( ” Speed
as a motor =%d rp m” , round (N))
139
Chapter 18 DC Generators
Scilab code Exa 18.1 Example on Magnetization Characteristics
1 2 3 4 5
i = linspace (0,1.6,9) V=[ 0 40 66 86 101 11 2 121 128 133 ] plot (i, V,re ct=[ 0 0 1. 6 13 3] ) xtitle ( ”Magnetiz ation cur ve for ex am pl e 18.1 ” , ” Fie ld Current” , ”Generate d em f” )
6 7 // refe r F ig . 18. 4 in th e te xt bo ok 8 Rsh=94 // res is ta nc e of shu nt f i e l d wi ndi ng 9 //OA is th e f ie l d resistance line for this
resistance 10 Voc=126 // volt age cor res pond ing to poi nt A 11 mprintf ( ”O pen ci rc ui t voltage when th e f i e l d ci rc ui t res is ta nc e is 94 ohm=%d V \n ” ,Voc) 12 // D is point on OCC corresponding to 11 0 V. O D
repr esent s t he f ie l d resistance line t o ge ne ra te this vol tag e 13 R=70/.6 // total resist ance of sh un t f i e l d cir cui t 14 mprintf ( ” Additi onal
resi sta nce 140
in th e sh un t f i e l d
Figure 18.1: Example on Magnetization Characteristics
141
Figure 18.2: Example on Magnetization Characteristics is %f o hm \ n ” , R-R sh) th e c r i t i c a l res ist anc e of shu nt f i e l d circu it
15 // lin e OE represents 16 Rc=40/.2 17 mprintf ( ” Cr it ic al
res is ta nc e=%d o hm” ,Rc)
Scilab code Exa 18.2 Example on Magnetization Characteristics
1 2 i = linspace (0,3.5,8) 3 V=[ 0 60 12 0 138 145 149 151 15 2]
142
4 plot2d (i,V) 5 xtitle ( ”Magnetiz ation cur ve for ex am pl e 18.2 ” , ” Fie ld Current” , ”Generate d em f” ) 6 7 // refe r F ig . 18. 5 in th e te xt bo ok 8 Rsh=60 //sh un t f i e l d res is ta nc e 9 10 11 12
// line
OA is
f i e l d resis tance
line
Voc=149 // volt age cor res pond ing to poi nt A mprintf ( ”O pen ci r cu i t volt age= %d V \ n ” ,Voc)
// re si st an ce repr esen ted by OE is resistance
critical
13 Rc=120 14 mprintf ( ” Cr it ic al res is ta nc e of shu nt f i e l d=%d o hm ” ,Rc) 15 // when th e lo ad ha s a resist ance of 4 o hm 16 R =4 17 // load cur ren t I=V/4 18 // I s h=V/60 19 // Ia=I+Is h 20 Eg=Voc 21 Ra=.1 //arm at ur e res ist anc e 22 23 24 25 26 27 28 29 30
//V=Eg−I a ∗Ra V=Eg/(1+(1/R+1/Rsh)*Ra) mprintf ( ”Terminal voltag e , V=%f V \n ” ,V ) // when th e ter mina l volt age V=100 // terminal voltage
is 1 0 0 V
Ia=(Eg-V)/Ra Ish=V/Rsh I=Ia-Ish mprintf ( ”Lo ad cu rr en t=%f A ” ,I )
Scilab code Exa 18.3 Example on Magnetization Characteristics
143
\n
Figure 18.3: Example on Magnetization Characteristics
144
1 2 3 4 5
i = linspace (0,2.5,6) V=[ 0 50 84 105 120 13 1] plot (i,V) xtitle ( ”Magnetiz ation cur ve for Current” , ”Generate d em f” )
6 7 // refe r F ig .18.6 in th e te xt bo ok 8 // OE is the f i e l d res is ta nc e li ne
ex am pl e 18.3 ” , ” Fie ld
of c r i t i c a l
resistance 9 10 11 12 13 14
Rc=100
15 16 17 18
// so lvi ng ( iv ) Eg=100 //open − circuit vo lt ag e Rsh=55 //sh un t f i e l d res is ta nc e // now , th e oper atin g poi nt is M inste
// so lvi ng ( i i i ) Rsh=70 // f i e l d re si st an ce N=750 // speed in rpm Nc=Rsh/Rc*N mprintf ( ”When the f i e l d re si st an ce is 70 ohm, c r i t i c a l s p ee d=%d rpm \n ” , round (Nc))
ad of A
19 // //LM/LN=N1/N 20 from the graph , LM/LN=10 0/115 21 N1=100/115*N // desir ed spe ed 22 mprintf ( ”W ith sh un t f i e l d re si st an ce
of 55 ohm, red uct ion in sp ee d to m ake th e open cir cui t vol tag e equal to 100 V =%d r pm” , round (N-N1))
Scilab code Exa 18.4 Example on Magnetization Characteristics
1 2 // ge ner ate d emf is 3 // read ings
direc tly
proportio
for OCC at 100 0 rpm are 145
nal
to sp ee d
Figure 18.4: Example on Magnetization Characteristics
146
4 Eg 2 =[10* (1000/ 800) 112*( 1000/ 800) 198*( 1000/ 800) 232*( 1000/ 800) 252*( 1000/ 800) 266*( 1000/ 800)] 5 i = linspace (0,5,6) 6 plot2d (i,Eg2) 7 xtitle ( ”Magnetiz ation cur ve for ex am pl e 18.4 ” , ” Fie ld cur ren t ” , ”Generate d em f” ) 8 9 10 11 12 13 14 15 16 17 18 19
// refe r F ig .18.7 in th e te xt bo ok Rsh=70 // resist ance of f i e l d cir cui t // line OA is f i e l d resis tance line V=330 // volt age cor res pon din g to poi nt A mprintf ( ”No lo ad ter min al volt age is %d V // now , no lo ad ter min al volt age is 2 70 V V=270
// th e oper atin g poi nt is D // line OD is cor res pon ding f i e l d resist ance line R=V/2.4 // resis tance repr esen ted by line OD mprintf ( ” Add iti ona l resist ance requ ired in th e f i e l d ci rc ui t to re duc e th e voltage to 27 0 V=%f o hm \n ” ,R-Rsh)
Scilab code Exa 18.5 Example on Parallel Operation
1 2 3 4 5 6 7 8 9 10 11
\ n” ,V )
// for
generato
r A
V1=240 // i n i t i a l term ina l vol tag e V2=225 // fin al ter mina l volta ge Ia=120 //ar ma tu re current Ra=(V1-V2)/Ia //arm at ur e res ist anc e
// for
generato
r B
V1=230 // i n i t i a l term ina l vol tag e V2=215 // fin al ter mina l volta ge Ib=100 //ar ma tu re current Rb=(V1-V2)/Ib //arm at ur e res ist anc e
12 I=200 // total
lo ad cur ren t 147
13 14 15 16 17 18
// I1+I 2=I , V=240 − I 1 ∗Ra , V=230 − I 2 ∗Rb // solvi ng for V, I1 and I2 a=[ 1 1 0;R a 0 1;0 Rb 1] b=[200;240;230] x = inv (a)*b I1=x(1,1)
19 I2=x(2,1) 20 V=x(3,1) 21 mprintf ( ”Bus −bar
volt age= %f V, \ nG ene rat or A sup pli es %f A, \ nGe ne rat or B sup pli es %f A ” , V,I 1,I2)
Scilab code Exa 18.6 Example on Parallel Operation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Ra=.03 //ar ma tu r e resist ance of e ac h gene rato r Rsh=60 // f i e l d res ist anc e of ea ch generato r I=4500 // total lo ad cur ren t
// I1+I2 =4500 , Is h=V/60 // Ia 1=I1+ V/60 // Ia 2=I2+ V/60 Ea1=500 // in du ce d emf in generat //500=V+Ia1 ∗ . 0 3 Ea2=510 // in du ce d emf in generat //510=V+Ia2 ∗ . 0 3 // solving for V, I1 and I2
or 1 or 2
a=[ 1 1 0; .0 3 0 1+ .0 3/ 60 ;0 .0 3 1+ .0 3/ 60 ] b=[4500;500;510] x = inv (a)*b I1=x(1,1) I2=x(2,1) V=x(3,1) mprintf ( ”Bus −bar volt age= %f V, \ nLoad shared
gen era tor 1=%f A, \nLoad shared A” , V,I 1,I2)
148
by by gener ator 2=%f
Scilab code Exa 18.7 Example on Parallel Operation
1 2 //Le t V be bus −ba r volt age
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
and I1 , I2 be th e cur ren ts sup pli ed by gen era tor s 1 and 2 respectively Il=3000 // total lo ad cur ren t // I1+I2 =I l // for gene rato r 1 Rsh1=30 // f i e l d re si st an ce Ra1=.05 //arm at ur e res ist anc e Eg1=400 // induced em f // for gene rato r 2 Rsh2=25 // f i e l d re si st an ce Ra2=.03 //arm at ur e res ist anc e Eg2=380 // induced em f // I s h 1=V/ Rsh1 // I s h 2=V/ Rsh2 // Ia 1= I1+Is h1 // Ia 2= I2+Is h2 //Eg1=V+Ia1 ∗ Ra1 ; E g2=V+I a 2 ∗Ra2 // solving for I1 , I2 and V
a=[ 1 1 0;R a1 0 1+R a1/R sh 1;0 Ra 2 1+R a2/R sh 2] b=[Il;Eg1;Eg2] x = inv (a)*b I1=x(1,1) I2=x(2,1) V=x(3,1) P1=V*I1 P2=V*I2 mprintf ( ”Ou tp ut of gen era tor 1=%f kW \ nO ut pu t of ge ne ra to r 2=%f kW” , P1/1 00 0, P2/10 00)
28 // an sw er s va ry from th e te xt boo k due to rou nd off
error 149
Chapter 19 DC Motors
Scilab code Exa 19.1 Example on Torque and Speed
1 2 3 4 5 6 7 8 9 10 11 12
// calc ulat ing tor que de ve op ed P =6 //n o . of poles A =6 //n o . of parallel circuits Ia=300 //ar ma tu re current n=500 //n o . of ar ma tu re turns Z=2*500 // tota l no . of con duc tors phi=75D-3 // flux pe r pole Ta=.159*P*phi*Ia*Z/A mprintf ( ”Torq ue devel oped= %f N −m\ n ” ,Ta)
// calculat
ing
T=2.5*Ta/100
shaft to rq ue // torque l o st in wi nd age , f r i c t i o n an d
ir on losses 13 14 15 16 17 18 19
Tsh=Ta-T mprintf ( ” Shaft
torque =%f N −m\n ” ,Tsh) // calc ulat ing shaft power N=400 // speed in rpm Psh=2*%pi*N*Tsh/60 mprintf ( ” Sh af t power =%f kW” ,Psh/1000)
//an sw er va ry fro m th e te xtb ook due to rou nd of f error 150
Scilab code Exa 19.2 Example on Torque and Speed
12 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
// calc ulat ing tor que dev elo ped by ar ma tu re V=200 // voltage applied across th e motor Rsh=40 // res is ta nc e of shu nt f i e l d wi ndi ng Ish=V/Rsh I=100 // tot al current drawn by mo tor Ia=I-Ish Ra=.1 //arm at ur e res ist anc e Eb=V-Ia*Ra P=Eb*Ia // mechanic al po we r developed N=750 // speed in rpm Ta=60*P/(2*%pi*N) mprintf ( ”Tor qu e developed by armat ure =%f N −m\ n ” ,Ta)
// calculat
ing
co pp er los ses
Wcu1=V*Ia-Eb*Ia //arm at ur e co pp er lo ss es Wcu2=Ish^2*Rsh // f i e l d coppe r lo ss es mprintf ( ”Total cop per lo ss es= %f W \n ” ,Wcu1+Wcu2)
// calc ulat ing shaft power Wc=1500 // f r i c t i o n an d iro n l o s s e s Pi=200*100 // input to mo to r Psh=Pi-(Wc+Wcu1+Wcu2) mprintf ( ” Sh af t powe r=%f kW \ n” ,Psh/1000)
// calculat
ing
shaft
to rq ue
Tsh=60*Psh/(2*%pi*N) mprintf ( ” Shaft torque =%f N −m\n ” ,Tsh)
// calculating
effic ienc y
e=Psh/Pi*100 mprintf ( ” Ef fi ci en cy= %f percent ” ,e )
Scilab code Exa 19.3 Example on Torque and Speed
151
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25
Po=60D+3 // f u l l e=0.905 // eff ici Pin=Po/e V=400 // applied I=Pin/V // li ne
load out put of the mo tor enc y of th e motor voltage current
drawn by the mo tor
Rsh=200 // res ist anc e of th e sh un t f i e l d wi nd in g Ish=V/Rsh Ia=I-Ish Ra=0.1 //arm at ur e resi sta nce Eb=V-Ia*Ra A =2 //n o . of par all el pa th s in ar ma tu r e w in di ng P =4 //n o . of poles phi=45D-3 // flux pe r pole Z=450 // tot al number of conduct ors N = round (60*Eb*A/(P*phi*Z)) mprintf ( ” Fu ll loa d speed= %d rpm \ n” ,N )
// calc ulat ing
ar ma tu re tor que
Ta=0.159*P*phi*Ia*Z/A mprintf ( ”To rq ue deve loped moto r=%f N−m\ n ” ,Ta)
// calculat Psh=60D+3
by the ar ma tu re of the D C
ingsh af useful // t po wetor rq ue
Tsh=60*Psh/(2*%pi*N) mprintf ( ” Usef ul torque= %f N −m” ,Tsh)
// error
in th e te xt bo ok a ns we r for
useful
to rq ue
Scilab code Exa 19.4 Example on Torque and Speed
1 2 3 4 5
V=220 // voltage applied to motor Rsh=157 //shun t f i e l d re si st an ce Ra=0.3 //arm at ur e resi sta nce Ish=V/Rsh
6 I0=4.5 // current
drawn by the mo to r at no load 152
7 8 9 10 11 12
Ia0=I0-Ish Eb0=V-Ia0*Ra
//un de r loade d conditions , I=30 // cur ren t dr aw n by mo to r Ia=I-Ish Eb=V-Ia*Ra
13 // ph i =.97 ∗ phi0 14 / /b a ck e mf is directly
prop ort iona l t o flux an d
speed 15 N0=1000 // spe ed at no load 16 N=Eb*N0/(Eb0*.97) 17 mprintf ( ”Spee d unde r loaded (N))
con di tio n=%d rpm” , round
Scilab code Exa 19.5 Example on Torque and Speed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// calc ulat ing shaft power V=100 // volt age appl ied to ser ies motor Ra=.22 //arm at ur e resi sta nce Rse=.13 // se ri es f i e l d resi sta nce Rm=Ra+Rse // total resistance Ia=45 // cur ren t in ar ma tu re cir cui t Eb=V-Ia*Rm Pm=Eb*Ia // mechanic al po we r developed Wc=750 // ir on an d f r i c t i o n l o s s es Psh=Pm-Wc mprintf ( ” Sh af t powe r=%f kW \ n” ,Psh/1000)
// calc ulat ing tor que dev elo ped N=750 // speed in rpm Ta=60*Pm/(2*%pi*N) mprintf ( ” Total torque= %f N −m\n ” ,Ta)
// calculat
ing
shaft
to rq ue
Tsh=60*Psh/(2*%pi*N)
19 mprintf ( ” Shaft
torque =%f N −m” ,Tsh) 153
Scilab code Exa 19.6 Example on Torque and Speed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
// calc ulat ing sp ee d P =4 //n o . of poles V=220 // applied voltage Ia=46 // cur ren t in ar ma tu re cir cui t Ra=.25 // f i e l d re si st an ce Rse=.15 // se ri es f i e l d resi sta nce Rm=Ra+Rse Eb=V-Ia*Rm A =2 //n o . of parallel circuits phi=20D-3 // flux pe r pole Z=1200 // to tal conduct ors on ar ma tu re N = round (60*Eb*A/(P*phi*Z)) mprintf ( ” Spe ed , N=%d rpm \ n ” , N )
// calculating
total
to rq ue
Ta=.159*P*phi*Ia*Z/A mprintf ( ” Total torque= %f N −m\n ” ,Ta)
// calc ulat ing shaft power Pm=Eb*Ia // mechanic al po we r developed Wc=900 // ir on an d f r i c t i o n l o s s es Po=Pm-Wc mprintf ( ” Sh af t powe r=%f kW \ n” ,Po/1000)
// calculat
ing
shaft
to rq ue
Tsh=60*Po/(2*%pi*N) mprintf ( ” Shaft torque
Tsh=%f N −m\ n ” , Tsh) // calculating effic ienc y Pin=V*Ia // input to mo to r e=Po/Pin*100 mprintf ( ” Ef fi ci en cy= %f percent ” ,e )
154
Scilab code Exa 19.7 Example on Torque and Speed
1 2 //worki ng as mo to r 3 V1=110 // applied voltage to motor 4 Rsh=45 //sh un t f i e l d res is ta nc e 5 6 7 8 9 10 11 12 13 14 15 16
Ish1=V1/Rsh //shun t f i e l d curren t Il=230 Ia1=Il-Ish1 Ra=.03 //arm at ur e resi sta nce Eb1=V1-Ia1*Ra N1=450 // speed in rpm V2=210 //ch a n ge d va lu e of appl ied volta ge Ish2=V2/Rsh Il=85 // curren t drawn by the mo to r fr om the main Ia2=Il-Ish2 Eb2=V2-Ia2*Ra
//b a ck emf is direc tly current and spe ed
proportio
nal
to sh un t f i e l d
17 N2=(Eb2/Eb1)*(Ish1/Ish2)*N1 18 mprintf ( ”Speed of the mot or =%d r pm \ n ” ,N2) 19 20 21 22 23 24 25 26
//wo inter g mina as generato r V=200 rk// l volt age
across
th e lo ad
Ish3=V/Rsh Il=140 // loa d curren t on th e generato r Ia3=Il+Ish3 Eg=V+Ia3*Ra N3=(Eg/Eb1)*(Ish1/Ish3)*N1 mprintf ( ”Sp ee d at wh ic h generator wou ld ha ve to ru n= %d rpm” ,N3)
27 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 19.8 Example on Speed Control of DC Motors
155
1 2 3 4 5 6 7 8 9 10 11 12
V=230 // voltage applied to motor N1=1000 // i n i t i a l sp ee d Ia=35 //ar ma tu re current Ra=.3 // resistance of a r m at u r e circu Eb1=V-Ia*Ra
it
N1=1000 // speed in rpm Ia=25 //arm at ur e current in new situ atio n N2=750 //cha nge d spee d in rpm
/ /b a ck emf is
directly
prop ort iona l t o sp e e d
R=((V-Ia*Ra)*N1-N2*Eb1)/(Ia*N1) mprintf ( ” Add iti ona l resist ance %f ohm” ,R )
in ar ma t ur e cir cui t=
Scilab code Exa 19.9 Example on Speed Control of DC Motors
1 2 3 4 5 6 7 8 9 10 11 12 13 14
N1=600 // i n i t i a l speed of the mo to r in rpm Ia1=20 //ar ma tu re current V=200 // applied voltage Ra=.4 //arm at ur e res ist anc e Eb1=V-Ia1*Ra Rf1=200 // f i e l d re si st an ce If1=200/200 // f i e l d cu rr en t N2=900 // increa sed spe ed in rpm
// I f 2 =200 /Rf // phi1 / phi2=If 1 / I f2=R f/200 // Ia 2= Ia 1 ∗ phi1 /phi2=. 1 ∗ Rf //Eb2=200 −.04∗ Rf / /b a ck e mf is directly prop ort iona l t o flux an d speed 15 // we ge t a qu adr ati c eq ua ti on in Rf as .0 4 ∗ Rfˆ2 −20 0∗ Rf+57600=0 16 // solving for Rf 17 Rf2=(200-
sqrt (200^2-4*.04*57600))/(2*.04)
156
18 mprintf ( ” Additi onal
circuit=%f ohm”
resi sta nce
in th e sh un t f i e l d
,Rf2-Rf1)
Scilab code Exa 19.10 Example on Speed Control of DC Motors
1 2 3 4 5 6 7 8 9 10 11
V=500 // applied voltage N1=700 // i n i t i a l speed of mot or Ia1=50 //ar ma tu re current Ra=.4 // eff ect ive ar ma tu r e resist ance Eb1=V-Ia1*Ra N2=600 // reduc ed speeed of mo to r Ia2=Ia1 //as tor que and flux re ma in s same
/ /b a ck emf is
directly
prop ort iona l t o sp e e d
R=((V-Ia2*Ra)*N1-Eb1*N2)/(Ia2*N1) mprintf ( ” Add iti ona l resist ance cir cui t is %f o hm” ,R )
in th e ar ma t ur e
Scilab code Exa 19.11 Example on Speed Control of DC Motors
1 2 3 4 5 6 7 8 9 10 11 12 13
R=.25+.05 // total resistance N1=500 //nor ma l speed V=250 // applied voltage Ia1=100 //arma tu re current Eb1=V-Ia1*R
of t he a r m a t u r e circu it
at no rm al spe ed
// solving par t ( i ) R1=R+1 // total resis itanc e in t he a r m at u r e circu it Ia2=50 //ar ma tu re current Eb2=V-Ia2*R1
/ /b a ck emf is
directly
prop ort iona l t o sp e e d
N2=Eb2/Eb1*N1 mprintf ( ”For ( i ) \ nS pee d=%d rpm \ n ” , round (N2))
157
14 15 16 17 18
// sol ving part ( i i ) Ia3=50 //ar ma tu re current Eb3=V-Ia3*R
// Is h3 =.6 ∗ Ish1 −−> phi3 / phi1 =.6 / /b a ck e mf is directly prop ort iona l t o flux an d speed
19 N3=(Eb3/Eb1)*N1/.6 20 mprintf ( ”For ( i i ) \ nS pe ed=%d rpm” , N3)
Scilab code Exa 19.12 Example on Speed Control of DC Motors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// so lvi ng ( i ) Il=70 // curren t V=200 // applied Rsh=100 //shun t Ish=V/Rsh //shun
drawn by the mo to r voltage f i e l d re si st an ce t f i e l d curren t
Ia1=Il-Ish N1=500 // i n i t i a l sp ee d Ra1=.2 //arm at ur e resi sta nce Eb1=200-Ia1*Ra1 N2=350 // reduc ed spee d of mo to r Ia2=Ia1 //arma tu re current rem ain s same
//Eb2=200 −68∗(R+.2) / /b a ck emf is proportio
nal
to sp ee d
R=((V-Ia2*Ra1)*N1-Eb1*N2)/(Ia2*N1) mprintf ( ” Add iti ona l resist ance circuit=%f ohm \ n” ,R )
in th e ar ma t ur e
// so lvi ng ( i i ) Ra2=R+Ra1 //arm at ur e resi sta nce Ia3=35 //ar ma tu re current Eb3=V-Ia3*Ra2 N3=N1*Eb3/Eb1 mprintf ( ” Spe ed=%d rpm” ,N3)
23 //an sw er va ry fro m th e te xtb ook
158
due to rou nd of f
error
Scilab code Exa 19.13 Example on Speed Control of DC Motors
1 2 3 4 5 6 7
8 9 10
V=250 // voltage applied to th e motor Eb1=V //Ra is negligible N1=500 // speed in rpm Ia1=40 //ar ma tu re current R=25 // additional resist ance
//as
flux re ma in s same , ba ck emf is direc tly prop orti onal t o sp ee d ; and to rq ue is directly proportional to ar ma tu re curren t //Eb2=250 − I a 2 ∗ 25 , N2=5 00 −50 ∗ I a 2 // als o , to rq ue varies as c u b e of sp ee d //fr om these conditi ons , we ge t , Ia2ˆ 3 −30 ∗ Ia 2 ˆ2+325 ∗ I a 2 −1000=0 // solving this eq ua ti on , we get
11 12 Ia2=5 13 N2=(Ia2/Ia1)^(1/3)*N1 14 mprintf ( ”S p eed of th e motor w it h 25 o hm res is tor the arm atu re ci rc ui t=%d r pm” ,N2)
159
in
Chapter 20 Testing of DC Machine
Scilab code Exa 20.1 Example on losses in DC Machine
1 2 E1=400 //e ddy cur ren t los ses 3 // for a machine , eddy cu rr en t losses 4 5 6 7 8
is directly pro por tio nal to Bmaxˆ2 and f ˆ2 // Bmax is proporti onal to flux // f is prop orti onal t o sp ee d //w hen sp ee d and flux increased by 10% E2=1.1^2*1.1^2*E1 //E ddy curren t lo ss es un de r ch an ge d conditi on mprintf ( ” Increase in eddy current lo ss es= %f W” E1 )
Scilab code Exa 20.2 Example on losses in DC Machine
1 2 N=1500 // speed in rpm 3 E1=300 // hysteresis losses 4 //E1=k1 ∗N
160
, E2-
5 6 7 8 9 10 11 12 13 14
k1=E1/N E2=150 //e ddy cur ren t los ses
//E2=k2 ∗Nˆ 2 k2=E2/N^2 E=E1+E2 // tota l ir on
// when iro n losses
losses ar e r ed uc ed t o half
//k1 ∗N1+k2 ∗N1ˆ2=.5 ∗E // solving for N1 N1=(-k1+ sqrt (k1^2-4*k2*(-.5*E)))/(2*k2) mprintf ( ”T o t a l ir on losses will be h al v e d if s p e e d is red uce d to % d r pm” , round (N1))
Scilab code Exa 20.3 Example on losses in DC Machine
1 2 3 4 5 6 7 8 9
// calculating effic Il=200 // current Rsh=100 //shun t V=500 // terminal
ienc y at f u l l lo ad supplied f i e l d res is ta nc e voltage
Ish=V/Rsh Ia=Il+Ish Wcu=Ia^2*.1 //arm at ur e co pp er lo ss es Wc=4000 // cons tant lo ss es including f i e l d co pp er
losses 10 11 12 13 14 15 16 17 18 19
Wt=Wcu+Wc // total losses Po=V*Il //output pow er e=Po*100/(Po+Wt) mprintf ( ” Eff ici enc y at f u l l load =%f percent
/ / Cal cul ati ng effic ienc y at half Il=200/2 Ia=Il+Ish Wcu=Ia^2*.1 Wt=Wc+Wcu Po=V*Il
20 e=Po*100/(Po+Wt)
161
lo ad
\n ” , e )
21 22 23 24 25 26
mprintf ( ” Efficienc y at half lo ad =%f per cen t \n ” , e ) // Cal cul ati ng effic ienc y at 1.5 ti me s t he f u l l lo ad Il=1.5*200 Ia=Il+Ish Wcu=Ia^2*.1 Wt=Wc+Wcu
27 Po=V*Il 28 e=Po*100/(Po+Wt) 29 mprintf ( ” Effi cien cy perc ent ” , e )
at 1.5
tim es th e f u l l loa d=%f
Scilab code Exa 20.4 Example on losses in DC Machine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Po=10D+3 //ou tpu t po we r of ea ch mot or at f u l l load e=.85 // eff ici enc y at f u l l lo ad Pi=Po/e W=Pi-Po // total los ses at f u l l lo ad for e ac h motor
// calcu lating half lo ad efficiency Wc=500 // cons tant lo ss es Wcu1=(W-Wc)/2^2 // co pp er lo ss es W1=Wc+Wcu1 // total losses P1=Po/2 //output e1=P1/(P1+W1)*100 mprintf ( ” Effi cien cy percent \ n ” , e1)
at half
loa d for
// calcu lating half lo ad efficiency Wc=600 // cons tant lo ss es Wcu2=(W-Wc)/2^2 // co pp er lo ss es W2=Wc+Wcu2 // total losses P2=Po/2 //output e2=P2/(P2+W2)*100 mprintf ( ” Effi cien cy perc ent ” , e2)
at half
for
for
loa d for
162
motor A
motor A=%f motor B
motor B=%f
Scilab code Exa 20.5 Example on losses in DC Machine
1 2 // calculating 3 4 5 6 7 8 9 10 11 12 13 14 15
power re qui red at th e driv ing shaf t at f u l l load Po=30D+3 //out pu t power of dc sh un t generat or Wi=1300 // mec han ica l and iron lo ss es Rsh=125 //shun t f i e l d res is ta nc e V=250 // terminal voltage Ra=.13 //arm at ur e r esi sta nce Ish=V/Rsh Wcu=V*Ish Wc=Wi+Wcu Il=Po/V Ia=Il+Ish Wcu=Ia^2*Ra Wt=Wc+Wcu Pi=Po+Wt
//sh un t f i e l d cop per lo ss es // con st ant los ses of gene rat or
//arm at ur e co pp er lo ss // total losses
16 mprintf ( ”P ower requi red at th e driving shaft load=%f kW \n ” , Pi/1 0^3 ) 17 // calculating effic ienc y at f u l l lo ad 18 e=Po/Pi*100 19 mprintf ( ” Eff ici enc y at f u l l load =%f percent 20 // calcu lating efficiency a t half l oa d 21 Il=(Po/2)/V 22 Ia=Il+Ish 23 Wcu=Ia^2*Ra // co pp er lo ss es 24 Wt=Wc+Wcu // total losses 25 e=(Po/2)/(Po/2+Wt)*100 26 mprintf ( ” Efficienc y at half lo ad =%f per cen t 27 // at maximum e f f i c i e n c y 28 Wcu=Wc // co pp er lo ss es 29 Ia = sqrt (Wcu/Ra) 30 Il=Ia-Ish
163
at f u l l
\n ” , e )
\n ” , e )
31 mprintf ( ”P ower out put at max ef f ic i en c y=%f kW \n ” ,Il* V/10^3) 32 // calculat ing max eff ici enc y 33 e_max=Il*V/(Il*V+2*Wc)*100 34 mprintf ( ”Max ef fi ci en cy= %f percent ” , e_ ma x) 35 //an sw er va ry fro m th e te xtb ook due to rou nd of f
error
Scilab code Exa 20.6 Example on losses in DC Machine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
V=500 // voltage applied to motor Ra=.2 //arm at ur e r esi sta nce Il0=4 //n o loa d curren t ta ke n by mo tor Ish=1 //shun t current Pi=V*Il0 //po wer inp ut at no load Ia0=Il0-Ish Wcu=Ia0^2*Ra //ar m at ur e co pp er los ses at n o lo ad Wc=Pi-Wcu // cons tant lo ss es
//w hen input
curren t= 20 A
Il=20 Ia=Il-Ish Wcu=Ia^2*Ra //arm at ur e co pp er lo ss es Wt=Wc+Wcu // total losses Pi=V*Il //po wer input to mot or Po=Pi-Wt e=Po/Pi*100 mprintf ( ”When input curren t= 20 A, outp ut is %f W and effic ienc y of motor is %f per ce nt \ n” ,P o, e)
//w hen input Il=100 Ia=Il-Ish Wcu=Ia^2*Ra Wt=Wc+Wcu
24 Pi=V*Il
curren t =100 A
//arm at ur e co pp er lo ss es // total losses
//po wer input
to mot or 164
25 Po=Pi-Wt 26 e=Po/Pi*100 27 mprintf ( ”When input
curren t =100 A , out put is %f W and effic ienc y of motor is %f pe rc en t \ n ” , Po,e)
Scilab code Exa 20.7 Example on losses in DC Machine
1 2 //sh un t generato
r was run as a sh un t motor at no load 3 I0=5 // cur ren t dr aw n 4 Ish=1.5 //shun t f i e l d curren t 5 6 7 8 9 10 11
Ia0=I0-Ish Ra=.15 //ar m a t u r e circu it resistance V=440 // terminal voltage Wcu=Ia0^2*Ra //arm at ur e co pp er los s Pi=V*I0 //p ow er input Wc=Pi-Wcu // cons tant lo ss es
// calculating load
effic ienc y of s h u n t ge ne rat or at f u l l
12 13 14 15 16 17 18
Po=50D+3 //out pu t of generat or Il=Po/V // load current Ia=Il+Ish Wcu=Ia^2*Ra // co pp er lo ss es Wt=Wc+Wcu // total losses e=Po/(Po+Wt)*100 mprintf ( ” Efficienc y of sh un t gen erat or at f u l l lo ad = %f percent \ n ” , e )
19 20 21 22 23 24
// calculating
effic ienc y at 3 /4th lo ad
I1=3/4*Il // load current Ia=I1+Ish Wcu=Ia^2*Ra // co pp er lo ss es Wt=Wc+Wcu // total losses e=(3/4*Po)/(3/4*Po+Wt)*100
25 mprintf ( ” Effi cien cy
at 3/ 4th loa d=%f perc ent 165
\n”, e)
26 27 28 29 30 31
// calcu lating efficiency I2=.5*Il // load current
a t half
l oa d
Ia=I2+Ish Wcu=Ia^2*.15 // co pp er lo ss es Wt=Wc+Wcu // total losses e=(.5*Po)/(.5*Po+Wt)*100
32 mprintf ( ” Effi cien cy
at half
, e)
loa d=%f perc ent ”
Scilab code Exa 20.8 Example on losses in DC Machine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
I1=50 // input current fr om ma in s Po=100D+3 //ou tp ut of gene rato r on f u l l lo ad in W V=500 // terminal voltage I2=Po/V // lo ad curr ent of gene rat or Rg=.1 //ar ma t ur e resist ance of gene rat or Rm=.1 //arm at ur e res ist anc e of mo tor Pi=25D+3 // input po we r fr om mai ns Pr=(Pi-I2^2*Rg-(I1+I2)^2*Rm)/2 // iro n an d
me ch ani cal //sh un t //shun t / / calculating
lo ss es in ea ch ma chin e f i e l d current of generator f i e l d curren t of mo to r effic ienc y of gen er ato r Wt=Pr+V*I3+I2^2*Rg // total losses
I3=4 I4=3
e=Po/(Po+Wt)*100 mprintf ( ” Effi cien cy
of generato r=%f perc ent effic ienc y of motor Pi=V*(I1+I2+I4) //po we r input Wt=Pr+V*I4+(I1+I2)^2*Rm // total losses
\n ” , e )
// calculating
e=(Pi-Wt)/Pi*100 mprintf ( ” Ef fi ci en cy
of mo to r=%f percent ” , e )
166
Chapter 21 Three Phase Alternators
Scilab code Exa 21.1 Example on emf Equation
1 2 3 4 5 6 7 8 9 10 11
// calc ulat ing sp ee d f=50 // frequ ency P=20 //n o . of poles N=120*f/P mprintf ( ”Spe ed at wh ic h al ter na to r must be rpm \n ” , N )
ru n=%d
// calc ulat ing th e gene rate d emf pe r ph as e x=180 // total no . of slots y=x/P // slo ts pe r pol e m=y/3 // slo ts pe r pol e pe r ph as e alpha=180/9 //ph as e displacem ent be tw ee n adjacent slots
sin ((alpha/2)*%pi 12 Kd = sin ((m*alpha/2)*%pi/180)/(m* /180)) // distribution factor 13 Kc=1 // coi l s p a n factor 14 Kw=Kd*Kc //win di ng facto r 15 Z=180*8 // tota l no . of con duc tors 16 a=Z/3 // conduc tors pe r ph ase 17 T=a/2 // turns pe r ph ase 18 phi=25D-3
// flux
pe r pole 167
19 20 21 22 23 24
Eph= round (4.44*Kw*f*phi*T) mprintf ( ”Generated em f per
// calculat
ing
line
phase =%d V \ n ” , Eph)
emf
El = sqrt (3)* round (Eph) mprintf ( ” Li ne emf =%d V” , round (El))
//an sw er va ry fro m th e te xtb ook due to rou nd of f error
Scilab code Exa 21.2 Example on emf Equation
1 2 3 4 5
funcprot (0) m =2 //n o . of slots p e r po le pe r p h a s e x=m*3 //n o . of slots p e r po le alpha=180/x //ph as e displacem ent be tw ee n adjacent
slots
in de gr ee s
6 Kd = sin ((m*alpha/2)*%pi/180)/(m* /180)) // distribution factor 7 beta=180-150 // in degrees 8 9 10 11 12 13 14 15 16 17 18
sin ((alpha/2)*%pi
Kc = cos ((beta/2)*%pi/180) // coi l s p a n factor Kw=Kd*Kc //win di ng facto r P=10 //n o . of poles n=m*P //n o . of slots pe r p h as e Zph=n*10 //n o . of con duc tors pe r ph as e Tph=100 //n o . of turn s pe r ph as e N=600 // sp ee d of th e alternator in rpm f=P*N/120 // frequ ency phi=.05 // useful flux pe r pol e in W b Eph=4.44*Kw*f*phi*Tph mprintf ( ” Stator em f per pha se at no load =%d V” round (Eph))
Scilab code Exa 21.3 Example on emf Equation
168
,
1 2 3 4 5 6 7 8 9 10
funcprot (0)
// calculating pit ch factor beta=0 // f u l l pitch co il Kc = cos ((beta/2)*%pi/180) mprintf ( ” Pitch fac tor , Kc=%d \n ” , Kc)
// calculating distribution factor m =4 //n o . of slots p e r po le pe r p h a s e x=m*3 //n o . of slots p e r po le alpha=180/x //ph as e displacem ent be tw ee n adjacent slots in de gr ee s
11 Kd = sin ((m*alpha/2)*%pi/180)/(m* sin ((alpha/2)*%pi /180)) 12 mprintf ( ” Distribution factor of stator w in di ng =%f , Kd) 13 // calc ulat ing emf gene rate d pe r ph as e 14 Kw=Kd*Kc 15 y=m*8 //n o . of slots pe r p h as e 16 n=y*10 //n o . of con duct ors pe r ph as e 17 Tph=160 //n o . of turn s pe r ph as e 18 f=50 // frequ ency 19 20 21 22 23 24 25
phi=.04 // flux pe r pole Eph= round (4.44*f*Kw*Tph*phi) mprintf ( ”E mf per phase at no load= %d V \n ” , Ep h)
// calculat
ing
line
emf
El = sqrt (3)*Eph mprintf ( ” Li ne emf =%d V” , round (El))
//an sw er va ry fro m th e te xtb ook due to rou nd of f error
Scilab code Exa 21.4 Example on emf Equation
1 2 funcprot (0) 3 / / calculating
distribution
factor 169
of stator
w in di n g
\n”
m =9 //n o . of slots p e r po le pe r p h a s e x=m*3 //n o . of slots p e r po le alpha=180/x Kd = sin ((m*alpha/2)*%pi/180)/(m* sin ((alpha/2)*%pi /180)) 8 mprintf ( ” Distribu tion facto r of stator wi nd in g , Kd= 4 5 6 7
9 10 11 12 13 14 15 16 17 18 19 20 21 22
%f \ n ” ,Kd) // calculating
pit ch factor
of stato r w i n di ng
beta=2*20/3 Kc = cos ((beta/2)*%pi/180) mprintf ( ”Pitch fac tor= %f \ n ” , Kc)
// calculating useful flux p er po le Zph=9*2*4 //n o . of cond uct ors pe r ph as e Tph=36 // turn s pe r ph as e of stator wi nd in g P =2 //n o . of poles N=3000 // speed in rpm f=P*N/120 V=3.3D+3 // line volt age Eph=V/ sqrt (3) phi=Eph/(4.44*f*Kd*Kc*Tph) mprintf ( ” Useful flu x per
pole= %f Wb” , ph i)
Scilab code Exa 21.5 Example on emf Equation
1 2 3 4 5 6
funcprot (0) m =5 //n o . of slots p e r po le pe r p h a s e x=m*3 //n o . of slots p e r po le alpha=180/x // in degrees Kd = sin ((m*alpha/2)*%pi/180)/(m* sin ((alpha/2)*%pi /180)) // distribution factor 7 beta=3*12 // in degrees 8 Kc = cos ((beta/2)*%pi/180) // pit ch factor of stator
winding 9 Tph=5*2*4/2
//n o . of tur ns pe r ph as e 170
10 11 12 13 14 15
V=6D+3 // line volta ge Eph=V/ sqrt (3) phi=.857 // flu x in Wb f = round (Eph/(4.44*Kd*Kc*Tph*phi)) P =4 //n o . of poles N=120*f/P
16 mprintf ( ”Sp ee d of rota tion of alterna tor , N=%d r pm” round (N)) 17 //an sw er va ry fro m th e te xtb ook due to rou nd of f
error
Scilab code Exa 21.6 Example on Regulation
1 2 3 4 5 6 7 8 9 10
// calculating V=3300 // line
regul ation volta ge
at f u l l lo ad at un it y pf
Vph=V/ sqrt (3) P=500D+3 //output Ia=P/( sqrt (3)*V) Ra=.4 // resis tance pe r ph as e Xs=3.8 // reactance pe r ph ase pf=1 //po wer fac tor Ef=[(Vph*1+Ia*Ra)^2+(Vph*0+Ia*Xs)^2]^.5
//open
circu it vol tag e p e r p h as e 11 VR=(Ef-Vph)/Vph*100 12 mprintf ( ”Regula tion at f u l l loa d at uni ty pf =%f percent \ n ” , VR) 13 // calculating regul ation at f u l l lo ad at .8 pf
lagging 14 Ef=[(Vph*.8+Ia*Ra)^2+(Vph*0.6+Ia*Xs)^2]^.5 15 VR=(Ef-Vph)/Vph*100 16 mprintf ( ”Regula tion f u l l loa d at .8 pf lagging= %f percent \ n ” , VR) 17 // an sw er s va ry from th e te xt boo k due to rou nd off
error 171
,
Scilab code Exa 21.7 Example on emf Equation
1 2 3 4 5 6 7 8 9 10 11 12 13
// cal cul at in g sync hro nous im pe da nc e Voc=90 //o pen cir cui t volt age pe r ph as e Isc=15 // sho rt circu it cu rr en t Zs=Voc/Isc mprintf ( ” Syn chro nou s impeda nce= %d ohm \ n ” , Zs)
// calc ulat ing sy nc hr ono us reactanc e Ra=1 //arm at ur e resi sta nce pe r ph as e Xs = sqrt (Zs^2-Ra^2) mprintf ( ”Synchronou
s rea cta nce= %f ohm \ n ” , Xs)
// Solvi ng part ( i i i ) V=400 // line volt age Vt = round ( V / sqrt (3)) //ph as e volt age
of lo ad 14 Ia=15 // load
at th e term inals
current
15 Ef = round ([(Vt*.8+Ia*Ra)^2+(Vt*.6+Ia*Xs)^2]^.5) 16 mprintf ( ”Volt age ri se s from % d V to % d V , when th e lo ad is thrown off \ n ” , Vt,Ef ) 17 // sol ving part ( iv ) 18 // at 0.8 pf lagging 19 VR=(Ef-Vt)/Vt*100 20 mprintf ( ”Reg ula ti on at .8 pf lagging =%f per ce nt \n ” , VR ) 21 // at uni ty pf 22 Ef=[(Vt*1+Ia*Ra)^2+(Vt*0+Ia*Xs)^2]^.5 23 VR=(Ef-Vt)/Vt*100 24 mprintf ( ”Regulation at unity pf =%f percent ” , VR) 25 // an sw er s va ry from th e te xt boo k due to rou nd off
error
172
Scilab code Exa 21.8 Example on Regulation
1 2 // refe r F ig . 21. 19 in th e te xt bo ok 3 AT=15D+3 // PE re pres ents the ar ma tu re reac tion
amp ere
turns 4 5 6 7 8 9 10 11 12 13 14
mprintf ( ”Arm at ur e re ac ti on am pe re turns= %d \n ” , AT) Pout=15D+6 //ou tp ut of th e alternator Vl=10.2D+3 // line volt age Il=Pout/( sqrt (3)*Vl) Iph=Il Ia=Il
// line DE represents th e lea kag e reac tanc e d ro p in t e r m s of line val ue s Es=1.3D+3 Eph=Es/ sqrt (3) Xl=Eph/Ia mprintf ( ”Leak age Xl )
15 // calculating
per ph as e , Xl=%f ohm \n ” ,
reacta nce
regul ation
for
f u l l lo ad at .8 pf
lagging 16 Rt=.53 // resist terminals
ance
of th e stator
wi nd in g b e t we e n
17 Ra=Rt/2 // resis tance pe r ph as e 18 Rd1=Ia*Ra // resist ance d r o p in t er ms of ph as e va lu e 19 Rd2= sqrt (3)*Rd1 // resistance d ro p in t e r m s of line 20 21 22 23 24 25 26 27 28 29
value // ref er Fi g .21. 20( a) in th e te xtb ook Ifg=21.67D+3 Ifs=1.67D+3 Ifsc=18D+3
// ref er Fi g .21. 20( b) in th e te xtb ook Ifl=40.67D+3 // to ta l f i e l d am pe re turns Ef=12.85D+3 //n o lo ad volt age Vt=10.2D+3 // f u l l load rated voltage VR=(Ef-Vt)/Vt*100 mprintf ( ”Regula tion at f u l l lo ad , 0.8 perc ent ” , round (VR))
173
pf lagging
=%d
Scilab code Exa 21.9 Example on Regulation
12 3 4 5 6 7 8 9 10 11 12 13
function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i Vt=1100/ sqrt (3) // termin al vol tage , ta ke n as refer ence
14 15 16 17 18 19 20 21
Vt=pol2rect(Vt,0) Ia=1200*1000/(3*Vt) //arma tu re current pf=.8 // lagging power facto r phi=acosd(pf) Ia=pol2rect(Ia,-phi) Xq=1.2*j Xd=1.8*j
phasor
22 23 24 25 26
// ref er Fi g .21.2 4 in th e te xt bo ok , ph as or O B in dir ect ion of E f is g iv e n a s
th e
OB=Vt+Ia*Xq delta=29 //po we r angle Id=Ia* sin ((delta+phi)*%pi/180) Ef=mag(OB)+mag(Id)*mag(Xd-Xq) mprintf ( ” Exc ita tio n vol tag e Ef=%d V” , round (Ef))
Scilab code Exa 21.10 Example on Regulation
174
1 2 function [z]=pol2rect(r,theta) 3 x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) 4 5 z=x+y*%i 6 endfunction 7 8 9 10 11 12 13
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
16 17 18 19 20
phi=acosd(pf) Ia=pol2rect(1,-phi) Xd=.8*j Xq=.4*j
// ter mina l volt age is ta ke n as reference ph as or and th e rat ed quantities ar e ta ke n as 1 p . u . 14 Vt=pol2rect(1,0) // terminal voltage 15 pf=.8 // lagging power facto r
21 22 23 24 25
// refe r to F ig .21.24
//arma tu re current
in th e te xt bo ok
OB=Vt+Ia*Xq //po we r angle delta=14.47 Id=Ia* sin ((delta+phi)*%pi/180) Ef=mag(OB)+mag(Id)*mag(Xd-Xq) mprintf ( ” Excitation voltage pe r ph as e is %f p . u . ” Ef )
175
,
Chapter 22 Synchronous Motors
Scilab code Exa 22.1 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction Va=400/ sqrt (3) // pe r ph as e applied voltage Ef=Va // pe r ph as e excitation volta ge delta=4*2 // equ iv al ent e l e c t r i c a l deg rees by wh ich
t h e ro to r is ret art ed 16 Xs=2 // per ph as e syn chr onou s reactance 17 Vt=pol2rect(Va,0) 18 Ef=pol2rect(Ef,-8) 19 Xs=pol2rect(2,90)
176
20 Ia=(Vt-Ef)/Xs 21 [Ia the ta]=rect2p ol(Ia) 22 mprintf ( ”Ar ma tu re current
, lag ging
drawn by the mo tor is %f A , Ia, th e app lie d vol tag e by %f de gre es ”
-theta)
Scilab code Exa 22.2 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// calc ulat ing
ar ma tu re curren t
Pout=7.46D+3 //output po we r Wc=500 // iron amd mec hani cal lo ss es P=Pout+Wc // tot al mec hani cal po wer deve loped Pm=P/3 Va=440/ sqrt (3) // applied voltage pe r ph as e pf=.75 // lagging power facto r Ra=.5 // effe ctiv e resistance p e r p h as e
//Pm=Va∗ I a ∗ p f −Ia ˆ2 ∗ Ra // solving this qua dra tic
eq uat ion
Ia=(Va*pf- sqrt ((Va*pf)^2-4*Ra*Pm))/(2*Ra) mprintf ( ”Arma tur e cu rr en t=%f A \n ” , Ia)
// calculat
ing
total
power supp lied
Pin=Va*Ia*pf Pi=3*Pin // total in pu t t o stato r Pe=650 // excitation loss Pt=Pi+Pe mprintf ( ”Total po we r supp lied= %f W \ n ” , Pt)
// calculating
effic ienc y
e=Pout/Pt*100 mprintf ( ” Ef fi ci en cy= %f percent ” , e )
// an sw er s va ry from th e te xt boo k due to rou nd off error
177
Scilab code Exa 22.3 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction f=50 P =4 Ns=120*f/P
// calculat
ing
excitation
volt age and power ang le
Va=400/ sqrt (3) Va=pol2rect(Va,0) pf=1 //po wer fac tor Pin=3000 // input to mo to r Ia=Pin/(3*mag(Va)) Xs=8 Ef=mag(Va)-%i*Ia*Xs [Ef the ta]=rect2p ol(Ef) mprintf ( ” Exci tati on volt age
degrees
\ n ” , Ef,-the ta) 178
Ef=%f V, po we r angle= %f
31 32 33 34 35 36
// calc ulat ing
tor que dev elo ped
omega_s=2*%pi*Ns/60 T=3*mag(Va)*Ef/(Xs*omega_s)* mprintf ( ”Mechanic al torque
sin (-theta*%pi/180)
developed T // cal cul at in g max torqu e deve lope d
=%f N −m\n ” ,T )
Tmax=3*mag(Va)*Ef/(Xs*omega_s)
37 mprintf ( ”Max torqu e deve lope d or pul l ou t torqu e=%f N−m” ,Tmax)
Scilab code Exa 22.4 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// calc ulat ing supply
pe r ph as e curren t drawn from th e
20 Pout=100*746 //output po we r 21 Va=500/ sqrt (3) // pe r ph as e applied 22 Zs=.06+j*.6
// synchr onous
voltage
im pe dan ce per phas e 179
23 24 25 26 27 28
e=.89 // eff ici enc y of motor at f u l l lo ad Pin=Pout/e // input to the mo tor pf=.8 // leading power facto r Ia=Pin/(3*Va*pf) theta=acosd(.8) mprintf ( ”Cur re nt drawn from th e su ppl y is %f A
leadin g th e appl ied theta)
excitation
volt age by % f degr ees
29 30 31 32 33 34
// calculating
35 36 37 38
// cal cul at in g mec hani cal po wer deve loped P m Ra=.06 // stator wi nd in g resist ance pe r ph as e
vol tag e p er p ha s e
Va=pol2rect(Va,0) Ia=pol2rect(Ia,theta) Ef=Va-Ia*Zs [Ef del ta]=rect2p ol(Ef) mprintf ( ” Exci tati on volt age pe r ph as e is %f V angle= %f degree s \ n ” , ma g(Ef),-delt a)
Pm=Pin-3*mag(Ia)^2*Ra mprintf ( ” Mechanical
\n ” , Ia,
po we r developed=
\ nPower
%f W \n ” , Pm)
Scilab code Exa 22.5 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 function [r,theta]=rect2pol(A) x = real ( A ) 3 4 y = imag ( A ) r = sqrt (x^2+y^2) 5 6 theta=atand(y/x) 7 endfunction 8 function [z]=pol2rect(r,theta) 9 x=r* cos (theta*%pi/180) 10 y=r* sin (theta*%pi/180) 11 z=x+y*%i 12 endfunction
180
13 14 15 16 17 18
j=%i Pout=10D+3 //out pu t of th e motor at f u l l loa d e=.85 // eff ici enc y at f u l l lo ad Pin=Pout/e // input at f u l l load Zs=.4+j*3 // synchr onous im pe da nc e per phas e
19 20 21 22 23 24 25
Va=400/ sqrt (3) // pe r ph as e applied voltage pf=.8 // leading power facto r Ia=Pin/(3*Va*pf) Ia=pol2rect(Ia,acosd(pf)) Ef=Va-Ia*Zs [Ef del ta]=rect2p ol(Ef) mprintf ( ”M otor must be excite d to a volt age
of %f V pe r p h a s e and t he an gl e of re tar d is %f de gr ee s \n ” , Ef,-del ta)
Scilab code Exa 22.6 Example on Phasor Diagram and Power angle Char-
acteristics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction
j=%i Va=400/ sqrt (3) // applied Zs=.5+j*4 // synchr onous pf=1 //po wer fac tor Ia=15 Ef=Va-Ia*Zs
16 [Ef del ta]=rect2p
voltage pe r ph as e im pe da nc e per phas e
ol(Ef)
181
17 mprintf ( ” Excitation
voltage is %f V a nd power angl e is equ al to % d degree s ” , Ef,-del ta)
Scilab code Exa 22.7 Example on Phasor Diagram and Power angle Characteristics
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i
// appl ied volt age pe r ph as e is ta ke n as th e reference ph as or 21 Va=1 // applied voltage per ph as e in p . u . 22 pf=.8 // lagging power facto r 23 24 25 26 27
theta=acosd(pf) Ia=pol2rect(1,-theta) Xq=.4*j Xd=.8*j OC=Va-Ia*Xq
28 [OC alp ha]=rect2p
//ar ma tu re current
ol(OC)
182
per ph ase
29 delta=-alpha //po we r angle 30 Id=Ia* sin ((theta-delta)*%pi/180) 31 Ef=OC-mag(Id)*mag(Xd-Xq) //ar ma t ur e resist
ance is neglected 32 mprintf ( ” Excitation voltage pe r ph as e is %f p . u . lagging th e appl ied volt age by % f degr ees \n ” ,Ef, delta) 33 // calculat ing power due to excitation 34 Pf=Va*Ef* sin (delta*%pi/180)/mag(Xd) 35 mprintf ( ”Pe r pha se po we r developed du e to f i e l d excitation is %f p . u. \ n ” ,Pf) 36 // calculat ing power due to saliency sin (2*delta*%pi/180) 37 Pr=Va^2*mag((Xd-Xq)/(2*Xd*Xq))* 38 mprintf ( ”P er ph as e power dev elo ped due to sali ency of th e motor is %f p . u. \ n ” ,Pr) 39 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 22.8 Example on Variation of Excitation
1 2 3 4 5 6 7 8 9 10 11 12 13 14
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction j=%i
// cal cul at in g new po wer angle
15 Va=400/ sqrt (3) // applied
voltage 183
pe r ph as e
16 17 18 19 20 21
Pin=8.5D+3/3 //po wer input per ph as e pf=.8 // lagging power facto r Ia=Pin/(Va*pf) //arma tu re current per theta=acosd(pf) Ia=pol2rect(Ia,-theta) Zs=4*j
22 23 24 25 26 27 28 29
Ef=Va-Ia*Zs [Ef the ta]=rect2p delta=-theta
30 31 32 33 34
//t he excitati
pha se
ol(Ef)
on vol tag e is incr ease d by 50%
Ef_dash=1.5*Ef
//as
the po wer deve lope d rem ain s same
delta_dash=asind(Ef* sin (delta*%pi/180)/Ef_dash) mprintf ( ”T he n ew po wer angle is %f degrees \n” , delta_dash)
// calc ulat ing
new ar ma tu re curren t and power facto r
Ef_dash=pol2rect( Ef_d ash ,-delta_dash) Ia_dash=(Va-Ef_dash)/Zs [Ia_da sh the ta]=rect2p ol(Ia_das h) mprintf ( ”T he ar ma tu re current drawn fr om the
supp ly is %f A a nd is now lea din g t he app li ed vol tag e by
%f degrees wer fac tor= %f( leading ) \n ” , Ia_dash ,thetawi,th cospo (theta*%pi/180)) 35 // an sw er s va ry from th e te xt boo k due to rou nd off error
184
Chapter 23 Three Phase Induction Motor
Scilab code Exa 23.1 Example on Slip and Rotor Frequency
1 2 3 4 5 6 7 8 9 10 11
// calc ulat ing f u l l loa d sp ee d of induction P1=8 //n o . of pol es of alternat or N=750 // sp ee d at whi ch alter nator ru ns f=P1*N/120 // fre que ncy of alternator P2=6 //n o . of poles of indu ctio n motor Ns=120*f/P2 // synchronous speed s=.03 // f u l l load sl ip Nr=Ns*(1-s) mprintf ( ” Full load ” , round (Nr))
spee d of indu ction
motor
mo to r=%d r pm
12 // calculat ing fr equ enc y of rotor emf 13 fr=s*f 14 mprintf ( ”Freq ue ncy of rot or emf=%f H z” , fr)
Scilab code Exa 23.2 Example on Slip and Rotor Frequency
185
\n
1 2 // calculat ing no . of poles 3 Ns=1200 // sync hro nous spe ed of
rota ting mag ne ti c field 4 f=60 // fr equ enc y of th e su pp ly to th e stator 5 P=120*f/Ns 6 7 8 9 10 11 12 13 14 15 16
of po le s=%d \ n ” , P ) ing sli p at f u l l lo ad Nr=1140 // f u l l load speed mprintf ( ”No.
// calculat
s=(Ns-Nr)/Ns mprintf ( ”Perc ent age s*100)
// calculating
sl ip at f u l l loa d=%f perc ent
\n ” ,
fr eq ue nc y of rot or vol tag e
fr=s*f mprintf ( ”Freq ue ncy
of rot or volt age= %d Hz \ n” ,fr) // calc ulat ing sp ee d of rotor f i e l d w. r . t . rotor N1=120*fr/P // spe ed mprintf ( ”Spee d of ro to r f i e l d w. r . t . ro to r=%d rpm
\n”
,N1) 17 // calc ulat ing sp ee d of rotor f i e l d w. r . t . stator 18 N2=1140 // sp ee d of th e rotor w. r . t . stator 19 mprintf ( ”Spe the roto rot ror f i ef iledl dw.w. rpm \ nS pe ededofof the r .rt..t .st statatoror= f i %d eld =%d rpm \ n ” , N2+N 1,N1+N2-Ns) 20 s=.1 21 N1=(1-s)*Ns 22 mprintf ( ”S p eed of th e rotor at 10 per cen t sli p=%d
rpm \ nR ot or frequency
at 10 percent
sl ip= %d Hz \n ” ,
N1,s*f) 23 Eph=230 // applied voltage pe r ph as e 24 E1ph=Eph // in du ce d emf pe r ph as e in th e stator
winding 25 E2ph=E1ph*.5 // rotor in du ce d emf at sta nd st il l 26 E2ph_dash=s*E2ph 27 mprintf ( ”Ro to r in du ce d emf at st an ds ti ll= %f V \ nRotor in du ce d emf at 10 perc ent sl ip= %f V ” ,E2ph, E2ph_dash)
186
Scilab code Exa 23.3 Example on Slip and Rotor Frequency
1 2 3 4 5 6 7 8
// calc ulat ing sy nc hr ono us sp ee d f=50 // frequ ency P =4 //n o . of poles Ns=120*f/P mprintf ( ” Synchronous
speed= %f rpm \n ” ,Ns) ing sp ee d of rotating air gap f i e l d mprintf ( ”Rot at in g f i e l d in air gap rotates at synchronous spee d , hence i t s speed =%f rpm \n ” ,Ns) 9 // calculat ing sp ee d of indu cti on motor 10 s=.04 // sl ip 11 12 13 14 15
// calculat
Nr=(1-s)*Ns mprintf ( ”Spe ed of indu ction
mo to r=%f rp m \n ” ,Nr) // calculating slip in rpm mprintf ( ” Sli p of the mo to r in rpm=%f rpm \n ” ,s*Ns) mprintf ( ”T he rotor f i e l d rota tes at syn chr onou s
spe ed w. r . t . stator , he nc e re la ti ve spe ed =%f rpm \ n ” ,Ns) 16 mprintf ( ”B oth rotor and stator f i e l d rotate at sy nc hr ono us sp ee d , rel at iv e to th e stator , he nce , speed of ro to r f i e l d w. r . t . st at or f i e l d =0 rpm \n ” ) 17 mprintf ( ”Spe ed of the rot or f i e l d w. r . t . rot or= %f rpm \n ” ,s*Ns) 18 // calculat ing fr equ enc y of rotor in du ce d emf 19 fr=s*f 20 mprintf ( ”Freq ue ncy of rot or induc ed emf=%f H z \n ” ,fr) 21 // calculat ing rotor in du ce d emf pe r ph as e 22 k=.6 // turn s rati o 23 E1ph=400/ sqrt (3) // in du ce d emf in stator wi nd in g 24 E2ph=E1ph*k // rotor in du ce d emf pe r ph as e at th e
ins ta nt of start ing 187
25 E2ph_dash=s*E2ph 26 mprintf ( ”Ro to r ind uce d emf per condition=%f V” ,E2ph_dash)
ph ase un de r loade d
Scilab code Exa 23.4 Example on Equivalent Circuit
1 2 3 4 5 6 7
R2=.5 // rotor resist ance pe r ph as e //at sta nds til l E=40 // induced em f E2=E/ sqrt (3) // induce d emf per pha se X2=3 // rotor reactan ce pe r ph as e R =4 // additi onal resistance pe r p h a se in th e rot or circuit 8 Rt=R2+R // total resistance p er p h a s e in t he rot or circuit 9 Z2 = sqrt (Rt^2+X2^2) // roto r im pe da nc e per pha se 10 I2=E2/Z2 11 mprintf ( ”R o t o r cur ren t pe r ph as e at st an dst il l= %f A n ” , I2) 12 // calculating rot or cu rr en t p er p h as e at 5% s lip 13 s=.05 // sl ip 14 X2=s*X2 15 Z2 = sqrt (R2^2+X2^2) 16 E2=s*E2 // induce d emf per pha se 17 I2=E2/Z2 18 mprintf ( ”R o t o r cur ren t pe r ph as e at 5 per ce nt sl ip= %f A” ,I2)
Scilab code Exa 23.5 Example on Equivalent Circuit
1
188
\
2 // calculating 3 4 5 6 7 8 9 10 11 12 13
rot or starting cu rr en t pe r p h a se o n n o r m a l volt age wi t h sli p ring sh or t − circuited V=400 // volt age appl ied to th e stator wi nd in g V1=V/ sqrt (3) //pha se voltage k=2.5 // transfor mation rati o R2=.02 // rotor resist ance pe r ph as e
//at sta nds til l s =1 // sl ip E2=V1/k // in du ce d ph as e voltage in th e rotor wi nd in g X2=2*%pi*50*.6D-3 // rotor reactan ce pe r ph as e Z2 = sqrt (R2^2+X2^2) I2=E2/Z2 mprintf ( ”R o t o r starting
vol tag e w i t h slip
cur ren t pe r ph as e on n or m a l rin g sh or t − circuited=%f A \n ” , I2
) 14 15 16 17 18 19
// calculating
rot or power factor
at starting
pf=R2/Z2 mprintf ( ”Ro to r power facto r at star ting= %f \n ” ,pf)
// calculating s=.03 // sl ip
rot or cu rr en t p er p h as e at 3 % s lip
E2=s*E2
20 X2=s*X2 21 Z2 = sqrt (R2^2+X2^2) 22 I2=E2/Z2 23 mprintf ( ”R o t o r cur ren t pe r ph as e at 3 per ce nt sl ip= %f A\ n” ,I2) 24 // calculating rot or power factor at 3% slip 25 pf=R2/Z2 26 mprintf ( ”Ro to r power facto r at 3 perc ent sl ip= %f” , pf ) 27 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 23.6 Example on Equivalent Circuit
189
1 2 function [r,theta]=rect2pol(A) 3 x = real ( A ) y = imag ( A ) 4 5 r = sqrt (x^2+y^2) theta=atand(y/x) 6 7 8 9 10 11 12 13 14 15 16 17
endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i R2_dash=.16 s=.03 X2=.4 Z2_dash=R2_dash/s+X2*j
refer red
// ef fe ct iv e rotor
18 R0=200 19 Xm=20*j 20 Z=1/(1/R0+1/Xm+1/Z2_dash) 21 22 23 24 25 26 27 28 29 30 31 32
im pe da nc e
t o sta tor
// equ iva len t im pe da nc e
Z1=.15+.4*j // al sta input tor imim pe pe dan Zin=Z1+Z // tot dacenc e V=400 // applied voltage
// calculating
stator
cu rre nt
V1=V/ sqrt (3) // pe r ph as e stator voltage I1=V1/Zin [I1 the ta1]=rect2 pol(I1) mprintf ( ” Stator current =%f A at %f po wer fac tor lagging \ n ” ,I1, cos (theta1*%pi/180))
// calculat
ing
rotor
cur ren t
I1=V1/Zin E1=V1-I1*Z1 Iw=E1/R0 // pe r ph as e core
los s component of no loa d
current 33 Im=E1/Xm // per ph ase magnet ising 34 I0=Iw+Im //n o loa d current 35 I2_dash=I1-I0
190
current
36 [I2_da sh the ta2]=rect2 pol(I2_da sh) 37 mprintf ( ”P er ph as e rotor curren t=%f A lagging by %f degrees \ n ” ,I2_dash ,- theta2) 38 // cal cul at in g mec hani cal out put po wer 39 P=I2_dash^2*R2_dash*(1-s)/s // mechanical po we r output
pe r ph ase 40 Pout=3*P 41 mprintf ( ” Total mechanical po we r output =%f kW \ n ” ,Pout /1000) 42 // cal cul at in g input po wer drawn by the mo tor 43 Pin=3*V1*mag(I1)* cos (theta1*%pi/180) 44 mprintf ( ” Total input po we r dr aw n by the mo to r=%f kW \ n ” ,Pin/1000) 45 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 23.7 Example on Equivalent Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i R2_dash=.16 s=3/100 // sl ip
17 Rl=R2_dash*(1-s)/s
// lo ad resist 191
ance
18 19 20 21 22 23
Z1=.15+.4*j // sta tor im pe dan ce Z2_dash=.16+.4*j // equival ent rotor im pe da nc e Z=Rl+Z1+Z2_dash // tot al im pe da nc e per pha se Vph=400/ sqrt (3) // applied voltage pe r ph as e I2_dash=Vph/Z R0=200
24 25 26 27 28 29 30 31 32 33 34
Xm=20 Iw=Vph/R0 Im=Vph/Xm I0=Iw-Im*j I1=I0+I2_dash [I1 the ta]=rect2p ol(I1) pf = cos (theta*%pi/180) p=mag(I2_dash)^2*Rl //outp ut po wer per ph as e Pout=3*p Pin=3*Vph*I1*pf mprintf ( ”By usin g ap pr ox im at e equivalent circu it ,
t he val ue s of differ ent pa ra me te rs ar e as u n d er \ nP er ph ase sta tor current =%f A \ nPe r ph as e rotor current=%f A \ nOpe rati ng po we r fa ct or= %f \ nInput power=%f kW \ nMecha nical outpu t powe r=%f kW \ n ” ,I1, I2_dr ash 35 // refe F ig,pf,Pin . 23. 16 /10 in ^3, th ePout/10^3) te xt bo ok 36 Z2_dash=5.3+j*0.4 37 Z=(j*Xm)*Z2_dash/(j*Xm+Z2_dash) // equi val ent
impedance 38 39 40 41 42 43 44 45
Zin=Z1+Z // tot al input im pe da nc e I1=Vph/Zin I2_dash=I1*j*Xm/(j*Xm+Z2_dash) [I1 the ta]=rect2p ol(I1) pf = cos (theta*%pi/180) Pout=3*(mag(I2_dash))^2*R2_dash*(1-s)/s Pin=3*Vph*I1*pf mprintf ( ”By solvi ng th e p ro b l e m us in g t he circu
it in F i g . 23 .1 6 in th e book , th e val ue s of differ ent par ame te rs are as un de r \ nPer ph as e stator cur ren t =%f A\ nP er ph as e rotor current =%f A \ nOperating po we r fa ct or= %f \ nIn put power =%f kW \ nMechanical 192
out put power =%f kW \n ” ,mag(I1),I2_dash ,pf,Pin /10^3,Pout/10^3)
Scilab code Exa 23.8 Example on Losses in Induction Motor
1 2 3 4 5 6 7 8
Pin=60D+3 //p ow er input p=1D+3 // stato r losses Pg=Pin-p // ai r ga p po we r s=3/100 // sl ip Pm=Pg*(1-s) Prcu=s*Pg mprintf ( ”Mechanic al po we r developed
kW w it h rotor
by the mo to r=%f co pp er lo ss es of %f kW” ,Pm/1000,
Prcu/1000)
Scilab code Exa 23.9 Example on Losses in Induction Motor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//pow er output // eff ici enc y //po we r input // total losses //P=Pscu+Psi+Prcu+Pfw // Pscu= Prcu= Psi , Pfw=Ps i /3 Po=50D+3 e=90/100 Pin=Po/e P=Pin-Po
Psi=P/(1+1+1+1/3) Pscu=Psi // stator co pp er loss Prcu=Psi mprintf ( ”Rotor copper lo ss= %d W \ n” , round (Prcu)) Pg=Pin-2*Pscu mprintf ( ” Air gap powe r=%d W \ n ” , round (Pg)) s=Prcu/Pg mprintf ( ” S l i p=%f p . u . ” , s )
193
16 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 23.10 Example on Losses in Induction Motor
1 2 3 4 5 6 7 8 9 10 11 12 13
f=50 // frequ ency P =6 //n o . of poles Ns=120*f/P // synchr onous spee d in rpm Nr=950 // sp ee d at whic h th e motor is ru nn in g in rpm s=(Ns-Nr)/Ns // sl ip Pm=3.73D+3 // mechanic al po we r developed by the mo to r
// ir on losses
in t h e ro to r ar e ne gl ec te d
Prcu=s*Pm/(1-s) // rotor co pp er loss P1=Pm+Prcu // rotor input P=.25D+3 // stato r losses P2=P1+P mprintf ( ” Sta tor in pu t to th e 3 − ph as e induction =%f kW\n ” ,P2/1000)
mo tor
Scilab code Exa 23.11 Example on Losses in Induction Motor
1 2 3 4 5 6 7 8 9 10 11
// calculating rot or co pp e r losses s=.04 // sli p of th e motor Pout=14.92D+3 //out pu t of th e motor Pfw=200 // f r i c t i o n an d windage losses Prcu=s*(Pout+Pfw)/(1-s) mprintf ( ”Rot or coppe r lo ss es= %d W \n ” , round (Prcu))
// calculating
effic ienc y at f u l l lo ad
P=Pout+Pfw+Prcu+1620 // stator inp ut e=Pout/P*100 mprintf ( ” Eff ici enc y at f u l l load =%f percent
194
\n ” ,e )
12 13 14 15 16 17
// calculating line cu rr en t pf=.86 //p ower factor of lo ad Vl=500 // line volta ge
18 19 20 21
f=50 // supply frequency f_r=s*f // fre quen cy of rotor emf n=f_r*60 mprintf ( ”No of c om pl et e cycles of t he rot or electro motiv e for ce per mi nu te =%d \n ” ,n )
Il=P/( sqrt (3)*Vl*pf) mprintf ( ”Line curre nt= %f A \ n” ,Il)
// calculating
no of c om pl et e cycle s of t he rot or
elect romotive
force
pe r m i n u te
22 //an sw er va ry fro m th e te xtb ook
due to rou nd of f e rr or , al so t he re is an er ro r i n v al u e of st at or in pu t gi ve n in te xt bo ok
Scilab code Exa 23.12 Example on Losses in Induction Motor
1 2 // calculating slip 3 n=100 //n o . of co mp le te alternati
ons
pe r mi n u t e of
rotor
emf 4 f_r=n/60 // rotor fre quen cy in Hz 5 f=50 // supp ly frequency in Hz 6 7 8 9 10 11 12 13 14 15
s=f_r/f mprintf ( ” Slip
of the mot or =%f percent // calculat ing rotor sp ee d P =6 //n o . of poles Ns=120*f/P // synchronous speed
\ n ” ,s*100)
Nr=(1-s)*Ns mprintf ( ” Rotor
sp eed= %d rp m \ n ” , round (Nr)) // calculating rot or co pp e r losses pe r p h a s e P1=75D+3 // rotor input Prcu=P1*s
16 mprintf ( ”Ro to r cop per
lo ss es per ph as e=%f W \n ” ,Prcu 195
/3) 17 // cal cul at in g mec hani cal po wer deve loped 18 Pm=P1-Prcu 19 mprintf ( ” Mechanical pow er devel oped= %f kW \ n” , Pm /1000) 20 // calculating rot or resistance pe r p h a s e 21 22 23 24
Ir=60 // rotor curren t Rr=Prcu/(3*Ir^2) mprintf ( ”Ro to r res is ta nc e per
ph as e=%f o hm” ,Rr) // an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 23.13 Example on Torque
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// cal cul at in g rat io of maximum to f u l l load torqu e Nr=970 // spe ed at f u l l load torqu e in rpm Ns=50*120/6 // synchr onous speed in rpm s=(Ns-Nr)/Ns // sl ip at f u l l loa d R2=.02 // rotor resist ance pe r ph as e X2=.3 // rot or re act anc e p er p ha s e at sta nds till alpha=R2/X2
// Full
load
torque
Tf=k1 ∗Kt
k1=s*alpha/(s^2+alpha^2)
//ma ximum to r qu e Tmax=Kt/2 x=1/(2*k1) mprintf ( ” Ratio x)
of maximum to f u l l load
torque= %f
\n ” ,
// ca lc ul at in g spee d at maximum torque s_m=R2/X2 // s l i p at maximum torque Nm=(1-s_m)*Ns mprintf ( ” Speed )
19 // calculating
at maximum to rq ue=%d rp m \ n ” , round (Nm) ratio
of starting 196
to rq ue t o f u l l lo ad
torque 20 21 22 23 24
s =1 // slip
a t star ting // sta rti ng torqu e Ts t=k2 ∗Kt k2=s*alpha/(s^2+alpha^2) y=k2/k1 mprintf ( ”Ra ti o of starting
to rq ue to f u l l lo ad
torque=%f \ n” ,y )
Scilab code Exa 23.14 Example on Torque
1 2 3 4 5 6 7 8 9 10
function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i Vl=220 // line volta ge Vph=Vl/ sqrt (3) // stator ph as e voltage n=.65 // ratio of no . of rot or w in di n g tu rn s to no . of
stator
wi nd in g turn s //ph as e volt age in du ce d in th e rotor a t stand still 12 R2=.1 // rotor resist ance pe r ph as e 13 X2=.8 // st an ds til l reac tanc e pe r ph as e 14 // at 5 % sli p 11 E2=n*Vph
15 16 17 18 19 20 21 22
s=5/100 X=s*X2 // reactance pe r ph ase Z2=R2+X*j // ro to r impe danc e e2=s*E2 // rotor ph as e voltage I2=e2/mag(Z2) mprintf ( ”R o t o r cur ren t at 5 per ce nt
// calculat
ing
Prcu=3*I2^2*R2
sl ip= %f A rotor in pu t // total rot or c op pe r losses
23 Pg=Prcu/s
197
wi nd in g
\n ” ,I2)
24 mprintf ( ”Rotor inpu t=%f W\n ” ,Pg) 25 // calculating total to rq ue at 5% s lip 26 Pm=Pg-3*I2^2*R2 // mechanic al po we r developed
by the
rotor 27 Ns=120*50/4 28 Nr=Ns*(1-s)
// synchronous speed // sp ee d of th e rotor
29 T=60*Pm/(2*%pi* round (Nr)) 30 mprintf ( ”To ta l to rq ue de ve lo pe d by th e rotor
at 5 perc ent sl ip= %f N −m\ nT ot al mec hani cal po wer at 5 percent s li p=%f kW \n ” ,T,Pm/1000) 31 // cal cul at in g rotor current at maximum torqu e 32 s_m=R2/X2 // s l i p fo r maximum torque 33 I2m=s_m*E2/ sqrt (R2^2+(s_m*X2)^2) 34 mprintf ( ”Rotor cu rr en t at maximum tor que= %d A \n ” , round (I2m)) 35 // cal cul at in g rotor input corresponding to m aximum
torque 36 Sm=3* round (I2m)^2*R2 // total 37 Pg=Sm/s_m 38 mprintf ( ”Rot or input corresp =%f W\ n ” ,Pg) 39 40 41 42 43
rot or co pp e r losses ondin g to m aximum torque
// ca lc ul at in g maximum torque Pm=Pg-Sm Nm=Ns*(1-s_m) T=60*Pm/(2*%pi* round (Nm)) mprintf ( ”Maximum t o r qu e=%f N −m\ nSpeed
torque=%d rpm
at maximum \nMaximum me ch an ic al power= %f kW” ,T ,
Nm,Pm/1000) 44 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 23.15 Example on Torque
1 2 Ns=120*50/4
// synchronous
speed 198
3 4 5 6 7 8
R2=.03 // rotor resist ance X2=.15 // rotor reactan ce alpha=R2/X2 s_m=alpha // s l i p at maximum torque Nr=(1-s_m)*Ns // speed at maximum tor que
9 10 11 12 13 14 15
//Tst=Kt ∗ alpha /( 1+al pha ˆ2) //Tmax=Kt/2 //Ts t /Tmax=3/4 −−>3∗ alphaˆ2 −8∗ alpha+3=0 // solving for al ph a
// alp ha =(. 03+r ) /. 15
alpha=(8- sqrt (8^2-4*3*3))/(2*3) r=.15* alpha -.03 mprintf ( ” If a resistance of %f o hm is added in th e
circ uit , t h e re qu ir ed star ting achieved” ,r )
t or qu e will
be
Scilab code Exa 23.16 Example on Torque
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
R2=1.1 // rotor resist ance pe r ph as e // at 60 Hz supply f=60 // frequenc y of supp ly P =6 //n o . of poles Ns1=120*f/P // synchronous speed Nr=1000 // sp ee d of rotor s_m1=(Ns1-Nr)/Ns1 // s l i p at maximum torque X2=R2/s_m1 L2=X2/(2*%pi*60)
// at 50 Hz supply X2=2*%pi*50*L2 s_m2=R2/X2 // s l i p at maximum torque Ns2=120*50/6 // synchronous speed Nr2=(1-s_m2)*Ns2 mprintf ( ” Rotor spee d at maximum to rqu e=%d r pm” , round (Nr2))
199
Scilab code Exa 23.17 No load and Block Rotor Test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
function [z]=pol2rect(r,theta) x=r* cos (theta) y=r* sin (theta) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction j=%i R1=.15 // pe r ph as e stator
wi nd in g resist ance test Vb=133/ sqrt (3) // per ph as e voltage Ib=100 // pe r ph ase current Wb=8085/3 // per phase po we r Zb=Vb/Ib // per phase imp eda nce Rb=Wb/Ib^2 // pe r ph as e resi sta nce Xb = sqrt (Zb^2-Rb^2) // per ph ase reactance R2_dash=Rb-R1 //pe r p h as e rot or resistance referred t o sta tor X2_dash=Xb/2 // pe r ph as e rotor reac tanc e referred to stator X1=X2_dash // pe r ph as e stator leakag e reactan ce //n o lo ad test Vo=400/ sqrt (3) // per ph as e voltage Io=20 // per ph as e current Wo=2080/3 // per phase po we r pf=Wo/(Vo*Io) //p ow er fac tor
// blo ck rotor
30 phi0= acos (pf)
200
31 32 33 34 35 36
Iw=Io* cos (phi0) Im=-Io* sin (phi0)*j Io=pol2rect(Io,-phi0) Z1=R1+X1*j Ro=(Vo-Io*Z1)/Iw Xm=(Vo-Io*Z1)/Im
37 mprintf ( ”Equ iva le nt
cir cui t pa ra me te rs ar e \nR1=%f ohm; \ nX1=%f ohm ; \ nR2 dash= %f ohm ; \ nX2 dash= %f ohm ; \ nRo=%f ohm ; \ nXm=%f ohm” ,R1,X1 ,R2_dash ,X2_dash , mag ( Ro ) , mag ( Xm ) )
Scilab code Exa 23.18 Example on Circle Diagram
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// refe r F ig . 23. 25 in th e te xt bo ok k1=40 // curren t scal e Vph=400/ sqrt (3) // voltage per ph ase P=k1*Vph //po we r per pha se k2=3*P //p ow er sca le // calculat ing f u l l lo ad stator curr ent P=33.6D+3 //outp ut of mot or P1=P/k2 //ou pu t of motor to scale / /P is th e cor res pon ding oper atin g poi nt OP=1.55 I1=OP*k1 phi1=28.5 mprintf ( ” Full
load sta tor current =%f A wit h %f po wer factor lag gin g \ n ” ,I1, cos (phi1*%pi/180)) 15 // calculating effic ienc y at f u l l lo ad 16 17 18 19 20
PL=2.35 PX=2.75 e=PL/PX*100 mprintf ( ” Eff ici enc y at
f u l l load =%f percent // cal cul at in g max po wer out put
21 NPm=2.6
201
\n ” ,e )
22 23 24 25
mprintf ( ”Maximum ou tp ut powe r=%f kW \n ” ,NPm*k2*10^-3) // ca lc ul ti ng max torqu e deve loped MTm=3.12 mprintf ( ”Maximum tor que ” ,MTm*k2*10^-3)
devel oped
by the mot or =%f kW
26 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 23.19 Example on starting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//at sh ort circu it Vsc=100 // applied voltage Isc=15 // line va lu e of cur ren t Iph=Isc/ sqrt (3) //ph as e va lu e of cur ren t // calculat ing starting cur ren t drawn by th e motor V=400 // line volt age Vph=V/ sqrt (3) //pha se voltage I=Iph*Vph/Vsc //ph a s e va lu e of starting cu rr en t Il=I mprintf ( ” Sta rti ng ,Il)
// calculating
ratio
curren t drawn by the mo to r=%d A of starting
t o f u l l lo ad cu rr en t
Pout=5D+3 //output e=.84 // f u l l loa d ef fi ci en cy pf=.82 //p ow er fac tor I=Pout/( sqrt (3)*V*pf*e) // f u l l load curren t r=Il/I mprintf ( ”Rat io of star ting to f u l l loa d curren t=%f” r)
Scilab code Exa 23.20
Example on starting 202
\n”
,
1 2 3 4 5 6
V=400 //pha se voltage applied to mo tor // when star ted directly on line Iph=25 //ph as e current Il = sqrt (3)*Iph mprintf ( ”Line current
drawn by the mo tor when
star ted directly on line= %f A \ n” ,Il) 7 //w hen start ed wi th au to −tr ans fo rm er starter ta pp in g per 8 Vl=.6*V // line 9 Vph=Vl //pha se 10 Iph=25 //ph as e
with a
ce nt of 60 per cen t volt age voltage current
11 Ist=Iph*Vph/V 12 Il = sqrt (3)*Ist 13 mprintf ( ”When sta rte d wit h au to −tra nsf orm er
starte r w it h a ta pp in g of 60 per ce nt \ nPhase star ting current =%f A \ nL in e star ting current =%f A \n ” ,Ist,
Il ) 14 // when start ed wi th star −de lt a starter 15 Vph=V/ sqrt (3) //pha se voltage 16 I=Iph*Vph/V 17 Il=I 18 mprintf ( ”When sta rte d wit h star
starting A” ,I,Il)
−de lt a starter \ nPhase cur ren t =%f A \ nL in e star ting current =%f
203
Chapter 24 Single Phase Induction Motor
Scilab code Exa 24.1 Example on Equivalent Circuit
1 2 3 4 5 6 7 8 9 10 11 12
f=50 // frequenc y in Hz P =4 //n o . of poles Ns=120*f/P // synchronous Nr=1420
// calculat
ing
speed
fo rw ar d sli p
s=(Ns-Nr)/Ns mprintf ( ”For wa rd s l i p= %f p . u. \ n ” ,s )
// calc ulat ing
bac kward sl ip
s1=2-s mprintf ( ”Ba ck wa rd s l i p s b=%f p . u.
// calcu lating branch
effective
ro to r resist
\ n ” ,s1) ance in f or w ar d
13 R2_dash=4.5 14 Rf=R2_dash/(2*s) 15 mprintf ( ” Effective
rot or resistance in fo rw ar d bra nch= %f ohm \n ” , Rf) 16 // calculating effe ctiv e rot or resistance in ba ckwa rd branch 17 Rb=R2_dash/(2*(2-s)) 18 mprintf ( ” Effective
rotor
resist 204
ance
in ba ckwa rd
br an ch= %f ohm” , Rb) 19 // an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 24.2 Example on Equivalent Circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction f=50 // frequ ency P =4 //n o . of poles Ns=120*f/P // synchronous speed Nr=1420 s=(Ns-Nr)/Ns Xm=70 R2_dash=3.75 X2_dash=1.75 Zf=(Xm*%i/2)*(R2_dash/(2*s)+%i*X2_dash/2)/(R2_dash /(2*s)+%i*(Xm+X2_dash)/2) // forwa rd impeda nce 27 Zb=(%i*Xm/2)*(R2_dash/(2*(2-s))+%i*X2_dash/2)/( R2_dash/(2*(2-s))+%i*(Xm+X2_dash)/2)
205
//backward
impedance 28 29 30 31 32
Z1=2.5+%i*1.5 Zin=Z1+Zf+Zb // inpu t impeda nce
// calculat
ing
in pu t cur ren t
V1=pol2rect(230,0) I1=V1/Zin
33 [I1 the ta]=rect2p ol(I1) 34 mprintf ( ”Inp ut curren t drawn by th e motor is %f A , lagging th e appl ied volt age by % f degr ees \n ” , I1 ,-theta) 35 // calc ulat ing inp ut power 36 Pin=mag(V1)*I1* cos (theta*%pi/180) 37 mprintf ( ”Pow er in put= %f W\n ” , Pin ) 38 // cal cul at in g mec hani cal po wer deve loped 39 Pgf=I1^2* real (Zf) 40 Pgb=I1^2* real (Zb) 41 Pm=(Pgf-Pgb)*(1-s) 42 mprintf ( ” Mechanical po we r developed= %f W \n ” , Pm) 43 // calculat ing resultant to rq ue de ve lo pe d 44 omega_s=2*%pi*Ns/60 45 T=(Pgf-Pgb)/omega_s 46 47 48 49 50 51 52
mprintf ( ”Resultant torqu // calculating effic ienc y e deve loped =%f N −m\n ” ,T ) Prot=35+60 Pout=Pm-Prot e=Pout/Pin*100 mprintf ( ” Ef fi ci en cy= %f percent ” , e )
// an sw er s va ry from th e te xt boo k due to rou nd off error
Scilab code Exa 24.3 Example on Equivalent Circuit
1 2 function [r,theta]=rect2pol(A) 3
x = real ( A )
206
4 y = imag ( A ) r = sqrt (x^2+y^2) 5 6 theta= atan (y/x) 7 endfunction 8 function [z]=pol2rect(r,theta) x=r* cos (theta) 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
y=r* sin (theta) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction f=50 // frequ ency P =4 //n o . of poles Ns=120*f/P // synchronous Nr=1425 s=(Ns-Nr)/Ns // sl ip R2_dash=7.5 X2_dash=4.5
speed
25 Xm=150 26 Zf=(Xm*%i/2)*(R2_dash/(2*s)+%i*X2_dash/2)/(R2_dash /(2*s)+%i*(Xm+X2_dash)/2) // forwa rd impeda nce 27 Zb=(%i*Xm/2)*(R2_dash/(2*(2-s))+%i*X2_dash/2)/( R2_dash/(2*(2-s))+%i*(Xm+X2_dash)/2) //backward
impedance 28 29 30 31 32 33 34
Z1=2.5+4.5*%i Zin=Z1+Zf+Zb // inpu t impeda nce
// calculat
ing
in pu t cur ren t
V1=pol2rect(230,0) I1=V1/Zin [I1 the ta]=rect2p ol(I1) mprintf ( ”Inp ut curren t drawn by th e motor is %f A a t %f pf lagg ing \ n” , I1, cos (theta))
35 // calc ulat ing air gap power 36 Pgf=I1^2* real (Zf) // air gap po wer due to for war d
field 207
37 Pgb=I1^2*
real (Zb) // ai r ga p po we r du e to ba ck wa rd
field 38 39 40 41
Pg=Pgf+Pgb mprintf ( ” Air
// calculating
gap pow er=%f W \ n ” ,Pg) rot or co pp e r losses
Prc=s*Pgf+(2-s)*Pgb
42 mprintf ( ”Rot or coppe r lo ss es= %f W” ,Prc) 43 // an sw er s va ry from th e te xt boo k due to rou nd off
error
Scilab code Exa 24.4 Example on No Load and Block Rotor Test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//u n de r bl oc k rotor
condit ion
Vb=82.5 Ib=9.3 Zb=Vb/Ib P=500 //power con sume d Rb=P/Ib^2 Xb = sqrt (Zb^2-Rb^2) R1=2.5 //m ain res ist anc e wi nd in g R2_dash=Rb-R1 // ro to r resist ance refer red t o sta tor X1=Xb/2 X2_dash=X1 // rot or re act anc e referred t o stato r
//un de r no load I0=6.4 V0=230 Z0=V0/I0 P0=220 //power cons ume d R0=P0/I0^2 X0 = sqrt (Z0^2-R0^2) Xm=2*X0-3/2*Xb mprintf ( ”Equ iva le nt cir cui t pa ra me te rs of th e motor
ar e : \ nR1=%f ohm , \ nX1=%f ohm , \ nXm=%f ohm , \ n R2 dash =%f ohm , \ nX2 dash= %f ohm \ n” , R1,X1,Xm, R2_d ash , 208
X2_dash)
Scilab code Exa 24.5 Example on No Load and Block Rotor Test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
function [r,theta]=rect2pol(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) theta=atand(y/x) endfunction function [z]=pol2rect(r,theta) x=r* cos (theta*%pi/180) y=r* sin (theta*%pi/180) z=x+y*%i endfunction function [r]=mag(A) x = real ( A ) y = imag ( A ) r = sqrt (x^2+y^2) endfunction f=50 // frequ ency P =4 //n o . of poles Ns=120*f/P // synchronous speed Nr=1420 //mo to r speed s=(Ns-Nr)/Ns R1=2.5 X1=3.365 Xm=60.945 R2_dash=3.28 X2_dash=3.365 Zf=(Xm*%i/2)*(R2_dash/(2*s)+%i*X2_dash/2)/(R2_dash /(2*s)+%i*(Xm+X2_dash)/2) // forwa rd impeda nce 29 Zb=(%i*Xm/2)*(R2_dash/(2*(2-s))+%i*X2_dash/2)/( R2_dash/(2*(2-s))+%i*(Xm+X2_dash)/2)
209
//backward
impedance 30 31 32 33 34
Z1=R1+%i*X1 Zin=Z1+Zf+Zb
// calculat
ing
// inpu t impeda nce in pu t cur ren t and power factor
V1=pol2rect(230,0) I1=V1/Zin
35 [I1 the ta]=rect2p ol(I1) 36 mprintf ( ”Inp ut curren t drawn by th e motor is %f A
lagg ing th e ap pli ed vol tag e by a n an gl e of %f de gr ee s , th at is at % f pf lag gin g \ n ” , I1,-th et a , cos (theta*%pi/180)) 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
// calc ulat ing
inp ut power
Pin=mag(V1)*I1* cos (theta*%pi/180) mprintf ( ”Pow er in put= %f W\n ” , Pin )
// calc ulat ing
tor que dev elo ped
Pgf=I1^2* real (Zf) Pgb=I1^2* real (Zb) omega_s=2*%pi*Ns/60 T=(Pgf-Pgb)/omega_s mprintf ( ”Resultant
torqu e deve loped =%f N −m\n ” ,T ) // cal cul at in g out put pow er Pm=(Pgf-Pgb)*(1-s) // ed mechanic we r developed W0=220 //pow er co ns um unde r al no po load I0=6.4 //n o loa d current Prot=W0-I0^2*(R1+R2_dash/4) // rotational losses Pout=Pm-Prot mprintf ( ”Out pu t pow er devel oped= %f W \ n” , Po ut)
// calculating
effic ienc y
e=Pout/Pin*100 mprintf ( ” Eff ici enc y=%f percent
// calc ulat ing Pg=Pgf+Pgb mprintf ( ” Air
// calculating
air
\n ” , e )
gap power
gap pow er=%f W \ n ” ,Pg) rot or co pp e r losses
Prc=s*Pgf+(2-s)*Pgb mprintf ( ”Rot or coppe r lo ss es= %f W” ,Prc)
// an sw er s va ry from th e te xt boo k due to rou nd off error 210
211