Vous êtes sur la page 1sur 212

Scilab Textbook Companion for

Basic Electrical Engineering


by A. Mittle and V. N. Mittle1
Created by
Idris Manaqibwala
Electrical Technology
Civil Engineering
VNIT Nagpur
College Teacher
Prof. V. B. Borghate
Cross-Checked by
Bhavani Jalkrish
August 28, 2014

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

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.

Contents
List of Scilab Codes

1 DC Circuits

13

2 Electrostatics

22

3 Electromagnetism

26

4 Magnetic Circuit

29

5 Electromagnetic Induction

41

6 Fundamentals of Alternating Current

52

7 AC Series Circuit

68

8 AC Parallel Circuit

80

9 Three Phase Systems

97

10 Measuring Instruments

107

13 Temperature Rise and Ventilation in Electrical Machines

111

14 Single Phase Transformers

113

15 Three Phase Transformers

127

16 Electromechanical Energy Conversion

130

17 Fundamentals of DC Machines

132

18 DC Generators

140

19 DC Motors

150

20 Testing of DC Machine

160

21 Three Phase Alternators

167

22 Synchronous Motors

176

23 Three Phase Induction Motor

185

24 Single Phase Induction Motor

204

List of Scilab Codes


Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14

Exa 1.16
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

2.1
2.2
2.3
2.4
2.5
2.6
3.2
3.3
3.4
3.5
4.1

Example on Ohms Law . . . . . . . . . . . . . . . . .


Example on Ohms Law . . . . . . . . . . . . . . . . .
Example on Ohms Law . . . . . . . . . . . . . . . . .
Example on Kirchhoffs Law . . . . . . . . . . . . . . .
Example on Kirchhoffs Law . . . . . . . . . . . . . . .
Example on Kirchhoffs Law . . . . . . . . . . . . . . .
Example on Kirchhoffs Law . . . . . . . . . . . . . . .
Example on Superposition Theorem . . . . . . . . . .
Example on Superposition Theorem . . . . . . . . . .
Example on Thevenin Theorem . . . . . . . . . . . . .
Example on Norton Theorem . . . . . . . . . . . . . .
Example on Nodal Analysis . . . . . . . . . . . . . . .
Example on Maximum Power Transfer Theorem . . .
Example on Delta to Star and Star to Delta Transformation . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Delta to Star and Star to Delta Transformation . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Coulombs Law . . . . . . . . . . . . . . .
Example on Electric Intensity . . . . . . . . . . . . .
Example on Electric Potential . . . . . . . . . . . . . .
Example on charging and discharging of capacitor . .
Example on charging and discharging of capacitor . .
Example on charging and discharging of capacitor . .
Example on Field Strength and Flux Density . . . . .
Example on Field Strength and Flux Density . . . . .
Example of Force on on Current Carrying Conductor .
Example of Force on on Current Carrying Conductor .
Example on Series Magnetic Circuit . . . . . . . . . .
5

13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
22
22
23
24
24
25
26
26
27
27
29

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
4.10
4.11
4.12
4.13
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12

Exa 5.13
Exa 5.14
Exa 5.15
Exa
Exa
Exa
Exa
Exa
Exa
Exa

5.16
5.17
5.18
6.1
6.2
6.3
6.4

Example on Series Magnetic Circuit . . . . . . . . . .


Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Magnetic Circuit . . . . . . . . . .
Example on Series Parallel Magnetic Circuit . . . . . .
Example on Series Parallel Magnetic Circuit . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Induced EMF . . . . . . . . . . . . . . . .
Example on Growth and Decay of Current in Inductive
Circuits . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Growth and Decay of Current in Inductive
Circuits . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Growth and Decay of Current in Inductive
Circuits . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Growth and Decay of Current in Inductive
Circuits . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Energy Stored in Magnetic Field . . . . .
Example on Energy Stored in Magnetic Field . . . . .
Example on Energy Stored in Magnetic Field . . . . .
Example on AC Wave Shapes . . . . . . . . . . . . . .
Example on AC Wave Shapes . . . . . . . . . . . . . .
Example on AC Wave Shapes . . . . . . . . . . . . . .
Example on AC Wave Shapes . . . . . . . . . . . . . .
6

30
30
31
32
33
33
34
35
36
37
38
39
41
41
42
42
43
44
44
45
45
46
46
47
47
48
48
49
49
50
52
54
54
55

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.13
6.14
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
7.9
7.10
7.11
7.12
7.13
7.14
7.15
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
8.13
9.1

Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example

on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on

AC Wave Shapes . . . . . . . .
AC Wave Shapes . . . . . . . .
AC Wave Shapes . . . . . . . .
AC Wave Shapes . . . . . . . .
AC Wave Shapes . . . . . . . .
AC Wave Shapes . . . . . . . .
Phase Difference . . . . . . . .
Simple AC Circuits . . . . . .
Simple AC Circuits . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
AC Series Circuit . . . . . . .
Phasor Method . . . . . . . . .
Phasor Method . . . . . . . . .
Phasor Method . . . . . . . . .
Phasor Method . . . . . . . . .
Admittance Method . . . . . .
Symbolic Method . . . . . . .
Symbolic Method . . . . . . .
Symbolic Method . . . . . . .
Symbolic Method . . . . . . .
Series Parallel Circuit . . . . .
AC Network Theorems . . . .
Resonance in Parallel Circuits .
Resonance in Parallel Circuits .
Three Phase Circuits . . . . .
7

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

56
56
60
61
64
64
66
66
67
68
68
69
70
71
71
73
73
74
75
76
76
77
78
79
80
81
83
84
86
87
88
89
90
91
92
93
95
97

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

9.2
9.3
9.4
9.5
9.6
9.7
9.8
9.9
9.10
9.11
9.12
10.1
10.2
10.3
10.4
10.5
10.6
13.1
13.2
14.1
14.2
14.3
14.4
14.5
14.6
14.7
14.8
14.9
14.10
14.11
14.12
14.13
14.14
14.15
14.16
14.17
14.18
15.1

Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example

on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on
on

Three Phase Circuits . . . . . .


Three Phase Circuits . . . . . .
Three Phase Circuits . . . . . .
Three Phase Circuits . . . . . .
Three Phase Circuits . . . . . .
Three Phase Circuits . . . . . .
Power Measurement . . . . . . .
Power Measurement . . . . . . .
Power Measurement . . . . . . .
Power Measurement . . . . . . .
Power Measurement . . . . . . .
Moving Coil Instruments . . . .
Moving Coil Instruments . . . .
Moving Coil Instruments . . . .
Moving Coil Instruments . . . .
Moving Coil Instruments . . . .
Moving Coil Instruments . . . .
Heating and Cooling of Electrical
Heating and Cooling of Electrical
EMF Equation . . . . . . . . . .
EMF Equation . . . . . . . . . .
Equivalent Circuit . . . . . . . .
Equivalent Circuit . . . . . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Regulation and Efiiciency . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Regulation and Efficiency . . . .
Testing of Transformer . . . . . .
Testing of Transformer . . . . . .
Testing of Transformer . . . . . .
Parallel Operation . . . . . . . .
Parallel Operation . . . . . . . .
three phase transformer . . . . .
8

. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Machines
Machines
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .

98
99
100
101
101
102
103
103
104
105
105
107
107
108
109
109
110
111
112
113
113
114
115
116
116
117
118
119
120
120
121
121
122
123
124
124
125
127

Exa
Exa
Exa
Exa

15.2
15.3
15.4
16.2

Exa 16.3
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

17.1
17.2
17.3
17.4
17.5
17.6
17.7
17.8
17.9
17.10
17.11
17.12
17.13
17.14
18.1
18.2
18.3
18.4
18.5
18.6
18.7
19.1
19.2
19.3
19.4
19.5
19.6
19.7
19.8
19.9
19.10

Example on three phase transformer . . . . . . . . . .


Example on three phase transformer . . . . . . . . . .
Example on three phase transformer . . . . . . . . . .
Example on Electromechanical Energy Conversion Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on Electromechanical Energy Conversion Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example on DC Winding . . . . . . . . . . . . . . . .
Example on DC Winding . . . . . . . . . . . . . . . .
Example on EMF Equation . . . . . . . . . . . . . . .
Example on EMF Equation . . . . . . . . . . . . . . .
Example on EMF Equation . . . . . . . . . . . . . . .
Example on EMF Equation . . . . . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Types of DC Machines . . . . . . . . . . .
Example on Magnetization Characteristics . . . . . . .
Example on Magnetization Characteristics . . . . . . .
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

128
128
129
130
131
132
132
133
133
134
134
135
135
136
136
137
137
138
139
140
142
143
145
147
148
149
150
151
151
152
153
154
155
155
156
157

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

19.11
19.12
19.13
20.1
20.2
20.3
20.4
20.5
20.6
20.7
20.8
21.1
21.2
21.3
21.4
21.5
21.6
21.7
21.8
21.9
21.10
22.1

Exa 22.2
Exa 22.3
Exa 22.4
Exa 22.5
Exa 22.6
Exa 22.7
Exa 22.8
Exa 23.1
Exa 23.2

Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
Example on
teristics . .
Example on
teristics . .
Example on
teristics . .
Example on
teristics . .
Example on
teristics . .
Example on
teristics . .
Example on
teristics . .
Example on
Example on
Example on

Speed Control of DC Motors . . . . . . .


Speed Control of DC Motors . . . . . . .
Speed Control of DC Motors . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
losses in DC Machine . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
Regulation . . . . . . . . . . . . . . . . .
emf Equation . . . . . . . . . . . . . . . .
Regulation . . . . . . . . . . . . . . . . .
Regulation . . . . . . . . . . . . . . . . .
Regulation . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Phasor Diagram and Power angle Charac. . . . . . . . . . . . . . . . . . . . . . . .
Variation of Excitation . . . . . . . . . .
Slip and Rotor Frequency . . . . . . . . .
Slip and Rotor Frequency . . . . . . . . .
10

157
158
159
160
160
161
162
163
164
165
166
167
168
168
169
170
171
172
173
174
174
176
177
178
179
180
181
182
183
185
185

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

23.3
23.4
23.5
23.6
23.7
23.8
23.9
23.10
23.11
23.12
23.13
23.14
23.15
23.16
23.17
23.18
23.19
23.20
24.1
24.2
24.3
24.4
24.5

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 . . .
Example on Losses in Induction Motor . . .
Example on Losses in Induction Motor . . .
Example on Losses in Induction Motor . . .
Example on Losses in Induction Motor . . .
Example on Torque . . . . . . . . . . . . .
Example on Torque . . . . . . . . . . . . .
Example on Torque . . . . . . . . . . . . .
Example on Torque . . . . . . . . . . . . .
No load and Block Rotor Test . . . . . . . .
Example on Circle Diagram . . . . . . . . .
Example on starting . . . . . . . . . . . . .
Example on starting . . . . . . . . . . . . .
Example on Equivalent Circuit . . . . . . .
Example on Equivalent Circuit . . . . . . .
Example on Equivalent Circuit . . . . . . .
Example on No Load and Block Rotor Test
Example on No Load and Block Rotor Test

11

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

187
188
188
189
191
193
193
194
194
195
196
197
198
199
200
201
202
202
204
205
206
208
209

List of Figures
4.1
4.2

Example on Series Magnetic Circuit . . . . . . . . . . . . . .


Example on Series Magnetic Circuit . . . . . . . . . . . . . .

34
37

6.1
6.2
6.3
6.4

Example
Example
Example
Example

on
on
on
on

AC
AC
AC
AC

18.1
18.2
18.3
18.4

Example
Example
Example
Example

on
on
on
on

Magnetization
Magnetization
Magnetization
Magnetization

Wave
Wave
Wave
Wave

Shapes
Shapes
Shapes
Shapes

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

53
57
60
65

Characteristics
Characteristics
Characteristics
Characteristics

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

141
142
144
146

12

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

Chapter 1
DC Circuits

Scilab code Exa 1.1 Example on Ohms Law


1
2 //By KCL, I 1 + I 2 =2.25
3 I1 =10/(2+8)
4 I2 =2.25 - I1
5 r =(10 -5* I2 ) / I2
6 mprintf ( r=%d ohm , c u r r e n t i n b r a n c h ABC=%d A and

c u r r e n t i n b r a n c h ADC=%f A , r , I1 , I2 )

Scilab code Exa 1.2 Example on Ohms Law


1
2
3
4
5
6
7
8

// i 1 , i 2 , i 3 be t h e c u r r e n t s i n t h e b r a n c h e s CD, EF
and GH r e s p e c t i v e l y
// i 1+i 2+i 3 =1.5
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 // p o i n t s A, E , F ,G a r e a t t h e same p o t e n t i a l
3 Rab =20
4 Reb =50
5 R1 = Rab * Reb /( Rab + Reb )
// e q u i v a l e n t r e s i s t a n c e
6
7
8
9
10
11
12
13
14

o f Rab
and Reb
Rbc =25
R2 = R1 + Rbc // e q u i v a l e n t r e s i s t a n c e o f R1 and Rbc
Rfc =50
R3 = Rfc * R2 /( Rfc + R2 ) // e q u i v a l e n t r e s i s t a n c e o f R2
and Rfc
Rcd =30
R4 = R3 + Rcd // e q u i v a l e n t r e s i s t a n c e o f R3 and Rcd
R = R4 *50/(50+ R4 ) // e q u i v a l e n t r e s i s t a n c e b e t w e e n A
and D
i =200/ R
//Ohm s Law
mprintf ( C u r r e n t drawn by c i r c u i t =%f A , i )

Scilab code Exa 1.4 Example on Kirchhoffs Law


1
2 // r e f e r F i g . 1 . 1 0 i n t h e t e x t b o o k
3 // a p p l y i n g KCL, I 1+I 2 =20; I 2+I 3 =30
4 // a p p l y i n g KVL
5 // f o r mesh ABGHA, 0.1 I 2 +20R1=108
6 // f o r mesh BCFGB, 0 . 3 I 2 +20R130R2=0
7 // f o r mesh CDEFC, 0 . 2 I 2 +30R2=114
8 a =[ -0.1 20 0;0.3 20 -30;0.2 0 30]
9 b =[108;0;114]

14

10
11
12
13
14
15
16

x = inv ( a ) * b
I2 = x (1 ,1)
R1 = x (2 ,1)
R2 = x (3 ,1)
I1 =20 - I2
I3 =30+ I2
mprintf ( R1=%f ohm , R2=%f ohm , I 1=%f A, I 2=%f A, I 3=
%f A , R1 , R2 , I1 , I2 , I3 )

Scilab code Exa 1.5 Example on Kirchhoffs Law


1
2
3
4
5
6
7
8
9
10

// r e f e r F i g . 1 . 1 1 i n t h e t e x t b o o k
// a p p l y i n g KVL o v e r l o o p s ABEFA and BCDEB, I 2 =3.5
I 1 ; 2 I 1 +7 I 2 =10
a =[3.5 -1; -2 7]
b =[0;10]
i = inv ( a ) * b
I1 = i (1 ,1)
I2 = i (2 ,1)
I = I2 - I1
mprintf ( C u r r e n t t h r o u g h 8 ohm r e s i s t a n c e =%f A from
E t o B , I )

Scilab code Exa 1.6 Example on Kirchhoffs Law


1
2
3
4
5
6
7

// r e f e r F i g . 1 . 1 2 i n t h e t e x t b o o k
// A p p l y i n g KVL
// f o r mesh AHGBA, 23 i 1 +20 i 2 +3 i 4 =0
// f o r mesh GFCBG, 20 i 1 43 i 2 +20 i 3 +3 i 4 =0
// f o r mesh FEDCF, 20 i 2 43 i 3 +3 i 4 =0
// f o r mesh ABCDJIA , 3 i 1 +3 i 2 +3 i 3 9 i 4 +50=0
15

8
9
10
11
12
13
14
15
16
17
18

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)
i4 = i (4 ,1)
V1 =3*( i4 - i1 )
V2 =3*( i4 - i2 )
V3 =3*( i4 - i3 )
mprintf ( V o l t a g e a c r o s s b r a n c h AB=%f V, V o l t a g e
a c r o s s b r a n c h BC=%f V, V o l t a g e a c r o s s b r a n c h CD=
%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

// r e f e r F i g . 1 . 1 3 i n t h e t e x t b o o k
// by a p p l y i n g KVL
// f o r mesh ABCDA, 7 . 4 5 i 1 3.25 i 2 =10
// f o r mesh EFBAE, 8 . 5 5 i 2 5.3 i 3 3.25 i 1 =10
// f o r mesh HGBFEAH, 1 1 . 3 i 3 5.3 i 2 =80
a =[7.45 -3.25 0; -3.25 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 ( C u r r e n t i n 6 ohm r e s i s t o r =%f A, c u r r e n t i n
3 ohm r e s i s t o r =%f A , i3 , i2 - i1 )

Scilab code Exa 1.8 Example on Superposition Theorem


16

1
2
3
4
5
6
7
8
9
10
11
12
13

// u s i n g S u p e r p o s i t i o n Theorem
// c o n s i d e r E1 a l o n e
E1 =1.5
R1 =(1+1) *2/(1+1+2) +2 // t o t a l r e s i s t a n c e
I1 = E1 / R1 // c u r r e n t s u p p l i e d
i1 = I1 /2 // c u r r e n t i n b r a n c h AB from B t o A
// c o n s i d e r E2 a l o n e
E2 =1.1
R2 =(1+1) *2/(1+1+2) +1+1 // t o t a l r e s i s t a n c e
I2 = E2 / R2 // c u r r e n t s u p p l i e d
i2 = I2 /2 // c u r r e n t i n b r a n c h AB from B t o A
mprintf ( C u r r e n t t h r o u g h 2 ohm r e s i s t o r =%f A , i1 + i2
)

Scilab code Exa 1.9 Example on Superposition Theorem


1
2
3
4
5
6
7
8
9
10
11

// r e f e r F i g . 1 . 2 0 i n t h e t e x t b o o k
// a p p l y i n g KVL
// f o r mesh BAEFB, 4 I 1 +2 I 2 =1.5
// f o r mesh BACDB, 2 I 1 +4 I 2 =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 ( C u r r e n t t h r o u g h 2 ohm r e s i s t o r =%f A from B
t o A , I1 + I2 )

Scilab code Exa 1.10 Example on Thevenin Theorem


1

17

2 // r e f e r F i g . 1 . 2 2 ( a ) i n t h e t e x t b o o k
3 // r e s i s t a n c e b e t w e e n A and B i s removed
4 // I 1 be c u r r e n t i n b r a n c h CD
5 // a p p l y i n g KCL
6 // 100 I 1 i s t h e c u r r e n t i n b r a n c h AF
7 // I1 50 i s t h e c u r r e n t i n b r a n c h DE
8 // 70 I 1 i s t h e c u r r e n t i n b r a n c h FE
9 // a p p l y i n g KVL f o r mesh CDEFC, we g e t ,
10 I1 =56
11 V =.1* I1 +.15*( I1 -50)
// t h e v e n i n s v o l t a g e
12 r =(.1+.15) *(.1+.15) /(.25+.25)
// t h e v e n i n s

equivalent resistance
13 I = V /( r +.05)
14 mprintf ( C u r r e n t f l o w i n g

i n t h e b r a n c h AB o f 0 . 0 5
ohm r e s i s t a n c e i s %f A , I )

Scilab code Exa 1.11 Example on Norton Theorem


1
2
3
4
5
6
7
8

// by Norton s Theorem
I =2*10 // t o t a l c u r r e n t p r o d u c e d by c u r r e n t s o u r c e
r =2*2/(2+2) // r e s u l t a n t r e s i s t a n c e o f c u r r e n t s o u r c e
In =20* r /( r +1) // n o r t o n c u r r e n t
Rn =1+ r // n o r t o n r e s i s t a n c e
I = In * Rn /( Rn +8)
mprintf ( C u r r e n t t h r o u g h t h e l o a d r e s i s t a n c e o f 8
ohm=%f A from A t o B , I )

Scilab code Exa 1.12 Example on Nodal Analysis


1
2
3

// c i r c u i t h a s 4 nodes , v i z , A, B , C and D
// node D i s t a k e n a s r e f e r e n c e node
18

4
5
6
7
8
9
10
11
12
13
14
15
16
17

// v o l t a g e s a t A, B and C be Va , Vb and Vc
respectively
// a p p l y i n g KCL
// a t node A, 7VaVbVc=25
// a t node B , 4Va+19Vb10Vc=0
// a t node C , 4Va10Vb+19Vc=40
a =[7 -1 -1; -4 19 -10; -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 ( C u r r e n t i n 5 ohm AC b r a n c h=%f A from A t o C
, I)
// e r r o r i n t e x t b o o k a n s w e r

Scilab code Exa 1.13 Example on Maximum Power Transfer Theorem


1
2 V =3*20/(2+3) // t h e v e n i n s v o l t a g e
3 r =1+2*3/(2+3) // t h e v e n i n s e q u i v a l e n t r e s i s t a n c e
4 R=r
5 Pmax = V ^2/(4* r )
6 mprintf ( Max power t r a n s f e r r e d t o t h e l o a d i s %f W

when l o a d r e s i s t a n c e i s %f ohm , Pmax , R )

Scilab code Exa 1.14 Example on Delta to Star and Star to Delta Transformation
1
2

// i n n e r d e l t a DEF i s t r a n s f o r m e d t o e q u i v a l e n t s t a r
c o n n e c t i o n h a v i n g r e s i s t a n c e s Ra , Rb , Rc
19

3 Ra =1.5*2.5/(1.5+2.5+1)
4 Rb =1.5*1/(1.5+2.5+1)
5 Rc =1*2.5/(1.5+2.5+1)
6 // i n n e r p o r t i o n o f o b t a i n e d

7
8
9
10
11
12
13
14
15
16

s t a r n e t w o r k ABC i s
converted i n t o e q u i v a l e n t d e l t a with r e s i s t a n c e s
R1 , R2 , R3
R1 =4+5.05+4*5.05/5
R2 =4+5+4*5/5.05
R3 =5+5.05+5*5.05/4
// now t h e n e t w o r k r e d u c e s t o t h e form i n which t h e
r e s i s t a n c e s a c r o s s a branch are in p a r a l l e l
// l e t e q u i v a l e n t r e s i s t a n c e s be Rac , Rbc and Rab
Rac =5* R1 /(5+ R1 )
Rbc =5* R2 /(5+ R2 )
Rab =5* R3 /(5+ R3 )
R =( Rac + Rbc ) * Rab /( Rac + Rbc + Rab )
mprintf ( E q u i v a l e n t r e s i s t a n c e b e t w e e n A and B=%f
ohm ,R )

Scilab code Exa 1.16 Example on Delta to Star and Star to Delta Transformation
1
2 // by S u p e r p o s i t i o n Theorem
3 // c o n s i d e r 2 V b a t t e r y a l o n e
4 R1 =(3+1) *2/(3+1+2)
// e q u i v a l e n t
5
6
7
8
9
10
11

r e s i s t a n c e o f Raf ,
Rfg , Rab
R2 =(1+ R1 ) *12/(1+ R1 +12) // e q u i v a l e n t r e s i s t a n c e o f
Rad , R1 , Rde
R =1+2+ R2 // t o t a l r e s i s t a n c e o f t h e c i r c u i t
I1 =2/ R
I2 = I1 *12/(1+ R1 +12)
I3 = I2 *4/(2+4) // c u r r e n t t h r o u g h 2 ohm
// c o n s i d e r 4 V b a t t e r y a l o n e
I4 =34/71 // c u r r e n t t h r o u g h 2 ohm
20

12 I = I3 + I4
13 mprintf ( By S u p e r p o s i t i o n Theorem ,
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

current through
t h e 2 ohm r e s i s t a n c e i s %f A from A t o B\n , I )
// by Thevenin s Theorem
// a p p l y i n g KCL
// f o r mesh CDHIC , 15 i 1 +12 i 2 =2
// f o r mesh DEGHD, 12 i 1 +17 i 2 =4
a =[15 12;12 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 i s e q u i v a l e n t r e s i s t a n c e
o f Rcd , Rci , Rdh
R =(1+ R1 ) *(3+1) /(1+ R1 +3+1) // t h e v e n i n s e q u i v a l e n t
resistance
I = Vab /( R +2)
mprintf ( By T h e v e n i n Theorem , c u r r e n t t h r o u g h 2 ohm
r e s i s t a n c e i s %f A from A t o B\n , I )
// by Maxwell Mesh A n a l y s i s
// a p p l y i n g KVL
// f o r mesh CDEHC, 15 I1 12 I 2 =2
// f o r mesh DABED, 12 I 1 +15 I 2 +2 I 3 =0
// f o r mesh AFGBA, 2 I 2 +6 I 3 =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 Maxwell Mesh A n a l y s i s , c u r r e n t t h r o u g h 2
ohm r e s i s t a n c e i s %f A from A t o B , I2 + I3 )

21

Chapter 2
Electrostatics

Scilab code Exa 2.1 Example on Coulombs Law


1
2
3
4
5
6
7
8
9
10
11
12

epsilon =8.854 D -12


r = sqrt (.1^2+.1^2) // d i s t a n c e b /w A and C
Fca =(2 D -6) *(4 D -6) /(4* %pi * epsilon * r ^2) // from A t o C
Fcb =(4 D -6) *(2 D -6) /(4* %pi * epsilon *.1^2) // from C t o B
Fcd =(4 D -6) *(4 D -6) /(4* %pi * epsilon *.1^2) // from C t o D
// Fr h a s h o r i z o n t a l and v e r t i c a l c o m p o n en t s a s Frx
and Fry r e s p e c t i v e l y
Frx = Fcd - Fca * cos (45* %pi /180)
Fry = Fcb - Fca * sin (45* %pi /180)
Fr = sqrt ( Frx ^2+ Fry ^2)
mprintf ( R e s u l t a n t f o r c e a c t i n g on c h a r g e a t C=%f N
, Fr )
// e r r o r i n t e x t b o o k a n s w e r

Scilab code Exa 2.2 Example on Electric Intensity


1

22

2 epsilon =8.854 D -12


3 E1 =(4 D -8) /(4* %pi * epsilon *.05^2) // f i e l d
4
5

6
7
8
9
10
11
12

i n t e n s i t y due
t o c h a r g e a t A, d i r e c t i o n i s from D t o A
r = sqrt (2*.05^2) // d i s t a n c e b/w B and D
E2 =(4 D -8) /(4* %pi * epsilon * r ^2) // f i e l d i n t e n s i t y due
t o c h a r g e a t B , d i r e c t i o n i s from B t o D a l o n g
d i a g o n a l BD
E3 =(8 D -8) /(4* %pi * epsilon *.05^2) // f i e l d i n t e n s i t y due
t o c h a r g e a t C , d i r e c t i o n i s from D t o C
// Er h a s h o r i z o n t a l and v e r t i c a l c o m po n e n t s a s Erx
and Ery r e s p e c t i v e l y
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 ( R e s u l t a n t i n t e n s i t y on c h a r g e a t C=%f 1 0 4
N/C a t a n g l e %f d e g r e e s , Er /10^4 , - theta )

Scilab code Exa 2.3 Example on Electric Potential


1
2
3
4
5
6
7
8
9
10

epsilon =8.854 D -12


AB =.05
BC =.07
AC = sqrt (.05^2+.07^2)
V1 =2 D -10/(4* %pi * epsilon *.05) // p o t e n t i a l a t A
charge at B
V2 = -8D -10/(4* %pi * epsilon * AC ) // p o t e n t i a l a t A
charge at C
V3 =4 D -10/(4* %pi * epsilon *.07) // p o t e n t i a l a t A
charge at D
V = V1 + V2 + V3
mprintf ( P o t e n t i a l a t A due t o c h a r g e s a t B ,
=%f V , V )

23

due t o
due t o
due t o

C and 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
14
15
16
17
18
19
20
21

C =30 D -6
R =500
T=C*R
mprintf ( Time c o n s t a n t T=%f s e c \n , T )
// a t t =0 s e c , v o l t a g e a c r o s s c a p a c i t o r i s z e r o
V =100 // a p l i e d v o l t a g e
I = V / R //Ohm s Law
mprintf ( I n i t i a l c u r r e n t=%f A\n , I )
t =.05
Q=C*V
q = Q *(1 - exp ( - t / T ) )
mprintf ( Charge on t h e c a p a c i t o r a f t e r 0 . 0 5 s e c i s
%f C\n , q )
i1 = I * exp ( - t / T )
mprintf ( C h a r g i n g c u r r e n t a f t e r 0 . 0 5 s e c i s %f A\n ,
i1 )
t =.015
i2 = I * exp ( - t / T )
mprintf ( C h a r g i n g c u r r e n t a f t e r 0 . 0 1 5 s e c i s %f A\n
, i2 )
V = i1 * R
mprintf ( V o l t a g e a c r o s s 500 ohm r e s i s t o r a f t e r 0 . 0 5
s e c i s %f V , V )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 2.5 Example on charging and discharging of capacitor


1

24

2
3
4
5
6
7
8
9

C =100 D -6
V =200
Q=C*V
Ct =100 D -6+50 D -6 // t o t a l c a p a c i t a n c e
Vt = Q / Ct
mprintf ( P . D . a c r o s s t h e c o m b i n a t i o n =%f V\n , Vt )
EE1 =100 D -6* V ^2/2
mprintf ( E l e c t r o s t a t i c e n e r g y b e f o r e c a p a c i t o r s a r e
c o n n e c t e d i n p a r a l l e l =%f J \n , EE1 )
10 EE2 = Ct * Vt ^2/2
11 mprintf ( E l e c t r o s t a t i c e n e r g y a f t e r c a p a c i t o r s a r e
c o n n e c t e d i n p a r a l l e l =%f J , EE2 )

Scilab code Exa 2.6 Example on charging and discharging of capacitor


1
2 C1 =100 D -6
3
4
5
6
7
8
9
10
11
12
13

14
15

// c a p a c i t a n c e o f f i r s t c a p a c i t o r which i s
t o be c h a r g e d
V =200 // v o l t a g e a c r o s s C1
Q = C1 * V
// L e t Q1 , Q2 , Q3 , Q4 be t h e c h a r g e s on r e s p e c t i v e
capacitors after connection
Q2 =4000 D -6
Q3 =5000 D -6
Q4 =6000 D -6
Q1 =Q -( Q2 + Q3 + Q4 )
C2 = C1 *( Q2 / Q1 )
C3 = C1 *( Q3 / Q1 )
C4 = C1 *( Q4 / Q1 )
mprintf ( Three c a p a c i t o r s have c a p a c i t a n c e s %d
microF , %d microF and %d microF \n , C2 *10^6 , C3
*10^6 , C4 *10^6)
Vt = Q1 / C1
mprintf ( V o l t a g e a c r o s s t h e c o m b i n a t i o n =%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 =4 D -7* %pi


N =150 // no . o f t u r n s o f c o i l
I =4 // c u r r e n t c a r r i e d by c o i l
l =.3 // l e n g t h o f s o l e n o i d i n m t r s
Bc = mu_not * N * I / l
mprintf ( Flux d e n s i t y a t c e n t r e =%f10 3 Wb/m2 ,
Bc *10^3)

Scilab code Exa 3.3 Example on Field Strength and Flux Density
1
2
3

mu_not =4 D -7* %pi


// c a l c u l a t i n g f l u x d e n s i t y a t c e n t r e o f c o i l B=
mu not I / ( 2 R)
4 I =50
5 R =4 D -2
6 B = mu_not * I /(2* R )
26

7
8
9
10
11

mprintf ( Flux d e n s i t y a t c e n t r e o f c o i l =%f10 6 Wb/


m 2 ( T e s l a ) \n , B *10^6)
// c a l c u l a t i n g f l u x d e n s i t y p e r p e n d i c u l a r t o p l a n e o f
c o i l a t a d i s t a n c e o f 10 cm from i t
z =10 D -2
B = mu_not * I * R ^2/(2*( R ^2+ z ^2) ^1.5)
mprintf ( Flux d e n s i t y p e r p e n d i c u l a r t o p l a n e o f c o i l
a t a d i s t a n c e o f 10 cm from i t =%f10 6 Wb/m 2 (
T e s l a ) , B *10^6)

Scilab code Exa 3.4 Example of Force on on Current Carrying Conductor


1
2
3
4
5
6
7
8

mu_not =4 D -7* %pi


I1 =30 // c u r r e n t i n w i r e A
I2 =30 // c u r r e n t i n w i r e B
R =10 D -2 // d i s t a n c e b/w 2 w i r e s
F = mu_not * I1 * I2 /(2* %pi * R )
mprintf ( F o r c e p e r m e t r e l e n g t h i s %d10 4 N/m i n
b o t h c a s e s ( i ) and ( i i ) . However i n c a s e ( i ) , i t i s
a t t r a c t i v e and i n c a s e ( i i ) , i t i s r e p u l s i v e , F
*10^4)

Scilab code Exa 3.5 Example of Force on on Current Carrying Conductor


1
2
3
4
5
6

B =.06 // f l u x d e n s i t y
I =40 D -3 // c u r r e n t i n c o i l
l =4 D -2 // l e n g t h o f c o i l s i d e
F=B*I*l
N =50 // no . o f t u r n s
27

mprintf ( F o r c e a c t i n g on e a c h c o i l s i d e=%f10 3 N ,
F * N *10^3)

28

Chapter 4
Magnetic Circuit

Scilab code Exa 4.1 Example on Series Magnetic Circuit


1
2
3 mu_not =4 D -7* %pi
4 a =(3 D -2) ^2 // c r o s s s e c t i o n a l a r e a
5 La =(20 -1.5 -1.5) *1 D -2 // l e n g t h o f f l u x p a t h i n p a r t A
6 mu_r =1000 // r e l a t i v e p e r m e a b i l i t y f o r p a r t A
7 Sa = La /( mu_not * mu_r * a )
8 mprintf ( R e l u c t a n c e o f p a r t A=%f 1 0 4AT/Wb\n , Sa
9
10
11
12
13
14
15
16
17

/10^4)
Lb =(17+8.5+8.5) *1 D -2 // l e n g t h o f f l u x p a t h i n p a r t B
mu_r =1200 // r e l a t i v e p e r m e a b i l i t y f o r p a r t B
Sb = Lb /( mu_not * mu_r * a )
mprintf ( R e l u c t a n c e o f p a r t B=%f 1 0 4AT/Wb\n , Sb
/10^4)
Lg =(2+2) *1 D -3 // l e n g t h o f f l u x p a t h i n a i r gap
Sg = Lg /( mu_not * a )
mprintf ( R e l u c t a n c e o f 2 a i r g a p s=%f 1 0 4 AT/Wb\n ,
Sg /10^4)
S = Sa + Sb + Sg
mprintf ( T o t a l r e l u c t a n c e o f m a g n e t i c c i r c u i t =%f
1 0 4 AT/Wb\n , S /10^4)
29

18 N =1000 // no . o f t u r n s on e a c h c o i l
19 I =1 // c u r r e n t i n c o i l
20 mmf =2* N * I
21 mprintf ( mmf=%d AT\n , mmf )
22 flux = mmf / S
23 mprintf ( Flux i n m a g n e t i c c i r c u i t =%f10 4 Wb\n ,
24
25

flux *10^4)
flux_density = flux / a
mprintf ( Flux d e n s i t y=%f T e s l a , flux_density )

Scilab code Exa 4.2 Example on Series Magnetic Circuit


1
2
3
4
5
6
7
8
9
10
11
12

Bg =.7 // f l u x d e n s i t y i n a i r gap
Lg =3 D -3 // l e n g t h o f a i r gap
ATg =.796* Bg * Lg *1 D +6
Bs = Bg // f l u x d e n s i t y i n i r o n p a t h
H =660 // ampere t u r n s c o r r e s p o n d i n g t o Bs from BH
curve ( Fig . 4 . 2 ) o f textbook
Li =40 D -2 // l e n g t h o f f l u x p a t h i n i r o n p o r t i o n
ATs = H * Li
AT = round ( ATg ) + round ( ATs )
mprintf ( T o t a l ampere t u r n s t o be p r o v i d e d on t h e
e l e c t r o m a g n e t=%d AT , AT )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 4.3 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 N =700
// no . o f t u r n s on s t e e l

30

ring

I =2 // c u r r e n t c a r r i e d by t h e w i n d i n g on t h e r i n g
AT = N * I
mprintf ( mmf p r o d u c e d=%d AT\n , AT )
ATi =.35* AT // i r o n p o r t i o n t a k e s 35% o f t o t a l mmf
ATg = AT - ATi
l =1.5 D -3 // l e n g t h o f f l u x p a t h i n a i r gap
B = mu_not * ATg / l
mprintf ( Flux d e n s i t y=%f Wb/m2\ n , B )
d =3 D -2 // d i a m e t e r o f c i r c u l a r s e c t i o n o f r i n g
A = %pi * d ^2/4 // c r o s s s e c t i o n a l a r e a o f r i n g
flux = B * A
mprintf ( M a g n e t i c f l u x=%f m i l l i W b \n , flux *10^3)
S = AT / flux //Ohm s law f o r m a g n e t i c c i r c u i t s
mprintf ( R e l u c t a n c e=%f 1 0 6 AT/Wb\n , S /10^6)
l = %pi *25 D -2 // l e n g t h o f mean f l u x p a t h i n s t e e l
ring
19 H = ATi / l
20 mu_r = B /( H * mu_not )
21 mprintf ( R e l . p e r m e a b i l i t y o f s t e e l r i n g=%d , round (
mu_r ) )

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

Scilab code Exa 4.4 Example on Series Magnetic Circuit


1
2
3
4
5
6

phi =.26 D -3 // f l u x
d =2 D -2 // d i a m e t e r o f c i r c u l a r c r o s s s e c t i o n o f r i n g
A = %pi * d ^2/4
B = phi / A
H =740 // ampere t u r n s p e r l e n g t h o f f l u x p a t h
c o r r e s p o n d i n g t o B a s o b t a i n e d from BH c u r v e o f
cast steel
7 L =90 D -2 // l e n g t h o f mean f l u x p a t h i n t h e c a s t s t e e l
ring
8 AT = H * L
9 N =800 // no . o f t u r n s o f t h e c o i l wound on t h e r i n g
31

10
11
12
13
14
15
16
17
18
19
20
21
22
23

I = AT / N
mprintf ( C u r r e n t i n t h e c o i l =%f A\n ,I )
Lg =2 D -3 // l e n g t h o f a i r gap
Li =L - Lg // l e n g t h o f mean f l u x p a t h i n r i n g
mu = B / H
Bg = AT /( Li / mu +.796* Lg *1 D +6)
flux = Bg * A
mprintf ( M a g n e t i c f l u x p r o d u c e d=%f10 4 Wb\n , flux
*1 D +4)
// c a l c u l a t i n g v a l u e o f c u r r e n t which w i l l p r o d u c e
t h e same f l u x a s i n ( i )
ATi = H * Li
ATg =.796* B * Lg *1 D +6
AT = ATi + ATg
I = AT / N
mprintf ( C u r r e n t i n t h e c o i l which w i l l g i v e t h e
same f l u x a s i n ( i )=%f A ,I )

Scilab code Exa 4.5 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 N =400
// number o f t u r n s on t h e

c o i l wound on i r o n

ring
I =1.2 // c u r r e n t t h r o u g h t h e c o i l
AT = N * I
l =1 // mean f l u x p a t h i n r i n g i n m t r s
H = AT / l
B =1.15 // f l u x D e n s i t y
mu_r = B /( H * mu_not )
mprintf ( R e l p e r m e a b i l i t y o f i r o n r i n g mu r=%d ,
round ( mu_r ) )
11 // e r r o r i n t e x t b o o k a n s w e r

4
5
6
7
8
9
10

32

Scilab code Exa 4.6 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 Li =50 d -2 // l e n g t h o f f l u x p a t h i n i r o n
4 mu_r =1300 // r e l a t i v e p e r m e a b i l i t y
5 a =12 D -4 // c r o s s s e c t i o n a l a r e a
6 Si = Li /( mu_not * mu_r * a )
7 mprintf ( R e l u c t a n c e o f i r o n p a r t o f m a g n e t i c

circuit

=%f 1 0 3 AT/Wb\n , Si /10^3)


8 Lg =.4 D -2 // l e n g t h o f f l u x p a t h i n a i r gap
9 Sg = Lg /( mu_not * a )
10 mprintf ( R e l u c t a n c e o f a i r gap o f m a g n e t i c
11
12
13
14
15
16
17
18
19
20

c i r c u i t=

%f 1 0 3 AT/Wb\n , Sg /10^3)
S = Si + Sg
mprintf ( T o t a l r e l u c t a n c e o f m a g n e t i c c i r c u i t =%f
1 0 3 AT/Wb\n ,S /10^3)
N =400+400 // t o t a l no . o f t u r n s
I =1 // c u r r e n t t h r o u g h e a c h c o i l
mmf = N * I
flux = mmf / S
mprintf ( T o t a l f l u x=%f m i l l i W b \n , flux *10^3)
B = flux / a
mprintf ( Flux d e n s i t y i n a i r gap=%f Wb/m2 , B )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 4.7 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 N =300 // no . o f t u r n s i n

coil
33

Figure 4.1: Example on Series Magnetic Circuit


4
5
6
7
8
9
10
11

I =.7 // c u r r e n t t h r o u g h c o i l
AT = N * I
L =60 D -2 // l e n g t h o f r i n g
Lg =2 D -3 // l e n g t h o f a i r gap
Li =L - Lg // l e n g t h o f f l u x p a t h i n r i n g
mu_r =300 // r e l p e r m e a b i l i t y o f i r o n
B = AT /( Li /( mu_not * mu_r ) +.796* Lg *1 D +6)
mprintf ( Flux d e n s i t y=%f Wb/m2 , B )

Scilab code Exa 4.8 Example on Series Magnetic Circuit

34

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

mu_not =4 D -7* %pi


phi =.0006 // f l u x
A =5.5 D -4 // c r o s s s e c t i o n a l a r e a o f r i n g
B = phi / A
h =[0 200 400 500 600 800 1000]
b =[0 .4 .8 1 1.09 1.17 1.19]
plot2d (h , b )
xtitle ( BH c u r v e f o r e x a m p l e 4 . 8 , H( ampere t u r n s
p e r m e t r e ) , B(Wb/m 2 ) )
H =600 // c o r r e s p o n d i n g t o B from BH c u r v e
L =270 D -2 // l e n g t h o f r i n g
Lg =4.5 D -3 // l e n g t h o f a i r gap
Li =L - Lg // l e n g t h o f f l u x p a t h i n i r o n p o r t i o n o f r i n g
ATi = H * Li
ATg =.796* B * Lg *1 D +6
AT = round ( ATi ) + round ( ATg )
mprintf ( T o t a l ampere t u r n s=%d , AT )
// e r r o r i n t e x t b o o k a n s w e r

Scilab code Exa 4.9 Example on Series Magnetic Circuit


1
2
3
4
5
6
7
8
9
10
11
12
13

mu_not =4 D -7* %pi


flux =1.1 D -3
A =4*4*1 D -4 // c r o s s s e c t i o n a l a r e a
B = flux / A
mu_r =2000 // r e l p e r m e a b i l i t y
H = B /( mu_not * mu_r )
// c a l c u l a t i n g ampere t u r n s r e q u i r e d f o r p o t i o n C
l =.25 // l e n g t h o f mean f l u x p a t h
ATc = H * l
// c a l c u l a t i n g ampere t u r n s r e q u i r e d f o r p o t i o n D
l =.3 // l e n g t h o f mean f l u x p a t h
ATd = H * l
35

14 // c a l c u l a t i n g ampere t u r n s r e q u i r e d f o r a i r gap
15 ATg =.796* B *.002*10^6
16 AT = round ( ATc ) + round ( ATd ) + round (2* ATg )
17 mprintf ( T o t a l ampere t u r n s r e q u i r e d=%d , AT )
18 // a n s w e r v a r y from t h e t e x t b o o k due t o round o f f

error

Scilab code Exa 4.10 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 flux =.018
4 // c o n s i d e r p a r t A
5 a =205 D -4
// c r o s s s e c t i o n a l a r e a
6 Ba = flux / a
7 H =760
// c o r r e s p o n d i n g t o Ba a s o b t a i n e d from F i g .
8
9
10
11
12
13
14
15
16
17
18
19

4.2 in the textbook


l =(38 -.25) *1 D -2 // l e n g t h o f mean f l u x p a t h i n i r o n
portion of part A
ATi = H * l
ATg =.796* Ba *2.5 D -3*10^6
ATa = ATi + ATg
// c o n s i d e r p a r t B
a =255 D -4
Bb = flux / a
H =670 // c o r r e s p o n d i n g t o Bb a s o b t a i n e d from F i g .
4.2 in the textbook
l =.25 // l e n g t h o f mean f l u x p a t h i n i r o n p o r t i o n o f
part B
ATb = H * l
AT = round ( ATa ) + round ( ATb )
mprintf ( T o t a l ampere t u r n s r e q u i r e d f o r c o m p l e t e
m a g n e t i c c i r c u i t =%d , AT )

36

Figure 4.2: Example on Series Magnetic Circuit

Scilab code Exa 4.11 Example on Series Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 b =[.5 1 1.2 1.4]
4 mu_r =[2500 2000 1500 1000]
5 plot2d (b , mu_r , rect =[0 ,0 ,1.5 ,3000])
6 xtitle ( Bmu r c u r v e f o r e x a m p l e 4 . 1 1 , B(Wb/m 2 ) ,

mu r )
7

37

8 phi =.38 D -3
// f l u x i n r i n g
9 A =3 D -4
// c r o s s s e c t i o n a l a r e a
10 B = phi / A
11 mu_r =1300
// c o r r e s p o n d n g t o B from Bmu r c u r v e
12
13
14
15
16
17
18
19
20
21

plotted
H = B /( mu_not * mu_r ) // ampere t u r n s p e r m e t r e o f f l u x
path l e n g t h
l = %pi *58 D -2 // l e n g t h o f mean f l u x p a t h
AT_iron = H * l
mprintf ( T o t a l ampere t u r n s r e q u i r e d by i r o n r i n g=%d
\n , round ( AT_iron ) )
// a f t e r saw c u t o f 1 mm w i d t h h a s b e e n made
l =l -.1 D -2 // l e n g t h o f mean f l u x p a t h i n i r o n
portion of ring
ATi = H * l
ATg =.796* B *1 D -3*1 D +6
AT = round ( ATi ) + round ( ATg )
mprintf ( E x t r a ampere t u r n s r e q u i r e d =%d , round ( AT )
- round ( AT_iron ) )

Scilab code Exa 4.12 Example on Series Parallel Magnetic Circuit


1
2
3
4
5
6
7
8
9
10
11

// two p a r a l l e l m a g n e t i c c i r c u i t s have e q u a l
reluctances
phi_cc =1.2 D -3 // f l u x i n c e n t r a l c o r e
phi_ol = phi_cc /2 // f l u x i n e a c h o u t e r l i m b
// c a l c u l a t i n g AT f o r c e n t r a l c o r e
a =9 D -4 // c r o s s s e c t i o n a l a r e a
B_cc = phi_cc / a
H =1600 // c o r r e s p o n d i n g t o B c c from F i g 4 . 2 i n t h e
textbook
l =.15 // l e n g t h o f mean f l u x p a t h
AT_cc = H * l
// c a l c u l a t i n g AT f o r o u t e r l i m b s
38

12 a =5 D -4
// c r o s s s e c t i o n a l a r e a
13 B_ol = phi_ol / a
14 H =1200
// c o r r e s p o n d i n g t o B o l from F i g 4 . 2 i n t h e

textbook
15 l =.35
// l e n g t h o f mean f l u x p a t h
16 AT_ol = H * l
17 AT = AT_cc + AT_ol
18 N =400
19 mprintf ( C u r r e n t r e q u i r e d i n t h e c o i l =%f A , AT / N )

Scilab code Exa 4.13 Example on Series Parallel Magnetic Circuit


1
2 mu_not =4 D -7* %pi
3 phi_cc =1.2 D -3
// f l u x i n c e n t r a l c o r e
4 phi_ol = phi_cc /2
// f l u x i n e a c h o u t e r l i m b
5 // c o n s i d e r c e n t r a l c o r e
6 a =9 D -4
// c r o s s s e c t i o n a l a r e a
7 B_cc = phi_cc / a
// f l u x d e n s i t y
8 H =1600
// c o r r e s p o n d i n g t o B c c from F i g 4 . 2 i n t h e

textbook
9 l =(15 -.2) *1 D -2
10
11
12
13
14
15
16
17
18
19
20

// l e n g t h o f mean f l u x p a t h o f c a s t

steel
AT_cc = H * l
ATg =.796* B_cc *2 D -3*10^6
// c o n s i d e r o u t e r l i m b
a =5 D -2 // c r o s s s e c t i o n a l a r e a
B_ol = phi_ol / a
H =1200 // c o r r e s p o n d i n g t o B o l from F i g 4 . 2 i n t h e
textbook
l =.35 // l e n g t h o f mean f l u x p a t h
AT_ol = H * l
AT = AT_cc + ATg + AT_ol
N =400
mprintf ( E x c i t i n g c u r r e n t i n t h e c o i l =%f A , AT / N )
39

40

Chapter 5
Electromagnetic Induction

Scilab code Exa 5.1 Example on Induced EMF


1
2 N =1000 // no . o f t u r n s i n t h e c o i l
3 dphi = -2*900 D -6 // c h a n g e i n f l u x i n Wb
4 dt =.2 // t i m e i n s e c i n which c h a n g e t a k e s p l a c e
5 emf = - N * dphi / dt
6 mprintf ( A v e r a g e emf i n d u c e d i n t h e c o i l =%d V , round

( emf ) )

Scilab code Exa 5.2 Example on Induced EMF


1
2 l =80 D -2 // l e n g t h o f c o n d u c t o r
3 B =1.2 // f l u x d e n s i t y o f u n i f o r m m a g n e t i c f i e l d
4 v =30 // v e l o c i t y o f c o n d u c t o r i n m/ s
5 // when t h e d i r e c t i o n o f m o t i o n i s p e r p e n d i c u l a r t o

field
6 e=B*l*v
7 mprintf ( emf i n d u c e d i n t h e c o n d u c t o r when t h e
41

d i r e c t i o n o f m o t i o n i s p e r p e n d i c u l a r t o f i e l d =%f
V\n ,e )
8 // when t h e d i r e c t i o n o f m o t i o n i s i n c l i n e d 45
degrees to f i e l d
9 e = B * l * v * sin ( %pi /4)
10 mprintf ( emf i n d u c e d i n t h e c o i l when t h e d i r e c t i o n
o f m o t i o n i s i n c l i n e d 45 d e g r e e s t o f i e l d =%f V ,e
)

Scilab code Exa 5.3 Example on Induced EMF


1
2 N =120 // no . o f t u r n s i n c o i l
3 dphi =(.3 -.8) *1 D -3 // c h a n g e i n
4
5
6
7
8
9

f l u x due t o m o t i o n o f

conductor
dt =.08 // t i m e t a k e n f o r c h a n g e i n f l u x
e = - N * dphi / dt
mprintf ( I n d u c e d emf i n t h e c o i l =%f V\n ,e )
R =200 // r e s i s t a n c e o f f e r e d by t h e c o i l
I=e/R
mprintf ( I n d u c e d c u r r e n 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 =4 D -7* %pi


N =3500 // no . o f t u r n s on i r o n r o d
I =.6 // c u r r e n t t h r o u g h c o i l
AT = N * I
B =.45 // f l u x d e n s i t y i n Wb/m2
l =25 D -2 // l e n g t h o f mean m a g n e t i c f l u x p a t h
H = AT / l
mu_r = B /( H * mu_not )
42

10
11
12
13
14
15
16
17
18
19

mprintf ( R e l a t i v e p e r m e a b i l i t y o f m e t a l=%f\n , mu_r )


A = %pi *2.5 D -2^2/4 // c r o s s s e c t i o n a l a r e a o f r i n g
phi = B * A
L = N * phi / I
mprintf ( S e l f i n d u c t a n c e o f c o i l =%f H\n ,L )
// s o l v i n g p a r t ( i i i )
dphi =.08* phi - phi // c h a n g e i n f l u x
dt =.0015 // t i m e t a k e n f o r c h a n g e
e = - N * dphi / dt
mprintf ( emf i n d u c e d i n t h e c o i l when v a l u e o f f l u x
f a l l s t o 8 p e r c e n t i t s v a l i u e i n 0 . 0 0 1 5 s e c=%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
20

mu_not =4 D -7* %pi


H =3500 // ampere t u r n s p e r m e t r e o f f l u x p a t h l e n g t h
l = %pi *40 D -2 // l e n g t h o f mean f l u x p a t h i n r i n g
AT = H * l
N =440 // no . o f t u r n s on c o i l
I = AT / N // e x c i t i n g c u r r e n t
mprintf ( E x c i t i n g c u r r e n t=%d A\n , round ( I ) )
B =.9 // f l u x d e n s i t y
A =15 D -4 // c r o s s s e c t i o n a l a r e a o f r i n g
phi = B * A
L = N * phi / I
mprintf ( S e l f i n d u c t a n c e o f c o i l =%f H\n ,L )
// s o l v i n g p a r t ( i i i )
l =( l -1/10^2) // l e n g t h o f mean f l u x p a t h i n s t e e l r i n g
ATi = H * l // ampere t u r n s r e q u i r e d f o r i r o n p o r t i o n
ATg =.796* B *1 D -2*1 D +6 // ampere t u r n s f o r a i r gap
AT = ATi + ATg
I = AT / N
mprintf ( When an a i r gap 1 cm l o n g i s c u t i n t h e
43

r i n g , e x c i t i n g c u r r e n t I=%f A and s e l f i n d u c t a n c e
o f c o i l =%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 // no . o f t u r n s
dI =10 -5 // c h a n g e i n c u r r e n t
dB =1.2 -.8 // c o r r e s p o n d i n g c h a n g e i n f l u x d e n s i t y
A =15 D -4 // c r o s s s e c t i o n a l a r e a
L = A * N * dB / dI
mprintf ( S e l f i n d u c t a n c e o f c o i l , L=%f H\n ,L )
di =5 -10 // c h a n g e i n c u r r e n t
dt =.04 // t i m e t a k e n f o r c h a n g e
e = - L * di / dt
mprintf ( I n d u c e d emf when t h e c u r r e n t f a l l s
u n i f o r m l y from 10 A t o 5 A i n 0 . 0 4 s e c=%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 =4 D -7* %pi


N =1200 // no . o f t u r n s i n t h e c o i l on s o l e n o i d
l =80 D -2 // l e n g t h o f s o l e n o i d
A = %pi /4*(5 D -2) ^2 // c r o s s s e c t i o n a l a r e a
L = N *( mu_not * N * A / l )
mprintf ( S e l f i n d u c t a n c e=%f mH\n ,L *1000)
// c a l c u l a t i n g i n d u c e d emf
di = -5 -5
dt =.03
e = - L * di / dt
mprintf ( I n d u c e d emf=%f V ,e )
44

Scilab code Exa 5.8 Example on Induced EMF


1
2
3
4
5
6

7
8
9
10
11
12
13

N =1500 // no . o f t u r n s i n c o i l A
phi =.04 D -3 // f l u x l i n k i n g c o i l A i n Wb
I =4 // c u r r e n t i n c o i l
La = N * phi / I
mprintf ( S e l f i n d u c t a n c e o f c o i l A=%f mH. As t h e
c o i l s a r e i d e n t i c a l , c o i l B w i l l a l s o have t h e
same s e l f i n d u c t a n c e . Hence , s e l f i n d u c t a n c e o f
c o i l B=%f mH\n , La *1000 , La *1000)
k =.7
M = N * k * phi / I
mprintf ( Mutual i n d u c t a n c e o f a r r a n g e m e n t=%f mH\n ,M
*1000)
di = -8
dt =.02
e = - M * di / dt
mprintf ( Emf i n d u c e d i n t h e c o i l B due t o a c h a n g e
o f c u r r e n t i n c o i l A=%f V\n ,e )

Scilab code Exa 5.9 Example on Induced EMF


1
2 mu_not =4 D -7* %pi
3 Ns =400 // no . o f t u r n s on s e a r c h c o i l
4 N =1000 // no . o f t u r n s o f w i r e on s o l e n o i d
5 M = mu_not * Ns * N *25 D -4/80 D -2
6 mprintf ( Mutual i n d u c t a n c e o f a r r a n g e m e n t=%f mH\n ,M

*1000)
7 // d i / d t =200
45

8 e = - M *200
9 mprintf ( emf i n d u c e d i n s e a r c h

c o i l =%f V ,e )

Scilab code Exa 5.10 Example on Induced EMF


1
2 mu_not =4 D -7* %pi
3 N =800 // no . o f t u r n s f o r e a c h s o l e n o i d
4 l =90 D -2 // l e n g t h o f e a c h s o l e n o i d
5 Ax = %pi *(3 D -2) ^2/4 // c r o s s s e c t i o n a l a r e a o f
6
7
8
9
10
11
12
13

solenoid

X
Ay = %pi *(6 D -2) ^2/4 // c r o s s s e c t i o n a l a r e a o f s o l e n o i d
Y
M = N * N * mu_not * Ax / l
mprintf ( Mutual i n d u c t a n c e o f a r r a n g e m e n t=%f mH\n
,1000* M )
// c a l c u l a t i n g c o u p l i n g co e f f i c i e n t
Lx = N * mu_not * N * Ax / l
Ly = N * mu_not * N * Ay / l
k = M / sqrt ( Lx * Ly )
mprintf ( C o u p l i n 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 =4 D -7* %pi


Nb =500 // no . o f t u r n s i n c o i l B
l =120 D -2 // mean l e n g t h o f f l u x p a t h i n i r o n c i r c u i t
Na =50 // no . o f t u r n s i n c o i l A
mu_r =2000 // r e l a t i v e p e r m e a b i l i t y o f i r o n
A =80*10^ -4 // c r o s s s e c t i o n a l a r e a
M = Nb * mu_not * mu_r * Na * A /( l )
mprintf ( Mutual i n d u c t a n c e M=%f H\n ,M )
46

10 di =12
11 dt =.015
12 e = - M * di / dt
13 mprintf ( Emf i n d u c e d i n

c o i l B=%f V ,e )

Scilab code Exa 5.12 Example on Growth and Decay of Current in Inductive Circuits
1
2
3
4
5
6
7
8
9
10
11
12
13

V =110 // a p p l i e d v o l t a g e
L =.5 // i n d u c t a n c e o f c o i l
r=V/L
mprintf ( Rate o f c h a n g e o f c u r r e n t=%d A/ s \n ,r )
R =8 // r e s i s t a n c e o f c o i l
I=V/R
mprintf ( F i n a l s t e a d y c u r r e n t=%f A\n ,I )
T=L/R
mprintf ( Time c o n s t a n t=%f s e c \n ,T )
// s o l v i n g p a r t ( i v )
t = - log (.5) * T
mprintf ( Time t a k e n f o r t h e c u r r e n t t o r i s e t o h a l f
i t s f i n a l v a l u e=%f s e c ,t )

Scilab code Exa 5.13 Example on Growth and Decay of Current in Inductive Circuits
1
2
3
4
5
6

// c a l c u l a t i n g t i m e i t w i l l t a k e c u r r e n t t o r e a c h . 8
of i t s f i n a l steady value
L =5 // i n d u c t a n c e o f w i n d i n g
R =50 // r e s i s t a n c e o f w i n d i n g
T=L/R
V =110 // a p p l i e d v o l t a g e
47

7 I = V / R // f i n a l s t e a d y c u r r e n t
8 i =.8* I
9 t = - T * log (1 - i / I )
10 mprintf ( C u r r e n t g r o w s t o . 8 t i m e s
11
12
13
14
15
16
17

i t s f i n a l steady
v a l u e , %f s e c a f t e r t h e s w i t c h i s c l o s e d \n ,t )
// c a l c u l a t i n g t i m e i t w i l l t a k e f o r t h e c u r r e n t t o
reach .9 of i t s f i n a l steady value
i =.9* I
t = - T * log (1 - i / I )
mprintf ( Time t a k e n f o r t h e c u r r e n t t o grow t o . 9
t i m e i t s f i n a l s t e a d y v a l u e i s %f s e c \n ,t )
// c a l c u l a t i n g a v e r a g e emf i n d u c e d
e = - L *( -2.2/.05)
mprintf ( emf i n d u c e d=%d V\n , round ( e ) )

Scilab code Exa 5.14 Example on Growth and Decay of Current in Inductive Circuits
1
2 // c a l c u l a t i n g i n d u c t a n c e and r e s i s t a n c e o f t h e r e l a y
3 T =.004 // t i m e c o n s t a n t which i s t i m e t a k e n f o r t h e
4
5
6
7
8
9
10
11

current to r i s e to .632 of i t s f i n a l steady value


I =.35/.632 // f i n a l s t e a d y v a l u e
V =200 // a p p l i e d v o l t a g e
R=V/I
L=T*R
mprintf ( R e s i s t a n c e o f r e l a y c i r c u i t =%f ohm\
n I n d u c t a n c e o f r e l a y c i r c u i t =%f H\n ,R , L )
// c a l c u l a t i n g i n i t i a l r a t e o f r i s e o f c u r r e n t
r=V/L
mprintf ( I n i t i a l r a t e o f r i s e o f c u r r e n t=%f A/ s ,r )

48

Scilab code Exa 5.15 Example on Growth and Decay of Current in Inductive Circuits
1
2
3
4
5
6
7
8
9

R =.5+40+15 // t o t a l r e s i s t a n c e
L =1 // t o t a l i n d u c t a n c e
T=L/R
V =12 // emf o f b a t t e r y
I = V / R // f i n a l s t e a d y c u r r e n t i n t h e c i r c u i t
i =.04 // c u r r e n t a t t i m e t a f t e r c l o s i n g t h e c i r c u i t
t = - T * log (1 - i / I )
mprintf ( The r e l a y w i l l b e g i n t o o p e r a t e %f s e c
a f t e r t h e r e l a y c i r c u i t i s c l o s e d \n ,t )

Scilab code Exa 5.16 Example on Energy Stored in Magnetic Field


1
2
3
4
5
6
7
8
9
10
11
12
13
14

mu_not =4* %pi *1 D -7


// c a l c u l a t i n g i n d u c t a n c e
N =4000 // number o f t u r n s
I =2 // c u r r e n t f l o w i n g i n t h e s o l e n o i d
d =8 D -2 // d i a m e t e r o f s o l e n o i d
As = %pi /4* d ^2
l =80 D -2 // l e n g t h o f s o l e n o i d i n m t r s
phi = mu_not * N * I * As / l
L = N * phi / I
mprintf ( I n d u c t a n c e=%f H\n ,L )
// c a l c u l a t i n g e n e r g y s t o r e d i n t h e m a g n e t i c f i e l d
E = L * I ^2/2
mprintf ( Energy s t o r e d i n t h e m a g n e t i c f i e l d =%f J ,E
)

Scilab code Exa 5.17 Example on Energy Stored in Magnetic Field


49

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 =4 D -7* %pi


// c a l c u l a t i n g e x c i t i n g c u r r e n t
B =1.2 // f l u x d e n s i t y
mu_r =500 // r e l p e r m e a b i l i t y f o r i r o n
H = B /( mu_not * mu_r )
D =10 D -2 // mean d i a m e t e r
l = %pi * D // l e n g t h o f f l u x p a t h i n t h e r i n g
AT = H * l
N =300 // number o f t u r n s on t h e r i n g
I = AT / N
mprintf ( E x c i t i n g c u r r e n t=%d A\n , round ( I ) )
// c a l c u l a t i n g i n d u c t a n c e
As =8 D -4 // c r o s s s e c t i o n a l a r e a
phi = B * As
L = N * phi / I
mprintf ( I n d u c t a n c e=%f H\n ,L )
// c a l c u l a t i n g e n e r g y s t o r e d
E = L * I ^2/2
mprintf ( Energy s t o r e d=%f J \n ,E )
// c o n s i d e r t h e c a s e i n which an a i r gap o f 2 mm i n
t h e r i n g i s made
li =l -2 D -3 // l e n g t h o f f l u x p a t h i n i r o n p o r t i o n
lg =2 D -3 // l e n g t h o f a i r gap
ATi = H * li // ampere t u r n s f o r i r o n p o r t i o n
ATg =.796* B * lg *10^6 // ampere t u r n s f o r a i r gap
AT = ATi + ATg
I = AT / N
mprintf ( When t h e r e i s an a i r gap o f 2mm i n t h e r i n g
\ n E x c i t i n g c u r r e n t=%f A\n ,I )
L = N * phi / I
mprintf ( I n d u c t a n c e=%f mH\n ,L *1000)
E = L * I ^2/2
mprintf ( Energy s t o r e d=%f J \n ,E )

50

Scilab code Exa 5.18 Example on Energy Stored in Magnetic Field


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

19

mu_not =4 D -7* %pi


// c a l c u l a t i n g p u l l on t h e a r m a t u r e
mu_r =300 // r e l p e r m e a b i l i t y o f i r o n
AT =2000 // t o t a l ampere t u r n s
li =50 D -2 // l e n g t h o f i r o n p a t h
lg =1.5 D -3 // l e n g t h o f a i r gap
B = AT /( li /( mu_not * mu_r ) +.796* lg *10^6)
A =3 D -4 // a r e a o f e a c h p o l e s h o e
x = B ^2* A /(2* mu_not ) // p u l l on t h e a r m a t u r e a t e a c h
pole
p =2* x
mprintf ( T o t a l p u l l due t o b o t h t h e p o l e s=%f N\n ,p )
// c o n s i d e r i n g t h e gap c l o s e s t o . 2 mm
lg =.2*1 D -3
B = AT /( li /( mu_not * mu_r ) +.796* lg *10^6)
x = B ^2* A /(2* mu_not )
p =2* x
mprintf ( When t h e gap c l o s e s t o . 2 mm, t o t a l f o r c e
n e e d e d due t o b o t h t h e p o l e s , t o p u l l t h e
a r m a t u r e away=%f N ,p )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
error

51

Chapter 6
Fundamentals of Alternating
Current

Scilab code Exa 6.1 Example on AC Wave Shapes


1
2 // p l o t t i n g g r a p h f o r i 1
3 theta = linspace (0 ,2* %pi ,100)
4 i1 =50* sin ( theta ) +50* sin ( theta - %pi /4)
5 plot ( theta , i1 )
6 // p l o t t i n g g r a p h f o r i 2
7 theta = linspace (0 ,2* %pi ,100)
8 i2 =50* cos ( theta ) +50* cos ( theta + %pi /4)
9 plot ( theta , i2 , o )
10 // p l o t t i n g g r a p h f o r i 3
11 i3 =50* cos ( theta ) -20* sin ( theta )
12 plot ( theta , i3 , )
13 xtitle ( Graphs o f i 1 ( ) , i 2 ( oo ) and i 3 ( ) , t h e t a ,
14

c u r r e n t )
// round o f f e r r o r w h i l e p l o t t i n g g r a p h s

52

Figure 6.1: Example on AC Wave Shapes

53

Scilab code Exa 6.2 Example on AC Wave Shapes


1
2
3 // i =Imax s i n ( 2 %pi f t )
4 Imax =100 //max v a l u e o f c u r r e n t
5 f =25 // f r e q u e n c y i n Hz
6 // c a l c u l a t i n g t i m e a f t e r which c u r r e n t becomes 20 A
7 i =20
8 t = asin ( i / Imax ) /(2* %pi * f )
9 mprintf ( Time a f t e r which c u r r e n t becomes 20 A=%f

s e c \n ,t )
10 // c a l c u l a t i n g t i m e a f t e r which c u r r e n t becomes 50 A
11 i =50
12 t = asin ( i / Imax ) /(2* %pi * f )
13 mprintf ( Time a f t e r which c u r r e n t becomes 50 A=%f

s e c \n ,t )
14 // c a l c u l a t i n g t i m e a f t e r which c u r r e n t becomes 100 A
15 i =100
16 t = asin ( i / Imax ) /(2* %pi * f )
17 mprintf ( Time a f t e r which c u r r e n t becomes 100 A=%f

s e c \n ,t )

Scilab code Exa 6.3 Example on AC Wave Shapes


1
2

// c a l c u l a t i n g i n s t a n t a n e o u s v o l t a g e a t . 0 0 5 s e c
a f t e r t h e wave p a s s e s t h r o u g h z e r o i n p o s i t i v e
direction
3 f =50 // f r e q u e n c y
4 Emax =350 //max v a l u e o f v o l t a g e
5 t =.005
54

6 e1 = Emax * sin (2* %pi * f * t )


7 mprintf ( V o l t a g e a t . 0 0 5 s e c
8

9
10
11

a f t e r t h e wave p a s s e s
t h r o u g h z e r o i n p o s i t i v e d i r e c t i o n =%d V\n , e1 )
// c a l c u l a t i n g i n s t a n t a n e o u s v o l t a g e a t . 0 0 8 s e c
a f t e r t h e wave p a s s e s t h r o u g h z e r o i n n e g a t i v e
direction
t =.008
e2 = - Emax * sin (2* %pi * f * t )
mprintf ( V o l t a g e a t . 0 0 8 s e c a f t e r t h e wave p a s s e s
t h r o u g h z e r o i n n e g a t i v e d i r e c t i o n =%f V , e2 )

Scilab code Exa 6.4 Example on AC Wave Shapes


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

// e =100 s i n ( 1 0 0 %pi t )
// c a l c u l a t i n g r a t e o f c h a n g e o f v o l t a g e a t t = . 0 0 2 5
sec
t =.0025
r1 =10000* %pi * cos (100* %pi * t )
mprintf ( Rate o f c h a n g e o f v o l t a g e a t . 0 0 2 5 s e c=%f V
/ s e c \n , r1 )
// c a l c u l a t i n g r a t e o f c h a n g e o f v o l t a g e a t t =.005
sec
t =.005
r2 =10000* %pi * cos (100* %pi * t )
mprintf ( Rate o f c h a n g e o f v o l t a g e a t . 0 0 5 s e c=%d V/
s e c \n , r2 )
// c a l c u l a t i n g r a t e o f c h a n g e o f v o l t a g e a t t =.01 s e c
t =.01
r3 =10000* %pi * cos (100* %pi * t )
mprintf ( Rate o f c h a n g e o f v o l t a g e a t . 0 1 s e c=%f V/
s e c \n , r3 )
// e r r o r i n t e x t b o o k a n s w e r i n f i r s t and l a s t c a s e

55

Scilab code Exa 6.5 Example on AC Wave Shapes


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

// c a l c u l a t i n g g r e a t e s t r a t e o f c h a n g e o f c u r r e n t
// i =50 s i n ( 1 0 0 %pi t )
mprintf ( G r e a t e s t r a t e o f c h a n g e o f c u r r e n t=%f A/ s e c
\n ,50*100* %pi )
// c a l c u l a t i n g a v e r a g e v a l u e o f c u r r e n t
f =50 // f r e q u e n c y o f t h e wave
T =1/ f
Imean =1/.01* integrate ( 50 s i n ( 1 0 0 %pi t ) , t ,0 , T /2)
mprintf ( A v e r a g e v a l u e o f t h e g i v e n c u r r e n t=%f A\n ,
Imean )
Irms = sqrt ( integrate ( ( 5 0 s i n ( t h e t a ) ) 2 , t h e t a ,0 ,2*
%pi ) /(2* %pi ) )
mprintf ( RMS v a l u e o f c u r r e n t=%f A\n , Irms )
// c a l c u l a t i n g t i m e i n t e r v a l b e t w e e n a maximum v a l u e
and n e x t z e r o v a l u e
t =( %pi /2) /(100* %pi )
mprintf ( Time i n t e r v a l b e t w e e n a maximum v a l u e and
t h e n e x t z e r o v a l u e i s %f s e c t o %f s e c ,t ,2* t )
// v a l u e o f g r e a t e s t r a t e o f c h a n g e o f c u r r e n t i s
g i v e n wrong i n t h e t e x t b o o k due t o a p p r o x i m a t i o 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
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

plot2d (t , i )
for j =0:3
i = linspace (40+20* j ,40+20* j ,2)
t = linspace ( j +1 , j +2 ,2)
plot2d (t , i )
if j ==0 then
t = linspace ( j +1 , j +1 ,2)
i = linspace (0 ,40 ,2)
plot2d (t , i )
else
t = linspace ( j +1 , j +1 ,2)
i = linspace (40+20*( j -1) ,40+20* j ,2)
plot2d (t , i )
end
end
for j =1:3
i = linspace (100 -20* j ,100 -20* j ,2)
t = linspace ( j +4 , j +5 ,2)
plot2d (t , i )
i = linspace (100 -20*( j -1) ,100 -20* j ,2)
t = linspace ( j +4 , j +4 ,2)
plot2d (t , i )
end
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 ) , -(40+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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

t = linspace ( j +9 , j +9 ,2)
i = linspace ( -40 -20*( j -1) , -40 -20* j ,2)
plot2d (t , i )
end
end
for j =1:3
i = linspace ( -(100 -20* j ) , -(100 -20* j ) ,2)
t = linspace ( j +12 , j +13 ,2)
plot2d (t , i )
i = linspace ( -100+20*( j -1) , -100+20* 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 ( P e r i o d i c c u r r e n t wave f o r e x a m p l e 6 . 6 , t i m e
i n s e c o n d s , c u r r e n t )
// c a l c u l a t i n g a v e r a g e v a l u e f o r t h i s wave s h a p e
Iavg =(0+40+60+80+100+80+60+40) /8
mprintf ( A v e r a g e v a l u e o f c u r r e n t o f g i v e n wave
s h a p e=%f A\n , Iavg )
// c a l c u l a t i n g RMS v a l u e f o r t h e g i v e n wave s h a p e
Irms = sqrt ( (0 ^2 +4 0^ 2+ 60 ^2 + 80 ^2 +1 00 ^2 +8 0^ 2+ 60 ^2 +4 0^ 2)
/8)
mprintf ( RMS v a l u e o f c u r r e n t o f g i v e n wave s h a p e=%f
A\n , Irms )
// c a l c u l a t i n g form f a c t o r
x = Irms / Iavg
mprintf ( Form f a c t o r o f g i v e n wave form=%f\n ,x )
// c a l c u l a t i n g peak f a c t o r
Imax =100 //maximum v a l u e o f c u r r e n t wave
y = Imax / Irms
mprintf ( Peak f a c t o r o f g i v e n wave=%f\n ,y )
// c a l c u l a t i n g a v e r a g e and RMS v a l u e o f c u r r e n t
c o n s i d e r i n g t h e wave t o be s i n u s o i d a l h a v i n g peak
v a l u e o f 100 A
59

Figure 6.3: Example on AC Wave Shapes


Iavg = integrate ( 1 0 0 / %pi s i n ( t h e t a ) , t h e t a ,0 , %pi )
mprintf ( A v e r a g e v a l u e o f s i n e wave=%f A\n , Iavg )
Irms = sqrt ( integrate ( ( 1 0 0 s i n ( t h e t a ) ) 2/ %pi , t h e t a
,0 , %pi ) )
77 mprintf ( RMS v a l u e o f s i n e wave=%f A , Irms )
74
75
76

Scilab code Exa 6.7 Example on AC Wave Shapes


1
2 theta = linspace (0 ,2* %pi ,100)
3 i =10+10* sin ( theta ) // e x p r e s s i o n

60

f o r the r e s u l t a n t

wave
4 plot2d ( theta , i )
5 xtitle ( Wave s h a p e f o r e x a m p l e 6 . 7 , t h e t a , c u r r e n t
)
6
7
8
9
10
11
12

// c a l c u l a t i n g a v e r a g e v a l u e o f t h e r e s u l t a n t wave
Iavg = integrate ( 10+10 s i n ( t h e t a ) , t h e t a ,0 ,2* %pi )
/(2* %pi )
mprintf ( A v e r a g e v a l u e o f t h e r e s u l t a n t c u r r e n t wave
=%d A\n , Iavg )
// c a l c u l a t i n g RMS v a l u e o f c u r r e n t o f t h e r e s u l t a n t
wave
Irms = sqrt ( integrate ( (10+10 s i n ( t h e t a ) ) 2 , t h e t a
,0 ,2* %pi ) /(2* %pi ) )
mprintf ( RMS v a l u e o f t h e r e s u l t a n t c u r r e n t wave=%f
A , Irms )

Scilab code Exa 6.8 Example on AC Wave Shapes


1
2 theta = linspace (0 ,2* %pi ,100)
3 i =50* sin ( theta )
4 xset ( window ,0)
5 plot2d ( theta , i )
6 xtitle ( C u r r e n t wave s h a p e f o r e x a m p l e 6.8>(a ) ,

t h e t a , c u r r e n t )
7
8 xset ( window ,1)
9 theta = linspace (0 , %pi ,100)
10 i =50* sin ( theta )
11 plot2d ( theta , i )
12 theta = linspace ( %pi ,2* %pi ,100)
13 i = -50* sin ( theta )
14 plot2d ( theta , i )
15 xtitle ( C u r r e n t wave s h a p e f o r e x a m p l e 6.8>(b ) ,

61

t h e t a , c u r r e n t )
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

xset ( window ,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 ( C u r r e n t wave s h a p e f o r e x a m p l e 6.8>( c ) ,
t h e t a , c u r r e n t )
xset ( window ,3)
theta = linspace (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 ( C u r r e n t wave s h a p e f o r e x a m p l e 6.8>(d ) ,
t h e t a , c u r r e n t )
// c o n s i d e r wave s h a p e ( a )
62

mprintf ( For wave s h a p e ( a ) \ nAs t h e n e g a t i v e and


p o s i t i v e p a r t s o f t h e wave a r e e q u a l , r e a d i n g o f
moving c o i l ammeter i s z e r o \n )
52 Irms = sqrt ( integrate ( ( 5 0 s i n ( t h e t a ) ) 2 , t h e t a ,0 ,2*
%pi ) /(2* %pi ) )
53 mprintf ( R e a d i n g o f moving i r o n ammeter=%f A\n , Irms
)
51

54
55
56
57

// c o n s i d e r wave s h a p e ( b )
Iavg = integrate ( 50 s i n ( t h e t a ) , t h e t a ,0 , %pi ) / %pi
mprintf ( For wave s h a p e ( b ) \ nRead ing on t h e moving
c o i l ammeter=%f A\n , Iavg )
58 Irms = sqrt ( integrate ( ( 5 0 s i n ( t h e t a ) ) 2 , t h e t a ,0 ,2*
%pi ) /(2* %pi ) )
59 mprintf ( R e a d i n g on moving i r o n ammeter=%f A\n , Irms
)
60
61
62

// c o n s i d e r c a s e ( c )
mprintf ( For wave s h a p e ( c ) \ n A v e r a g e v a l u e o v e r one
c o m p l e t e p e r i o d i s c l e a r l y z e r o . Thus r e a d i n g on
moving c o i l ammeter i s z e r o . As t h e v a l u e o f
c u r r e n t r e m a i n s c o n s t a n t a t 50 A d u r i n g v a r i o u s
i n t e r v a l s , RMS v a l u e w i l l be 50 A o n l y . Hence ,
r e a d i n g on moving i r o n ammeter=50 A\n )

63
64
65

// c o n s i d e r c a s e ( d )
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 ( For wave s h a p e ( d ) \ nRead ing on moving c o i l
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 ( R e a d i n g on moving i r o n ammeter=%f A\n , Irms
)

63

Scilab code Exa 6.9 Example on AC Wave Shapes


1
2 // l e t u s assume V=1 V, T=1 s e c
3 // e=V t /T
4 V =1
5 T =1
6 Erms = sqrt ( integrate ( (V t /T) 2 , t ,0 , T ) / T )
7 mprintf ( RMS v a l u e o f v o l t a g e i s %f t i m e s maximum

v o l t a g e \n , Erms / V )
8 Emean = integrate ( V t /T , t ,0 , T ) / T
9 k = Erms / Emean
10 mprintf ( Form f a c t o r o f t h i s wave=%f ,k )

Scilab code Exa 6.10 Example on AC Wave Shapes


1
2 // t h e g r a p h i s drawn c o n s i d e r i n g R=%pi
3 R = %pi
4 theta = linspace ( - %pi , %pi ,100)
5 V = sqrt ( R ^2 - theta ^2)
6 plot2d ( theta , V )
7 xtitle ( Wave s h a p e f o r e x a m p l e 6 . 1 0 , t h e t 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 ( (R2x 2 ) / ( 2 R) , x ,-R , R ) )

64

Figure 6.4: Example on AC Wave Shapes

65

13

mprintf ( RMS v a l u e o f s u c h a wave s h a p e w i l l be %f


o f i t s maximum v o l t a g e , Vrms / R )

Scilab code Exa 6.11 Example on Phase Difference


1
2 // c o n s i d e r p a r t ( i )
3 phi = %pi /12
4 mprintf ( For p a r t ( i ) \ n V o l t a g e l e a d s t h e c u r r e n t
5
6
7
8
9
10
11
12
13
14
15
16

wave by %d d e g r e e s \n , round ( phi *180/ %pi ) )


f =377.16/(2* %pi )
mprintf ( F r e q u e n c y o f t h e wave s h a p e=%d Hz\n ,f )
// c o n s i d e r p a r t ( i i )
phi = %pi /3
mprintf ( For p a r t ( i i ) \ n V o l t a g e l e a d s t h e c u r r e n t by
%d d e g r e e s \n , round ( phi *180/ %pi ) )
mprintf ( F r e q u e n c y o f t h e wave s h a p e=omega / ( 2 p i ) \n
)
// c o n s i d e r p a r t ( i i i )
phi =0 -( - %pi /2)
mprintf ( For p a r t ( i i i ) \ n V o l t a g e l e a d s t h e c u r r e n t
wave by %d d e g r e e s \n , round ( phi *180/ %pi ) )
mprintf ( F r e q u e n c y o f t h e wave s h a p e=omega / p i \n )
// c o n s i d e r p a r t ( i v )
mprintf ( For p a r t ( i v ) \ n C u r r e n t wave l a g s t h e
v o l t a g e by an a n g l e=a l p h a+a t a n ( x /R) and t h e
f r e q u e n c y o f t h i s wave s h a p e i s omega / ( 2 p i ) )

Scilab code Exa 6.13 Example on Simple AC Circuits


1
2 V =230 // a p p l i e d v o l t a g e
3 L =60 D -3 // i n d u c t a n c e o f

coil
66

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

f =50 // f r e q u e n c y o f s u p p l y
Xl =2* %pi * f * L
I =230/ Xl
// i f f r e q u e n c y i s r e d u c e d t o 20 Hz
Xl =2* %pi *20* L
I1 = V / Xl
mprintf ( C u r r e n t t h r o u g h t h e c o i l i f f r e q u e n c y i s
r e d u c e d t o 20 Hz=%f A\n , I1 )
// i f f r e q u e n c y i s i n c r e a s e d t o 60 Hz
Xl =2* %pi *60* L
I2 = V / Xl
mprintf ( C u r r e n t t h r o u g h t h e c o i l i f f r e q u e n c y i s
i n c r e a s e d t o 60 Hz=%f A\n , I2 )
// i f f r e q u e n c y i s i n c r e a s e d t o 100 Hz
Xl =2* %pi *100* L
I3 = V / Xl
mprintf ( C u r r e n t t h r o u g h t h e c o i l i f f r e q u e n c y i s
i n c r e a s e d t o 100 Hz=%f A\n , I3 )

Scilab code Exa 6.14 Example on Simple AC Circuits


1
2 // c a l c u l a t i n g r e a c t a n c e o f c a p a c i t o r
3 C =100 D -6
4 Xc =1/(2* %pi *50* C )
5 mprintf ( C a p a c i t i v e r e a c t a n c e , Xc=%f ohm\n , Xc )
6 // c a l c u l a t i n g RMS v a l u e o f c u r r e n t
7 V =200
8 Irms = V / Xc
9 mprintf ( RMS v a l u e o f c u r r e n t=%f A\n , Irms )
10 // c a l c u l a t i n g max c u r r e n t
11 Imax = Irms * sqrt (2)
12 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

// c a l c u l a t i n g c u r r e n t f l o w i n g i n t h e c i r c u i t
L =0.1 // i n d u c t a n c e
f =50 // f r e q u e n c y
Xl =2* %pi * f * L
R =15 // t o t a l r e s i s t a n c e i n t h e c i r c u i t
Z = sqrt ( R ^2+ Xl ^2)
V =230 // v o l t a g e a p p l i e d t o s e r i e s c i r c u i t
I=V/Z
mprintf ( C u r r e n t f l o w i n g i n t h e c i r c u i t =%f A\n ,I )
// c a l c u l a t i n g power f a c t o r
pf = R / Z
mprintf ( Power f a c t o r o f t h e c i r c u i t i s %f ( l a g g i n g ) \
n V o l t a g e a c r o s s r e a c t o r=%f V\ n V o l t a g e a c r o s s
r e s i s t o r =%f V ,pf , I * Xl , I * R )

Scilab code Exa 7.2 Example on AC Series Circuit

68

1
2
3
4
5
6
7
8
9
10
11

V1 =200 // v o l t a g e a p p l i e d t o noni n d u c t i v e l o a d
I1 =20 // c u r r e n t f l o w i n g t h r o u g h t h e l o a d
R = V1 / I1
V =230 // a p p l i e d v o l t a g e t o s e r i e s c o n n e c t i o n o f R and
L
I = I1
Z=V/I
Xl = sqrt ( Z ^2 - R ^2)
L = Xl /(2* %pi *50)
phi = atand ( Xl / R )
mprintf ( I n d u c t a n c e o f t h e r e a c t o r=%f H, p h a s e a n g l e
b e t w e e n a p p l i e d v o l t a g e and t h e c u r r e n t i s %f
d e g r e e s ,L , phi )

Scilab code Exa 7.3 Example on AC Series Circuit


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

// c a l c u l a t i n g r e s i s t a n c e , r e a c t a n c e and i m p e d a n c e o f
choke c o i l
I =7.5 // c u r r e n t f l o w i n g t h r o u g h t h e c i r c u i t
V1 =110 // v o l t a g e a c r o s s noni n d u c t i v e r e s i s t o r
R = V1 / I
V2 =180 // v o l t a g e a c r o s s c h o k e c o i l
Z = V2 / I
Zt =230/ I // i m p e d a n c e o f w h o l e c i r c u i t
r =( Zt ^2 - R ^2 - Z ^2) /(2* R )
Xl = sqrt ( Z ^2 - r ^2)
mprintf ( R e a c t a n c e o f c o i l =%f ohm\ n R e s i s t a n c e o f
c o i l =%f ohm\ nImpedance o f c o i l =%f ohm\n ,Xl ,r , Z )
// c a l c u l a t i n g t o t a l r e s i s t a n c e and i m p e d a n c e o f t h e
circuit
Rt = r + R
Zt = sqrt ( Rt ^2+ Xl ^2)
mprintf ( T o t a l r e s i s t a n c e o f c i r c u i t =%f ohm\ n T o t a l
69

16
17
18
19
20
21
22
23
24
25

i m p e d a n c e o f c i r c u i t =%f ohm\n ,Rt , Zt )


// c a l c u l a t i n g power a b s o r b e d by t h e c o i l
P1 = I ^2* r
mprintf ( Power a b s o r b e d by t h e c o i l =%f W\n , P1 )
// c a l c u l a t i n g power drawn by c i r c u i t
P2 = I ^2*( r + R )
mprintf ( Power drawn by t h e c i r c u i t =%f W\n , P2 )
// c a l c u l a t i n g power f a c t o r o f w h o l e c i r c u i t
pf = Rt / Zt
mprintf ( Power f a c t o r o f t h e w h o l e c i r c u i t =%f
l a g g i n g , pf )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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

// c a l c u l a t i n g c u r r e n t drawn a t 50 Hz
V =220 // v o l t a g e a p p l i e d t o c h o k e c o i l
f =50 // f r e q u e n c y o f s u p p l y
I1 =12 // c u r r e n t t a k e n by c h o k e c o i l
R1 =0 // r e s i s t a n c e o f c o i l i s n e g l i g i b l e
Xl = V / I1
I2 =16.5 // c u r r e n t t a k e n by t h e r e s i s t o r
R = V / I2
Z = sqrt ( R ^2+ Xl ^2)
I=V/Z
mprintf ( C u r r e n t t a k e n by t h e c i r c u i t a t 50 Hz=%f A\
n ,I )
// c a l c u l a t i n g c u r r e n t drawn a t 30 Hz
Xl_dash =30/50* Xl
Z_dash = sqrt ( Xl_dash ^2+ R ^2)
I = V / Z_dash
mprintf ( C u r r e n t drawn by t h e c i r c u i t a t 30 Hz=%f A\
n ,I )
70

Scilab code Exa 7.5 Example on AC Series Circuit


1
2
3
4
5
6
7
8
9
10
11
12
13

// l e t r e s i s t a n c e and i n d u c t a n c e o f t h e c o i l be R and
L respectively
V =220 // v o l t a g e a p p l i e d t o c o i l
f =50 // f r e q u e n c y o f s u p p l y
I =60 // c u r r e n t i n d i c a t e d by ammeter
Z1 = V / I
// when t h e f r e q u e n c y i s i n c r e a s e d t o 100 Hz
I =40 // c u r r e n t i n d i c a t e d by ammeter
Z2 = V / I
// on s o l v i n g f o r L
L = sqrt (( Z2 ^2 - Z1 ^2) /3) /(100* %pi )
R = sqrt ( Z1 ^2 -(100* %pi * L ) ^2)
mprintf ( R e s i s t a n c e o f c o i l =%f ohm\ n I n d u c t a n c e o f
c o i l =%f H ,R , L )

Scilab code Exa 7.6 Example on AC Series Circuit


1
2
3
4
5
6
7
8
9
10
11

// c a l c u l a t i n g p a r a m e t e r s o f e a c h c o i l
I =3 // c u r r e n t t h r o u g h t h e c i r c u i t
// f o r c o i l A
Ra =12/3 // r e s i s t a n c e
Va =15 // v o l t a g e d r o p
Za = Va / I
Xa = sqrt ( Za ^2 - Ra ^2)
// f o r c o i l B
Rb =6/3 // r e s i s t a n c e
Vb =9 // v o l t a g e d r o p
71

12
13
14
15
16
17
18
19

20
21
22
23
24

25
26
27
28
29
30
31
32
33
34
35
36
37
38

Zb = Vb / I
Xb = sqrt ( Zb ^2 - Rb ^2)
// f o r c o i l C
Rc =9/3 // r e s i s t a n c e
Vc =12 // v o l t a g e d r o p
Zc = Vc / I
Xc = sqrt ( Zc ^2 - Rc ^2)
mprintf ( P a r a m e t e r s o f \ nCoilA : Ra=%f ohm , Xa=%f ohm\
n C o i l B : Rb=%f ohm , Xb=%f ohm\ n C o i l C : Rc=%f ohm ,
Xc=%f ohm\n ,Ra , Xa , Rb , Xb , Rc , Xc )
// c a l c u l a t i n g power f a c t o r o f e a c h c o i l
pf_a = Ra / Za
pf_b = Rb / Zb
pf_c = Rc / Zc
mprintf ( power f a c t o r o f t h e c o i l s a r e \ n p f a=%f (
l a g g i n g ) \ n p f b=%f ( l a g g i n g ) \ n p f c=%f ( l a g g i n g ) \n ,
pf_a , pf_b , pf_c )
// c a l c u l a t i n g power d i s s i p a t e d f o r e a c h c o i l
Pa = I ^2* Ra
Pb = I ^2* Rb
Pc = I ^2* Rc
mprintf ( Power d i s s i p a t e d i n t h e s e c o i l s : \ nPa=%f W\
nPb=%f W\ nPc=%f W\n ,Pa , Pb , Pc )
// c a l c u l a t i n g power f a c t o r o f w h o l e c i r c u i t
Rt = Ra + Rb + Rc
Xt = Xa + Xb + Xc
Zt = sqrt ( Rt ^2+ Xt ^2)
pf = Rt / Zt
mprintf ( Power f a c t o r o f t h e w h o l e c i r c u i t =%f
l a g g i n g \n , pf )
// c a l c u l a t i n g v o l t a g e a p p l i e d a c r o s s t h e w h o l e
circuit
V = I * Zt
mprintf ( V o l t a g e a p p l i e d a c r o s s t h e w h o l e c i r c u i t =%f
V ,V )

72

Scilab code Exa 7.7 Example on AC Series Circuit


1
2 // r 1 be t h e v a r i a b l e r e s i s t a n c e
3 X =10 // t o t a l i n d u c t i v e r e a c t a n c e o f c i r c u i t
4 V =200 // rms v a l u e o f a p p l i e d v o l t a g e
5 //RMS v a l u e o f c u r r e n t I =200/ s q r t ((2+ r 1 ) 2+102)
6 // power consumed i s P=I 2 r 1
7 // For max power , dP/ d r=0
8 // on s o l v i n g
9 r1 = sqrt (104)
10 mprintf ( V a l u e o f v a r i a b l e r e s i s t o r a t t h e i n s t a n t
11

12
13
14
15

16
17
18
19
20

o f max power consumed i n i t i s %f ohm\n , r1 )


// s o l v i n g p a r t ( i i ) , l e t r 2 be t h e v a r i a b l e
r e s i s t a n c e I =200/ s q r t ( ( 2 0 0 + r 2 ) 2+102) ,P=I 2(2+
r2 )
// f o r max power , dP/ d r=0
// on s o l v i n g
r2 =10 -2
mprintf ( V a l u e o f v a r i a b l e r e s i s t o r =%d ohm f o r t h e
c o n d i t i o n o f max power consumed by t h e c i r c u i 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 ( C u r r e n t i n c a s e ( i )=%f A a t %f p f l a g g i n g \
n C u r r e n t i n c a s e ( i i )=%f A a t %f p f l a g g i n g \n ,I1 ,
pf1 , I2 , pf2 )

Scilab code Exa 7.8 Example on AC Series Circuit

73

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

// b o t h t h e c o i l s draw l a g g i n g c u r r e n t s , h e n c e b o t h
are inductive
// f o r c o i l A
Va =10 // v o l t a g e a p p l i e d
Ia =2 // c u r r e n t drawn
Za = Va / Ia
pf =.8 // power f a c t o r
Ra = pf * Za
Xa = sqrt ( Za ^2 - Ra ^2)
// f o r c o i l B
Vb =5 // v o l t a g e a p p l i e d
Ib =2 // c u r r e n t drawn
Zb = Vb / Ib
pf =.7 // power f a c t o r
Rb = pf * Zb
Xb = sqrt ( Zb ^2 - Rb ^2)
Rt = Ra + Rb // t o t a l r e s i s t a n c e o f c i r c u i t
Xt = Xa + Xb // t o t a l r e a c t a n c e o f c i r c u i t
Z = sqrt ( Rt ^2+ Xt ^2)
V = Ia * Z
pf = Rt / Z
mprintf ( V o l t a g e t o be a p p l i e d t o t h e c i r c u i t o f
c o i l s A and B i n s e r i e s =%f V and p f=%f l a g g i n g ,V
, pf )

Scilab code Exa 7.9 Example on AC Series Circuit


1
2 // c a l c u l a t i n g c a p a c i t a n c e
3 Xc =4 // c a p a c i t i v e r e a c t a n c e
4 f =50
5 omega =2* %pi * f
6 C =1/( omega * Xc )

74

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

mprintf ( C a p a c i t a n c e C=%f microF \n ,C *1 D +6)


// c a l c u l a t i n g i m p e d a n c e
R =5 // r e s i s t a n c e o f c i r c u i t
Z = sqrt ( R ^2+ Xc ^2)
mprintf ( Impedance o f c i r c u i t =%f ohm\n ,Z )
// c a l c u l a t i n g c u r r e n t t a k e n by c i r c u i t
V =200
I=V/Z
mprintf ( C u r r e n t drawn by c i r c u i t =%f A\n ,I )
// c a l c u l a t i n g v o l t a g e d r o p a c r o s s t h e r e s i s t a n c e
Vr = I * R
mprintf ( V o l t a g e d r o p a c r o s s t h e r e s i s t a n c e =%f V\n ,
Vr )
// c a l c u l a t i n g v o l t a g e d r o p a c r o s s t h e r e a c t a n c e
Vc = I * Xc
mprintf ( V o l t a g e d r o p a c r o s s t h e r e a c t a n c e=%f V\n ,
Vc )
// c a l c u l a t i n g power f a c t o r
pf = R / Z
mprintf ( Power f a c t o r o f t h e c i r c u i t =%f l e a d i n g , pf )

Scilab code Exa 7.10 Example on AC Series Circuit


1
2
3
4
5
6
7
8
9
10

// r a t i n g o f b u l b i s 100 W, 1 1 0 V
P =100
V =110
I = P / V // n o r m a l c u r r e n t o f b u l b
// v o l t a g e a c r o s s b u l b s h o u l d be 110 V
Vc = sqrt (230^2 - V ^2) // v o l t a g e a c r o s s t h e c a p a c i t a n c e
Xc = Vc / I
C =1/(100* %pi * Xc )
mprintf ( C a p a c i t a n c e o f %f microF must be c o n n e c t e d
i n s e r i e s w i t h t h e b u l b ,C *1 D +6)

75

Scilab code Exa 7.11 Example on AC Series Circuit


1
2
3
4
5

C =35 D -6 // c a p a c i t a n c e
f =50 // f r e q u e n c y
Xc =1/(2* %pi * f * C )
Z =2* Xc // v o l t a g e a p p l i e d a c r o s s t h e c a p a c i t a n c e i s
equal to h a l f of t o t a l voltage applied
6 R = sqrt ( Z ^2 - Xc ^2)
7 mprintf ( R e s i s t a n c e o f v a r i a b l e r e s i s t o r , R=%f ohm ,
R)

Scilab code Exa 7.12 Example on AC Series Circuit


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

// c a l c u l a t i n g c u r r e n t drawn
V =230 // v o l t a g e a p p l i e d
R =15+10 // t o t a l r e s i s t a n c e o f t h e c i r c u i t
L =.04+.1 // t o t a l i n d u c t a n c e
Xl =2* %pi *50* L
C =100 D -6 // c a p a c i t a n c e
Xc =1/(2* %pi *50* C )
X = Xl - Xc
Z = sqrt ( R ^2+ X ^2)
I=V/Z
mprintf ( C u r r e n t drawn=%f A\n ,I )
// c a l c u l a t i n g v o l t a g e s 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 and l e a d s t h e c u r r e n t by %f d e g r e e s
\n ,V1 , round ( phi1 ) )
76

18 Z2 = sqrt (10^2+(2* %pi *50*.1 -1/(2* %pi *50*100 D -6) ) ^2)


19 V2 = I * Z2
20 phi2 = acosd (10/ Z2 )
21 mprintf ( V2=%f V and l a g s t h e c u r r e n t by %f d e g r e e s \
22
23
24
25

n ,V2 , phi2 )
// c a l c u l a t i n g power f a c t o r o f o v e r a l l c i r c u i t
pf = R / Z
mprintf ( Power f a c t o r o f o v e r a l l c i r c u i t =%f l a g g i n g
, pf )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

Scilab code Exa 7.13 Example on AC Series Circuit


1
2 // s o l v i n g p a r t ( i )
3 Rb =5 // r e s i s t a n c e o f c o i l B
4 Xb =2* %pi *50*.02 // i n d u c t i v e r e a c t a n c e
5 Zb = sqrt ( Rb ^2+ Xb ^2)
6 phi_b = atand ( Xb / Rb ) // p h a s e d i f f e r e n c e
7
8
9
10
11
12
13
14
15
16
17
18
19

of c o i l B
o f Vb w i t h

current as r e f e r e n c e phasor
phi_a =90* %pi /180 - phi_b * %pi /180 //Va and Vb a r e i n
quadrature
// Xc/R=t a n ( p h i a )
//Vb=2Va>R2+Xc2=Zb 2 / 4
// on s o l v i n g f o r R and Xc
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 microF \n ,R , C *1 D +6)
// s o l v i n g p a r t ( i i )
Rt =5+ R // t o t a l r e s i s t a n c e o f c i r c u i t
Xt = Xb - Xc // r e s u l t a n t r e a c t a n c e o f c i r c u i t
Zt = sqrt ( Rt ^2+ Xt ^2)
V =220 // a p p l i e d v o l t a g e
77

20 I = V / Zt
21 mprintf ( C u r r e n t drawn by t h e c i r c u i t =%f A\n ,I )
22 // s o l v i n g p a r t ( i i i )
23 // a s t h e r e a c t a n c e i s p o s i t i v e , c i r c u i t i s i n d u c t i v e
24 pf = Rt / Zt // l a g g i n g
25 mprintf ( Power f a c t o r o f t h e c i r c u i t =%f ( l a g g i n g ) \n ,
26

pf )
// t h e a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

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

// c a l c u l a t i n g f r e q u e n c y o f a p p l i e d v o l t a g e
C =25.5 D -6 // c a p a c i t a n c e
I =.4 // c u r r e n t t h r o u g h c i r c u i t
V =50 // v o l t a g e a c r o s s c a p a c i t o r
Xc = V / I
f =1/(2* %pi * C * Xc )
mprintf ( F r e q u e n c y=%d Hz\n , round ( f ) )
// c a l c u l a t i n g p a r a m e t e r s o f c h o k e c o i l
V =35 // v o l t a g e a c r o s s c h o k e c o i l
Z = V / I // i m p e d a n c e o f c h o k e c o i l
// r 2+(100 %pi L ) 2=Z2
R =20/.4
Vac =45 // v o l t a g e a c r o s s a c p o r t i o n o f c i r c u i t
Zac = Vac / I // i m p e d a n c e o f a c p o r t i o n
// (R+r ) 2+(100 %pi L ) 2= Zac 2
// s o l v i n g f o r 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 ( P a r a m e t e r s o f c h o k e c o i l : \ n R e s i s t a n c e=%f
ohm\ n I n d u c t a n c e=%f H\ n I n d u c t i v e r e a c t a n c e=%f ohm\
n ,r ,L , Xl )
78

22 // c a l c u l a t i n g a p p l i e d v o l t a g e
23 Z = sqrt (( R + r ) ^2+( Xl - Xc ) ^2)
24 V = I * Z
25 mprintf ( V o l t a g e a p p l i e d t o t h e c i r c u i t =%f V\n ,V )
26 // c a l c u l a t i n g l o s s e s i n c h o k e c o i l
27 W = I ^2* r
28 mprintf ( L o s s e s i n c h o k e c o i l =%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

// c a l c u l a t i n g c a p a c i t a n c e t o g i v e r e s o n a n c e
Xl =2* %pi *50*.4
Xc = Xl
C =1/(2* %pi *50* Xc )
mprintf ( C a p a c i t a n c e=%f microF \n ,C *1 D +6)
// c a l c u l a t i n g c u r r e n t
R =5
Z=R
V =110
I=V/Z
mprintf ( c u r r e n t drawn=%f A\n ,I )
// c a l c u l a t i n g v o l t a g e a c r o s s i n d u c t a n c e
Xl =2* %pi *50*.4
Vl = I * Xl
mprintf ( V o l t a g e a c r o s s i n d u c t a n c e=%f V\n , Vl )
// c a l c u l a t i n g v o l t a g e a c r o s s c a p a c i t a n c e
Xc = Xl
Vc = I * Xc
mprintf ( V o l t a g e a c r o s s c a p a c i t a n c e=%f V\n , Vc )
// c a l c u l a t i n g Qf a c t o r
Q_factor = Vl / V
mprintf ( Qf a c t o r o f t h e c i r c u i t =%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
// c a l c u l a t i n g c u r r e n t i n e a c h b r a n c h and i t s a n g l e
of lag or lead
19 V =230
20 f =50
80

21
22
23
24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40

// f o r b r a n c h A
Ra =10 // r e s i s t a n c e
L =.04 // i n d u c t a n c e
Xl =2* %pi * f * L // i n d u c t i v e r e a c t a n c e
Za = sqrt ( Ra ^2+ Xl ^2) // i m p e d a n c e
Ia = V / Za
phi_a = atand ( Xl / Ra )
// f o r b r a n c h B
R =25 // r e s i s t a n c e
Zb = R // i m p e d a n c e
Ib = V / Zb
phi_b =0
mprintf ( C u r r e n t i n b r a n c h A, I a=%f A l a g g i n g t h e
a p p l i e d v o l t a g e by %f d e g r e e s \ n C u r r e n t i n b r a n c h
B , I b=%f A i n p h a s e w i t h a p p l i e d v o l t a g e \n ,Ia ,
phi_a , Ib )
// c a l c u l a t i n g c u r r e n t drawn by t h e c i r c u i t
Ia = pol2rect ( Ia , phi_a )
Ib = pol2rect ( Ib ,0)
I = Ia + Ib
mprintf ( T o t a l c u r r e n t drawn by t h e c i r c u i t =%f A\n ,
mag ( I ) )
phi = atand ( imag ( I ) / real ( I ) )
mprintf ( Phase a n g l e o f c o m b i n a t i o n=%f d e g r e e s and
power f a c t o r =%f l a g g i n g ,phi , cos ( phi * %pi /180) )

Scilab code Exa 8.2 Example on Phasor Method


1
2
3
4
5
6
7

function [r , theta ]= rect2pol ( A )


x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
theta = atand ( y / x )
endfunction
81

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
13 function [ r ]= mag ( A )
14
x = real ( A )
15
y = imag ( A )
16
r = sqrt ( x ^2+ y ^2)
17 endfunction
18 // s o l v i n g p a r t ( i )
19 Xa =2* %pi *50*.1 // i n d u c t i v e r e a c t a n c e o f b r a n c h A
20 Za = sqrt (50^2+ Xa ^2)
21 Ia =230/ Za
22 phi_a = atand ( Xa /50) // a n g l e o f l a g o f I a w . r . t .
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

applied voltage
Ia = pol2rect ( Ia , - phi_a )
Xb =1/(2* %pi *50*100 D -6) // c a p a c i t i v e r e a c t a n c e o f
branch B
Zb = sqrt (45^2+ Xb ^2)
Ib =230/ Zb
phi_b = atand ( Xb /45) // a n g l e o f l e a d o f I b w . r . t .
applied voltage
Ib = pol2rect ( Ib , phi_b )
I = Ia + Ib
mprintf ( C u r r e n t drawn by t h e c i r c u i t =%f A\n , mag ( I
))
// c a l c u l a t i n g power f a c t o r
phi = atan ( imag ( I ) / real ( I ) ) // p h a s e a n g l e o f t h e
circuit
pf = cos ( phi )
mprintf ( Power f a c t o r o f t h e c i r c u i t =%f ( l e a d i n g ) \n ,
pf )
// c a l c u l a t i n g power t a k e n by t h e p a r a l l e l c i r c u i t
P =230* mag ( I ) * pf
mprintf ( Power t a k e n by t h e p a r a l l e l c i r c u i t =%d W ,
round ( P ) )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
82

off error

Scilab code Exa 8.3 Example on Phasor Method


1
2
3 function [r , theta ]= rect2pol ( A )
4
x = real ( A )
5
y = imag ( A )
6
r = sqrt ( x ^2+ y ^2)
7
theta = atand ( y / x )
8 endfunction
9 function [ z ]= pol2rect (r , theta )
10
x = r * cos ( theta * %pi /180)
11
y = r * sin ( theta * %pi /180)
12
z = x + y * %i
13 endfunction
14 function [ r ]= mag ( A )
15
x = real ( A )
16
y = imag ( A )
17
r = sqrt ( x ^2+ y ^2)
18 endfunction
19 // c a l c u l a t i n g c u r r e n t i n c o i l A
20 Xa =2* %pi *50*.02 // i n d u c t i v e r e a c t a n c e o f c o i l A
21 Za = sqrt (12^2+ Xa ^2)
22 Ia =200/ Za
23 phi_a = atand ( Xa /12) // a n g l e o f l a g o f I a w . r . t .
24
25
26
27
28
29

applied voltage
mprintf ( I a=%f A, l a g g i n g t h e a p p l i e d v o l t a g e by %f
d e g r e e s \n , Ia , phi_a )
// c a l c u l a t i n g c u r r e n t i n c o i l B
Xb =2* %pi *50*.03 // i n d u c t i v e r e a c t a n c e o f c o i l B
Zb = sqrt (6^2+ Xb ^2)
Ib =200/ Zb
phi_b = atand ( Xb /6) // a n g l e o f l a g o f I b w . r . t . a p p l i e d
83

30
31
32
33
34
35

36
37
38
39
40
41
42
43
44

voltage
mprintf ( I b=%f A, l a g g i n g t h e a p p l i e d v o l t a g e by %f
d e g r e e s \n , Ib , phi_b )
// c a l c u l a t i n g t o t a l c u r r e n t i n t h e c i r c u i t
Ia = pol2rect ( Ia , - phi_a )
Ib = pol2rect ( Ib , - phi_b )
I = Ia + Ib
mprintf ( T o t a l c u r r e n t drawn by c i r c u i t =%f A l a g g i n g
t h e a p p l i e d v o l t a g e by %f d e g r e e s \n , mag ( I ) ,atand ( imag ( I ) / real ( I ) ) )
// c a l c u l a t i n g t o t a l c u r r e n t when a d d i t i o n a l c i r c u i t
i s added
Xc =1/(2* %pi *50*120 D -6) // c a p a c i t i v e r e a c t a n c e
Zc = sqrt (15^2+ Xc ^2)
Ic =200/ Zc
phi_c = atand ( Xc /15) // a n g l e o f l a g o f I c w . r . t .
applied voltage
Ic = pol2rect ( Ic , phi_c )
I = Ia + Ib + Ic
phi = atand ( imag ( I ) / real ( I ) )
mprintf ( For t h e new c i r c u i t , t o t a l c u r r e n t drawn=%f
A l a g g i n g t h e a p p l i e d v o l t a g e by %f d e g r e e s , i . e
. p f=%f ( l a g g i n g ) , mag ( I ) ,- phi , cos ( phi * %pi /180) )

Scilab code Exa 8.4 Example on Phasor Method


1
2
3
4
5
6
7
8
9

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)
84

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

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 o r c o i l A
Ia =5 // c u r r e n t t a k e n
Va =110 // v o l t a g e a p p l i e d
Pa =300 // power d i s s i p a t e d
Ra = Pa / Ia ^2
Za = Va / Ia
Xa = sqrt ( Za ^2 - Ra ^2)
// f o r c o i l B
Ib =5 // c u r r e n t t a k e n
Vb =110 // v o l t a g e a p p l i e d
Pb =400 // power d i s s i p a t e d
Rb = Pb / Ib ^2
Zb = Vb / Ib
Xb = sqrt ( Zb ^2 - Rb ^2)
// c a l c u l a t i n g c u r r e n t drawn and power f a c t o r when
c o i l s conected in s e r i e s
R = Ra + Rb
Xl = Xa + Xb
Z = sqrt ( R ^2+ Xl ^2) // i m p e d a n c e o f s e r i e s c i r c u i t
I = Va / Z
pf = R / Z
mprintf ( C u r r e n t i n t h e s e r i e s c i r c u i t =%f A a t p f=%f
l a g g i n g \n , I , pf )
// c a l c u l a t i n g c u r r e n t drawn and power f a c t o r when
c o i l s conected in p a r a l l e l
Ia = pol2rect ( Ia , - acosd ( Ra / Za ) )
Ib = pol2rect ( Ib , - acosd ( Rb / Zb ) )
I = Ia + Ib
phi = atan ( imag ( I ) / real ( I ) )
mprintf ( T o t a l c u r r e n t drawn by t h e p a r a l l e l c i r c u i t
85

=%f A a t p f=%f ( l a g g i n g ) , mag ( 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

15
16
17
18
19
20

21
22
23
24
25
26

function [ r ]= mag ( A )
x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
endfunction
j = %i
// s o l v i n g p a r t ( i )
// f o r c o i l 1
Z1 =5+2* %pi *50*.03* j // i m p e d a n c e
Y1 =1/ Z1
G1 = real ( Y1 )
B1 = imag ( Y1 )
mprintf ( For c o i l 1 , \ n C o n d u c t a n c e=%f mho\
n S u s p e c t a n c e=%f mho\ n A d m i t t a n c e=%f mho\n , G1 , - B1
, mag ( Y1 ) )
// f o r c o i l 2
Z2 =3+2* %pi *50*.04* j // i m p e d a n c e
Y2 =1/ Z2
G2 = real ( Y2 )
B2 = imag ( Y2 )
mprintf ( For c o i l 2 , \ n C o n d u c t a n c e=%f mho\
n S u s p e c t a n c e=%f mho\ n A d m i t t a n c e=%f mho\n , G2 , - B2
, mag ( Y2 ) )
// s o l v i n g p a r t ( i i )
Y = Y1 + Y2 // t o t a l a d m i t t a n c e
I =200* Y
phi = atan ( imag ( I ) / real ( I ) )
pf = cos ( phi )
mprintf ( T o t a l c u r r e n t drawn by t h e c i r c u i t =%f A a t
p f o f %f ( l a g g i n g ) \n , mag ( I ) , pf )
86

// c a l c u l a t i n g power
P =200* mag ( I ) * pf
mprintf ( Power a b s o r b e d by t h e c i r c u i t =%f W\n ,P )
// s o l v i n g p a r t ( i v )
Z =1/ Y
R = real ( Z )
Xl = imag ( Z )
L = Xl /(2* %pi *50)
mprintf ( R=%f ohm , L=%f H o f s i n g l e c o i l which w i l l
t a k e t h e same c u r r e n t and power a s t a k e n by t h e
o r i g i n a l c i r c u i t ,R , L )
36 // a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

27
28
29
30
31
32
33
34
35

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
19

function [ r ]= mag ( A )
x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
endfunction
j = %i
// v o l t a g e V i s t a k e n a s r e f e r e n c e p h a s o r
Z1 =5+10* j // i m p e d a n c e o f i n d u c t i v e b r a n c h
Z2 =10 -15* j // i m p e d a n c e o f c a p a c i t i v e b r a n c h
I =20 // t o t a l c u r r e n t
V = I / mag (1/ Z1 +1/ Z2 )
mprintf ( A p p l i e d v o l t a g e=%f V\n ,V )
// c a l c u l a t i n g power f a c t o r o f t o t a l c u r r e n t
I1 = V / Z1
I2 = V / Z2
I = I1 + I2
phi = atan ( imag ( I ) / real ( I ) ) // a n g l e o f l a g
pf = cos ( phi )
87

20
21
22
23
24
25
26
27

mprintf ( Power f a c t o r o f t h e t o t a l c i r c u i t =%f (


l a g g i n g ) \n , pf )
// c a l c u l a t i n g power t a k e n by e a c h b r a n c h
R1 =5 // r e s i s t a n c e o f b r a n c h 1
P1 = mag ( I1 ) ^2* R1
R2 =10 // r e s i s t a n c e o f b r a n c h 2
P2 = mag ( I2 ) ^2* R2
mprintf ( Power t a k e n by i n d u c t i v e b r a n c h=%f W\ nPower
t a k e n by c a p a c i t i v e b r a n c h=%f W , P1 , P2 )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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
21

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 o r c o i l A
Va =10 // v o l t a g e a p p l i e d
Ia =2 // c u r r e n t t a k e n
pf =.8 // l a g g i n g power f a c t o r
Ia = pol2rect ( Ia , - acosd ( pf ) )
Za = Va / Ia // i m p e d a n c e
// f o r c o i l B
Vb =5 // v o l t a g e a p p l i e d
Ib =2 // c u r r e n t t a k e n
pf =.7 // l a g g i n g power f a c t o r
88

22 Ib = pol2rect (2 , - acosd ( pf ) )
23 Zb = Vb / Ib // i m p e d a n c e
24 // c a l c u l a t i n g v o l t a g e r e q u i r e d t o p r o d u c e a c u r r e n t

o f 2 A w i t h A and B i n s e r i e s
25 I =2
26 Z = Za + Zb // i m p e d a n c e o f s e r i e s c i r c u i t
27 V = I * mag ( Z )
28 mprintf ( V o l t a g e r e q u i r e d t o p r o d u c e a c u r r e n t
29
30
31
32
33

of 2

A w i t h A and B i n s e r i e s =%f V\n , V )


// c a l c u l a t i n g v o l t a g e r e q u i r e d t o p r o d u c e a c u r r e n t
o f 2 A w i t h A and B i n p a r a l l e l
Z = Za * Zb /( Za + Zb ) // i m p e d a n c e o f p a r a l l e l c i r c u i t
V = I * mag ( Z )
mprintf ( V o l t a g e r e q u i r e d t o p r o d u c e a c u r r e n t o f 2
A w i t h A and B i n p a r a l l e l =%f V\n , V )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

Scilab code Exa 8.8 Example on Symbolic Method


1
2
3
4
5
6
7
8
9
10
11
12
13
14

// c a l c u l a t i n g v a l u e o f unknown c a p a c i t a n c e
V =110 // a p p l i e d v o l t a g e
R =30 // r e s i s t a n c e o f r e s i s t i v e c i r c u i t
Ir = V / R //Ohm s Law
I =5 // t o t a l c u r r e n t drawn
Xc = V / sqrt ( I ^2 - Ir ^2)
f =50 // f r e q u e n c y o f s u p p l y
C =1/(2* %pi * f * Xc )
mprintf ( C a p a c i t a n c e=%f microF \n ,C *10^6)
// c a l c u l a t i n g unknown f r e q u e n c y
I =4 // t o t a l c u r r e n t drawn
f = sqrt ( I ^2 - Ir ^2) /( V *2* %pi * C )
mprintf ( To d e c r e a s e t h e t o t a l c u r r e n t t o 4 A, t h e
f r e q u e n c y o f t h e s u p p l y s h o u l d be a d j u s t e d t o %f
89

Hz ,f )
15 // The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

Scilab code Exa 8.9 Example on Symbolic Method


1
2 function [ r ]= mag ( A )
3
x = real ( A )
4
y = imag ( A )
5
r = sqrt ( x ^2+ y ^2)
6 endfunction
7
8 j = %i
9 R1 =12 // r e s i s t a n c e o f s e r i e s
10 X1 =2* %pi *50*.025 // i n d u c t i v e
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

circuit
reactance of the s e r i e s

circuit
Z1 = R1 + X1 * j
pf1 = R1 / mag ( Z1 ) // power f a c t o r o f t h e s e r i e s c i r c u i t (
lagging )
// t h e i m p e d a n c e s and power f a c t o r o f t h e p a r a l l e l
c i r c u i t a r e t o be same a s t h a t o f s e r i e s c i r c u i t
// on s o l v i n g , we g e t , R Xl / s q r t (R2+ Xl 2 )=mag ( Z1 ) ;
Xl / ( s q r t (R2+ Xl 2 ) )=p f 1
R = mag ( Z1 ) / pf1
// s o l v i n g f o r Xl
Xl = pf1 * R / sqrt (1 - pf1 ^2)
L = Xl /(2* %pi *50)
mprintf ( R e s i s t a n c e=%f ohm ; I n d u c t a n c e=%f H\n ,R , L )
// c a l c u l a t i n g c u r r e n t i n e a c h c a s e
V =230 // a p p l i e d v o l t a g e
I1 = V / mag ( Z1 )
mprintf ( C u r r e n t i n s e r i e s c i r c u i t =%f A\n , I1 )
I2 = V / mag ( Z1 )
mprintf ( C u r r e n t drawn by p a r a l l e l c i r c u i t =%f A , I2 )
90

26

// The a n s w e r s v a r y from t h e t e x t b o o k due t o round


off error

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
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
// c a l c u l a t i n g i m p e d a n c e o f o v e r a l l c i r c u i t
Za =2+0* j // i m p e d a n c e o f b r a n c h A
Zb =3+4* j // i m p e d a n c e o f b r a n c h B
Zab = Za * Zb /( Za + Zb ) // e q u i v a l e n t i m p e d a n c e s o f b r a n c h e s
A and B
Zc =2 -2* j
Z1 = Zab * Zc /( Zab + Zc ) // e q u i v a l e n t i m p e d a n c e o f p a r a l l e l
circuit
Zd =1+1* j // i m p e d a n c e o f b r a n c h D
Z = Z1 + Zd
[ Z theta ]= rect2pol ( Z )
mprintf ( T o t a l i m p e d a n c e o f o v e r a l l c i r c u i t =%f ohm
91

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

48

a t a n g l e %f d e g r e e s \n , Z , theta )
// c a l c u l a t i n g c u r r e n t t a k e n by o v e r a l l c i r c u i t
V =110 // v o l t a g e a p p l i e d t o t h e o v e r a l l c i r c u i t
I=V/Z
mprintf ( C u r r e n t t a k e n by t h e o v e r a l l c i r c u i t =%f A\n
, I)
// C a l c u l a t i n g power consumed i n e a c h b r a n c h and
t o t a l power consumed
Id = I // c u r r e n t i n t h e s e r i e s b r a n c h
Rd =1 // r e s i s t a n c e o f b r a n c h D
Pd = I ^2* Rd // power consumed by b r a n c h D
Ia = I * mag ( Z1 ) / mag ( Za ) // c u r r e n t i n b r a n c h A
Ib = I * mag ( Z1 ) / mag ( Zb ) // c u r r e n t i n b r a n c h B
Ic = I * mag ( Z1 ) / mag ( Zc ) // c u r r e n t i n b r a n c h C
Ra =2
Pa = Ia ^2* Ra
Rb =3
Pb = Ib ^2* Rb
Rc =2
Pc = Ic ^2* Rc
P = Pa + Pb + Pc + Pd
mprintf ( Power consumed by b r a n c h A=%f W, \ nPower
consumed by b r a n c h B=%f W, \ nPower consumed by
b r a n c h C=%f W, \ nPower consumed by b r a n c h D=%f W, \
n T o t a l power consumed=%f W ,Pa , Pb , Pc , Pd , P )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

Scilab code Exa 8.11 Example on AC Network Theorems


1
2
3
4
5

function [r , theta ]= rect2pol ( A )


x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
92

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32
33

theta = atand ( y / x )
endfunction
function [ r ]= mag ( A )
x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
endfunction
j = %i
// u s i n g Maxwell s mesh a n a l y s i s
// r e f e r F i g . 8 . 1 4 i n t h e t e x t b o o k
// c o n s i d e r i n g mesh FDCEF, (18+8 j ) I1 (10+8 j ) I 2 =24
// c o n s i d e r i n g mesh ABCDA, (10+8 j ) I1 (14+10 j ) I 2 =0
a =[18+8* j -(10+8* j ) ;10+8* j -(14+10* j ) ]
b =[24;0]
x = inv ( a ) * b
I1 = x (1 ,1)
I2 = x (2 ,1)
[ I2 theta ]= rect2pol ( I2 )
mprintf ( By Maxwell Mesh A n a l y s i s , c u r r e n t i n b r a n c h
AB o f t h e c i r c u i t shown i s %f A, l a g g i n g t h e
a p p l i e d v o l t a g e by %f d e g r e e s \n ,I2 , - theta )
// u s i n g t h e v e n i n s t h e o r e m
// r e f e r F i g . 8 . 1 4 ( a ) , ( b ) and ( c )
Zth =8*(10+8* j ) /(8+10+8* j ) +( -4* j ) // t h e v e n i n s
impedance
// f o r c a l c u l a t i n g t h e e q u i v a l e n t Thevenin s v o l t a g e
Vth , I 1 be t h e c u r r e n t f l o w i n g i n t h e b r a n c h CD
I1 =24/(8+10+8* j )
Vth = I1 *(10+8* j ) // e q u i v a l e n t t h e v e n i n s v o l t a g e
I = Vth /((4+6* j + Zth ) )
[ I theta ]= rect2pol ( I )
mprintf ( By T h e v e n i n Theorem , c u r r e n t i n t h e b r a n c h
AB i s %f A l a g g i n g t h e v o l t a g e by %f d e g r e e s \n ,I
, - theta )

93

Scilab code Exa 8.12 Example on Resonance in Parallel 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
26
27
28
29

function [ r ]= mag ( A )
x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
endfunction
j = %i
V =200
// c a l c u l a t i n g s u p p l y f r e q u e n c y
L =.1 // i n d u c t a n c e o f b r a n c h A
//Xa=2%pi f . 1
Ra =10 // r e s i s t a n c e o f b r a n c h A
C =150 D -6 // c a p a c i t a n c e o f b r a n c h B
//Xb=1/(2 %pi f 150D6)
Rb =0 // r e s i s t a n c e o f b r a n c h B
// Zb=Xb j
// t o t a l c u r r e n t I=I a+Ib , t o t a l c u r r e n t i s i n p h a s e
w i t h v o l t a g e >j component o f I =0
// on s o l v i n g f o r f ,
f = sqrt (( V *2* %pi * L ) *(1/(2* %pi * C ) ) /V - Ra ^2) /(2* %pi * L )
mprintf ( F r e q u e n c y o f t h e s u p p l y which i s a l s o t h e
r e s o n a n t f r e q u e n c y , f=%f Hz\n , f )
Xa =2* %pi * f *.1
Za = Ra + Xa * j
Ia = V / Za
Xb =1/(2* %pi * f *150 D -6)
Zb = - Xb * j
Ib = V / Zb
I = Ia + Ib
mprintf ( T o t a l c u r r e n t drawn by t h e c i r c u i t =%f A ,
mag ( I ) )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

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
17
18
19
20
21
22
23
24
25

26
27

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
// c a l c u l a t i n g b r a n c h c u r r e n t s
Z1 =15+12* j // i m p e d a n c e o f b r a n c h 1
I1 =200/ Z1
phi1 = atand (12/15)
Z2 =25 -17* j // i m p e d a n c e o f b r a n c h 2
I2 =200/ Z2
phi2 = atand (17/25)
mprintf ( I 1=%f A a t a n g l e o f %f d e g r e e s \ n I 2=%f A a t
a n g l e o f %f d e g r e e s \n , mag ( I1 ) , phi1 , mag ( I2 ) , phi2 )
// c a l c u l a t i n g t o t a l c u r r e n t
I = I1 + I2
[ I phi ]= rect2pol ( I )
mprintf ( T o t a l c u r r e n t drawn by t h e c i r c u i t I=%f A,
a n g l e o f l a g=%f d e g r e e s and power f a c t o r =%f
l a g g i n g \n ,I , - phi , cos ( phi * %pi /180) )
// power f a c t o r i s t o be r a i s e d t o u n i t y a c a p a c i t o r
h a s t o be c o n n e c t e d i n p a r a l l e l
// a t u n i t y power f a c t o r , i m a g i n a r y p a r t o f I must be
zero
95

28 Xc = -200/ imag ( I1 + I2 )
29 f =40
30 C =1/(2* %pi * f * Xc )
31 mprintf ( I f power f a c t o r

i s t o be r a i s e d t o u n i t y a
c a p a c i t o r o f %f microF h a s t o be c o n n e c t e d i n
p a r a l l e l t o g i v e n c i r c u i t , C *1 D +6)

96

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
// c o n s i d e r i n g c o i l s t o be s t a r c o n n e c t e d
Vl =400 // l i n e v o l t a g e
Vph = Vl / sqrt (3)
Rph =15 // r e s i s t a n c e o f l o a d
Xl =2* %pi *50*.03 // i n d u c t i v e r e a c t a n c e o f e a c h c o i l
Zph = Rph + Xl * j
Iph = Vph / mag ( Zph )
Il = Iph
pf = Rph / mag ( Zph ) // power f a c t o r
P = sqrt (3) * Vl * Il * pf
mprintf ( I n s t a r c o n n e c t e d c i r c u i t , \ nPhase c u r r e n t=
%f A, \ n L i n e c u r r e n t=%f A, \ nPower a b s o r b e d=%f kW\n
, Iph , Il , P /10^3)
97

// c o n s i d e r i n g c o i l s t o be d e l t a c o n n e c t e d
Vph = Vl
Iph = Vph / mag ( Zph )
Il = sqrt (3) * Iph
P = sqrt (3) * Vl * Il * pf
mprintf ( I n d e l t a c o n n e c t e d c i r c u i t , \ nPhase c u r r e n t=
%f A, \ n L i n e c u r r e n t=%f A, \ nPower a b s o r b e d=%f kW\n
, Iph , Il , P /10^3)
26 // a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error
20
21
22
23
24
25

Scilab code Exa 9.2 Example on Three Phase Circuits


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

// c a l c u l a t i n g p h a s e c u r r e n t
Vl =440 // l i n e v o l t a g e
Vph = Vl
Pout =200 D +3 // o u t p u t
e =.91 // e f f i c i e n c y
Pin = Pout / e // i n p u t
pf =.86 // power f a c t o r
Iph = Pin /(3* Vph * pf )
mprintf ( C u r r e n t drawn by e a c h motor p h a s e=%f A\n ,
Iph )
// c a l c u l a t i n g l i n e c u r r e n t
Il = sqrt (3) * Iph
mprintf ( L i n e c u r r e n t=%f A\n , Il )
// c a l c u l a t i n g a c t i v e and r e a c t i v e c o m p o ne n t s o f
phase c u r r e n t
phi = acos ( pf )
Iact = Iph * pf
Ireact = Iph * sin ( phi )
mprintf ( A c t i v e component o f p h a s e c u r r e n t=%f A\
n R e a c t i v e component o f p h a s e c u r r e n t=%f A , Iact ,
Ireact )
98

Scilab code Exa 9.3 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

Vl =400 // l i n e v o l t a g e a c r o s s a l t e r n a t o r and motor


Vph = Vl // a s t h e motor i s d e l t a c o n n e c t e d
Pout =112 D +3 // o u t p u t o f motor
e =.88 // e f f i c i e n c y o f motor
Pin = Pout / e // i n p u t t o motor
pf =.86
phi = acos ( pf )
Il = Pin /( sqrt (3) * Vl * pf )
Iph = Il / sqrt (3)
mprintf ( C u r r e n t i n e a c h motor phase , I p h=%f A\n ,
Iph )
// a l t e r n a t o r i s s t a r c o n n e c t e d
mprintf ( C u r r e n t i n e a c h a l t e r n a t o r p h a s e=%f A\n , Il
)
// c a l c u l a t i n g a c t i v e and r e a c t i v e c o m p o ne n t s o f
c u r r e n t i n e a c h p h a s e o f motor
Iact = Iph * pf
Ireact = Iph * sin ( phi )
mprintf ( A c t i v e component o f c u r r e n t i n e a c h p h a s e
o f motor=%f A\ n R e a c t i v e component o f c u r r e n t i n
e a c h p h a s e o f motor=%f A\n , Iact , Ireact )
// p h a s e a n g l e b e t w e e n t h e p h a s e v o l t a g e and p h a s e
c u r r e n t w i l l be t h e same f o r b o t h motor and
a l t e r n a t o r i f we n e g l e c t l i n e i m p e d a n c e
Iph = Il
Iact = Iph * pf
Ireact = Iph * sin ( phi )
mprintf ( A c t i v e component o f c u r r e n t i n e a c h p h a s e
o f a l t e r n a t o r =%f A\ n R e a c t i v e component o f c u r r e n t
i n e a c h p h a s e o f a l t e r n a t o r =%f A\n , Iact , Ireact
)
99

23

// The a n s w e r s v a r y from t h e t e x t b o o k due t o round


off error

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
// c a l c u l a t i n g c u r r e n t i n e a c h l i n e
Vl =400 // l i n e v o l t a g e
Vph = Vl / sqrt (3) // p h a s e v o l t a g e
Ir =8 D +3/ Vph
Iy =6 D +3/ Vph
Ib =4 D +3/ Vph
mprintf ( C u r r e n t i n Rphase , I r=%f A\ n C u r r e n t i n Y
phase , I y=%f A\ n C u r r e n t i n Bphase , I b=%f A\n ,Ir ,
Iy , Ib )
// Loads on t h r e e p h a s e s a r e r e s i s t i v e
Ir = pol2rect ( Ir ,0)
Iy = pol2rect ( Iy , -120)
Ib = pol2rect ( Ib , -240)
In = Ir + Iy + Ib
mprintf ( C u r r e n t i n t h e n e u t r a l=%f A , mag ( In ) )

100

Scilab code Exa 9.5 Example on Three Phase Circuits


1
2
3
4
5
6
7
8
9
10

Pout =30 D +3 // o u t p u t
e =.86 // e f f i c i e n c y
Pin = Pout / e // i n p u t
Vl =440 // l i n e v o l t a g e
pf =.83 // power f a c t o r
Il = Pin /( sqrt (3) * Vl * pf )
mprintf ( L i n e c u r r e n t=%f A\n , Il )
Iph = Il / sqrt (3) // motor i s d e l t a c o n n e c t e d
mprintf ( Phase c u r r e n t=%f A , Iph )

Scilab code Exa 9.6 Example on Three Phase Circuits


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)
10
y = r * sin ( theta * %pi /180)
11
z = x + y * %i
12 endfunction
13 function [ r ]= mag ( A )
14
x = real ( A )
15
y = imag ( A )
16
r = sqrt ( x ^2+ y ^2)
17 endfunction
18 j = %i
19 // c a l c u l a t i n g p h a s e c u r r e n t s l e t
20 Vl =440 // l i n e v o l t a g e

101

t h e s e q u e n c e be RYB

21 Vph = Vl // d e l t a c o n n e c t e d l o a d
22 Zph1 =150 // i m p e d a n c e o f t h e p h a s e b e t w e e n A and B(
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

resistive )
I1 = Vph / Zph1
mprintf ( I 1=%f A a t 0 d e g r e e s w . r . t . Vry \n , I1 )
Zph2 =30+50* j // i m p e d a n c e o f t h e p h a s e b e t w e e n B and C
I2 = Vph / mag ( Zph2 )
// a s t h e l o a d i s i n d u c t i v e , c u r r e n t w i l l l a g t h e
v o l t a g e Vyb by p h i 2
phi2 = atand (50/30)
mprintf ( I 2=%f A a t %f d e g r e e s w . r . t . Vyb\n , I2 ,
phi2 )
C =20 D -6
f =50
Xc = -(1/(2* %pi * f * C ) ) * j
I3 = Vph / mag ( Xc )
// a s t h e l o a d i s c a p a c i t i v e , c u r r e n t w i l l l e a d t h e
v o l t a g e Vbr by 90 d e g r e e s
mprintf ( I 3=%f A a t 90 d e g r e e s w . r . t . Vbr \n , I3 )
// c a l c u l a t i n g l i n e c u r r e n t s
Vry = pol2rect (440 ,0)
Vyb = pol2rect (440 , -120)
Vbr = pol2rect (440 , -240)
I1 = Vry / Zph1
I2 = Vyb / Zph2
I3 = Vbr / Xc
// u s i n g KCL
Ir = I1 - I3
Iy = I2 - I1
Ib = I3 - I2
mprintf ( C u r r e n t i n l i n e R , I r=%f A, \ n C u r r e n t i n
l i n e Y, I y=%f A, \ n C u r r e n t i n l i n e B , I b=%f A, \ n ,
mag ( Ir ) , mag ( Iy ) , mag ( Ib ) )

102

Scilab code Exa 9.7 Example on Three Phase Circuits


1
2
3
4
5
6
7
8
9
10
11
12
13
14

Vl =1100 // l i n e v o l t a g e
Vph = Vl / sqrt (3) // s t a r c o n n e c t e d l o a d
Il =80 // c u r r e n t t h r o u g h l o a d
Iph = Il
Zph = Vph / Iph
P =100 D +3 // power drawn by l o a d
pf = P /( sqrt (3) * Vl * Il ) // power f a c t o r
Rph = Zph * pf
Xc = sqrt ( Zph ^2 - Rph ^2)
f =50
C =1/(2* %pi * f * Xc )
mprintf ( C a p a c i t a n c e p e r p h a s e=%f microF , C *10^6)
// Answer v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 9.8 Example on Power Measurement


1
2 W1 =15 D +3 // r e a d i n g o f f i r s t w a t t m e t e r
3 W2 = -1.5 D +3 // r e a d i n g o f s e c o n d w a t t m e t e r
4 W = W1 + W2 // t o t a l power f e d t o t h e l o a d
5 mprintf ( T o t a l power f e d t o t h e l o a d=%f kW\n ,W

/10^3)
6 phi = atand ( sqrt (3) *( W1 - W2 ) / W )
7 mprintf ( Power f a c t o r a n g l e , p h i=%f d e g r e e s \ nPower
f a c t o r o f l o a d=%f , phi , cos ( phi * %pi /180) )

Scilab code Exa 9.9 Example on Power Measurement


1

103

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

W1 =115 D +3
W2 =50 D +3
// c a l c u l a t i n g i n p u t t o motor
W = W1 + W2
mprintf ( Power i n p u t t o t h e motor=%f kW\n , W /1000)
// c a l c u l a t i n g power f a c t o r
phi = atand ( sqrt (3) *( W1 - W2 ) /( W1 + W2 ) )
mprintf ( Power f a c t o r a n g l e , p h i=%f d e g r e e s \ nPower
f a c t o r o f l o a d=%f A\n , phi , cos ( phi * %pi /180) )
// c a l c u l a t i n g l i n e c u r r e n t
Il = W /( sqrt (3) *440* cos ( phi * %pi /180) )
mprintf ( L i n e c u r r e n t drawn by t h e motor=%f A\n , Il )
// c a l c u l a t i n g e f f i c i e n c y
Pout =150 D +3 // o u t p u t o f motor
e = Pout / W *100
mprintf ( E f f i c i e n c y o f t h e i n d u c t i o n motor=%f
p e r c e n t ,e )

Scilab code Exa 9.10 Example on Power Measurement


1
2
3
4
5
6
7
8
9
10
11
12
13

// c a l c u l a t i n g p h a s e v o l t a g e
Vl =440 // l i n e v o l t a g e
Vph = Vl / sqrt (3) // s t a r c o n n e c t e d c i r c u i t
mprintf ( Phase v o l t a g e=%f V\n , Vph )
Iph =20 // p h a s e c u r r e n t
Zph = Vph / Iph // i m p e d a n c e o f l o a d p e r p h a s e
// c a l c u l a t i n g l o a d p a r a m e t e r s c u r r e n t i n e a c h p h a s e
l a g s b e h i n d i t s v o l t a g e by 40 d e g r e e s
// on s o l v i n g f o r R
R = Zph / sqrt (1+( tan (40* %pi /180) ) ^2)
X = R * tan (40* %pi /180)
mprintf ( Load p a r a m e t e r s a r e \nR=%f ohm\nX=%f ohm\n ,
R,X)
// c a l c u l a t i n g t o t a l power
104

14 P =3* Vph * Iph * cos (40* %pi /180)


15 mprintf ( T o t a l power consumed=%f kW\n ,P *10^ -3)
16 // c a l c u l a t i n g W1 and W2>W1+W2=P , W1W2=P t a n ( p h i ) /

sqrt (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) /1000 , w (2 ,1)

/1000)

Scilab code Exa 9.11 Example on Power Measurement


1
2
3
4
5
6
7
8
9
10
11
12
13
14

Pout =37.3 D +3 // power o u t p u t


e =.88 // e f f i c i e n c y
Pin = Pout / e // i n p u t power
pf =.82 // power f a c t o r
phi = acosd ( pf )
// c a l c u l a t i n g W1 and W2>W1+W2=Pin , W1W2=Pin t a n (
phi ) / s q r t (3)
a =[1 1;1 -1]
b =[ Pin ; Pin * tan ( phi * %pi /180) / sqrt (3) ]
w = inv ( a ) * b
mprintf ( R e a d i n g s o f two w a t t m e t e r s a r e : \ nW1=%f kW, \
nW2=%f kW\n , w (1 ,1) /1000 , w (2 ,1) /1000)
Vl =440 // l i n e v o l t a g e
Il = Pin /( sqrt (3) * Vl * pf )
mprintf ( F u l l l o a d l i n e c u r r e n t=%f A , Il )

Scilab code Exa 9.12 Example on Power Measurement


1
2

// c o n s i d e r i n g s t a r c o n n e c t e d c i r c u i t
105

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

Rph =20 // r e s i s t a n c e o f c o i l
Xph =15 // r e a c t a n c e o f c o i l
Vl =400 // l i n e v o l t a g e
Vph = Vl / sqrt (3) // p h a s e v o l t a g e
Zph = sqrt ( Rph ^2+ Xph ^2) // i m p e d a n c e p e r p h a s e
Iph = Vph / Zph // p h a s e c u r r e n t
Il = Iph // l i n e c u r r e n t
pf = Rph / Zph // power f a c t o r
phi = acosd ( pf )
Pin = sqrt (3) * Vl * Il * pf // i n p u t power
// c a l c u l a t i n g W1 and W2>W1+W2=Pin , W1W2=Pin t a n (
phi ) / s q r t (3)
a =[1 1;1 -1]
b =[ Pin ; Pin * tan ( phi * %pi /180) / sqrt (3) ]
w = inv ( a ) * b
mprintf ( R e a d i n g s o f two w a t t m e t e r s i n c a s e o f s t a r
c o n n e c t i o n a r e \nW1=%f W, \ nW2=%f W\n , w (1 ,1) , w
(2 ,1) )
// c o n s i d e r i n g d e l t a c o n n e c t e d c i r c u i t
Iph = Vl / Zph // p h a s e c u r r e n t
Il = sqrt (3) * Iph // l i n e c u r r e n t
Pin = sqrt (3) * Vl * Il * pf // i n p u t power
// c a l c u l a t i n g W1 and W2>W1+W2=Pin , W1W2=Pin t a n (
phi ) / s q r t (3)
a =[1 1;1 -1]
b =[ Pin ; Pin * tan ( phi * %pi /180) / sqrt (3) ]
w = inv ( a ) * b
mprintf ( R e a d i n g s o f two w a t t m e t e r s i n c a s e o f d e l t a
c o n n e c t i o n a r e \nW1=%f W, \ nW2=%f W , w (1 ,1) , w
(2 ,1) )
// The a n s w e r s v a r y from t h e t e x t b o o k due t o round
off error

106

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

// c a l c u l a t i n g r e s i s t a n c e o f t h e s h u n t
i =20 D -3 // c u r r e n t t h r o u g h t t h e c o i l
r =4 // r e s i s t a n c e o f c o i l
V=i*r
I =2 // t o t a l c u r r e n t t o be m e a s u r e d
Is =I - i // c u r r e n t t h r o u g h s h u n t
R = V / Is //Ohm s law
mprintf ( R e s i s t a n c e o f t h e s h u n t=%f ohm\n , R )
// s o l v i n g p a r t ( i i )
V =30 // v o l t a g e t o be m e a s u r e d
R = V /i - r
mprintf ( R e s i s t a n c e t o be c o n n e c t e d i n s e r i e s w i t h
moving c o i l =%d ohm , R )

Scilab code Exa 10.2 Example on Moving Coil Instruments


1

107

2
3
4
5
6
7
8
9
10
11
12
13

i =20 D -3 // c u r r e n t t h r o u g h t t h e c o i l
r =4 // r e s i s t a n c e o f c o i l
V =30 // v o l t a g e t o be m e a s u r e d
R =( V - r * i ) / i // r e s i s t a n c e i n s e r i e s t o r e a d u p t o 30
V
// t o r e a d u p t o 60 V
V =60
R1 = V /i - r
mprintf ( A d d i t i o n a l r e s i s t a n c e n e e d e d t o r e a d u p t o
60 V=%d ohm\n , R1 - R )
// t o r e a d u p t o 90 V
V =90
R2 = V /i - r
mprintf ( A d d i t i o n a l r e s i s t a n c e n e e d e d t o r e a d u p t o
90V=%d ohm ,R2 - R1 )

Scilab code Exa 10.3 Example on Moving Coil Instruments


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

i =20 D -3 // c u r r e n t t h r o u g h t t h e c o i l
r =4 // r e s i s t a n c e o f c o i l
V=i*r
// when t o t a l c u r r e n t t o be m e a s u r e d=2 A
Is =2 - i // s h u n t c u r r e n t
R1 = V / Is
mprintf ( R e s i s t a n c e o f s h u n t f o r 2A r a n g e=%f ohm\n ,
R1 )
// when t o t a l c u r r e n t t o be m e a s u r e d=4 A
Is =4 - i // s h u n t c u r r e n t
R2 = V / Is
mprintf ( R e s i s t a n c e o f s h u n t f o r 4A r a n g e=%f ohm\n ,
R2 )
// when t o t a l c u r r e n t t o be m e a s u r e d=6 A
Is =6 - i // s h u n t c u r r e n t
R3 = V / Is
108

16

mprintf ( R e s i s t a n c e o f s h u n t f o r 6A r a n g e=%f ohm , R3


)

Scilab code Exa 10.4 Example on Moving Coil Instruments


1
2
3
4
5
6
7
8
9
10
11
12
13

// c a l c u l a t i n g d e f l e c t i n g t o r q u e
N =50 // no . o f t u r n s i n c o i l
B =.12 // f l u x d e n s i t y i n Wb/m2
A =5 D -4 // a r e a o f c o i l i n m2
I =15 D -3 // c u r r e n t t h r o u g h c o i l
Td = N * B * A * I
mprintf ( D e f l e c t i n g t o r q u e=%fD6 Nm\n , Td *10^6)
// c a l c u l a t i n g d e f l e c t i o n o f p o i n t e r
C =18 D -7 // c o n s t a n t f o r s p r i n g i n Nm p e r d e g r e e
Tc = Td // c o n t r o l l i n g t o r q u e
theta = Tc / C
mprintf ( D e f l e c t i o n=%d d e g r e e s , theta )

Scilab code Exa 10.5 Example on Moving Coil Instruments


1
2
3
4
5
6
7
8
9
10
11

N =80 // no . o f t u r n s i n c o i l
B =.5 // f l u x d e n s i t y
A =15 D -4 // a r e a o f c o i l
Tc =2 D -4 // c o n t r o l l i n g t o r q u e a t f u l l s c a l e
deflection
Td = Tc // u n d e r f i n a l s t e a d y c o n d i t i o n
I = Td /( N * B * A )
n =100 // no . o f d i v i s i o n s
v =2 // v o l t a g e m e a s u r e d p e r d i v i s i o n
V = n * v // a t f u l l s c a l e d e f l e c t i o n
R=V/I
109

12

mprintf ( S e r i e s r e s i s t a n c e =%f ohm ,R )

Scilab code Exa 10.6 Example on Moving Coil Instruments


1
2
3
4
5
6
7
8
9
10
11
12

// c a l c u l a t i n g r e s i s t a n c e o f manganin s h u n t t o e x t e n d
range to 1 A
R =10 // r e s i s t a n c e o f i n s t r u m e n t c o i l
I =10 D -3 // c u r r e n t t h r o u g h c o i l
V=I*R
Is =1 - I // s h u n t c u r r e n t
r = V / Is
mprintf ( R e s i s t a n c e o f manganin s h u n t t o e x t e n d
r a n g e t o 1 A=%f ohm\n , r )
// c a l c u l a t i n g v a l u e o f s e r i e s r e s i s t a n c e t o e x t e n d
t h e r a n g e t o 15 V
v =15 - V // v o l t a g e a c r o s s s e r i e s r e s i s t a n c e
Rs = v / I
mprintf ( S e r i e s r e s i s t a n c e t o be c o n n e c t e d t o e x t e n d
r a n g e t o 15 V=%d ohm , Rs )

110

Chapter 13
Temperature Rise and
Ventilation in Electrical
Machines

Scilab code Exa 13.1 Example on Heating and Cooling of Electrical Machines
1
2
3
4
5
6
7
8
9
10
11
12

// temp . r i s e a t any t i m e t i s t h e t a=t h e t a f ( t h e t a f


t h e t a 1 ) exp ( t /T)
theta_1 =0 // i n i t i a l t e m p e r a t u r e
// t h e t a =25 d e g r e e C when t =1 h r ; t h e t a =37.5 d e g r e e
C when t =2 h r
// on s o l v i n g f o r T
T =1/ log (2)
mprintf ( H e a t i n g t i m e c o n s t a n t=%f h r \n , T )
// on s o l v i n g f o r t h e t a f
theta_f =25/(1 - exp ( -1/ T ) )
mprintf ( F i n a l s t e a d y f u l l l o a d t e m p e r a t u r e r i s e
t h e t a f =%f d e g r e e C\n , theta_f )
//Temp . f a l l a t any t i m e t i s t h e t a = t h e t a f + (
t h e t a 2 t h e t a f ) exp ( t /T )
// As t h e t r a n s f o r m e r i s d i s c o n n e c t e d now , t h e t a f =0
111

13 theta_2 = theta_f
14 theta_dash =40 -30
15 t =1.5
16 T = t / log ( theta_2 / theta_dash )
17 mprintf ( C o o l i n g t i m e c o n s t a n t =%f h r , T )
18 // The a n s w e r s v a r y from t h e t e x t b o o k due t o round

off error

Scilab code Exa 13.2 Example on Heating and Cooling of Electrical Machines
1
2
3
4
5
6
7
8
9
10
11
12
13
14

// temp . r i s e o f t h e motor a t any t i m e t i s t h e t a=


t h e t a f ( t h e t a f t h e t a 1 ) exp ( t /T)
theta_f =50 // f i n a l s t e a d y temp r i s e
T =100 // h e a t i n g t i m e c o n s t a n t i n min
t =20 // f u l l l o a d w o r k i n g p e r i o d i n min
// d u r i n g c o o l i n g p r o c e s s , temp . d e c r e a s e s t o t h e t a 1
=t h e t a exp ( t /T )
t =40 // s t a t i o n a r y p e r i o d i n min
T =140 // c o o l i n g t i m e c o n s t a n t i n min
// s o l v i n g s i m u l t a n e o u s e q u a t i o n s
a =[1 - exp ( -20/100) ; - exp ( -40/140) 1]
b =[50 -50* exp ( -20/100) ;0]
c = inv ( a ) * b
theta = c (1 ,1)
mprintf ( Maximum temp a t t a i n e d=%f d e g r e e C , theta )

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

// c a l c u l a t i n g Bm
Ep =400 // i n d u c e d emf i n p r i m a r y w i n d i n g
Np =350 // no . o f t u r n s i n p r i m a r y
Ai =55 D -4 // c r o s s s e c t i o n a l a r e a
f =50 // f r e q u e n c y i n Hz
Bm = Ep /(4.44* f * Ai * Np )
mprintf ( Maximum v a l u e o f f l u x d e n s i t y i n t h e c o r e=
%f T e s l a (Wb/m 2 ) \n , Bm )
// c a l c u l a t i n g v o l t a g e i n d u c e d i n s e c o n d a r y w i n d i n g
Ns =1050
Es = Ep * Ns / Np
mprintf ( V o l t a g e i n d u c e d i n t h e s e c o n d a r y w i n d i n g=%d
V , round ( Es ) )

Scilab code Exa 14.2 Example on EMF Equation


1

113

2
3
4
5
6
7
8
9
10
11
12

// c a l c u l a t i n g no . o f t u r n s i n s e c o n d a r y w i n d i n g
Es =500 // no l o a d v o l t a g e o f low v o l t a g e w i n d i n g
phi =.06 // f l u x
f =50 // f r e q u e n c y i n Hz
Ns = round ( Es /(4.44* f * phi ) )
mprintf ( No . o f t u r n s i n low v o l t a g e w i n d i n g=%f\n ,
Ns )
// c a l c u l a t i n g no . o f t u r n s i n p r i m a r y w i n d i n g
Np = Ns *6600/500
mprintf ( Np=%f ( n o t p o s s i b l e ) \n , Np )
// Here , t h e no . o f t u r n s f i n a l l y t a k e n i s 500 and
n o t 502
mprintf ( No . o f t u r n s f i n a l l y t a k e n i s 500 , b e c a u s e
t h e h i g h v o l t a g e w i n d i n g w i l l be s p l i t up i n t o a
no . o f c o i l s )

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 ( E q u i v a l e n t r e s i s t a n c e
%f ohm\n , Rp + Rs_dash )
Xs_dash =(2200/220) ^2* Xs
mprintf ( E q u i v a l e n t r e a c t a n c e
ohm\n , Xp + Xs_dash )
Rp_dash =(220/2200) ^2* Rp
mprintf ( E q u i v a l e n t r e s i s t a n c e
=%f ohm\n , Rp_dash + Rs )
Xp_dash =(220/2200) ^2* Xp
mprintf ( E q u i v a l e n t r e a c t a n c e
%f ohm , Xp_dash + Xs )
114

r e f e r r e d t o p r i m a r y=

r e f e r r e d t o p r i m a r y=%f

r e f e r r e d to secondary

r e f e r r e d t o s e c o n d a r 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
// c a l c u l a t i n g c u r r e n t i n p r i m a r y
Is =10 // a t 0 . 8 p f l a g g i n g
Ip_dash = Is *400/200 // a t 0 . 8 p f l a g g i n g
Ip_dash = pol2rect ( Ip_dash , - acosd (.8) )
Im =200/300 // m a g n e t i z i n g c u r r e n t
Iw =200/600 // a c t i v e component o f no l o a d c u r r e n t
I0 = Iw - Im * j // no l o a d c u r r e n t
Ip = Ip_dash + I0
[ Ip theta ]= rect2pol ( Ip )
mprintf ( C u r r e n t i n p r i m a r y i s %f A, l a g g i n g a t an
a n g l e o f %f d e g r e e s \n ,Ip , - theta )
29 // c a l c u l a t i n g t e r m i n a l v o l t a g e
30 Ip = pol2rect ( Ip , - theta )
31 Ep = Ip_dash *(.15+.37* j )
115

32 Es_dash =200 - Ep
33 [ Es_dash theta ]= rect2pol ( Es_dash )
34 Es = Es_dash *400/200
35 mprintf ( S e c o n d a r y t e r m i n a l v o l t a g e=%f V,

l a g g i n g at

an a n g l e o f %f d e g r e e s ,Es , - theta )

Scilab code Exa 14.5 Example on Regulation and Efficiency


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

// c a l c u l a t i n g v o l t a g e r e g u l a t i o n a t f u l l l o a d w i t h
0.8 pf lagging
Ip =2000/400 // p r i m a r y c u r r e n t a t f u l l l o a d
Rp =3
Xp =4
phi = acos (.8)
Vp =400
VR = Ip *( Rp * cos ( phi ) + Xp * sin ( phi ) ) / Vp *100
mprintf ( V o l t a g e r e g u l a t i o n a t f u l l l o a d w i t h 0 . 8 p f
l a g g i n g=%f p e r c e n t \n , VR )
// c a l c u l a t i n g v o l t a g e r e g u l a t i o n a t f u l l l o a d w i t h
0.8 pf leading
VR = Ip *( Rp * cos ( phi ) - Xp * sin ( phi ) ) / Vp *100
mprintf ( V o l t a g e r e g u l a t i o n a t f u l l l o a d w i t h 0 . 8 p f
l e a d i n g=%f p e r c e n t \n , VR )
// c a l c u l a t i n g r e g u l a t i o n a t h a l f l o a d w i t h 0 . 8 p f
lagging
Ip = Ip /2 // h a l f l o a d p r i m a r y c u r r e n t
VR = Ip *( Rp * cos ( phi ) + Xp * sin ( phi ) ) / Vp *100
mprintf ( V o l t a g e r e g u l a t i o n a t h a l f l o a d w i t h 0 . 8 p f
l a g g i n g=%f p e r c e n t , VR )

Scilab code Exa 14.6 Example on Regulation and Efficiency


116

1
2 // I s Rs =.02 Vs , I s Xs =.05 Vs
3 // c a l c u l a t i n g r e g u l a t i o n a t . 8 p f l a g g i n g
4 VR =(.02*.8+.05*.6) *100
5 mprintf ( V o l t a g e r e g u l a t i o n a t . 8 p f l a g g i n g=%f

p e r c e n t \n , VR )
6 // c a l c u l a t i n g r e g u l a t i o n a t . 8 p f l e a d i n g
7 VR =(.02*.8 -.05*.6) *100
8 mprintf ( V o l t a g e r e g u l a t i o n a t 0 . 8 p f l e a d i n g=%f
p e r c e n t , VR )

Scilab code Exa 14.7 Example on Regulation and Efiiciency


1
2 Wcu_fl =425 // c o p p e r l o s s e s a t f u l l l o a d
3 // c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d , u n i t y p f
4 Pout =50*1000*1 // o u t p u t
5 e = Pout /( Pout +350+425) *100
6 mprintf ( E f f i c i e n c y a t f u l l l o a d , u n i t y p f=%f
7
8
9
10
11
12
13
14
15
16
17
18

p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t h a l f
Pout = Pout /2 // o u t p u t
Wi =350 // i r o n l o s s e s
Wcu = Wcu_fl /2^2 // c o p p e r l o s s e s
e = Pout /( Pout + Wi + Wcu ) *100
mprintf ( E f f i c i e n c y a t h a l f l o a d
p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t f u l l
lagging
Pout =(50 D +3) *.8 // o u t p u t
e = Pout /( Pout + Wi + Wcu_fl ) *100
mprintf ( E f f i c i e n c y a t f u l l l o a d
p e r c e n t \n ,e )
// c a l c u l a t i n g maximum e f f i c i e n c y
Wcu = Wi // c o p p e r l o s s e s
117

load , unity pf

, u n i t y p f=%f
load , 0 . 8 pf

, . 8 p f l a g g i n g=%f

19 x = sqrt ( Wcu / Wcu_fl ) // l o a d a t which maximum e f f i c i e n c y

occurs
mprintf ( At %f p e r c e n t o f t h e f u l l l o a d , maximum
e f f i c i e n c y w i l l o c c u r \n ,x *100)
21 Pout =( x *50 D +3*1)
22 e_max = Pout /( Pout +2* Wi ) *100
23 mprintf ( Maximum e f f i c i e n c y =%f p e r c e n t \ nLoad a t
maximum e f f i c i e n c y =%f kVA , e_max , Pout /1000)
20

Scilab code Exa 14.8 Example on Regulation and Efficiency


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Wi =1100 // i r o n l o s s e s
Wcu =400 // c o p p e r l o s s e s a t 50% l o a d
Is =100*1000/10000 // s e c o n d a r y f u l l l o a d c u r r e n t
// c a l c u l a t i n g e f f i c i e n c y a t 25% l o a d , u n i t y p f
Is1 = Is /4 // s e c o n d a r y c u r r e n t
Wcu1 =(25/50) ^2*400 // c o p p e r l o s s e s
Pout =.25*100*1000 // o u t p u t
e = Pout /( Pout + Wcu1 + Wi ) *100
mprintf ( E f f i c i e n c y a t 25 p e r c e n t l o a d , u n i t y p f=%f
p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t 25% l o a d , 0 . 8 p f
e =( Pout *.8) /( Pout *.8+ Wcu1 + Wi ) *100
mprintf ( E f f i c i e n c y a t 25 p e r c e n t l o a d , . 8 p f=%f
p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t 50% l o a d , u n i t y p f
Pout =.5*100*1000 // o u t p u t
e = Pout /( Pout + Wi + Wcu ) *100
mprintf ( E f f i c i e n c y a t 50 p e r c e n t l o a d , u n i t y p f=%f
p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t 50% l o a d , 0 . 8 p f
e = Pout *.8/( Pout *.8+ Wi + Wcu ) *100
mprintf ( E f f i c i e n c y a t 50 p e r c e n t l o a d , 0 . 8 p f=%f
p e r c e n t \n ,e )
118

21 // c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d , u n i t y p f
22 Pout =100*1000 // o u t p u t
23 Wcu3 =(10/5) ^2*400 // c o p p e r l o s s e s
24 e = Pout /( Pout + Wcu3 + Wi ) *100
25 mprintf ( E f f i c i e n c y a t f u l l l o a d , u n i t y p f=%f
26
27
28
29
30
31

32

p e r c e n t \n ,e )
// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d , . 8 p f
e =( Pout *.8) /( Pout *.8+ Wcu3 + Wi ) *100
mprintf ( E f f i c i e n c y a t f u l l l o a d , 0 . 8 p f=%f p e r c e n t \
n ,e )
// c a l c u l a t i n g l o a d f o r max e f f i c i e n c y a t u n i t y p f
x = sqrt ( Wi / Wcu3 )
mprintf ( Load f o r max e f f i c i e n c y =%f kVA\ nLoad f o r
max e f f i c i e n c y w i l l r e m a i n t h e same i r r e s p e c t i v e
o f power f a c t o r ,x * Pout /1000)
// e r r o r i n t h e t e x t b o o k a n s w e r f o r e f f i c i e n c y a t 50
% load at unity pf as w e l l as at . 8 pf

Scilab code Exa 14.9 Example on Regulation and Efficiency


1
2 e =.9 // e f f i c i e n c y a t f u l l l o a d
3 Pout =500 // o u t p u t a t f u l l l o a d
4 // we g e t , . 9 = 5 0 0 / ( 5 0 0 +Wi+Wcu)
5 // e f f i c i e n c y a t h a l f l o a d i s a l s o t h e same
6
7
8
9
10
11
12
13
14

>.9=(500/2) /(500/2+Wi+Wcu/ 4 )
// s o l v i n g f o r Wi and Wcu a t f u l l l o a d
a =[.9 .9;.9 .225]
b =[50;25]
z = inv ( a ) * b
Wi = z (1 ,1)
Wcu = z (2 ,1)
// c a l c u l a t i n g e f f i c i e n c y a t 75% l o a d
Pout =.75*500 // o u t p u t
Wcu1 =.75^2* Wcu // c o p p e r l o s s e s
119

15 e = Pout /( Pout + Wi + Wcu1 ) *100


16 mprintf ( E f f i c i e n c y a t 75 p e r c e n t

f u l l l o a d=%f

p e r c e n t ,e )

Scilab code Exa 14.10 Example on Regulation and Efficiency


1
2
3
4
5
6
7
8
9
10

e_max =.98 //max e f f i c i e n c y


Pout =.75*500*1000 // o u t p u t o f t r a n s f o r m e r a t max
efficiency
Wi = Pout *(1 - e_max ) /(2* e_max )
Wcu1 = Wi // c o p p e r l o s s e s a t 3/4 f u l l l o a d
Wcu = Wcu1 /(.75) ^2 // c o p p e r l o s s e s a t f u l l l o a d
Is =500*1000/500 // s e c o n d a r y c u r r e n t
Vs =500 // s e c o n d a r y v o l t a g e
VR =( Wcu /( Vs * Is ) *.8+ sqrt (.1^2 -( Wcu /( Vs * Is ) ) ^2) *.6)
*100
mprintf ( R e g u l a t i o n a t f u l l l o a d , 0 . 8 p f l a g g i n g=%f
p e r c e n t , VR )

Scilab code Exa 14.11 Example on Regulation and Efficiency


1
2 e1 =.985 // e f f i c i e n c y a t f u l l l o a d , . 8 p f l a g g i n g
3 // . 9 8 5 = 1 0 0D+ 3 . 8 / ( 1 0 0D+3.8+Wi+Wcu) >.985Wi+.9 85
4
5
6
7
8
9

Wcu=1200
e2 =.99 // e f f i c i e n c y a t h a l f l o a d , u n i t y p f
// . 9 9 = ( ( 1 0 0D+3) / 2 ) / ( ( 1 0 0D+3)/2+Wi+Wcu/ 4 ) >.99Wi
+ . 2 4 7 5 Wcu=500
// s o l v i n g f o r Wi and Wcu
a =[.985 .985;.99 .2475]
b =[1200;500]
w = inv ( a ) * b
120

10 Wi = w (1 ,1)
11 Wcu = w (2 ,1)
12 mprintf ( I r o n

l o s s e s =%f W\ n F u l l l o a d c o p p e r l o s s e s =
%f W ,Wi , Wcu )

Scilab code Exa 14.12 Example on Regulation and Efficiency


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

// c a l c u l a t i n g r e g u l a t i o n a t f u l l l o a d , 0 . 8 p f
lagging
Pout1 =.75*500 D +3 // o u t p u t a t max e f f i c i e n c y
Wi =375 D +3*(1 -.97) /(2*.97)
Wcu1 = Wi // c o p p e r l o s s e s a t 3/4 t h f u l l l o a d
Wcu =(4/3) ^2* Wcu1 // c o p p e r l o s s e s a t f u l l l o a d
Is =500 D +3/220
Rs = Wcu / Is ^2
Vs =220 // s e c o n d a r y v o l t a g e
Zs =220*.1/ Is
Xs = sqrt ( Zs ^2 - Rs ^2)
VR =( Is * Rs *.8+ Is * Xs *.6) / Vs *100
mprintf ( R e g u l a t i o n a t . 8 p f l a g g i n g=%f p e r c e n t \n ,
VR )
// c a l c u l a t i n g r e g u l a t i o n a t f u l l l o a d , 0 . 8 p f
leading
VR =( Is * Rs *.8 - Is * Xs *.6) / Vs *100
mprintf ( R e g u l a t i o n a t . 8 p f l e a d i n g=%f p e r c e n t \n ,
VR )

Scilab code Exa 14.13 Example on Regulation and Efficiency


1
2

e_max =.98 //max e f f i c i e n c y o f t r a n s f o r m e r


121

3 P =15 D +3 // l o a d a t which max e f f i c i e n c y


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

occurs at

unity pf
Wi = P *(1 - e_max ) /(2* e_max )
Wcu = Wi
// i n t h e f i r s t i n t e r v a l
P1 =3 D +3/0.6 // l o a d on t h e t r a n s f o r m e r
Wcu1 = Wcu *( P1 / P ) ^2
// i n t h e s e c o n d i n t e r v a l
P2 =10 D +3/0.8 // l o a d on t h e t r a n s f o r m e r
Wcu2 = Wcu *( P2 / P ) ^2
// i n t h e t h i r d i n t e r v a l
P3 =18 D +3/0.9 // l o a d on t h e t r a n s f o r m e r
Wcu3 = Wcu *( P3 / P ) ^2
// l o a d on t h e t r a n s f o r m e r d u r i n g l a s t i n t e r v a l =0>
c o p p e r l o s s e s =0 , i r o n l o s s e s =0
Wi = Wi *24 // t o t a l i r o n l o s s e s
Wcu =10* Wcu1 +5* Wcu2 +5* Wcu3 // t o t a l c o p p e r l o s s e s
Pout =(3*10+10*5+18*5) *10^3 // t o t a l o u t p u t
e = Pout /( Pout + Wi + Wcu ) *100
mprintf ( A l l day e f f i c i e n c y =%f p e r c e n t ,e )

Scilab code Exa 14.14 Example on Testing of Transformer


1
2
3
4
5
6
7
8
9
10

// f o r no l o a d t e s t
V0 =400 // a p p l i e d v o l t a g e
I0 =1 // c u r r e n t
W0 =60 // power consumed
Iw = W0 / V0
R0 = V0 / Iw
Im = sqrt ( I0 ^2 - Iw ^2)
Xm = V0 / Im
mprintf ( No l o a d p a r a m e t e r s : \ nR0=%f ohm , \nXm=%f ohm\
n ,R0 , Xm )
11 // f o r s h o r t c i r c u i t t e s t
122

12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
27
28
29
30

Vsc =15 // a p p l i e d v o l t a g e
Isc =12.5 // c u r r e n t
Wsc =50 // power consumed
Zp = Vsc / Isc
Rp = Wsc / Isc ^2
Xp = sqrt ( Zp ^2 - Rp ^2)
mprintf ( E q u i v a l e n t r e s i s t a n c e and r e a c t a n c e
r e f e r r e d t o p r i m a r y i s %f ohm and %f ohm\n ,Rp , Xp
)
// c a l c u l a t i n g r e g u l a t i o n a t f u l l l o a d , 0 . 8 p f
lagging
Vp =400
Ip =5 D +3/400
VR = Ip *( Rp *.8+ Xp *.6) / Vp *100
mprintf ( V o l t a g e r e g u l a t i o n=%f p e r c e n t \n , VR )
// c a l c u l a t i n g i r o n and c o p p e r l o s s e s
Wi = W0
Wcu = Wsc
mprintf ( I r o n l o s s e s =%f W\ nCopper l o s s e s a t f u l l
l o a d=%f W\n ,Wi , Wcu )
// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d and 0 . 8 p f
lagging
e =5 D +3*.8/(5 D +3*.8+ Wi + Wcu ) *100
mprintf ( E f f i c i e n c y a t f u l l l o a d and . 8 p f l a g g i n g=
%f p e r c e n t ,e )

Scilab code Exa 14.15 Example on Testing of Transformer


1
2 W0 =1300 // power consumed i n no l o a d t e s t
3 Wsc =2400 // power consumed i n s h o r t c i r c u i t

test
performed at f u l l load current
4 Wi = W0
5 Wcu = Wsc
6 Pout =(8*200*.8+10*.5*200*1) *10^3 // t o t a l o u t p u t
123

7 Wit =1300*24 // t o t a l i r o n l o s s e s
8 Wcut =2400*8+2400/4*10 // t o t a l c o p p e r l o s s e s
9 e = Pout /( Pout + Wit + Wcut ) *100
10 mprintf ( A l l day e f f i c i e n c y =%f p e r c e n t ,e )

Scilab code Exa 14.16 Example on Testing of Transformer


1
2 Woc =60 // power consumed i n OC t e s t a t 220 V
3 // i r o n l o s s e s i n t r a n s f o r m e r a r e p r o p o r t i o n a l t o
4
5
6
7
8
9
10
11

square of applied voltage


Wi =60*(200/220) ^2 // i r o n l o s s e s a t n o r m a l v o l t a g e o f
200 V
Is =5 D +3/400 // f u l l l o a d c u r r e n t on HV s i d e
// f o r SC t e s t
Isc =10 // c u r r e n t
Wsc =120 // power consumed
Wcu =( Is / Isc ) ^2* Wsc // f u l l l o a d c o p p e r l o s s e s
e =(5 D +3*.8) /(5 D +3*.8+ Wi + Wcu ) *100
mprintf ( E f f i c i e n c y a t f u l l l o a d=%f p e r c e n t ,e )

Scilab code Exa 14.17 Example on Parallel Operation


1
2
3
4
5
6
7
8
9
10

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)
124

11
z = x + y * %i
12 endfunction
13
14 j = %i
15 I = pol2rect (300 , - acosd (.8) ) // t o t a l

l o a d t o be s h a r e d
by t r a n s f o r m e r s A and B a t . 8 p f l a g g i n g
16 Za =.011+.042* j // i m p e d a n c e o f t r a n s f o r m e r A
17 Zb =.044+.072* j // i m p e d a n c e o f t r a n s f o r m e r B
18
19 // c a l c u l a t i n g l o a d s h a r e d by t r a n s f o r m e r A
20 Ia = Zb * I /( Za + Zb )
21 [ Ia theta ]= rect2pol ( Ia )
22 mprintf ( Load s h a r e d by t r a n s f o r m e r A=%f A,

lagging

by an a n g l e o f %f d e g r e e s \n ,Ia , - theta )
23
24 // c a l c u l a t i n g l o a d s h a r e d by t r a n s f o r m e r B
25 Ib = Za * I /( Za + Zb )
26 [ Ib theta ]= rect2pol ( Ib )
27 mprintf ( Load s h a r e d by t r a n s f o r m e r B=%f A,
28

lagging

by an a n g l e o f %f d e g r e e s ,Ib , - theta )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 14.18 Example on Parallel Operation


1
2 function [ r ]= mag ( A )
3
x = real ( A )
4
y = imag ( A )
5
r = sqrt ( x ^2+ y ^2)
6 endfunction
7
8 j = %i
9 Zl =8+6.2* j // l o a d i m p e d a n c e
10 // f o r t r a n s f o r m e r A

125

11 Ea =6600 // s e c o n d a r y i n d u c e d emf
12 Za =.3+3.2* j // e q u i v a l e n t i m p e d a n c e r e f e r r e d
13
14
15
16
17
18

to
secondary
// f o r t r a n s f o r m e r B
Eb =6400 // s e c o n d a r y i n d u c e d emf
Zb =.2+1.2* j // e q u i v a l e n t i m p e d a n c e r e f e r r e d t o
secondary
Ia =( Ea * Zb +( Ea - Eb ) * Zl ) /( Za * Zb +( Za + Zb ) * Zl )
Ib =( Eb * Za -( Ea - Eb ) * Zl ) /( Za * Zb +( Za + Zb ) * Zl )
mprintf ( C u r r e n t d e l i v e r e d by t r a n s f o r m e r A i s %f A\
n C u r r e n t d e l i v e r e d by t r a n s f o r m e r B i s %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

15
16

P =50 D +3 // power p e r p h a s e
Power_rating =3* P
Vpp =2300 // p r i m a r y p h a s e v o l t a g e
Vsp =230 // s e c o n d a r y p h a s e v o l t a g e
Vpl = sqrt (3) * Vpp // p r i m a r y n o r m a l l i n e v o l t a g e
Vsl = Vsp // s e c o n d a r y n o r m a l l i n e v o l t a g e
mprintf ( R a t i n g o f 3 p h a s e t r a n s f o r m e r w i l l be \n3
phase , %d kVA , %d/%d V, s t a r / d e l t a c o n n e c t i o n \n ,
Power_rating /1 D +3 , round ( Vpl ) , round ( Vsl ) )
Ipp = P / Vpp
Ipl = Ipp
Isp = P / Vsp
Isl = sqrt (3) * Isp
mprintf ( Primary p h a s e c u r r e n t=%f A\ nPrimary l i n e
c u r r e n t=%f A\ n S e c o n d a r y p h a s e c u r r e n t=%f A\
n S e c o n d a r y l i n e c u r r e n t=%f A\n ,Ipp , Ipl , Isp , Isl )
// c a l c u l a t i n g v o l t a g e r e g u l a t i o n
Rp_dash =1.2 // e q u i v a l e n t r e s i s t a n c e r e f e r r e d t o
primary
127

Xp_dash =1.6 // e q u i v a l e n t r e a c t a n c e r e f e r r e d t o
primary
18 VR = Ipp *( Rp_dash *.8+ Xp_dash *.6) *100/ Vpp
19 mprintf ( V o l t a g e R e g u l a t i o n=%f p e r c e n t , VR )
17

Scilab code Exa 15.2 Example on three phase transformer


1
2
3
4
5
6
7
8

9
10
11
12
13

// c a l c u l a t i n g no . o f t u r n s p e r p h a s e
Vsp =440/ sqrt (3) // s e c o n d a r y p h a s e v o l t a g e
Et =8 // emf p e r t u r n i n v o l t
Ts = round ( Vsp / Et )
Vpp =1100 // p r i m a r y p h a s e v o l t a g e
Tp = Ts * Vpp / Vsp
mprintf ( No . o f t u r n s p e r p h a s e on p r i m a r y w i n d i n g=
%d\nNo . o f t u r n s p e r p h a s e on s e c o n d a r y w i n d i n g=
%d\n , Tp , Ts )
// c a l c u l a t i n g n e t c r o s s s e c t i o n a l a r e a o f c o r e
f =50 // f r e q u e n c y
Bm =1.3 // f l u x d e n s i t y
Ai = Et /(4.44* f * Bm )
mprintf ( Net c r o s s s e c t i o n a l a r e a o f c o r e , Ai=%d cm
2 , round ( Ai *1 D +4) )

Scilab code Exa 15.3 Example on three phase transformer


1
2
3
4
5
6

// c a l c u l a t i n g c u r r e n t s i n t h e main and t e a s e r
transformer
P2 =600 D +3 // o u t p u t
V2 =110 // a p p l i e d v o l t a g e
pf =.707 // l a g g i n g power f a c t o r
I2 = P2 /( pf * V2 )
128

7 I1t =1.15* I2 *110/6600


8 I1m = I2 *110/6600
9 mprintf ( C u r r e n t s i n p r i m a r y w i n d i n g o f main and

10
11
12
13
14

t e a s e r t r a n s f o r m e r i s %f A and %f A r e s p e c t i v e l y \
n , I1m , I1t )
// c a l c u l a t i n g l i n e c u r r e n t s
Ic = I1t
Ib = sqrt ( I1m ^2+( I1t /2) ^2)
Ia = Ib
mprintf ( L i n e c u r r e n t s a r e %f A, %f A and %f A , Ia ,
Ib , Ic )

Scilab code Exa 15.4 Example on three phase transformer


1
2
3
4
5
6
7
8
9
10
11
12
13
14

function [r , theta ]= rect2pol (x , y )


r = sqrt ( x ^2+ y ^2)
theta = atand ( y / x )
endfunction
Q =750 // t o t a l l o a d t o be s h a r e d
pf =.8 // l a g g i n g power f a c t o r
theta = - acosd (.8)
Q = rect2pol ( Q * cos ( theta ) ,Q * sin ( theta ) )
Zb = rect2pol (.35 ,3.3) // p e r p h a s e i m p e d a n c e o f
transformer B
Za = rect2pol (.2 ,1.8) // p e r p h a s e i m p e d a n c e o f
transformer A
Qa = Zb * Q /( Za + Zb )
Qb = Za * Q /( Za + Zb )
mprintf ( T r a n s f o r m e r A o f 500 kVA r a t i n g s h a r e s a
l o a d o f %f kVA w h e r e a s t r a n s f o r m e r B o f 250 kVA
r a t i n g s h a r e s a l o a d o f %f kVA , Qa , Qb )

129

Chapter 16
Electromechanical Energy
Conversion

Scilab code Exa 16.2 Example on Electromechanical Energy Conversion


Devices
1
2 i =3 // c u r r e n t i n c o i l
3 x =5 D -2 // l e n g t h o f a i r gap
4 lambda = sqrt ( i /(121* x ^2) )
5 // c a l c u l a t i n g f i e l d e n e r g y W f
6 W_f = integrate ( 12 1 lambda 2 . 0 5 2 , lambda , 0 ,
7
8
9
10
11
12
13
14
15
16

lambda )
mprintf ( F i e l d e n e r g y s t o r e d=%f watts e c \n , W_f )
// c a l c u l a t i n g c o e n e r g y
W_f_dash = integrate ( i . 5 / ( 1 1 . 0 5 ) , i ,0 , i )
mprintf ( Coe n e r g y=%f watts e c \n , W_f_dash )
// c a l c u l a t i n g m e c h a n i c a l f o r c e on moving p a r t
k e e p i n g lambda c o n s t a n t
function y = f ( x )
y =121* x ^2* lambda ^3/3
endfunction
F_f = -1* derivative (f , x )
mprintf ( M e c h a n i c a l f o r c e d e v e l o p e d F f=%d Nm ,
130

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 =4 D -7* %pi


i =120/6 // c u r r e n t f l o w i n g i n c o i l
N =300 // no . o f t u r n s
x =.005 // l e n g t h o f a i r gap
Ag =36 D -4 // c r o s s s e c t i o n a l a r e a a t gap
// c a l c u l a t i n g s t o r e d f i e l d e n e r g y
W_f = mu_not * N ^2* Ag * i ^2/(4* x )
mprintf ( S t o r e d f i e l d e n e r g y=%f watts e c \n , W_f )
// c a l c u l a t i n g m e c h a n i c a l f o r c e d e v e l o p e d
F_f = mu_not * N ^2* i ^2* Ag /(4* x ^2)
mprintf ( M e c h a n i c a l f o r c e d e v e l o p e d=%f Nm , 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 // no . o f p o l e s
a = P // no . o f p a r a l l e l c i r c u i t s
n =150 // no . o f s l o t s
c =8 // no . o f c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s
T = Z /2 // no . o f t u r n s
Lmt =250 D -2 // mean l e n g t h o f one t u r n
S =10*2.5*1 D -6 // c r o s s s e c t i o n a l a r e a
rho =2.1 D -8 // r e s i s t i v i t y a t 80 d e g r e e C
R =( rho * Lmt * T ) /( a ^2* S )
mprintf ( R e s i s t a n c e=%f ohm\n ,R )

Scilab code Exa 17.2 Example on DC Winding


1
2 P =4 // no . o f p o l e s
3 n =24 // no . o f s l o t s

132

4
5
6
7
8
9
10

c =2 // c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s
p = Z /4 // p o l e p i t c h
Ybp = p +1 // back p i t c h
Yfp =p -1 // f r o n t p i t c h
Y = Ybp - Yfp
mprintf ( R e s u l t a n t p i t c h=%f ,Y )

Scilab code Exa 17.3 Example on EMF Equation


1
2
3
4
5
6
7
8

P =6 // no . o f p o l e s
A = P // no . o f p a r a l l e l p a t h s
phi =.018 // f l u x p e r p o l e
N =600 // s p e e d o f r o t a t i o n i n rpm
Z =840 // t o t a l no . o f c o n d u c t o r s
Eg = P * phi * N * Z /(60* A )
mprintf ( Emf g e n e r a t e d=%f V\n , Eg )

Scilab code Exa 17.4 Example on EMF Equation


1
2
3
4
5
6
7
8

P =6 // no . o f p o l e s
A =2 // no . o f p a r a l l e l p a t h s
Z =300 // no . o f c o n d u c t o r s on a r m a t u r e
N =1000 // s p e e d o f r o t a t i o n i n rpm
Eg =400 // emf g e n e r a t e d on open c i r c u i t
phi =60* Eg * A /( P * N * Z )
mprintf ( Flux p e r p o l e=%f Wb\n , phi )

133

Scilab code Exa 17.5 Example on EMF Equation


1
2
3
4
5
6
7
8
9
10

Eg =400 // emf g e n e r a t e d
n =80 // no . o f s l o t s on a r m a t u r e
c =10 // c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s on a r m a t u r e
N =1000 // s p e e d i n rpm
phi =60* Eg /( N * Z )
Eg =220 // d e s i r e d v a l u e o f g e n e r a t e d v o l t a g e
N =60* Eg /( phi * Z )
mprintf ( Speed o f r o t a t i o n t o g e n e r a t e 220 V=%f rpm\
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 // no . o f s l o t s on a r m a t u r e
c =6 // c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s
A =2 // no . o f p a r a l l e l p a t h s i n a r m a t u r e w i n d i n g
N =750 // s p e e d o f r o t a t i o n
P =4 // no . o f p o l e s
Eg =230 // emf g e n e r a t e d on open c i r c u i t
phi =60* Eg * A /( P * N * Z )
mprintf ( U s e f u l f u x p e r p o l e=%f Wb\n , phi )
Eg =115 // emf t o be g e n e r a t e d a t no l o a d
A = P * N * Z * phi /(60* Eg ) // r e q u i r e d no . o f p a r a l l e l p a t h s
in armature winding
13 mprintf ( As t h e machine h a s e q u a l number o f p o l e s
and p a r a l l e l p a t h s i n a r m a t u r e w i n d i n g , t h e
a r m a t u r e w i l l be l a p c o n n e c t e d t o g e n e r a t e 115 V
a t t h e same s p e e d )

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
16
17

// c a l c u l a t i n g t e r m i n a l v o l t a g e
P =10 D +3 // l o a d s u p p l i e d
Vl =220 // v o l t a g e a t l o a d t e r m i n a l s
Il = P / Vl
R =.1 // r e s i s t a n c e o f f e e d e r s
Vd = Il * R // v o l t a g e d r o p on f e e d e r s
V = Vd + Vl
mprintf ( T e r m i n a l v o l t a g e a c r o s s t h e a r m a t u r e
t e r m i n a l s=%f V\n ,V )
// C a l c u l a t i n g s h u n t f i e l d c u r r e n t
Rsh =100 // s h u n t r e s i s t a n c e
Ish = V / Rsh
mprintf ( Shunt f i e l d c u r r e n t=%f A\n , Ish )
// C a l c u l a t i n g g e n e r a t e d emf
Ra =.05 // r e s i s t a n c e o f a r m a t u r e
Eg = V + Il * Ra
mprintf ( G e n e r a t e d emf Eg=%f V , Eg )

Scilab code Exa 17.8 Example on Types of DC Machines


1
2
3
4
5
6
7
8
9

// c a l c u l a t i n g t o t a l a r m a t u r e c u r r e n t
V =200 // t e r m i n a l v o l t a g e a c r o s s a r m a t u r e
Rsh =80 // s h u n t f i e l d r e s i s t a n c e
Ish = V / Rsh // s h u n t f i e l d c u r r e n t
Il =100 // l o a d c u r r e n t
Ia = Il + Ish
mprintf ( Armature c u r r e n t=%f A\n , Ia )
// c a l c u l a t i n g c u r r e n t p e r a r m a t u r e p a t h
135

10
11
12
13
14
15
16

A =4 // no . o f p a r a l l e l p a t h s
mprintf ( C u r r e n t p e r a r m a t u r e p a t h=%f A\n , Ia / A )
// c a l c u l a t i n g emf g e n e r a t e d
Ra =.1 // a r m a t u r e r e s i s t a n c e
e =2 // b r u s h c o n t a c t d r o p
Eg = V + Ia * Ra + e
mprintf ( Emf g e n e r a t e d=%f V\n , Eg )

Scilab code Exa 17.9 Example on Types of DC Machines


1
2
3
4
5
6
7
8
9
10
11
12

V =100 // t e r m i n a l v o l t a g e
Il =200 // l o a d c u r r e n t
Rse =.03 // r e s i s t a n c e o f s e r i e s f i e l d w i n d i n g
Ra =.04 // r e s i s t a n c e o f a r m a t u r e w i n d i n g
Rsh =60 // r e s i s t a n c e o f s h u n t
Vd = Il * Rse // v o l t a g e d r o p i n s e r i e s f i e l d w i n d i n g
V_dash = V + Il * Rse // t e r m i n a l v o l t a g e a c r o s s a r m a t u r e
Ish = V_dash / Rsh
Ia = Il + Ish
Eg = V + Il * Rse + Ia * Ra
mprintf ( G e n e r a t e d emf=%f V , Eg )

Scilab code Exa 17.10 Example on Types of DC Machines


1
2
3
4
5
6
7
8

V =250 // t e r m i n a l v o l t a g e
Il =450 // l o a d c u r r e n t
Rsh =50 // s h u n t f i e l d r e s i s t a n c e
Ish = V / Rsh
Ia = Ish + Il
Ra =.05 // a r m a t u r e r e s i s t a n c e
Eg = V + Ia * Ra
136

9
10
11
12
13
14
15
16

P =4 // no . o f p o l e s
phi =.05 // f l u x p e r p o l e i n Wb
n =120 // no . o f s l o t s on a r m a t u r e
c =4 // c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s
A = P // no . o f p a r a l l e l p a t h s
N =60* Eg * A /( P * phi * Z )
mprintf ( Speed o f r o t a t i o n=%f rpm , 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

// when t h e dc s h u n t machine w o r k s a s a g e n e r a t o r
V =250 // t e r m i n a l v o l t a g e
Il =80 // l o a d c u r r e n t
Rsh =100 // f i e l d r e s i s t a n c e
Ra =.12 // a r m a t u r e r e s i s t a n c e
Ish = V / Rsh
Ia = Il + Ish
Eg = V + Ia * Ra
// when t h e dc s h u n t machine w o r k s a s a motor
V =250 // a p p l i e d v o l t a g e t o motor
Il =80 // l i n e c u r r e n t drawn by t h e motor
Ia = Il - Ish
Eb =V - Ia * Ra
// f o r a machine , P p h i Z / ( 6 0 A) i s a c o n s t a n t
x = Eg / Eb
mprintf ( s p e e d a s g e n e r a t o r / s p e e d a s motor=%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

// c a l c u l a t i n g back emf
V =120 // a p p l i e d v o l t a g e
Il =200 // l i n e c u r r e n t
Rsh =30 // s h u n t f i e l d r e s i s t a n c e
Ra =.02 // a r m a t u r e w i n d i n g r e s i s t a n c e
Ish = V / Rsh
Ia = Il - Ish
Eb =V - Ia * Ra
mprintf ( Back emf=%f V\n , Eb )
n =90 // no . o f s l o t s on a r m a t u r e
c =4 // c o n d u c t o r s p e r s l o t
Z = n * c // t o t a l no . o f c o n d u c t o r s on a r m a t u r e
phi =.04
N =60* Eb /( phi * Z )
mprintf ( Speed a t which motor w i l l run when f l u x p e r
p o l e i s . 0 4 Wb=%d rpm , 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

// c a l c u l a t i n g l o a d c u r r e n t
i =30 // c u r r e n t drawn by e a c h motor
I =5* i // c u r r e n t drawn by 5 m o t o r s
P =150*60 // t o t a l l i g h t i n g l o a d
V =110 // a p p l i e d v o l t a g e
I1 = P / V // c u r r e n t t a k e n by l i g h t i n g l o a d
I = I1 + I
mprintf ( T o t a l l o a d c u r r e n t=%d A\n , round ( I ) )
// c a l c u l a t i n g t e r m i n a l v o l t a g e
V_dash =110 // v o l t a g e a t t e r m i n a l s o f l o a d
R =.04 // r e s i s t a n c e o f f e e d e r s
Vd = I * R // v o l t a g e d r o p i n f e e d e r s
V = V_dash + Vd
mprintf ( T e r m i n a l v o l t a g e a c r o s s t h e g e n e r a t o r
t e r m i n a l s=%f V\n ,V )
138

16
17
18
19
20
21
22
23
24

// c a l c u l a t i n g emf g e n e r a t e d
Rsh =55 // r e s i s t a n c e o f s h u n t f i e l d
Ish = V / Rsh
Ia = I + Ish
Ise = Ia
Rse =.04 // s e r i e s f i e l d r e s i s t a n c e
Ra =.03 // a r m a t u r e r e s i s t a n c e
Eg = V + Ia *( Ra + Rse )
mprintf ( G e n e r a t e d emf , 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 t h e machine i s w o r k i n g a s g e n e r a t o r
V =240 // t e r m i n a l v o l t a g e a c r o s s t h e l o a d
P =40 D +3 // l o a d on g e n e r a t o r
Il = P / V // l o a d c u r r e n t
Rsh =60 // r e s i s t a n c e o f s h u n t f i e l d
Ish = V / Rsh
Ia = Il + Ish
Ra =.03 // a r m a t u r e r e s i s t a n c e
e =2*1 // v o l t a g e d r o p a t b r u s h e s
Eg = V + Ia * Ra + e
N =450 // s p e e d a s a g e n e r a t o r a t t h i s l o a d
// l e t k=P p h i Z / ( 6 0 A)
k = Eg / N
// when t h e machine i s w o r k i n g a s motor
Ia = Il - Ish
Eb =V - Ia * Ra - e
N = Eb / k
mprintf ( Speed a s a motor=%d rpm , round ( N ) )

139

Chapter 18
DC Generators

Scilab code Exa 18.1 Example on Magnetization Characteristics


1
2 i = linspace (0 ,1.6 ,9)
3 V =[0 40 66 86 101 112 121 128 133]
4 plot (i ,V , rect =[0 0 1.6 133])
5 xtitle ( M a g n e t i z a t i o n c u r v e f o r e x a m p l e 1 8 . 1 , F i e l d

C u r r e n t , G e n e r a t e d emf )
6
7 // r e f e r F i g . 1 8 . 4 i n t h e t e x t b o o k
8 Rsh =94 // r e s i s t a n c e o f s h u n t f i e l d w i n d i n g
9 //OA i s t h e f i e l d r e s i s t a n c e l i n e f o r t h i s
10
11
12

13
14

resistance
Voc =126 // v o l t a g e c o r r e s p o n d i n g t o p o i n t A
mprintf ( Open c i r c u i t v o l t a g e when t h e f i e l d c i r c u i t
r e s i s t a n c e i s 94 ohm=%d V\n , Voc )
//D i s p o i n t on OCC c o r r e s p o n d i n g t o 110 V . OD
r e p r e s e n t s the f i e l d r e s i s t a n c e l i n e to generate
this voltage
R =70/.6 // t o t a l r e s i s t a n c e o f s h u n t f i e l d c i r c u i t
mprintf ( A d d i t i o n a l r e s i s t a n c e i n t h e s h u n t f i e l d
140

Figure 18.1: Example on Magnetization Characteristics

141

Figure 18.2: Example on Magnetization Characteristics


c i r c u i t i s %f ohm\n , R - Rsh )
15 // l i n e OE r e p r e s e n t s t h e c r i t i c a l r e s i s t a n c e o f
shunt f i e l d
16 Rc =40/.2
17 mprintf ( C r i t i c a l r e s i s t a n c e =%d ohm , Rc )

Scilab code Exa 18.2 Example on Magnetization Characteristics


1
2 i = linspace (0 ,3.5 ,8)
3 V =[0 60 120 138 145 149 151 152]

142

4
5

plot2d (i , V )
xtitle ( M a g n e t i z a t i o n c u r v e f o r e x a m p l e 1 8 . 2 , F i e l d
C u r r e n t , G e n e r a t e d emf )

6
7 // r e f e r F i g . 1 8 . 5 i n t h e t e x t b o o k
8 Rsh =60 // s h u n t f i e l d r e s i s t a n c e
9 // l i n e OA i s f i e l d r e s i s t a n c e l i n e
10 Voc =149 // v o l t a g e c o r r e s p o n d i n g t o p o i n t A
11 mprintf ( Open c i r c u i t v o l t a g e=%d V\n , Voc )
12 // r e s i s t a n c e r e p r e s e n t e d by OE i s c r i t i c a l
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

resistance
Rc =120
mprintf ( C r i t i c a l r e s i s t a n c e o f s h u n t f i e l d =%d ohm\n
, Rc )
// when t h e l o a d h a s a r e s i s t a n c e o f 4 ohm
R =4
// l o a d c u r r e n t I=V/4
// I s h=V/60
// I a=I+I s h
Eg = Voc
Ra =.1 // a r m a t u r e r e s i s t a n c e
//V=EgI a Ra
V = Eg /(1+(1/ R +1/ Rsh ) * Ra )
mprintf ( T e r m i n a l v o l t a g e , V=%f V\n ,V )
// when t h e t e r m i n a l v o l t a g e i s 100 V
V =100 // t e r m i n a l v o l t a g e
Ia =( Eg - V ) / Ra
Ish = V / Rsh
I = Ia - Ish
mprintf ( Load c u r r e n t=%f A ,I )

Scilab code Exa 18.3 Example on Magnetization Characteristics

143

Figure 18.3: Example on Magnetization Characteristics

144

1
2 i = linspace (0 ,2.5 ,6)
3 V =[0 50 84 105 120 131]
4 plot (i , V )
5 xtitle ( M a g n e t i z a t i o n c u r v e

f o r e x a m p l e 1 8 . 3 , F i e l d
C u r r e n t , G e n e r a t e d emf )

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

// r e f e r F i g . 1 8 . 6 i n t h e t e x t b o o k
//OE i s t h e f i e l d r e s i s t a n c e l i n e o f c r i t i c a l
resistance
Rc =100
// s o l v i n g ( i i i )
Rsh =70 // f i e l d r e s i s t a n c e
N =750 // s p e e d i n rpm
Nc = Rsh / Rc * N
mprintf ( When t h e f i e l d r e s i s t a n c e i s 70 ohm ,
c r i t i c a l s p e e d=%d rpm\n , round ( Nc ) )
// s o l v i n g ( i v )
Eg =100 // open c i r c u i t v o l t a g e
Rsh =55 // s h u n t f i e l d r e s i s t a n c e
// now , t h e o p e r a t i n g p o i n t i s M i n s t e a d o f A
//LM/LN=N1/N
// from t h e graph , LM/LN=100/115
N1 =100/115* N // d e s i r e d s p e e d
mprintf ( With s h u n t f i e l d r e s i s t a n c e o f 55 ohm ,
r e d u c t i o n i n s p e e d t o make t h e open c i r c u i t
v o l t a g e e q u a l t o 100 V=%d rpm , round (N - N1 ) )

Scilab code Exa 18.4 Example on Magnetization Characteristics


1
2
3

// g e n e r a t e d emf i s d i r e c t l y p r o p o r t i o n a l t o s p e e d
// r e a d i n g s f o r OCC a t 1 0 0 0 rpm a r e
145

Figure 18.4: Example on Magnetization Characteristics

146

4 Eg2 =[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 ( M a g n e t i z a t i o n c u r v e

f o r e x a m p l e 1 8 . 4 , F i e l d
c u r r e n t , G e n e r a t e d emf )

8
9
10
11
12
13
14
15
16
17
18
19

// r e f e r F i g . 1 8 . 7 i n t h e t e x t b o o k
Rsh =70 // r e s i s t a n c e o f f i e l d c i r c u i t
// l i n e OA i s f i e l d r e s i s t a n c e l i n e
V =330 // v o l t a g e c o r r e s p o n d i n g t o p o i n t A
mprintf ( No l o a d t e r m i n a l v o l t a g e i s %d V\n ,V )
// now , no l o a d t e r m i n a l v o l t a g e i s 270 V
V =270
// t h e o p e r a t i n g p o i n t i s D
// l i n e OD i s c o r r e s p o n d i n g f i e l d r e s i s t a n c e l i n e
R = V /2.4 // r e s i s t a n c e r e p r e s e n t e d by l i n e OD
mprintf ( A d d i t i o n a l r e s i s t a n c e r e q u i r e d i n t h e f i e l d
c i r c u i t t o r e d u c e t h e v o l t a g e t o 270 V=%f ohm\n
,R - Rsh )

Scilab code Exa 18.5 Example on Parallel Operation


1
2
3
4
5
6
7
8
9
10
11
12

// f o r g e n e r a t o r A
V1 =240 // i n i t i a l t e r m i n a l v o l t a g e
V2 =225 // f i n a l t e r m i n a l v o l t a g e
Ia =120 // a r m a t u r e c u r r e n t
Ra =( V1 - V2 ) / Ia // a r m a t u r e r e s i s t a n c e
// f o r g e n e r a t o r B
V1 =230 // i n i t i a l t e r m i n a l v o l t a g e
V2 =215 // f i n a l t e r m i n a l v o l t a g e
Ib =100 // a r m a t u r e c u r r e n t
Rb =( V1 - V2 ) / Ib // a r m a t u r e r e s i s t a n c e
I =200 // t o t a l l o a d c u r r e n t
147

13
14
15
16
17
18
19
20
21

// I 1+I 2=I , V=240 I 1 Ra , V=230 I 2 Rb


// s o l v i n g f o r V, I 1 and I 2
a =[1 1 0; Ra 0 1;0 Rb 1]
b =[200;240;230]
x = inv ( a ) * b
I1 = x (1 ,1)
I2 = x (2 ,1)
V = x (3 ,1)
mprintf ( Busb a r v o l t a g e=%f V, \ n G e n e r a t o r A s u p p l i e s
%f A, \ n G e n e r a t o r B s u p p l i e s %f A , V , I1 , 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 // a r m a t u r e r e s i s t a n c e o f e a c h g e n e r a t o r
Rsh =60 // f i e l d r e s i s t a n c e o f e a c h g e n e r a t o r
I =4500 // t o t a l l o a d c u r r e n t
// I 1+I 2 =4500 , I s h=V/60
// I a 1=I 1+V/60
// I a 2=I 2+V/60
Ea1 =500 // i n d u c e d emf i n g e n e r a t o r 1
// 500=V+I a 1 . 0 3
Ea2 =510 // i n d u c e d emf i n g e n e r a t o r 2
// 510=V+I a 2 . 0 3
// s o l v i n g f o r V, I 1 and I 2
a =[1 1 0;.03 0 1+.03/60;0 .03 1+.03/60]
b =[4500;500;510]
x = inv ( a ) * b
I1 = x (1 ,1)
I2 = x (2 ,1)
V = x (3 ,1)
mprintf ( Busb a r v o l t a g e=%f V, \ nLoad s h a r e d by
g e n e r a t o r 1=%f A, \ nLoad s h a r e d by g e n e r a t o r 2=%f
A , V , I1 , I2 )

148

Scilab code Exa 18.7 Example on Parallel Operation


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

// L e t V be busb a r v o l t a g e and I1 , I 2 be t h e
c u r r e n t s s u p p l i e d by g e n e r a t o r s 1 and 2
respectively
Il =3000 // t o t a l l o a d c u r r e n t
// I 1+I 2= I l
// f o r g e n e r a t o r 1
Rsh1 =30 // f i e l d r e s i s t a n c e
Ra1 =.05 // a r m a t u r e r e s i s t a n c e
Eg1 =400 // i n d u c e d emf
// f o r g e n e r a t o r 2
Rsh2 =25 // f i e l d r e s i s t a n c e
Ra2 =.03 // a r m a t u r e r e s i s t a n c e
Eg2 =380 // i n d u c e d emf
// I s h 1=V/ Rsh1
// I s h 2=V/ Rsh2
// I a 1=I 1+I s h 1
// I a 2=I 2+I s h 2
// Eg1=V+I a 1 Ra1 ; Eg2=V+I a 2 Ra2
// s o l v i n g f o r I1 , I 2 and V
a =[1 1 0; Ra1 0 1+ Ra1 / Rsh1 ;0 Ra2 1+ Ra2 / Rsh2 ]
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 ( Output o f g e n e r a t o r 1=%f kW\ nOutput o f
g e n e r a t o r 2=%f kW , P1 /1000 , P2 /1000)
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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
13
14
15
16
17
18
19

// c a l c u l a t i n g t o r q u e d e v e o p e d
P =6 // no . o f p o l e s
A =6 // no . o f p a r a l l e l c i r c u i t s
Ia =300 // a r m a t u r e c u r r e n t
n =500 // no . o f a r m a t u r e t u r n s
Z =2*500 // t o t a l no . o f c o n d u c t o r s
phi =75 D -3 // f l u x p e r p o l e
Ta =.159* P * phi * Ia * Z / A
mprintf ( Torque d e v e l o p e d=%f Nm\n , Ta )
// c a l c u l a t i n g s h a f t t o r q u e
T =2.5* Ta /100 // t o r q u e l o s t i n windage , f r i c t i o n and
iron losses
Tsh = Ta - T
mprintf ( S h a f t t o r q u e=%f Nm\n , Tsh )
// c a l c u l a t i n g s h a f t power
N =400 // s p e e d i n rpm
Psh =2* %pi * N * Tsh /60
mprintf ( S h a f t power=%f kW , Psh /1000)
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
error
150

Scilab code Exa 19.2 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

// c a l c u l a t i n g t o r q u e d e v e l o p e d by a r m a t u r e
V =200 // v o l t a g e a p p l i e d a c r o s s t h e motor
Rsh =40 // r e s i s t a n c e o f s h u n t f i e l d w i n d i n g
Ish = V / Rsh
I =100 // t o t a l c u r r e n t drawn by motor
Ia =I - Ish
Ra =.1 // a r m a t u r e r e s i s t a n c e
Eb =V - Ia * Ra
P = Eb * Ia // m e c h a n i c a l power d e v e l o p e d
N =750 // s p e e d i n rpm
Ta =60* P /(2* %pi * N )
mprintf ( Torque d e v e l o p e d by a r m a t u r e=%f Nm\n , Ta )
// c a l c u l a t i n g c o p p e r l o s s e s
Wcu1 = V * Ia - Eb * Ia // a r m a t u r e c o p p e r l o s s e s
Wcu2 = Ish ^2* Rsh // f i e l d c o p p e r l o s s e s
mprintf ( T o t a l c o p p e r l o s s e s =%f W\n , Wcu1 + Wcu2 )
// c a l c u l a t i n g s h a f t power
Wc =1500 // f r i c t i o n and i r o n l o s s e s
Pi =200*100 // i n p u t t o motor
Psh = Pi -( Wc + Wcu1 + Wcu2 )
mprintf ( S h a f t power=%f kW\n , Psh /1000)
// c a l c u l a t i n g s h a f t t o r q u e
Tsh =60* Psh /(2* %pi * N )
mprintf ( S h a f t t o r q u e=%f Nm\n , Tsh )
// c a l c u l a t i n g e f f i c i e n c y
e = Psh / Pi *100
mprintf ( E f f i c i e n c y =%f p e r c e n t ,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 =60 D +3 // f u l l l o a d o u t p u t o f t h e motor
e =0.905 // e f f i c i e n c y o f t h e motor
Pin = Po / e
V =400 // a p p l i e d v o l t a g e
I = Pin / V // l i n e c u r r e n t drawn by t h e motor
Rsh =200 // r e s i s t a n c e o f t h e s h u n t f i e l d w i n d i n g
Ish = V / Rsh
Ia =I - Ish
Ra =0.1 // a r m a t u r e r e s i s t a n c e
Eb =V - Ia * Ra
A =2 // no . o f p a r a l l e l p a t h s i n a r m a t u r e w i n d i n g
P =4 // no . o f p o l e s
phi =45 D -3 // f l u x p e r p o l e
Z =450 // t o t a l number o f c o n d u c t o r s
N = round (60* Eb * A /( P * phi * Z ) )
mprintf ( F u l l l o a d s p e e d=%d rpm\n ,N )
// c a l c u l a t i n g a r m a t u r e t o r q u e
Ta =0.159* P * phi * Ia * Z / A
mprintf ( Torque d e v e l o p e d by t h e a r m a t u r e o f t h e DC
motor=%f Nm\n , Ta )
// c a l c u l a t i n g u s e f u l t o r q u e
Psh =60 D +3 // s h a f t power
Tsh =60* Psh /(2* %pi * N )
mprintf ( U s e f u l t o r q u e=%f Nm , Tsh )
// e r r o r i n t h e t e x t b o o k a n s w e r f o r u s e f u l t o r q u e

Scilab code Exa 19.4 Example on Torque and Speed


1
2
3
4
5
6

V =220 // v o l t a g e a p p l i e d t o motor
Rsh =157 // s h u n t f i e l d r e s i s t a n c e
Ra =0.3 // a r m a t u r e r e s i s t a n c e
Ish = V / Rsh
I0 =4.5 // c u r r e n t drawn by t h e motor a t no l o a d
152

7
8
9
10
11
12
13
14

Ia0 = I0 - Ish
Eb0 =V - Ia0 * Ra
// u n d e r l o a d e d c o n d i t i o n s ,
I =30 // c u r r e n t drawn by motor
Ia =I - Ish
Eb =V - Ia * Ra
// p h i =.97 p h i 0
// back emf i s d i r e c t l y p r o p o r t i o n a l t o f l u x and
speed
15 N0 =1000 // s p e e d a t no l o a d
16 N = Eb * N0 /( Eb0 *.97)
17 mprintf ( Speed u n d e r l o a d e d c o n d i t i o n=%d rpm , round
(N))

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
19

// c a l c u l a t i n g s h a f t power
V =100 // v o l t a g e a p p l i e d t o s e r i e s motor
Ra =.22 // a r m a t u r e r e s i s t a n c e
Rse =.13 // s e r i e s f i e l d r e s i s t a n c e
Rm = Ra + Rse // t o t a l r e s i s t a n c e
Ia =45 // c u r r e n t i n a r m a t u r e c i r c u i t
Eb =V - Ia * Rm
Pm = Eb * Ia // m e c h a n i c a l power d e v e l o p e d
Wc =750 // i r o n and f r i c t i o n l o s s e s
Psh = Pm - Wc
mprintf ( S h a f t power=%f kW\n , Psh /1000)
// c a l c u l a t i n g t o r q u e d e v e l o p e d
N =750 // s p e e d i n rpm
Ta =60* Pm /(2* %pi * N )
mprintf ( T o t a l t o r q u e=%f Nm\n , Ta )
// c a l c u l a t i n g s h a f t t o r q u e
Tsh =60* Psh /(2* %pi * N )
mprintf ( S h a f t t o r q u e=%f Nm , 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

// c a l c u l a t i n g s p e e d
P =4 // no . o f p o l e s
V =220 // a p p l i e d v o l t a g e
Ia =46 // c u r r e n t i n a r m a t u r e c i r c u i t
Ra =.25 // f i e l d r e s i s t a n c e
Rse =.15 // s e r i e s f i e l d r e s i s t a n c e
Rm = Ra + Rse
Eb =V - Ia * Rm
A =2 // no . o f p a r a l l e l c i r c u i t s
phi =20 D -3 // f l u x p e r p o l e
Z =1200 // t o t a l c o n d u c t o r s on a r m a t u r e
N = round (60* Eb * A /( P * phi * Z ) )
mprintf ( Speed , N=%d rpm\n , N )
// c a l c u l a t i n g t o t a l t o r q u e
Ta =.159* P * phi * Ia * Z / A
mprintf ( T o t a l t o r q u e=%f Nm\n , Ta )
// c a l c u l a t i n g s h a f t power
Pm = Eb * Ia // m e c h a n i c a l power d e v e l o p e d
Wc =900 // i r o n and f r i c t i o n l o s s e s
Po = Pm - Wc
mprintf ( S h a f t power=%f kW\n , Po /1000)
// c a l c u l a t i n g s h a f t t o r q u e
Tsh =60* Po /(2* %pi * N )
mprintf ( S h a f t t o r q u e Tsh=%f Nm\n , Tsh )
// c a l c u l a t i n g e f f i c i e n c y
Pin = V * Ia // i n p u t t o motor
e = Po / Pin *100
mprintf ( E f f i c i e n c y =%f p e r c e n t ,e )

154

Scilab code Exa 19.7 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

// w o r k i n g a s motor
V1 =110 // a p p l i e d v o l t a g e t o motor
Rsh =45 // s h u n t f i e l d r e s i s t a n c e
Ish1 = V1 / Rsh // s h u n t f i e l d c u r r e n t
Il =230
Ia1 = Il - Ish1
Ra =.03 // a r m a t u r e r e s i s t a n c e
Eb1 = V1 - Ia1 * Ra
N1 =450 // s p e e d i n rpm
V2 =210 // c h a n g e d v a l u e o f a p p l i e d v o l t a g e
Ish2 = V2 / Rsh
Il =85 // c u r r e n t drawn by t h e motor from t h e main
Ia2 = Il - Ish2
Eb2 = V2 - Ia2 * Ra
// back emf i s d i r e c t l y p r o p o r t i o n a l t o s h u n t f i e l d
c u r r e n t and s p e e d
N2 =( Eb2 / Eb1 ) *( Ish1 / Ish2 ) * N1
mprintf ( Speed o f t h e motor=%d rpm\n , N2 )
// w o r k i n g a s g e n e r a t o r
V =200 // t e r m i n a l v o l t a g e a c r o s s t h e l o a d
Ish3 = V / Rsh
Il =140 // l o a d c u r r e n t on t h e g e n e r a t o r
Ia3 = Il + Ish3
Eg = V + Ia3 * Ra
N3 =( Eg / Eb1 ) *( Ish1 / Ish3 ) * N1
mprintf ( Speed a t which g e n e r a t o r would have t o run=
%d rpm , N3 )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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 // v o l t a g e a p p l i e d t o motor
N1 =1000 // i n i t i a l s p e e d
Ia =35 // a r m a t u r e c u r r e n t
Ra =.3 // r e s i s t a n c e o f a r m a t u r e c i r c u i t
Eb1 =V - Ia * Ra
N1 =1000 // s p e e d i n rpm
Ia =25 // a r m a t u r e c u r r e n t i n new s i t u a t i o n
N2 =750 // c h a n g e d s p e e d i n rpm
// back emf i s d i r e c t l y p r o p o r t i o n a l t o s p e e d
R =(( V - Ia * Ra ) * N1 - N2 * Eb1 ) /( Ia * N1 )
mprintf ( A d d i t i o n a l r e s i s t a n c e i n a r m a t u r e c i r c u i t =
%f ohm ,R )

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 s p e e d o f t h e motor i n rpm


Ia1 =20 // a r m a t u r e c u r r e n t
V =200 // a p p l i e d v o l t a g e
Ra =.4 // a r m a t u r e r e s i s t a n c e
Eb1 =V - Ia1 * Ra
Rf1 =200 // f i e l d r e s i s t a n c e
If1 =200/200 // f i e l d c u r r e n t
N2 =900 // i n c r e a s e d s p e e d i n rpm
// I f 2 =200/ Rf
// p h i 1 / p h i 2= I f 1 / I f 2 =Rf / 2 0 0
// I a 2=I a 1 p h i 1 / p h i 2 =.1 Rf
// Eb2 =200 .04 Rf
// back emf i s d i r e c t l y p r o p o r t i o n a l t o f l u x and
speed
15 // we g e t a q u a d r a t i c e q u a t i o n i n Rf a s . 0 4 Rf 2 200
Rf +57600=0
16 // s o l v i n g f o r Rf
17 Rf2 =(200 - sqrt (200^2 -4*.04*57600) ) /(2*.04)
156

18

mprintf ( A d d i t i o n a l r e s i s t a n c e i n t h e s h u n t f i e l d
c i r c u i t =%f ohm ,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 // a p p l i e d v o l t a g e
N1 =700 // i n i t i a l s p e e d o f motor
Ia1 =50 // a r m a t u r e c u r r e n t
Ra =.4 // e f f e c t i v e a r m a t u r e r e s i s t a n c e
Eb1 =V - Ia1 * Ra
N2 =600 // r e d u c e d s p e e e d o f motor
Ia2 = Ia1 // a s t o r q u e and f l u x r e m a i n s same
// back emf i s d i r e c t l y p r o p o r t i o n a l t o s p e e d
R =(( V - Ia2 * Ra ) * N1 - Eb1 * N2 ) /( Ia2 * N1 )
mprintf ( A d d i t i o n a l r e s i s t a n c e i n t h e a r m a t u r e
c i r c u i t i s %f ohm ,R )

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 // t o t a l r e s i s t a n c e o f t h e a r m a t u r e c i r c u i t
N1 =500 // n o r m a l s p e e d
V =250 // a p p l i e d v o l t a g e
Ia1 =100 // a r m a t u r e c u r r e n t a t n o r m a l s p e e d
Eb1 =V - Ia1 * R
// s o l v i n g p a r t ( i )
R1 = R +1 // t o t a l r e s i s i t a n c e i n t h e a r m a t u r e c i r c u i t
Ia2 =50 // a r m a t u r e c u r r e n t
Eb2 =V - Ia2 * R1
// back emf i s d i r e c t l y p r o p o r t i o n a l t o s p e e d
N2 = Eb2 / Eb1 * N1
mprintf ( For ( i ) \ nSpeed=%d rpm\n , round ( N2 ) )
157

14 // s o l v i n g p a r t ( i i )
15 Ia3 =50 // a r m a t u r e c u r r e n t
16 Eb3 =V - Ia3 * R
17 // I s h 3 =.6 I s h 1 >p h i 3 / p h i 1 =.6
18 // back emf i s d i r e c t l y p r o p o r t i o n a l t o f l u x and

speed
19 N3 =( Eb3 / Eb1 ) * N1 /.6
20 mprintf ( For ( i i ) \ nSpeed=%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
23

// s o l v i n g ( i )
Il =70 // c u r r e n t drawn by t h e motor
V =200 // a p p l i e d v o l t a g e
Rsh =100 // s h u n t f i e l d r e s i s t a n c e
Ish = V / Rsh // s h u n t f i e l d c u r r e n t
Ia1 = Il - Ish
N1 =500 // i n i t i a l s p e e d
Ra1 =.2 // a r m a t u r e r e s i s t a n c e
Eb1 =200 - Ia1 * Ra1
N2 =350 // r e d u c e d s p e e d o f motor
Ia2 = Ia1 // a r m a t u r e c u r r e n t r e m a i n s same
// Eb2 =200 68(R+ . 2 )
// back emf i s p r o p o r t i o n a l t o s p e e d
R =(( V - Ia2 * Ra1 ) * N1 - Eb1 * N2 ) /( Ia2 * N1 )
mprintf ( A d d i t i o n a l r e s i s t a n c e i n t h e a r m a t u r e
c i r c u i t =%f ohm\n ,R )
// s o l v i n g ( i i )
Ra2 = R + Ra1 // a r m a t u r e r e s i s t a n c e
Ia3 =35 // a r m a t u r e c u r r e n t
Eb3 =V - Ia3 * Ra2
N3 = N1 * Eb3 / Eb1
mprintf ( Speed=%d rpm , N3 )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
158

error

Scilab code Exa 19.13 Example on Speed Control of DC Motors


1
2
3
4
5
6
7

8
9
10
11
12
13
14

V =250 // v o l t a g e a p p l i e d t o t h e motor
Eb1 = V //Ra i s n e g l i g i b l e
N1 =500 // s p e e d i n rpm
Ia1 =40 // a r m a t u r e c u r r e n t
R =25 // a d d i t i o n a l r e s i s t a n c e
// a s f l u x r e m a i n s same , back emf i s d i r e c t l y
p r o p o r t i o n a l t o s p e e d ; and t o r q u e i s d i r e c t l y
p r o p o r t i o n a l to armature c u r r e n t
// Eb2=250 I a 2 2 5 , N2=50050 I a 2
// a l s o , t o r q u e v a r i e s a s c u b e o f s p e e d
// from t h e s e c o n d i t i o n s , we g e t , I a 2 3 30 I a 2 2+325
I a 2 1000=0
// s o l v i n g t h i s e q u a t i o n , we g e t
Ia2 =5
N2 =( Ia2 / Ia1 ) ^(1/3) * N1
mprintf ( Speed o f t h e motor w i t h 25 ohm r e s i s t o r i n
t h e a r m a t u r e c i r c u i t =%d rpm , N2 )

159

Chapter 20
Testing of DC Machine

Scilab code Exa 20.1 Example on losses in DC Machine


1
2 E1 =400 // eddy c u r r e n t l o s s e s
3 // f o r a machine , eddy c u r r e n t
4
5
6
7
8

losses is directly
p r o p o r t i o n a l t o Bmax2 and f 2
//Bmax i s p r o p o r t i o n a l t o f l u x
// f i s p r o p o r t i o n a l t o s p e e d
// when s p e e d and f l u x i n c r e a s e d by 10%
E2 =1.1^2*1.1^2* E1 // Eddy c u r r e n t l o s s e s u n d e r
changed c o n d i t i o n
mprintf ( I n c r e a s e i n eddy c u r r e n t l o s s e s =%f W , E2 E1 )

Scilab code Exa 20.2 Example on losses in DC Machine


1
2 N =1500 // s p e e d i n rpm
3 E1 =300 // h y s t e r e s i s l o s s e s
4 // E1=k1 N

160

5
6
7
8
9
10
11
12
13
14

k1 = E1 / N
E2 =150 // eddy c u r r e n t l o s s e s
// E2=k2 N2
k2 = E2 / N ^2
E = E1 + E2 // t o t a l i r o n l o s s e s
// when i r o n l o s s e s a r e r e d u c e d t o h a l f
// k1 N1+k2 N1 2 =.5 E
// s o l v i n g f o r N1
N1 =( - k1 + sqrt ( k1 ^2 -4* k2 *( -.5* E ) ) ) /(2* k2 )
mprintf ( T o t a l i r o n l o s s e s w i l l be h a l v e d i f s p e e d
i s r e d u c e d t o %d rpm , round ( N1 ) )

Scilab code Exa 20.3 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

// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d
Il =200 // c u r r e n t s u p p l i e d
Rsh =100 // s h u n t f i e l d r e s i s t a n c e
V =500 // t e r m i n a l v o l t a g e
Ish = V / Rsh
Ia = Il + Ish
Wcu = Ia ^2*.1 // a r m a t u r e c o p p e r l o s s e s
Wc =4000 // c o n s t a n t l o s s e s i n c l u d i n g f i e l d c o p p e r
losses
Wt = Wcu + Wc // t o t a l l o s s e s
Po = V * Il // o u t p u t power
e = Po *100/( Po + Wt )
mprintf ( E f f i c i e n c y a t f u l l l o a d=%f p e r c e n t \n , e )
// C a l c u l a t i n g e f f i c i e n c y a t h a l f l o a d
Il =200/2
Ia = Il + Ish
Wcu = Ia ^2*.1
Wt = Wc + Wcu
Po = V * Il
e = Po *100/( Po + Wt )
161

21
22
23
24
25
26
27
28
29

mprintf ( E f f i c i e n c y a t h a l f l o a d=%f p e r c e n t \n , e )
// C a l c u l a t i n g e f f i c i e n c y a t 1 . 5 t i m e s t h e f u l l l o a d
Il =1.5*200
Ia = Il + Ish
Wcu = Ia ^2*.1
Wt = Wc + Wcu
Po = V * Il
e = Po *100/( Po + Wt )
mprintf ( E f f i c i e n c y a t 1 . 5 t i m e s t h e f u l l l o a d=%f
p e r c e n t , e)

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 =10 D +3 // o u t p u t power o f e a c h motor a t f u l l l o a d


e =.85 // e f f i c i e n c y a t f u l l l o a d
Pi = Po / e
W = Pi - Po // t o t a l l o s s e s a t f u l l l o a d f o r e a c h motor
// c a l c u l a t i n g h a l f l o a d e f f i c i e n c y f o r motor A
Wc =500 // c o n s t a n t l o s s e s
Wcu1 =( W - Wc ) /2^2 // c o p p e r l o s s e s
W1 = Wc + Wcu1 // t o t a l l o s s e s
P1 = Po /2 // o u t p u t
e1 = P1 /( P1 + W1 ) *100
mprintf ( E f f i c i e n c y a t h a l f l o a d f o r motor A=%f
p e r c e n t \n , e1 )
// c a l c u l a t i n g h a l f l o a d e f f i c i e n c y f o r motor B
Wc =600 // c o n s t a n t l o s s e s
Wcu2 =( W - Wc ) /2^2 // c o p p e r l o s s e s
W2 = Wc + Wcu2 // t o t a l l o s s e s
P2 = Po /2 // o u t p u t
e2 = P2 /( P2 + W2 ) *100
mprintf ( E f f i c i e n c y a t h a l f l o a d f o r motor B=%f
p e r c e n t , e2 )

162

Scilab code Exa 20.5 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
24
25
26
27
28
29
30

// c a l c u l a t i n g power r e q u i r e d a t t h e d r i v i n g s h a f t a t
f u l l load
Po =30 D +3 // o u t p u t power o f dc s h u n t g e n e r a t o r
Wi =1300 // m e c h a n i c a l and i r o n l o s s e s
Rsh =125 // s h u n t f i e l d r e s i s t a n c e
V =250 // t e r m i n a l v o l t a g e
Ra =.13 // a r m a t u r e r e s i s t a n c e
Ish = V / Rsh
Wcu = V * Ish // s h u n t f i e l d c o p p e r l o s s e s
Wc = Wi + Wcu // c o n s t a n t l o s s e s o f g e n e r a t o r
Il = Po / V
Ia = Il + Ish
Wcu = Ia ^2* Ra // a r m a t u r e c o p p e r l o s s
Wt = Wc + Wcu // t o t a l l o s s e s
Pi = Po + Wt
mprintf ( Power r e q u i r e d a t t h e d r i v i n g s h a f t a t f u l l
l o a d=%f kW\n , Pi /10^3)
// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d
e = Po / Pi *100
mprintf ( E f f i c i e n c y a t f u l l l o a d=%f p e r c e n t \n , e )
// c a l c u l a t i n g e f f i c i e n c y a t h a l f l o a d
Il =( Po /2) / V
Ia = Il + Ish
Wcu = Ia ^2* Ra // c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
e =( Po /2) /( Po /2+ Wt ) *100
mprintf ( E f f i c i e n c y a t h a l f l o a d=%f p e r c e n t \n , e )
// a t maximum e f f i c i e n c y
Wcu = Wc // c o p p e r l o s s e s
Ia = sqrt ( Wcu / Ra )
Il = Ia - Ish
163

31
32
33
34
35

mprintf ( Power o u t p u t a t max e f f i c i e n c y =%f kW\n , Il *


V /10^3)
// c a l c u l a t i n g max e f f i c i e n c y
e_max = Il * V /( Il * V +2* Wc ) *100
mprintf ( Max e f f i c i e n c y =%f p e r c e n t , e_max )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f 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
24

V =500 // v o l t a g e a p p l i e d t o motor
Ra =.2 // a r m a t u r e r e s i s t a n c e
Il0 =4 // no l o a d c u r r e n t t a k e n by motor
Ish =1 // s h u n t c u r r e n t
Pi = V * Il0 // power i n p u t a t no l o a d
Ia0 = Il0 - Ish
Wcu = Ia0 ^2* Ra // a r m a t u r e c o p p e r l o s s e s a t no l o a d
Wc = Pi - Wcu // c o n s t a n t l o s s e s
// when i n p u t c u r r e n t =20 A
Il =20
Ia = Il - Ish
Wcu = Ia ^2* Ra // a r m a t u r e c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
Pi = V * Il // power i n p u t t o motor
Po = Pi - Wt
e = Po / Pi *100
mprintf ( When i n p u t c u r r e n t =20 A, o u t p u t i s %f W and
e f f i c i e n c y o f motor i s %f p e r c e n t \n ,Po , e )
// when i n p u t c u r r e n t =100 A
Il =100
Ia = Il - Ish
Wcu = Ia ^2* Ra // a r m a t u r e c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
Pi = V * Il // power i n p u t t o motor
164

25 Po = Pi - Wt
26 e = Po / Pi *100
27 mprintf ( When i n p u t c u r r e n t =100 A, o u t p u t

i s %f W
and e f f i c i e n c y o f motor i s %f p e r c e n t \n , Po , e )

Scilab code Exa 20.7 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
24
25

// s h u n t g e n e r a t o r was run a s a s h u n t motor a t no


load
I0 =5 // c u r r e n t drawn
Ish =1.5 // s h u n t f i e l d c u r r e n t
Ia0 = I0 - Ish
Ra =.15 // a r m a t u r e c i r c u i t r e s i s t a n c e
V =440 // t e r m i n a l v o l t a g e
Wcu = Ia0 ^2* Ra // a r m a t u r e c o p p e r l o s s
Pi = V * I0 // power i n p u t
Wc = Pi - Wcu // c o n s t a n t l o s s e s
// c a l c u l a t i n g e f f i c i e n c y o f s h u n t g e n e r a t o r a t f u l l
load
Po =50 D +3 // o u t p u t o f g e n e r a t o r
Il = Po / V // l o a d c u r r e n t
Ia = Il + Ish
Wcu = Ia ^2* Ra // c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
e = Po /( Po + Wt ) *100
mprintf ( E f f i c i e n c y o f s h u n t g e n e r a t o r a t f u l l l o a d=
%f p e r c e n t \n , e )
// c a l c u l a t i n g e f f i c i e n c y a t 3/4 t h l o a d
I1 =3/4* Il // l o a d c u r r e n t
Ia = I1 + Ish
Wcu = Ia ^2* Ra // c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
e =(3/4* Po ) /(3/4* Po + Wt ) *100
mprintf ( E f f i c i e n c y a t 3/4 t h l o a d=%f p e r c e n t \n , e )
165

26
27
28
29
30
31
32

// c a l c u l a t i n g e f f i c i e n c y a t h a l f l o a d
I2 =.5* Il // l o a d c u r r e n t
Ia = I2 + Ish
Wcu = Ia ^2*.15 // c o p p e r l o s s e s
Wt = Wc + Wcu // t o t a l l o s s e s
e =(.5* Po ) /(.5* Po + Wt ) *100
mprintf ( E f f i c i e n c y a t h a l f l o a d=%f p e r c e n t , e )

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 // i n p u t c u r r e n t from mains


Po =100 D +3 // o u t p u t o f g e n e r a t o r on f u l l l o a d i n W
V =500 // t e r m i n a l v o l t a g e
I2 = Po / V // l o a d c u r r e n t o f g e n e r a t o r
Rg =.1 // a r m a t u r e r e s i s t a n c e o f g e n e r a t o r
Rm =.1 // a r m a t u r e r e s i s t a n c e o f motor
Pi =25 D +3 // i n p u t power from mains
Pr =( Pi - I2 ^2* Rg -( I1 + I2 ) ^2* Rm ) /2 // i r o n and
m e c h a n i c a l l o s s e s i n e a c h machine
I3 =4 // s h u n t f i e l d c u r r e n t o f g e n e r a t o r
I4 =3 // s h u n t f i e l d c u r r e n t o f motor
// c a l c u l a t i n g e f f i c i e n c y o f g e n e r a t o r
Wt = Pr + V * I3 + I2 ^2* Rg // t o t a l l o s s e s
e = Po /( Po + Wt ) *100
mprintf ( E f f i c i e n c y o f g e n e r a t o r=%f p e r c e n t \n , e )
// c a l c u l a t i n g e f f i c i e n c y o f motor
Pi = V *( I1 + I2 + I4 ) // power i n p u t
Wt = Pr + V * I4 +( I1 + I2 ) ^2* Rm // t o t a l l o s s e s
e =( Pi - Wt ) / Pi *100
mprintf ( E f f i c i e n c y o f motor=%f p e r c e n t , e )

166

Chapter 21
Three Phase Alternators

Scilab code Exa 21.1 Example on emf Equation


1
2 // c a l c u l a t i n g s p e e d
3 f =50 // f r e q u e n c y
4 P =20 // no . o f p o l e s
5 N =120* f / P
6 mprintf ( Speed a t which a l t e r n a t o r must be run=%d

rpm\n , N )
7 // c a l c u l a t i n g t h e g e n e r a t e d emf p e r p h a s e
8 x =180 // t o t a l no . o f s l o t s
9 y = x / P // s l o t s p e r p o l e
10 m = y /3 // s l o t s p e r p o l e p e r p h a s e
11 alpha =180/9 // p h a s e d i s p l a c e m e n t b e t w e e n a d j a c e n t

slots
12 Kd = sin (( m * alpha /2) * %pi /180) /( m * sin (( alpha /2) * %pi
13
14
15
16
17
18

/180) ) // d i s t r i b u t i o n f a c t o r
Kc =1 // c o i l s p a n f a c t o r
Kw = Kd * Kc // w i n d i n g f a c t o r
Z =180*8 // t o t a l no . o f c o n d u c t o r s
a = Z /3 // c o n d u c t o r s p e r p h a s e
T = a /2 // t u r n s p e r p h a s e
phi =25 D -3 // f l u x p e r p o l e
167

19 Eph = round (4.44* Kw * f * phi * T )


20 mprintf ( G e n e r a t e d emf p e r p h a s e=%d V\n , Eph )
21 // c a l c u l a t i n g l i n e emf
22 El = sqrt (3) * round ( Eph )
23 mprintf ( L i n e emf=%d V , round ( El ) )
24 // a n s w e r v a r y from t h e t e x t b o o k due t o round o f f

error

Scilab code Exa 21.2 Example on emf Equation


1
2 funcprot (0)
3 m =2 // no . o f s l o t s p e r p o l e p e r p h a s e
4 x = m *3 // no . o f s l o t s p e r p o l e
5 alpha =180/ x // p h a s e d i s p l a c e m e n t b e t w e e n a d j a c e n t
6
7
8
9
10
11
12
13
14
15
16
17
18

s l o t s in degrees
Kd = sin (( m * alpha /2) * %pi /180) /( m * sin (( alpha /2) * %pi
/180) ) // d i s t r i b u t i o n f a c t o r
beta =180 -150 // i n d e g r e e s
Kc = cos (( beta /2) * %pi /180) // c o i l s p a n f a c t o r
Kw = Kd * Kc // w i n d i n g f a c t o r
P =10 // no . o f p o l e s
n = m * P // no . o f s l o t s p e r p h a s e
Zph = n *10 // no . o f c o n d u c t o r s p e r p h a s e
Tph =100 // no . o f t u r n s p e r p h a s e
N =600 // s p e e d o f t h e a l t e r n a t o r i n rpm
f = P * N /120 // f r e q u e n c y
phi =.05 // u s e f u l f l u x p e r p o l e i n Wb
Eph =4.44* Kw * f * phi * Tph
mprintf ( S t a t o r emf p e r p h a s e a t no l o a d=%d V ,
round ( Eph ) )

Scilab code Exa 21.3 Example on emf Equation


168

1
2 funcprot (0)
3 // c a l c u l a t i n g p i t c h f a c t o r
4 beta =0 // f u l l p i t c h c o i l
5 Kc = cos (( beta /2) * %pi /180)
6 mprintf ( P i t c h f a c t o r , Kc=%d\n , Kc )
7 // c a l c u l a t i n g d i s t r i b u t i o n f a c t o r
8 m =4 // no . o f s l o t s p e r p o l e p e r p h a s e
9 x = m *3 // no . o f s l o t s p e r p o l e
10 alpha =180/ x // p h a s e d i s p l a c e m e n t b e t w e e n a d j a c e n t
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

s l o t s in degrees
Kd = sin (( m * alpha /2) * %pi /180) /( m * sin (( alpha /2) * %pi
/180) )
mprintf ( D i s t r i b u t i o n f a c t o r o f s t a t o r w i n d i n g=%f\n
, Kd )
// c a l c u l a t i n g emf g e n e r a t e d p e r p h a s e
Kw = Kd * Kc
y = m *8 // no . o f s l o t s p e r p h a s e
n = y *10 // no . o f c o n d u c t o r s p e r p h a s e
Tph =160 // no . o f t u r n s p e r p h a s e
f =50 // f r e q u e n c y
phi =.04 // f l u x p e r p o l e
Eph = round (4.44* f * Kw * Tph * phi )
mprintf ( Emf p e r p h a s e a t no l o a d=%d V\n , Eph )
// c a l c u l a t i n g l i n e emf
El = sqrt (3) * Eph
mprintf ( L i n e emf=%d V , round ( El ) )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 21.4 Example on emf Equation


1
2
3

funcprot (0)
// c a l c u l a t i n g d i s t r i b u t i o n f a c t o r o f s t a t o r w i n d i n g
169

4 m =9 // no . o f s l o t s p e r p o l e p e r p h a s e
5 x = m *3 // no . o f s l o t s p e r p o l e
6 alpha =180/ x
7 Kd = sin (( m * alpha /2) * %pi /180) /( m * sin (( alpha /2) * %pi
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

/180) )
mprintf ( D i s t r i b u t i o n f a c t o r o f s t a t o r w i n d i n g , Kd=
%f\n , Kd )
// c a l c u l a t i n g p i t c h f a c t o r o f s t a t o r w i n d i n g
beta =2*20/3
Kc = cos (( beta /2) * %pi /180)
mprintf ( P i t c h f a c t o r =%f\n , Kc )
// c a l c u l a t i n g u s e f u l f l u x p e r p o l e
Zph =9*2*4 // no . o f c o n d u c t o r s p e r p h a s e
Tph =36 // t u r n s p e r p h a s e o f s t a t o r w i n d i n g
P =2 // no . o f p o l e s
N =3000 // s p e e d i n rpm
f = P * N /120
V =3.3 D +3 // l i n e v o l t a g e
Eph = V / sqrt (3)
phi = Eph /(4.44* f * Kd * Kc * Tph )
mprintf ( U s e f u l f l u x p e r p o l e=%f Wb , phi )

Scilab code Exa 21.5 Example on emf Equation


1
2 funcprot (0)
3 m =5 // no . o f s l o t s p e r p o l e p e r p h a s e
4 x = m *3 // no . o f s l o t s p e r p o l e
5 alpha =180/ x // i n d e g r e e s
6 Kd = sin (( m * alpha /2) * %pi /180) /( m * sin (( alpha /2) * %pi

/180) ) // d i s t r i b u t i o n f a c t o r
7 beta =3*12 // i n d e g r e e s
8 Kc = cos (( beta /2) * %pi /180) // p i t c h

factor of stator

winding
9 Tph =5*2*4/2 // no .

of turns per phase


170

V =6 D +3 // l i n e v o l t a g e
Eph = V / sqrt (3)
phi =.857 // f l u x i n Wb
f = round ( Eph /(4.44* Kd * Kc * Tph * phi ) )
P =4 // no . o f p o l e s
N =120* f / P
mprintf ( Speed o f r o t a t i o n o f a l t e r n a t o r , N=%d rpm ,
round ( N ) )
17 // a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
error
10
11
12
13
14
15
16

Scilab code Exa 21.6 Example on Regulation


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

// c a l c u l a t i n g r e g u l a t i o n a t f u l l l o a d a t u n i t y p f
V =3300 // l i n e v o l t a g e
Vph = V / sqrt (3)
P =500 D +3 // o u t p u t
Ia = P /( sqrt (3) * V )
Ra =.4 // r e s i s t a n c e p e r p h a s e
Xs =3.8 // r e a c t a n c e p e r p h a s e
pf =1 // power f a c t o r
Ef =[( Vph *1+ Ia * Ra ) ^2+( Vph *0+ Ia * Xs ) ^2]^.5 // open
c i r c u i t v o l t a g e per phase
VR =( Ef - Vph ) / Vph *100
mprintf ( R e g u l a t i o n a t f u l l l o a d a t u n i t y p f=%f
p e r c e n t \n , VR )
// c a l c u l a t i n g r e g u l a t i o n a t f u l l l o a d a t . 8 p f
lagging
Ef =[( Vph *.8+ Ia * Ra ) ^2+( Vph *0.6+ Ia * Xs ) ^2]^.5
VR =( Ef - Vph ) / Vph *100
mprintf ( R e g u l a t i o n f u l l l o a d a t . 8 p f l a g g i n g=%f
p e r c e n t \n , VR )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error
171

Scilab code Exa 21.7 Example on emf Equation


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

// c a l c u l a t i n g s y n c h r o n o u s i m p e d a n c e
Voc =90 // open c i r c u i t v o l t a g e p e r p h a s e
Isc =15 // s h o r t c i r c u i t c u r r e n t
Zs = Voc / Isc
mprintf ( S y n c h r o n o u s i m p e d a n c e=%d ohm\n , Zs )
// c a l c u l a t i n g s y n c h r o n o u s r e a c t a n c e
Ra =1 // a r m a t u r e r e s i s t a n c e p e r p h a s e
Xs = sqrt ( Zs ^2 - Ra ^2)
mprintf ( S y n c h r o n o u s r e a c t a n c e=%f ohm\n , Xs )
// S o l v i n g p a r t ( i i i )
V =400 // l i n e v o l t a g e
Vt = round ( V / sqrt (3) ) // p h a s e v o l t a g e a t t h e t e r m i n a l s
of load
Ia =15 // l o a d c u r r e n t
Ef = round ([( Vt *.8+ Ia * Ra ) ^2+( Vt *.6+ Ia * Xs ) ^2]^.5)
mprintf ( V o l t a g e r i s e s from %d V t o %d V, when t h e
l o a d i s thrown o f f \n , Vt , Ef )
// s o l v i n g p a r t ( i v )
// a t 0 . 8 p f l a g g i n g
VR =( Ef - Vt ) / Vt *100
mprintf ( R e g u l a t i o n a t . 8 p f l a g g i n g=%f p e r c e n t \n ,
VR )
// a t u n i t y p f
Ef =[( Vt *1+ Ia * Ra ) ^2+( Vt *0+ Ia * Xs ) ^2]^.5
VR =( Ef - Vt ) / Vt *100
mprintf ( R e g u l a t i o n a t u n i t y p f=%f p e r c e n t , VR )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

172

Scilab code Exa 21.8 Example on Regulation


1
2 // r e f e r F i g . 2 1 . 1 9 i n t h e t e x t b o o k
3 AT =15 D +3 //PE r e p r e s e n t s t h e a r m a t u r e r e a c t i o n ampere
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

turns
mprintf ( Armature r e a c t i o n ampere t u r n s=%d\n , AT )
Pout =15 D +6 // o u t p u t o f t h e a l t e r n a t o r
Vl =10.2 D +3 // l i n e v o l t a g e
Il = Pout /( sqrt (3) * Vl )
Iph = Il
Ia = Il
// l i n e DE r e p r e s e n t s t h e l e a k a g e r e a c t a n c e d r o p i n
terms o f l i n e v a l u e s
Es =1.3 D +3
Eph = Es / sqrt (3)
Xl = Eph / Ia
mprintf ( L e a k a g e r e a c t a n c e p e r phase , Xl=%f ohm\n ,
Xl )
// c a l c u l a t i n g r e g u l a t i o n f o r f u l l l o a d a t . 8 p f
lagging
Rt =.53 // r e s i s t a n c e o f t h e s t a t o r w i n d i n g b e t w e e n
terminals
Ra = Rt /2 // r e s i s t a n c e p e r p h a s e
Rd1 = Ia * Ra // r e s i s t a n c e d r o p i n t e r m s o f p h a s e v a l u e
Rd2 = sqrt (3) * Rd1 // r e s i s t a n c e d r o p i n t e r m s o f l i n e
value
// r e f e r F i g . 2 1 . 2 0 ( a ) i n t h e t e x t b o o k
Ifg =21.67 D +3
Ifs =1.67 D +3
Ifsc =18 D +3
// r e f e r F i g . 2 1 . 2 0 ( b ) i n t h e t e x t b o o k
Ifl =40.67 D +3 // t o t a l f i e l d ampere t u r n s
Ef =12.85 D +3 // no l o a d v o l t a g e
Vt =10.2 D +3 // f u l l l o a d r a t e d v o l t a g e
VR =( Ef - Vt ) / Vt *100
mprintf ( R e g u l a t i o n a t f u l l l o a d , 0 . 8 p f l a g g i n g=%d
p e r c e n t , round ( VR ) )
173

Scilab code Exa 21.9 Example on Regulation


1
2 function [ z ]= pol2rect (r , theta )
3
x = r * cos ( theta * %pi /180)
4
y = r * sin ( theta * %pi /180)
5
z = x + y * %i
6 endfunction
7 function [ r ]= mag ( A )
8
x = real ( A )
9
y = imag ( A )
10
r = sqrt ( x ^2+ y ^2)
11 endfunction
12 j = %i
13 Vt =1100/ sqrt (3) // t e r m i n a l v o l t a g e , t a k e n a s
14
15
16
17
18
19
20
21
22
23
24
25
26

reference
phasor
Vt = pol2rect ( Vt ,0)
Ia =1200*1000/(3* Vt ) // a r m a t u r e c u r r e n t
pf =.8 // l a g g i n g power f a c t o r
phi = acosd ( pf )
Ia = pol2rect ( Ia , - phi )
Xq =1.2* j
Xd =1.8* j
// r e f e r F i g . 2 1 . 2 4 i n t h e t e x t b o o k , p h a s o r OB i n t h e
d i r e c t i o n o f Ef i s g i v e n a s
OB = Vt + Ia * Xq
delta =29 // power a n g l e
Id = Ia * sin (( delta + phi ) * %pi /180)
Ef = mag ( OB ) + mag ( Id ) * mag ( Xd - Xq )
mprintf ( E x c i t a t i o n v o l t a g 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)
4
y = r * sin ( theta * %pi /180)
5
z = x + y * %i
6 endfunction
7 function [ r ]= mag ( A )
8
x = real ( A )
9
y = imag ( A )
10
r = sqrt ( x ^2+ y ^2)
11 endfunction
12 j = %i
13 // t e r m i n a l v o l t a g e i s t a k e n a s
14
15
16
17
18
19
20
21
22
23
24
25

r e f e r e n c e p h a s o r and
the rated q u a n t i t i e s are taken as 1 p . u .
Vt = pol2rect (1 ,0) // t e r m i n a l v o l t a g e
pf =.8 // l a g g i n g power f a c t o r
phi = acosd ( pf )
Ia = pol2rect (1 , - phi ) // a r m a t u r e c u r r e n t
Xd =.8* j
Xq =.4* j
// r e f e r t o F i g . 2 1 . 2 4 i n t h e t e x t b o o k
OB = Vt + Ia * Xq
delta =14.47 // power a n g l e
Id = Ia * sin (( delta + phi ) * %pi /180)
Ef = mag ( OB ) + mag ( Id ) * mag ( Xd - Xq )
mprintf ( E x c i t a t i o n v o l t a g e p e r p h a s e i s %f p . u . ,
Ef )

175

Chapter 22
Synchronous Motors

Scilab code Exa 22.1 Example on Phasor Diagram and Power angle Characteristics
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)
10
y = r * sin ( theta * %pi /180)
11
z = x + y * %i
12 endfunction
13 Va =400/ sqrt (3) // p e r p h a s e a p p l i e d v o l t a g e
14 Ef = Va // p e r p h a s e e x c i t a t i o n v o l t a g e
15 delta =4*2 // e q u i v a l e n t e l e c t r i c a l d e g r e e s by which
16
17
18
19

the r o t o r i s r e t a r t e d
Xs =2 // p e r p h a s e s y n c h r o n o u s r e a c t a n c e
Vt = pol2rect ( Va ,0)
Ef = pol2rect ( Ef , -8)
Xs = pol2rect (2 ,90)
176

20 Ia =( Vt - Ef ) / Xs
21 [ Ia theta ]= rect2pol ( Ia )
22 mprintf ( Armature c u r r e n t drawn by t h e motor i s %f A

, l a g g i n g t h e a p p l i e d v o l t a g e by %f d e g r e e s , Ia ,
- theta )

Scilab code Exa 22.2 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
21
22
23

// c a l c u l a t i n g a r m a t u r e c u r r e n t
Pout =7.46 D +3 // o u t p u t power
Wc =500 // i r o n amd m e c h a n i c a l l o s s e s
P = Pout + Wc // t o t a l m e c h a n i c a l power d e v e l o p e d
Pm = P /3
Va =440/ sqrt (3) // a p p l i e d v o l t a g e p e r p h a s e
pf =.75 // l a g g i n g power f a c t o r
Ra =.5 // e f f e c t i v e r e s i s t a n c e p e r p h a s e
//Pm=Va I a pf I a 2 Ra
// s o l v i n g t h i s q u a d r a t i c e q u a t i o n
Ia =( Va * pf - sqrt (( Va * pf ) ^2 -4* Ra * Pm ) ) /(2* Ra )
mprintf ( Armature c u r r e n t=%f A\n , Ia )
// c a l c u l a t i n g t o t a l power s u p p l i e d
Pin = Va * Ia * pf
Pi =3* Pin // t o t a l i n p u t t o s t a t o r
Pe =650 // e x c i t a t i o n l o s s
Pt = Pi + Pe
mprintf ( T o t a l power s u p p l i e d=%f W\n , Pt )
// c a l c u l a t i n g e f f i c i e n c y
e = Pout / Pt *100
mprintf ( E f f i c i e n c y =%f p e r c e n t , e )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

177

Scilab code Exa 22.3 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
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
// c a l c u l a t i n g e x c i t a t i o n v o l t a g e and power a n g l e
Va =400/ sqrt (3)
Va = pol2rect ( Va ,0)
pf =1 // power f a c t o r
Pin =3000 // i n p u t t o motor
Ia = Pin /(3* mag ( Va ) )
Xs =8
Ef = mag ( Va ) - %i * Ia * Xs
[ Ef theta ]= rect2pol ( Ef )
mprintf ( E x c i t a t i o n v o l t a g e Ef=%f V, power a n g l e=%f
d e g r e e s \n , Ef , - theta )
178

31 // c a l c u l a t i n g t o r q u e d e v e l o p e d
32 omega_s =2* %pi * Ns /60
33 T =3* mag ( Va ) * Ef /( Xs * omega_s ) * sin ( - theta * %pi /180)
34 mprintf ( M e c h a n i c a l t o r q u e d e v e l o p e d T=%f Nm\n ,T )
35 // c a l c u l a t i n g max t o r q u e d e v e l o p e d
36 Tmax =3* mag ( Va ) * Ef /( Xs * omega_s )
37 mprintf ( Max t o r q u e d e v e l o p e d o r p u l l o u t t o r q u e=%f

Nm , Tmax )

Scilab code Exa 22.4 Example on Phasor Diagram and Power angle Characteristics
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)
10
y = r * sin ( theta * %pi /180)
11
z = x + y * %i
12 endfunction
13 function [ r ]= mag ( A )
14
x = real ( A )
15
y = imag ( A )
16
r = sqrt ( x ^2+ y ^2)
17 endfunction
18 j = %i
19 // c a l c u l a t i n g p e r p h a s e c u r r e n t drawn from t h e

supply
20 Pout =100*746 // o u t p u t power
21 Va =500/ sqrt (3) // p e r p h a s e a p p l i e d v o l t a g e
22 Zs =.06+ j *.6 // s y n c h r o n o u s i m p e d a n c e p e r p h a s e
179

23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38

e =.89 // e f f i c i e n c y o f motor a t f u l l l o a d
Pin = Pout / e // i n p u t t o t h e motor
pf =.8 // l e a d i n g power f a c t o r
Ia = Pin /(3* Va * pf )
theta = acosd (.8)
mprintf ( C u r r e n t drawn from t h e s u p p l y i s %f A
l e a d i n g t h e a p p l i e d v o l t a g e by %f d e g r e e s \n , Ia ,
theta )
// c a l c u l a t i n g e x c i t a t i o n v o l t a g e p e r p h a s e
Va = pol2rect ( Va ,0)
Ia = pol2rect ( Ia , theta )
Ef = Va - Ia * Zs
[ Ef delta ]= rect2pol ( Ef )
mprintf ( E x c i t a t i o n v o l t a g e p e r p h a s e i s %f V\ nPower
a n g l e=%f d e g r e e s \n , mag ( Ef ) ,- delta )
// c a l c u l a t i n g m e c h a n i c a l power d e v e l o p e d Pm
Ra =.06 // s t a t o r w i n d i n g r e s i s t a n c e p e r p h a s e
Pm = Pin -3* mag ( Ia ) ^2* Ra
mprintf ( M e c h a n i c a l power d e v e l o p e d=%f W\n , Pm )

Scilab code Exa 22.5 Example on Phasor Diagram and Power angle Characteristics
1
2
3
4
5
6
7
8
9
10
11
12

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
180

13
14
15
16
17
18
19
20
21
22
23
24
25

j = %i
Pout =10 D +3 // o u t p u t o f t h e motor a t f u l l l o a d
e =.85 // e f f i c i e n c y a t f u l l l o a d
Pin = Pout / e // i n p u t a t f u l l l o a d
Zs =.4+ j *3 // s y n c h r o n o u s i m p e d a n c e p e r p h a s e
Va =400/ sqrt (3) // p e r p h a s e a p p l i e d v o l t a g e
pf =.8 // l e a d i n g power f a c t o r
Ia = Pin /(3* Va * pf )
Ia = pol2rect ( Ia , acosd ( pf ) )
Ef = Va - Ia * Zs
[ Ef delta ]= rect2pol ( Ef )
mprintf ( Motor must be e x c i t e d t o a v o l t a g e o f %f V
p e r p h a s e and t h e a n g l e o f r e t a r d i s %f d e g r e e s \n
, Ef , - delta )

Scilab code Exa 22.6 Example on Phasor Diagram and Power angle Characteristics
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

j = %i
Va =400/ sqrt (3) // a p p l i e d v o l t a g e p e r p h a s e
Zs =.5+ j *4 // s y n c h r o n o u s i m p e d a n c e p e r p h a s e
pf =1 // power f a c t o r
Ia =15
Ef = Va - Ia * Zs
[ Ef delta ]= rect2pol ( Ef )
181

17

mprintf ( E x c i t a t i o n v o l t a g e i s %f V and power a n g l e


i s e q u a l t o %d d e g r e e s , Ef , - delta )

Scilab code Exa 22.7 Example on Phasor Diagram and Power angle Characteristics
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)
10
y = r * sin ( theta * %pi /180)
11
z = x + y * %i
12 endfunction
13 function [ r ]= mag ( A )
14
x = real ( A )
15
y = imag ( A )
16
r = sqrt ( x ^2+ y ^2)
17 endfunction
18
19 j = %i
20 // a p p l i e d v o l t a g e p e r p h a s e i s
21
22
23
24
25
26
27
28

taken as the
r e f e r e n c e phasor
Va =1 // a p p l i e d v o l t a g e p e r p h a s e i n p . u .
pf =.8 // l a g g i n g power f a c t o r
theta = acosd ( pf )
Ia = pol2rect (1 , - theta ) // a r m a t u r e c u r r e n t p e r p h a s e
Xq =.4* j
Xd =.8* j
OC = Va - Ia * Xq
[ OC alpha ]= rect2pol ( OC )
182

29 delta = - alpha // power a n g l e


30 Id = Ia * sin (( theta - delta ) * %pi /180)
31 Ef = OC - mag ( Id ) * mag ( Xd - Xq ) // a r m a t u r e
32

33
34
35
36
37
38
39

resistance is

neglected
mprintf ( E x c i t a t i o n v o l t a g e p e r p h a s e i s %f p . u .
l a g g i n g t h e a p p l i e d v o l t a g e by %f d e g r e e s \n ,Ef ,
delta )
// c a l c u l a t i n g power due t o e x c i t a t i o n
Pf = Va * Ef * sin ( delta * %pi /180) / mag ( Xd )
mprintf ( Per p h a s e power d e v e l o p e d due t o f i e l d
e x c i t a t i o n i s %f p . u . \ n , Pf )
// c a l c u l a t i n g power due t o s a l i e n c y
Pr = Va ^2* mag (( Xd - Xq ) /(2* Xd * Xq ) ) * sin (2* delta * %pi /180)
mprintf ( Per p h a s e power d e v e l o p e d due t o s a l i e n c y
o f t h e motor i s %f p . u . \ n , Pr )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 22.8 Example on Variation of Excitation


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)
10
y = r * sin ( theta * %pi /180)
11
z = x + y * %i
12 endfunction
13 j = %i
14 // c a l c u l a t i n g new power a n g l e
15 Va =400/ sqrt (3) // a p p l i e d v o l t a g e p e r p h a s e

183

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35

Pin =8.5 D +3/3 // power i n p u t p e r p h a s e


pf =.8 // l a g g i n g power f a c t o r
Ia = Pin /( Va * pf ) // a r m a t u r e c u r r e n t p e r p h a s e
theta = acosd ( pf )
Ia = pol2rect ( Ia , - theta )
Zs =4* j
Ef = Va - Ia * Zs
[ Ef theta ]= rect2pol ( Ef )
delta = - theta
// t h e e x c i t a t i o n v o l t a g e i s i n c r e a s e d by 50%
Ef_dash =1.5* Ef
// a s t h e power d e v e l o p e d r e m a i n s same
delta_dash = asind ( Ef * sin ( delta * %pi /180) / Ef_dash )
mprintf ( The new power a n g l e i s %f d e g r e e s \n ,
delta_dash )
// c a l c u l a t i n g new a r m a t u r e c u r r e n t and power f a c t o r
Ef_dash = pol2rect ( Ef_dash , - delta_dash )
Ia_dash =( Va - Ef_dash ) / Zs
[ Ia_dash theta ]= rect2pol ( Ia_dash )
mprintf ( The a r m a t u r e c u r r e n t drawn from t h e s u p p l y
i s %f A and i s now l e a d i n g t h e a p p l i e d v o l t a g e by
%f d e g r e e s w i t h power f a c t o r =%f ( l e a d i n g ) \n ,
Ia_dash , theta , cos ( theta * %pi /180) )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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

// c a l c u l a t i n g f u l l l o a d s p e e d o f i n d u c t i o n motor
P1 =8 // no . o f p o l e s o f a l t e r n a t o r
N =750 // s p e e d a t which a l t e r n a t o r r u n s
f = P1 * N /120 // f r e q u e n c y o f a l t e r n a t o r
P2 =6 // no . o f p o l e s o f i n d u c t i o n motor
Ns =120* f / P2 // s y n c h r o n o u s s p e e d
s =.03 // f u l l l o a d s l i p
Nr = Ns *(1 - s )
mprintf ( F u l l l o a d s p e e d o f i n d u c t i o n motor=%d rpm\n
, round ( Nr ) )
12 // c a l c u l a t i n g f r e q u e n c y o f r o t o r emf
13 fr = s * f
14 mprintf ( F r e q u e n c y o f r o t o r emf=%f Hz , fr )

Scilab code Exa 23.2 Example on Slip and Rotor Frequency

185

1
2 // c a l c u l a t i n g no . o f p o l e s
3 Ns =1200 // s y n c h r o n o u s s p e e d o f
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

20
21
22

23
24
25
26
27

r o t a t i n g magnetic

field
f =60 // f r e q u e n c y o f t h e s u p p l y t o t h e s t a t o r
P =120* f / Ns
mprintf ( No . o f p o l e s=%d\n , P )
// c a l c u l a t i n g s l i p a t f u l l l o a d
Nr =1140 // f u l l l o a d s p e e d
s =( Ns - Nr ) / Ns
mprintf ( P e r c e n t a g e s l i p a t f u l l l o a d=%f p e r c e n t \n ,
s *100)
// c a l c u l a t i n g f r e q u e n c y o f r o t o r v o l t a g e
fr = s * f
mprintf ( F r e q u e n c y o f r o t o r v o l t a g e=%d Hz\n , fr )
// c a l c u l a t i n g s p e e d o f r o t o r f i e l d w . r . t . r o t o r
N1 =120* fr / P // s p e e d
mprintf ( Speed o f r o t o r f i e l d w . r . t . r o t o r=%d rpm\n
, N1 )
// c a l c u l a t i n g s p e e d o f r o t o r f i e l d w . r . t . s t a t o r
N2 =1140 // s p e e d o f t h e r o t o r w . r . t . s t a t o r
mprintf ( Speed o f t h e r o t o r f i e l d w . r . t . s t a t o r=%d
rpm\ nSpeed o f t h e r o t o r f i e l d w . r . t . s t a t o r f i e l d
=%d rpm\n , N2 + N1 , N1 + N2 - Ns )
s =.1
N1 =(1 - s ) * Ns
mprintf ( Speed o f t h e r o t o r a t 10 p e r c e n t s l i p =%d
rpm\ nRotor f r e q u e n c y a t 10 p e r c e n t s l i p =%d Hz\n ,
N1 , s * f )
Eph =230 // a p p l i e d v o l t a g e p e r p h a s e
E1ph = Eph // i n d u c e d emf p e r p h a s e i n t h e s t a t o r
winding
E2ph = E1ph *.5 // r o t o r i n d u c e d emf a t s t a n d s t i l l
E2ph_dash = s * E2ph
mprintf ( R o t o r i n d u c e d emf a t s t a n d s t i l l =%f V\ nRotor
i n d u c e d emf a t 10 p e r c e n t s l i p =%f V , E2ph ,
E2ph_dash )

186

Scilab code Exa 23.3 Example on Slip and Rotor Frequency


1
2 // c a l c u l a t i n g s y n c h r o n o u s s p e e d
3 f =50 // f r e q u e n c y
4 P =4 // no . o f p o l e s
5 Ns =120* f / P
6 mprintf ( S y n c h r o n o u s s p e e d=%f rpm\n , Ns )
7 // c a l c u l a t i n g s p e e d o f r o t a t i n g a i r gap f i e l d
8 mprintf ( R o t a t i n g f i e l d i n a i r gap r o t a t e s a t
9
10
11
12
13
14
15

16

17
18
19
20
21
22
23
24

s y n c h r o n o u s s p e e d , h e n c e i t s s p e e d=%f rpm\n , Ns )
// c a l c u l a t i n g s p e e d o f i n d u c t i o n motor
s =.04 // s l i p
Nr =(1 - s ) * Ns
mprintf ( Speed o f i n d u c t i o n motor=%f rpm\n , Nr )
// c a l c u l a t i n g s l i p i n rpm
mprintf ( S l i p o f t h e motor i n rpm=%f rpm\n ,s * Ns )
mprintf ( The r o t o r f i e l d r o t a t e s a t s y n c h r o n o u s
s p e e d w . r . t . s t a t o r , h e n c e r e l a t i v e s p e e d=%f rpm\
n , Ns )
mprintf ( Both r o t o r and s t a t o r f i e l d r o t a t e a t
s y n c h r o n o u s s p e e d , r e l a t i v e t o t h e s t a t o r , hence ,
s p e e d o f r o t o r f i e l d w . r . t . s t a t o r f i e l d =0 rpm\n
)
mprintf ( Speed o f t h e r o t o r f i e l d w . r . t . r o t o r=%f
rpm\n ,s * Ns )
// c a l c u l a t i n g f r e q u e n c y o f r o t o r i n d u c e d emf
fr = s * f
mprintf ( F r e q u e n c y o f r o t o r i n d u c e d emf=%f Hz\n , fr )
// c a l c u l a t i n g r o t o r i n d u c e d emf p e r p h a s e
k =.6 // t u r n s r a t i o
E1ph =400/ sqrt (3) // i n d u c e d emf i n s t a t o r w i n d i n g
E2ph = E1ph * k // r o t o r i n d u c e d emf p e r p h a s e a t t h e
instant of starting
187

25
26

E2ph_dash = s * E2ph
mprintf ( R o t o r i n d u c e d emf p e r p h a s e u n d e r l o a d e d
c o n d i t i o n=%f V , E2ph_dash )

Scilab code Exa 23.4 Example on Equivalent Circuit


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

R2 =.5 // r o t o r r e s i s t a n c e p e r p h a s e
// a t s t a n d s t i l l
E =40 // i n d u c e d emf
E2 = E / sqrt (3) // i n d u c e d emf p e r p h a s e
X2 =3 // r o t o r r e a c t a n c e p e r p h a s e
R =4 // a d d i t i o n a l r e s i s t a n c e p e r p h a s e i n t h e r o t o r
circuit
Rt = R2 + R // t o t a l r e s i s t a n c e p e r p h a s e i n t h e r o t o r
circuit
Z2 = sqrt ( Rt ^2+ X2 ^2) // r o t o r i m p e d a n c e p e r p h a s e
I2 = E2 / Z2
mprintf ( R o t o r c u r r e n t p e r p h a s e a t s t a n d s t i l l =%f A\
n , I2 )
// c a l c u l a t i n g r o t o r c u r r e n t p e r p h a s e a t 5% s l i p
s =.05 // s l i p
X2 = s * X2
Z2 = sqrt ( R2 ^2+ X2 ^2)
E2 = s * E2 // i n d u c e d emf p e r p h a s e
I2 = E2 / Z2
mprintf ( R o t o r c u r r e n t p e r p h a s e a t 5 p e r c e n t s l i p =
%f A , I2 )

Scilab code Exa 23.5 Example on Equivalent Circuit


1

188

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

// c a l c u l a t i n g r o t o r s t a r t i n g c u r r e n t p e r p h a s e on
normal v o l t a g e with s l i p r i n g short c i r c u i t e d
V =400 // v o l t a g e a p p l i e d t o t h e s t a t o r w i n d i n g
V1 = V / sqrt (3) // p h a s e v o l t a g e
k =2.5 // t r a n s f o r m a t i o n r a t i o
R2 =.02 // r o t o r r e s i s t a n c e p e r p h a s e
// a t s t a n d s t i l l
s =1 // s l i p
E2 = V1 / k // i n d u c e d p h a s e v o l t a g e i n t h e r o t o r w i n d i n g
X2 =2* %pi *50*.6 D -3 // r o t o r r e a c t a n c e p e r p h a s e
Z2 = sqrt ( R2 ^2+ X2 ^2)
I2 = E2 / Z2
mprintf ( R o t o r s t a r t i n g c u r r e n t p e r p h a s e on n o r m a l
v o l t a g e w i t h s l i p r i n g s h o r t c i r c u i t e d =%f A\n , I2
)
// c a l c u l a t i n g r o t o r power f a c t o r a t s t a r t i n g
pf = R2 / Z2
mprintf ( R o t o r power f a c t o r a t s t a r t i n g =%f\n , pf )
// c a l c u l a t i n g r o t o r c u r r e n t p e r p h a s e a t 3 % s l i p
s =.03 // s l i p
E2 = s * E2
X2 = s * X2
Z2 = sqrt ( R2 ^2+ X2 ^2)
I2 = E2 / Z2
mprintf ( R o t o r c u r r e n t p e r p h a s e a t 3 p e r c e n t s l i p =
%f A\n , I2 )
// c a l c u l a t i n g r o t o r power f a c t o r a t 3% s l i p
pf = R2 / Z2
mprintf ( R o t o r power f a c t o r a t 3 p e r c e n t s l i p =%f , pf
)
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 23.6 Example on Equivalent Circuit

189

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 [ r ]= mag ( A )
9
x = real ( A )
10
y = imag ( A )
11
r = sqrt ( x ^2+ y ^2)
12 endfunction
13 j = %i
14 R2_dash =.16
15 s =.03
16 X2 =.4
17 Z2_dash = R2_dash / s + X2 * j // e f f e c t i v e
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

r o t o r impedance
r e f e r r e d to s t a t o r
R0 =200
Xm =20* j
Z =1/(1/ R0 +1/ Xm +1/ Z2_dash ) // e q u i v a l e n t i m p e d a n c e
Z1 =.15+.4* j // s t a t o r i m p e d a n c e
Zin = Z1 + Z // t o t a l i n p u t i m p e d a n c e
V =400 // a p p l i e d v o l t a g e
// c a l c u l a t i n g s t a t o r c u r r e n t
V1 = V / sqrt (3) // p e r p h a s e s t a t o r v o l t a g e
I1 = V1 / Zin
[ I1 theta1 ]= rect2pol ( I1 )
mprintf ( S t a t o r c u r r e n t=%f A a t %f power f a c t o r
l a g g i n g \n ,I1 , cos ( theta1 * %pi /180) )
// c a l c u l a t i n g r o t o r c u r r e n t
I1 = V1 / Zin
E1 = V1 - I1 * Z1
Iw = E1 / R0 // p e r p h a s e c o r e l o s s component o f no l o a d
current
Im = E1 / Xm // p e r p h a s e m a g n e t i s i n g c u r r e n t
I0 = Iw + Im // no l o a d c u r r e n t
I2_dash = I1 - I0
190

36 [ I2_dash theta2 ]= rect2pol ( I2_dash )


37 mprintf ( Per p h a s e r o t o r c u r r e n t=%f A l a g g i n g by %f
38
39
40
41
42
43
44
45

d e g r e e s \n , I2_dash , - theta2 )
// c a l c u l a t i n g m e c h a n i c a l o u t p u t power
P = I2_dash ^2* R2_dash *(1 - s ) / s // m e c h a n i c a l power o u t p u t
per phase
Pout =3* P
mprintf ( T o t a l m e c h a n i c a l power o u t p u t=%f kW\n , Pout
/1000)
// c a l c u l a t i n g i n p u t power drawn by t h e motor
Pin =3* V1 * mag ( I1 ) * cos ( theta1 * %pi /180)
mprintf ( T o t a l i n p u t power drawn by t h e motor=%f kW\
n , Pin /1000)
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 23.7 Example on Equivalent Circuit


1
2
3 function [r , theta ]= rect2pol ( A )
4
x = real ( A )
5
y = imag ( A )
6
r = sqrt ( x ^2+ y ^2)
7
theta = atand ( y / x )
8 endfunction
9 function [ r ]= mag ( A )
10
x = real ( A )
11
y = imag ( A )
12
r = sqrt ( x ^2+ y ^2)
13 endfunction
14 j = %i
15 R2_dash =.16
16 s =3/100 // s l i p
17 Rl = R2_dash *(1 - s ) / s // l o a d r e s i s t a n c e

191

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45

Z1 =.15+.4* j // s t a t o r i m p e d a n c e
Z2_dash =.16+.4* j // e q u i v a l e n t r o t o r i m p e d a n c e
Z = Rl + Z1 + Z2_dash // t o t a l i m p e d a n c e p e r p h a s e
Vph =400/ sqrt (3) // a p p l i e d v o l t a g e p e r p h a s e
I2_dash = Vph / Z
R0 =200
Xm =20
Iw = Vph / R0
Im = Vph / Xm
I0 = Iw - Im * j
I1 = I0 + I2_dash
[ I1 theta ]= rect2pol ( I1 )
pf = cos ( theta * %pi /180)
p = mag ( I2_dash ) ^2* Rl // o u t p u t power p e r p h a s e
Pout =3* p
Pin =3* Vph * I1 * pf
mprintf ( By u s i n g a p p r o x i m a t e e q u i v a l e n t c i r c u i t ,
the v a l u e s o f d i f f e r e n t parameters are as under \
nPer p h a s e s t a t o r c u r r e n t=%f A\ nPer p h a s e r o t o r
c u r r e n t=%f A\ n O p e r a t i n g power f a c t o r =%f\ n I n p u t
power=%f kW\ n M e c h a n i c a l o u t p u t power=%f kW\n ,I1 ,
I2_dash , pf , Pin /10^3 , Pout /10^3)
// r e f e r F i g . 2 3 . 1 6 i n t h e t e x t b o o k
Z2_dash =5.3+ j *0.4
Z =( j * Xm ) * Z2_dash /( j * Xm + Z2_dash ) // e q u i v a l e n t
impedance
Zin = Z1 + Z // t o t a l i n p u t i m p e d a n c e
I1 = Vph / Zin
I2_dash = I1 * j * Xm /( j * Xm + Z2_dash )
[ I1 theta ]= rect2pol ( I1 )
pf = cos ( theta * %pi /180)
Pout =3*( mag ( I2_dash ) ) ^2* R2_dash *(1 - s ) / s
Pin =3* Vph * I1 * pf
mprintf ( By s o l v i n g t h e p r o b l e m u s i n g t h e c i r c u i t i n
F i g . 2 3 . 1 6 i n t h e book , t h e v a l u e s o f d i f f e r e n t
p a r a m e t e r s a r e a s u n d e r \ nPer p h a s e s t a t o r c u r r e n t
=%f A\ nPer p h a s e r o t o r c u r r e n t=%f A\ n O p e r a t i n g
power f a c t o r =%f\ n I n p u t power=%f kW\ n M e c h a n i c a l
192

o u t p u t 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 =60 D +3 // power i n p u t


p =1 D +3 // s t a t o r l o s s e s
Pg = Pin - p // a i r gap power
s =3/100 // s l i p
Pm = Pg *(1 - s )
Prcu = s * Pg
mprintf ( M e c h a n i c a l power d e v e l o p e d by t h e motor=%f
kW w i t h r o t o r c o p p e r l o s s e s o f %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

Po =50 D +3 // power o u t p u t
e =90/100 // e f f i c i e n c y
Pin = Po / e // power i n p u t
P = Pin - Po // t o t a l l o s s e s
//P=Pscu+P s i+Prcu+Pfw
// Pscu=Prcu=P s i , Pfw=P s i /3
Psi = P /(1+1+1+1/3)
Pscu = Psi // s t a t o r c o p p e r l o s s
Prcu = Psi
mprintf ( R o t o r c o p p e r l o s s =%d W\n , round ( Prcu ) )
Pg = Pin -2* Pscu
mprintf ( A i r gap power=%d W\n , round ( Pg ) )
s = Prcu / Pg
mprintf ( S l i p=%f p . u . , s )
193

16

// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f


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 // f r e q u e n c y
P =6 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d i n rpm
Nr =950 // s p e e d a t which t h e motor i s r u n n i n g i n rpm
s =( Ns - Nr ) / Ns // s l i p
Pm =3.73 D +3 // m e c h a n i c a l power d e v e l o p e d by t h e motor
// i r o n l o s s e s i n t h e r o t o r a r e n e g l e c t e d
Prcu = s * Pm /(1 - s ) // r o t o r c o p p e r l o s s
P1 = Pm + Prcu // r o t o r i n p u t
P =.25 D +3 // s t a t o r l o s s e s
P2 = P1 + P
mprintf ( S t a t o r i n p u t t o t h e 3 p h a s e i n d u c t i o n motor
=%f kW\n , P2 /1000)

Scilab code Exa 23.11 Example on Losses in Induction Motor


1
2
3
4
5
6
7
8
9
10
11

// c a l c u l a t i n g r o t o r c o p p e r l o s s e s
s =.04 // s l i p o f t h e motor
Pout =14.92 D +3 // o u t p u t o f t h e motor
Pfw =200 // f r i c t i o n and w i n d a g e l o s s e s
Prcu = s *( Pout + Pfw ) /(1 - s )
mprintf ( R o t o r c o p p e r l o s s e s =%d W\n , round ( Prcu ) )
// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d
P = Pout + Pfw + Prcu +1620 // s t a t o r i n p u t
e = Pout / P *100
mprintf ( E f f i c i e n c y a t f u l l l o a d=%f p e r c e n t \n ,e )
194

12 // c a l c u l a t i n g l i n e c u r r e n t
13 pf =.86 // power f a c t o r o f l o a d
14 Vl =500 // l i n e v o l t a g e
15 Il = P /( sqrt (3) * Vl * pf )
16 mprintf ( L i n e c u r r e n t=%f A\n , Il )
17 // c a l c u l a t i n g no o f c o m p l e t e c y c l e s

of the r o t o r

e l e c t r o m o t i v e f o r c e per minute
18 f =50 // s u p p l y f r e q u e n c y
19 f_r = s * f // f r e q u e n c y o f r o t o r emf
20 n = f_r *60
21 mprintf ( No o f c o m p l e t e c y c l e s o f t h e r o t o r
22

e l e c t r o m o t i v e f o r c e p e r m i n u t e=%d\n ,n )
// a n s w e r v a r y from t h e t e x t b o o k due t o round o f f
e r r o r , a l s o t h e r e i s an e r r o r i n v a l u e o f s t a t o r
input given in textbook

Scilab code Exa 23.12 Example on Losses in Induction Motor


1
2 // c a l c u l a t i n g s l i p
3 n =100 // no . o f c o m p l e t e
4
5
6
7
8
9
10
11
12
13
14
15
16

a l t e r n a t i o n s per minute o f
r o t o r emf
f_r = n /60 // r o t o r f r e q u e n c y i n Hz
f =50 // s u p p l y f r e q u e n c y i n Hz
s = f_r / f
mprintf ( S l i p o f t h e motor=%f p e r c e n t \n ,s *100)
// c a l c u l a t i n g r o t o r s p e e d
P =6 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d
Nr =(1 - s ) * Ns
mprintf ( R o t o r s p e e d=%d rpm\n , round ( Nr ) )
// c a l c u l a t i n g r o t o r c o p p e r l o s s e s p e r p h a s e
P1 =75 D +3 // r o t o r i n p u t
Prcu = P1 * s
mprintf ( R o t o r c o p p e r l o s s e s p e r p h a s e=%f W\n , Prcu
195

17
18
19
20
21
22
23
24

/3)
// c a l c u l a t i n g m e c h a n i c a l power d e v e l o p e d
Pm = P1 - Prcu
mprintf ( M e c h a n i c a l power d e v e l o p e d=%f kW\n , Pm
/1000)
// c a l c u l a t i n g r o t o r r e s i s t a n c e p e r p h a s e
Ir =60 // r o t o r c u r r e n t
Rr = Prcu /(3* Ir ^2)
mprintf ( R o t o r r e s i s t a n c e p e r p h a s e=%f ohm , Rr )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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
19

// c a l c u l a t i n g r a t i o o f maximum t o f u l l l o a d t o r q u e
Nr =970 // s p e e d a t f u l l l o a d t o r q u e i n rpm
Ns =50*120/6 // s y n c h r o n o u s s p e e d i n rpm
s =( Ns - Nr ) / Ns // s l i p a t f u l l l o a d
R2 =.02 // r o t o r r e s i s t a n c e p e r p h a s e
X2 =.3 // r o t o r r e a c t a n c e p e r p h a s e a t s t a n d s t i l l
alpha = R2 / X2
// F u l l l o a d t o r q u e Tf=k1 Kt
k1 = s * alpha /( s ^2+ alpha ^2)
//maximum t o r q u e Tmax=Kt /2
x =1/(2* k1 )
mprintf ( R a t i o o f maximum t o f u l l l o a d t o r q u e=%f\n ,
x)
// c a l c u l a t i n g s p e e d a t maximum t o r q u e
s_m = R2 / X2 // s l i p a t maximum t o r q u e
Nm =(1 - s_m ) * Ns
mprintf ( Speed a t maximum t o r q u e=%d rpm\n , round ( Nm )
)
// c a l c u l a t i n g r a t i o o f s t a r t i n g t o r q u e t o f u l l l o a d
196

20
21
22
23
24

torque
s =1 // s l i p a t s t a r t i n g
// s t a r t i n g t o r q u e Tst=k2 Kt
k2 = s * alpha /( s ^2+ alpha ^2)
y = k2 / k1
mprintf ( R a t i o o f s t a r t i n g t o r q u e t o f u l l l o a d
t o r q u e=%f\n ,y )

Scilab code Exa 23.14 Example on Torque


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 ]= mag ( A )
x = real ( A )
y = imag ( A )
r = sqrt ( x ^2+ y ^2)
endfunction
j = %i
Vl =220 // l i n e v o l t a g e
Vph = Vl / sqrt (3) // s t a t o r p h a s e v o l t a g e
n =.65 // r a t i o o f no . o f r o t o r w i n d i n g t u r n s t o no . o f
s t a t o r winding turns
E2 = n * Vph // p h a s e v o l t a g e i n d u c e d i n t h e r o t o r w i n d i n g
at s t a n d s t i l l
R2 =.1 // r o t o r r e s i s t a n c e p e r p h a s e
X2 =.8 // s t a n d s t i l l r e a c t a n c e p e r p h a s e
// a t 5 % s l i p
s =5/100
X = s * X2 // r e a c t a n c e p e r p h a s e
Z2 = R2 + X * j // r o t o r i m p e d a n c e
e2 = s * E2 // r o t o r p h a s e v o l t a g e
I2 = e2 / mag ( Z2 )
mprintf ( R o t o r c u r r e n t a t 5 p e r c e n t s l i p =%f A\n , I2 )
// c a l c u l a t i n g r o t o r i n p u t
Prcu =3* I2 ^2* R2 // t o t a l r o t o r c o p p e r l o s s e s
Pg = Prcu / s
197

24 mprintf ( R o t o r i n p u t=%f W\n , Pg )


25 // c a l c u l a t i n g t o t a l t o r q u e a t 5% s l i p
26 Pm = Pg -3* I2 ^2* R2 // m e c h a n i c a l power d e v e l o p e d by t h e

rotor
27 Ns =120*50/4 // s y n c h r o n o u s s p e e d
28 Nr = Ns *(1 - s ) // s p e e d o f t h e r o t o r
29 T =60* Pm /(2* %pi * round ( Nr ) )
30 mprintf ( T o t a l t o r q u e d e v e l o p e d by t h e r o t o r a t 5

31
32
33
34
35
36
37
38
39
40
41
42
43

44

p e r c e n t s l i p =%f Nm\ n T o t a l m e c h a n i c a l power a t 5


p e r c e n t s l i p =%f kW\n ,T , Pm /1000)
// c a l c u l a t i n g r o t o r c u r r e n t a t maximum t o r q u e
s_m = R2 / X2 // s l i p f o r maximum t o r q u e
I2m = s_m * E2 / sqrt ( R2 ^2+( s_m * X2 ) ^2)
mprintf ( R o t o r c u r r e n t a t maximum t o r q u e=%d A\n ,
round ( I2m ) )
// c a l c u l a t i n g r o t o r i n p u t c o r r e s p o n d i n g t o maximum
torque
Sm =3* round ( I2m ) ^2* R2 // t o t a l r o t o r c o p p e r l o s s e s
Pg = Sm / s_m
mprintf ( R o t o r i n p u t c o r r e s p o n d i n g t o maximum t o r q u e
=%f W\n , Pg )
// c a l c u l a t i n g maximum t o r q u e
Pm = Pg - Sm
Nm = Ns *(1 - s_m )
T =60* Pm /(2* %pi * round ( Nm ) )
mprintf ( Maximum t o r q u e=%f Nm\ nSpeed a t maximum
t o r q u e=%d rpm\nMaximum m e c h a n i c a l power=%f kW ,T ,
Nm , Pm /1000)
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 23.15 Example on Torque


1
2 Ns =120*50/4 // s y n c h r o n o u s s p e e d

198

3
4
5
6
7
8
9
10
11
12
13
14
15

R2 =.03 // r o t o r r e s i s t a n c e
X2 =.15 // r o t o r r e a c t a n c e
alpha = R2 / X2
s_m = alpha // s l i p a t maximum t o r q u e
Nr =(1 - s_m ) * Ns // s p e e d a t maximum t o r q u e
// a l p h a =(.03+ r ) / . 1 5
// Tst=Kt a l p h a /(1+ a l p h a 2 )
//Tmax=Kt /2
// Tst /Tmax=3/4>3 a l p h a 28 a l p h a +3=0
// s o l v i n g f o r a l p h a
alpha =(8 - sqrt (8^2 -4*3*3) ) /(2*3)
r =.15* alpha -.03
mprintf ( I f a r e s i s t a n c e o f %f ohm i s added i n t h e
c i r c u i t , t h e r e q u i r e d s t a r t i n g t o r q u e w i l l be
a c h i e v e d ,r )

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 // r o t o r r e s i s t a n c e p e r p h a s e
// a t 60 Hz s u p p l y
f =60 // f r e q u e n c y o f s u p p l y
P =6 // no . o f p o l e s
Ns1 =120* f / P // s y n c h r o n o u s s p e e d
Nr =1000 // s p e e d o f r o t o r
s_m1 =( Ns1 - Nr ) / Ns1 // s l i p a t maximum t o r q u e
X2 = R2 / s_m1
L2 = X2 /(2* %pi *60)
// a t 50 Hz s u p p l y
X2 =2* %pi *50* L2
s_m2 = R2 / X2 // s l i p a t maximum t o r q u e
Ns2 =120*50/6 // s y n c h r o n o u s s p e e d
Nr2 =(1 - s_m2 ) * Ns2
mprintf ( R o t o r s p e e d a t maximum t o r q u e=%d rpm , 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
30

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 // p e r p h a s e s t a t o r w i n d i n g r e s i s t a n c e
// b l o c k r o t o r t e s t
Vb =133/ sqrt (3) // p e r p h a s e v o l t a g e
Ib =100 // p e r p h a s e c u r r e n t
Wb =8085/3 // p e r p h a s e power
Zb = Vb / Ib // p e r p h a s e i m p e d a n c e
Rb = Wb / Ib ^2 // p e r p h a s e r e s i s t a n c e
Xb = sqrt ( Zb ^2 - Rb ^2) // p e r p h a s e r e a c t a n c e
R2_dash = Rb - R1 // p e r p h a s e r o t o r r e s i s t a n c e r e f e r r e d
to s t a t o r
X2_dash = Xb /2 // p e r p h a s e r o t o r r e a c t a n c e r e f e r r e d t o
stator
X1 = X2_dash // p e r p h a s e s t a t o r l e a k a g e r e a c t a n c e
// no l o a d t e s t
Vo =400/ sqrt (3) // p e r p h a s e v o l t a g e
Io =20 // p e r p h a s e c u r r e n t
Wo =2080/3 // p e r p h a s e power
pf = Wo /( Vo * Io ) // power f a c t o r
phi0 = acos ( pf )
200

31
32
33
34
35
36
37

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
mprintf ( E q u i v a l e n t c i r c u i t p a r a m e t e r s a r 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
15
16
17
18
19
20
21

// r e f e r F i g . 2 3 . 2 5 i n t h e t e x t b o o k
k1 =40 // c u r r e n t s c a l e
Vph =400/ sqrt (3) // v o l t a g e p e r p h a s e
P = k1 * Vph // power p e r p h a s e
k2 =3* P // power s c a l e
// c a l c u l a t i n g f u l l l o a d s t a t o r c u r r e n t
P =33.6 D +3 // o u t p u t o f motor
P1 = P / k2 // ouput o f motor t o s c a l e
//P i s t h e c o r r e s p o n d i n g o p e r a t i n g p o i n t
OP =1.55
I1 = OP * k1
phi1 =28.5
mprintf ( F u l l l o a d s t a t o r c u r r e n t=%f A w i t h %f power
f a c t o r l a g g i n g \n ,I1 , cos ( phi1 * %pi /180) )
// c a l c u l a t i n g e f f i c i e n c y a t f u l l l o a d
PL =2.35
PX =2.75
e = PL / PX *100
mprintf ( E f f i c i e n c y a t f u l l l o a d=%f p e r c e n t \n ,e )
// c a l c u l a t i n g max power o u t p u t
NPm =2.6
201

22 mprintf ( Maximum o u t p u t power=%f kW\n , NPm * k2 *10^ -3)


23 // c a l c u l t i n g max t o r q u e d e v e l o p e d
24 MTm =3.12
25 mprintf ( Maximum t o r q u e d e v e l o p e d by t h e motor=%f kW

, MTm * k2 *10^ -3)


26 // a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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

// a t s h o r t c i r c u i t
Vsc =100 // a p p l i e d v o l t a g e
Isc =15 // l i n e v a l u e o f c u r r e n t
Iph = Isc / sqrt (3) // p h a s e v a l u e o f c u r r e n t
// c a l c u l a t i n g s t a r t i n g c u r r e n t drawn by t h e motor
V =400 // l i n e v o l t a g e
Vph = V / sqrt (3) // p h a s e v o l t a g e
I = Iph * Vph / Vsc // p h a s e v a l u e o f s t a r t i n g c u r r e n t
Il = I
mprintf ( S t a r t i n g c u r r e n t drawn by t h e motor=%d A\n
, Il )
// c a l c u l a t i n g r a t i o o f s t a r t i n g t o f u l l l o a d c u r r e n t
Pout =5 D +3 // o u t p u t
e =.84 // f u l l l o a d e f f i c i e n c y
pf =.82 // power f a c t o r
I = Pout /( sqrt (3) * V * pf * e ) // f u l l l o a d c u r r e n t
r = Il / I
mprintf ( R a t i o o f s t a r t i n g t o f u l l l o a d c u r r e n t=%f ,
r)

Scilab code Exa 23.20 Example on starting


202

1
2 V =400 // p h a s e v o l t a g e a p p l i e d t o motor
3 // when s t a r t e d d i r e c t l y on l i n e
4 Iph =25 // p h a s e c u r r e n t
5 Il = sqrt (3) * Iph
6 mprintf ( L i n e c u r r e n t drawn by t h e motor when
7
8
9
10
11
12
13

14
15
16
17
18

s t a r t e d d i r e c t l y on l i n e =%f A\n , Il )
// when s t a r t e d w i t h auto t r a n s f o r m e r s t a r t e r w i t h a
t a p p i n g p e r c e n t o f 60 p e r c e n t
Vl =.6* V // l i n e v o l t a g e
Vph = Vl // p h a s e v o l t a g e
Iph =25 // p h a s e c u r r e n t
Ist = Iph * Vph / V
Il = sqrt (3) * Ist
mprintf ( When s t a r t e d w i t h auto t r a n s f o r m e r s t a r t e r
w i t h a t a p p i n g o f 60 p e r c e n t \ nPhase s t a r t i n g
c u r r e n t =%f A\ n L i n e s t a r t i n g c u r r e n t=%f A\n ,Ist ,
Il )
// when s t a r t e d w i t h s t a r d e l t a s t a r t e r
Vph = V / sqrt (3) // p h a s e v o l t a g e
I = Iph * Vph / V
Il = I
mprintf ( When s t a r t e d w i t h s t a r d e l t a s t a r t e r \ nPhase
s t a r t i n g c u r r e n t =%f A\ n L i n e s t a r t i n g c u r r e n t=%f
A ,I , Il )

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
13
14
15
16
17
18

f =50 // f r e q u e n c y i n Hz
P =4 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d
Nr =1420
// c a l c u l a t i n g f o r w a r d s l i p
s =( Ns - Nr ) / Ns
mprintf ( Forward s l i p =%f p . u . \ n ,s )
// c a l c u l a t i n g backward s l i p
s1 =2 - s
mprintf ( Backward s l i p s b=%f p . u . \ n , s1 )
// c a l c u l a t i n g e f f e c t i v e r o t o r r e s i s t a n c e i n f o r w a r d
branch
R2_dash =4.5
Rf = R2_dash /(2* s )
mprintf ( E f f e c t i v e r o t o r r e s i s t a n c e i n f o r w a r d
b r a n c h=%f ohm\n , Rf )
// c a l c u l a t i n g e f f e c t i v e r o t o r r e s i s t a n c e i n backward
branch
Rb = R2_dash /(2*(2 - s ) )
mprintf ( E f f e c t i v e r o t o r r e s i s t a n c e i n backward
204

b r a n c h=%f ohm , Rb )
19 // a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
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 // f r e q u e n c y
P =4 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d
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) // f o r w a r d i m p e d a n c e
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
205

28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

impedance
Z1 =2.5+ %i *1.5
Zin = Z1 + Zf + Zb // i n p u t i m p e d a n c e
// c a l c u l a t i n g i n p u t c u r r e n t
V1 = pol2rect (230 ,0)
I1 = V1 / Zin
[ I1 theta ]= rect2pol ( I1 )
mprintf ( I n p u t c u r r e n t drawn by t h e motor i s %f A,
l a g g i n g t h e a p p l i e d v o l t a g e by %f d e g r e e s \n , I1
, - theta )
// c a l c u l a t i n g i n p u t power
Pin = mag ( V1 ) * I1 * cos ( theta * %pi /180)
mprintf ( Power i n p u t=%f W\n , Pin )
// c a l c u l a t i n g m e c h a n i c a l power d e v e l o p e d
Pgf = I1 ^2* real ( Zf )
Pgb = I1 ^2* real ( Zb )
Pm =( Pgf - Pgb ) *(1 - s )
mprintf ( M e c h a n i c a l power d e v e l o p e d=%f W\n , Pm )
// c a l c u l a t i n g r e s u l t a n t t o r q u e d e v e l o p e d
omega_s =2* %pi * Ns /60
T =( Pgf - Pgb ) / omega_s
mprintf ( R e s u l t a n t t o r q u e d e v e l o p e d=%f Nm\n ,T )
// c a l c u l a t i n g e f f i c i e n c y
Prot =35+60
Pout = Pm - Prot
e = Pout / Pin *100
mprintf ( E f f i c i e n c y =%f p e r c e n t , e )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error

Scilab code Exa 24.3 Example on Equivalent Circuit


1
2
3

function [r , theta ]= rect2pol ( A )


x = real ( A )
206

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36

y = imag ( A )
r = sqrt ( x ^2+ y ^2)
theta = atan ( y / x )
endfunction
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
f =50 // f r e q u e n c y
P =4 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d
Nr =1425
s =( Ns - Nr ) / Ns // s l i p
R2_dash =7.5
X2_dash =4.5
Xm =150
Zf =( Xm * %i /2) *( R2_dash /(2* s ) + %i * X2_dash /2) /( R2_dash
/(2* s ) + %i *( Xm + X2_dash ) /2) // f o r w a r d i m p e d a n c e
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
Z1 =2.5+4.5* %i
Zin = Z1 + Zf + Zb // i n p u t i m p e d a n c e
// c a l c u l a t i n g i n p u t c u r r e n t
V1 = pol2rect (230 ,0)
I1 = V1 / Zin
[ I1 theta ]= rect2pol ( I1 )
mprintf ( I n p u t c u r r e n t drawn by t h e motor i s %f A a t
%f p f l a g g i n g \n , I1 , cos ( theta ) )
// c a l c u l a t i n g a i r gap power
Pgf = I1 ^2* real ( Zf ) // a i r gap power due t o f o r w a r d
field
207

37 Pgb = I1 ^2* real ( Zb ) // a i r gap power due t o backward

field
38 Pg = Pgf + Pgb
39 mprintf ( A i r gap power=%f W\n , Pg )
40 // c a l c u l a t i n g r o t o r c o p p e r l o s s e s
41 Prc = s * Pgf +(2 - s ) * Pgb
42 mprintf ( R o t o r c o p p e r l o s s e s =%f W , Prc )
43 // a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f

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 d e r b l o c k r o t o r c o n d i t i o n
Vb =82.5
Ib =9.3
Zb = Vb / Ib
P =500 // power consumed
Rb = P / Ib ^2
Xb = sqrt ( Zb ^2 - Rb ^2)
R1 =2.5 // main r e s i s t a n c e w i n d i n g
R2_dash = Rb - R1 // r o t o r r e s i s t a n c e r e f e r r e d t o s t a t o r
X1 = Xb /2
X2_dash = X1 // r o t o r r e a c t a n c e r e f e r r e d t o s t a t o r
// u n d e r no l o a d
I0 =6.4
V0 =230
Z0 = V0 / I0
P0 =220 // power consumed
R0 = P0 / I0 ^2
X0 = sqrt ( Z0 ^2 - R0 ^2)
Xm =2* X0 -3/2* Xb
mprintf ( E q u i v a l e n t c i r c u i t p a r a m e t e r s o f t h e motor
a r e : \ nR1=%f ohm , \ nX1=%f ohm , \nXm=%f ohm , \ nR2 dash
=%f ohm , \ nX2 dash=%f ohm\n , R1 , X1 , Xm , R2_dash ,
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 // f r e q u e n c y
P =4 // no . o f p o l e s
Ns =120* f / P // s y n c h r o n o u s s p e e d
Nr =1420 // motor s p e e d
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) // f o r w a r d i m p e d a n c e
29 Zb =( %i * Xm /2) *( R2_dash /(2*(2 - s ) ) + %i * X2_dash /2) /(
R2_dash /(2*(2 - s ) ) + %i *( Xm + X2_dash ) /2) // backward
209

30
31
32
33
34
35
36

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

impedance
Z1 = R1 + %i * X1
Zin = Z1 + Zf + Zb // i n p u t i m p e d a n c e
// c a l c u l a t i n g i n p u t c u r r e n t and power f a c t o r
V1 = pol2rect (230 ,0)
I1 = V1 / Zin
[ I1 theta ]= rect2pol ( I1 )
mprintf ( I n p u t c u r r e n t drawn by t h e motor i s %f A
l a g g i n g t h e a p p l i e d v o l t a g e by an a n g l e o f %f
d e g r e e s , t h a t i s a t %f p f l a g g i n g \n , I1 , - theta ,
cos ( theta * %pi /180) )
// c a l c u l a t i n g i n p u t power
Pin = mag ( V1 ) * I1 * cos ( theta * %pi /180)
mprintf ( Power i n p u t=%f W\n , Pin )
// c a l c u l a t i n g t o r q u e d e v e l o p e d
Pgf = I1 ^2* real ( Zf )
Pgb = I1 ^2* real ( Zb )
omega_s =2* %pi * Ns /60
T =( Pgf - Pgb ) / omega_s
mprintf ( R e s u l t a n t t o r q u e d e v e l o p e d=%f Nm\n ,T )
// c a l c u l a t i n g o u t p u t power
Pm =( Pgf - Pgb ) *(1 - s ) // m e c h a n i c a l power d e v e l o p e d
W0 =220 // power consumed u n d e r no l o a d
I0 =6.4 // no l o a d c u r r e n t
Prot = W0 - I0 ^2*( R1 + R2_dash /4) // r o t a t i o n a l l o s s e s
Pout = Pm - Prot
mprintf ( Output power d e v e l o p e d=%f W\n , Pout )
// c a l c u l a t i n g e f f i c i e n c y
e = Pout / Pin *100
mprintf ( E f f i c i e n c y =%f p e r c e n t \n , e )
// c a l c u l a t i n g a i r gap power
Pg = Pgf + Pgb
mprintf ( A i r gap power=%f W\n , Pg )
// c a l c u l a t i n g r o t o r c o p p e r l o s s e s
Prc = s * Pgf +(2 - s ) * Pgb
mprintf ( R o t o r c o p p e r l o s s e s =%f W , Prc )
// a n s w e r s v a r y from t h e t e x t b o o k due t o round o f f
error
210

211

Vous aimerez peut-être aussi