You are on page 1of 98

Scilab Textbook Companion for

Basic Electrical Engineering


by P. S. Dhogal1
Created by
Nishtha Rani
B.Tech
Electrical Engineering
UKTU
College Teacher
Vinesh Saini
Cross-Checked by
Lavitha Pereira and Mukul Kulkarni
January 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: P. S. Dhogal
Publisher: Tata McGraw-Hill Publishing, New Delhi
Edition: 1
Year: 2005
ISBN: 0-07-45186-1

Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

Contents
List of Scilab Codes

3 electricity and its fundamental law

4 Work power and energy

17

5 effects of electric current

30

6 magnetism and electromagnetism

33

7 DC generators

35

8 DC motors

50

9 cells and batteries

64

11 single phase AC circuits

74

12 polyphase system

92

List of Scilab Codes


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

3.1
3.2
3.3
3.4
3.5.a
3.5.b
3.6
3.7
3.8
3.9
3.10
3.11.a
3.11.b
3.11.c
3.11.d
4.1.b
4.1
4.2
4.3
4.4.a
4.4.b
4.5.a
4.5.b
4.6
4.7
4.8
4.9
4.10.a

resistance . . . . . . . . . . . . . . . . . . . . .
voltage . . . . . . . . . . . . . . . . . . . . . .
specific resistance . . . . . . . . . . . . . . . .
resistance . . . . . . . . . . . . . . . . . . . . .
total resistance . . . . . . . . . . . . . . . . . .
current flowing . . . . . . . . . . . . . . . . . .
voltage . . . . . . . . . . . . . . . . . . . . . .
total resistance . . . . . . . . . . . . . . . . . .
voltage . . . . . . . . . . . . . . . . . . . . . .
effective resistance and current . . . . . . . . .
current . . . . . . . . . . . . . . . . . . . . . .
unknow resistance . . . . . . . . . . . . . . . .
potential drop . . . . . . . . . . . . . . . . . .
current . . . . . . . . . . . . . . . . . . . . . .
total resistance . . . . . . . . . . . . . . . . . .
power lost . . . . . . . . . . . . . . . . . . . . .
resistance . . . . . . . . . . . . . . . . . . . . .
resistance . . . . . . . . . . . . . . . . . . . . .
resistance . . . . . . . . . . . . . . . . . . . . .
power taken in parallel case . . . . . . . . . . .
power taken in series case . . . . . . . . . . . .
total load . . . . . . . . . . . . . . . . . . . . .
current taken . . . . . . . . . . . . . . . . . . .
total cots of electric energy and total charges of
voltage current power and bill amount . . . . .
current taken . . . . . . . . . . . . . . . . . . .
amount of bills . . . . . . . . . . . . . . . . . .
total load of light and fans . . . . . . . . . . .
4

. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
bill .
. . .
. . .
. . .
. . .

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

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

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

4.10.b total load current . . . . . . .


4.11 horsepower of the motor . . . .
4.12.a Bhp of the motor . . . . . . . .
4.12.b cost of the energy . . . . . . .
5.1
ECE of silver . . . . . . . . . .
5.2
thickness of coper . . . . . . .
5.3
resistance . . . . . . . . . . . .
5.4
potential difference . . . . . . .
6.1
field strength . . . . . . . . . .
6.2
force . . . . . . . . . . . . . . .
6.3
emf induced . . . . . . . . . . .
7.1.a emf induced . . . . . . . . . . .
7.1.b emf generated . . . . . . . . .
7.2.a total armature current . . . . .
7.2.b current per armature path . . .
7.2.c emf generated . . . . . . . . .
7.3.a terminal voltage . . . . . . . .
7.3.b emf generated . . . . . . . . .
7.4.a terminal voltage . . . . . . . .
7.4.b emf generated . . . . . . . . .
7.4.c copper losses . . . . . . . . . .
7.4.d Bhp metric of the primemover
7.4.e commercial efficiency . . . . . .
7.5.a total armature current . . . . .
7.5.b current . . . . . . . . . . . . .
7.5.c emf generated . . . . . . . . .
7.5.d power developed . . . . . . . .
7.5.e copper losses . . . . . . . . . .
7.5.f stray losses . . . . . . . . . . .
7.5.g.1 electrical efficiency . . . . . . .
7.5.g.2 commercial efficiency . . . . . .
7.5.g.3 mechanical efficiency . . . . . .
8.1
speed . . . . . . . . . . . . . .
8.2.a Bhp . . . . . . . . . . . . . . .
8.2.b copper losses . . . . . . . . . .
8.2.c armature torque . . . . . . . .
8.2.d shaft torque . . . . . . . . . . .
8.2.e lost torque . . . . . . . . . . .
5

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

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

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

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

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

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

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

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

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

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

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

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

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

26
26
27
28
30
30
31
31
33
33
34
35
35
36
36
37
38
38
39
39
40
41
42
43
43
44
44
45
46
47
48
48
50
50
51
52
52
53

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

8.2.f
8.3
8.4.a
8.4.b
8.4.c
8.5.a
8.5.b
8.5.c
8.5.d
8.5.e
8.5.f
8.5.g
8.6
8.7
9.1
9.2
9.3
9.4.a
9.4.b
9.5
9.6
9.7.a
9.7.b
9.8.a
9.8.b
9.9.a
9.9.b
9.9.c
9.10
11.1
11.2
11.3
11.4
11.5.a
11.5.b
11.6.a
11.6.b
11.7.a

commercial efficiency . . . . . . . . . . . .
speed . . . . . . . . . . . . . . . . . . . .
stray losses . . . . . . . . . . . . . . . . .
horsepower of the motor . . . . . . . . . .
efficiency . . . . . . . . . . . . . . . . . .
back emf . . . . . . . . . . . . . . . . . .
copper losses . . . . . . . . . . . . . . . .
Bhp . . . . . . . . . . . . . . . . . . . . .
total torque . . . . . . . . . . . . . . . . .
shaft torque . . . . . . . . . . . . . . . . .
lost torque . . . . . . . . . . . . . . . . .
commercial efficiency . . . . . . . . . . . .
current taken . . . . . . . . . . . . . . . .
speed . . . . . . . . . . . . . . . . . . . .
value of current flowing . . . . . . . . . .
value of current flowing . . . . . . . . . .
value of current flowing . . . . . . . . . .
internal resistance . . . . . . . . . . . . .
value of current flowing . . . . . . . . . .
emf of each cell and its internal resistance
ampere hour capacity . . . . . . . . . . .
ampere hour efficiency . . . . . . . . . . .
watt hour efficiency . . . . . . . . . . . .
initial charging current . . . . . . . . . . .
final charging current . . . . . . . . . . .
value and direction of current . . . . . . .
total current . . . . . . . . . . . . . . . .
power dissipated . . . . . . . . . . . . . .
direction of current and total resistance .
instantaneous emf . . . . . . . . . . . . .
rms value of alternating current . . . . . .
current drawn . . . . . . . . . . . . . . .
current . . . . . . . . . . . . . . . . . . .
value of current flowing . . . . . . . . . .
value of current flowing . . . . . . . . . .
value of current flowing . . . . . . . . . .
value of current flowing . . . . . . . . . .
inductive reactance . . . . . . . . . . . . .
6

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

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

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

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

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

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

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

54
55
55
56
57
57
58
58
59
60
60
61
62
62
64
64
65
65
66
66
67
67
68
68
69
69
70
71
72
74
74
75
75
76
76
77
77
78

Exa 11.7.b impedance . . . . . . . . . . . . . . . . . . . . . . . .


Exa 11.7.c current . . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.7.d angle of phase difference . . . . . . . . . . . . . . . . .
Exa 11.8 inductance and phase angle . . . . . . . . . . . . . . .
Exa 11.9 capacitance . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.10.aimpedance . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.10.bcurrent . . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.10.cphase angles . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.10.dvoltage . . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.10.evoltage across the coil . . . . . . . . . . . . . . . . . .
Exa 11.10.ftotal power taken . . . . . . . . . . . . . . . . . . . .
Exa 11.11.atotal impedance . . . . . . . . . . . . . . . . . . . . .
Exa 11.11.bcurrent taken . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.11.cpower factor . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.12.acurrent taken . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.12.bphase angle . . . . . . . . . . . . . . . . . . . . . . . .
Exa 11.12.cseries equivalent arrangement of resistance and reactance
Exa 12.1.a line current and phase current . . . . . . . . . . . . .
Exa 12.1.b line current and phase current . . . . . . . . . . . . .
Exa 12.2.a line current and total power . . . . . . . . . . . . . . .
Exa 12.2.b line current and total power . . . . . . . . . . . . . . .
Exa 12.3.a current in each phase of the motor . . . . . . . . . . .
Exa 12.3.b current in each phase of the generator . . . . . . . . .
Exa 12.4 reading . . . . . . . . . . . . . . . . . . . . . . . . . .
Exa 12.5.a power factor when both readings are positive . . . . .
Exa 12.5.b power factor . . . . . . . . . . . . . . . . . . . . . . .

78
79
79
80
81
81
82
82
83
83
84
85
85
86
87
88
89
92
92
93
94
94
95
96
96
97

Chapter 3
electricity and its fundamental
law

Scilab code Exa 3.1 resistance


1
2
3
4
5
6
7
8
9

// Example 3 . 1 // r e s i s t a n c e
clc ;
clear ;
close ;
// g i v e n d a t a :
V =230; // i n v o l t s
I =10; // i n A
R=V/I;
disp (R , r e s i s t a n c e o f e l e m e n t , R( ohm )= )

Scilab code Exa 3.2 voltage


1 // Example 3 . 2 // v o l t a g e
2 clc ;
3 clear ;
4 close ;

5
6
7
8
9
10
11
12

// g i v e n d a t a :
R1 =0.5; // minimum v a l u e o f r e s i s t a n c e i n ohm
R2 =20; // maximum v a l u e o f r e s i s t a n c e i n ohm
I =1.2; // c u r r e n t i n A
V1 = I * R1 ;
V2 = I * R2 ;
disp ( V1 , v o l t a g e d r o p i n I s t c a s e , V1 (V) = )
disp ( V2 , v o l t a g e d r o p i n I I n d c a s e , V2 (V) = )

Scilab code Exa 3.3 specific resistance


1
2
3
4
5
6
7
8
9
10
11

// Example 3 . 3 // r e s i s t a n c e
clc ;
clear ;
close ;
// g i v e n d a t a :
L =1000; // l e n g t h o f w i r e i n cm
d =0.14; // d i a m e t e r o f w i r e i n cm
R1 =2.5*10^6; // r e s i s t a n c e i n micro ohm
a =( %pi * d ^2) /4; // c r o s s s e c t i o n a r e a
p =( R1 * a ) / L ;
disp (p , t h e s p e c i f i c r e s i s t a n c e , p ( micro ohmcm ) = )

Scilab code Exa 3.4 resistance


1 // Example 3 . 4 // r e s i s t a n c e
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 Rt1 =54.3; //
r e s i s t a n c e i n ohm
7 alfa =0.0043; // t h e r e s i s t a n c e t e m p e r a t u r e o f

c o e f i c i e n t in per degree c e l c i u s
9

8 t1 =20; // t e m p e r a t u r e i n d e g r e e c e l c i u s
9 t2 =40; // t e m p e r a t u r e i n d e g r e e c e l c i u s
10 Rt2 =( Rt1 *(1+( alfa * t2 ) ) ) /(1+( alfa * t1 ) ) ;
11 disp ( Rt2 , r e s i s t a n c e a t 40 d e g r e e c e l s i u s , Rt2 ( ohm ) =

Scilab code Exa 3.5.a total resistance


1
2
3
4
5
6
7
8
9
10

// Example 3 . 5 . a // r e s i s t a n c e
clc ;
clear ;
close ;
// g i v e n d a t a :
r1 =30; //
r e s i s t a n c e i n ohm
r2 =35; //
r e s i s t a n c e i n ohm
r3 =45; //
r e s i s t a n c e i n ohm
R = r1 + r2 + r3 ;
disp (R , t o t a l r e s i s t a n c e , R( ohm ) = )

Scilab code Exa 3.5.b current flowing


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

// Example 3 . 5 . b // c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
r1 =30; //
r e s i s t a n c e i n ohm
r2 =35; //
r e s i s t a n c e i n ohm
r3 =45; //
r e s i s t a n c e i n ohm
R = r1 + r2 + r3 ;
V =220;
I=V/R;
disp (I , c u r r e n t , I (A) = )
10

Scilab code Exa 3.6 voltage


// Example 3 . 6 // v o l t a g e a t t h e g e n e r a t i n g s t a t i o n
clc ;
clear ;
close ;
// g i v e n d a t a :
I =75; // c u r r e n t i n A
R =0.15; // r e s i s t a n c e i n ohm
v =220; // v o l t a g e i n v o l t s
V1 = I * R ; // v o l t a g e d r o p o f t h e f e e d e r i n s e c t i o n AB
V2 = I * R ; // v o l t a g e d r o p o f t h e f e e d e r i n s e c t i o n CD
V_total = V1 + V2 ; // t o t a l v o l t a g e d r o p i n t h e l e a d and
return feeder
12 V = v + V_total ;
13 disp (V , v o l t a g e a t t h e g e n e r a t i n g s t a t i o n , V( v ) = )
1
2
3
4
5
6
7
8
9
10
11

Scilab code Exa 3.7 total resistance


1
2
3
4
5
6
7
8
9
10
11

// Example 3 . 7 // t o t a l r e s i s t a n c e
clc ;
clear ;
close ;
// g i v e n d a t a :
r1 =6; //
r e s i s t a n c e i n ohm
r2 =10; //
r e s i s t a n c e i n ohm
r3 =15; //
r e s i s t a n c e i n ohm
r =(1/ r1 ) +(1/ r2 ) +(1/ r3 ) ;
R =1/ r ;
disp (R , e q u i v a l e n t r e s i s t a n c e , R( ohm ) = )

11

Scilab code Exa 3.8 voltage


1 // Example 3 . 8 // v o l t a g e
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 I =5; // c u r r e n t i n A
7 n =2; // number o f r e s i s t a n c e

in p a r a l l e l of section

BC
r1 =15; //
r e s i s t a n c e i n ohm
r2 =20; //
r e s i s t a n c e i n ohm
r3 =60; //
r e s i s t a n c e i n ohm
r4 =64; //
r e s i s t a n c e i n ohm
r5 =64; //
r e s i s t a n c e i n ohm
r6 =2.5; //
r e s i s t a n c e i n ohm
R1 = r4 / n ; // e q u i v a l e n t r e s i s t a n c e o f s e c t i o n BC
R2 =( r1 * r2 * r3 ) /(( r1 * r2 ) +( r2 * r3 ) +( r3 * r1 ) ) ; //
e q u i v a l e n t r e s i s t a n c e o f s e c t i o n CD
16 R = R1 + R2 + r6 ; // e q u i v a l e n t r e s i s t a n c e o f s e c t i o n AD
17 V = I * R ;
18 disp (V , v o l t a g e , V( v ) = )

8
9
10
11
12
13
14
15

Scilab code Exa 3.9 effective resistance and current


1 // Example 3 . 9 // r e s i s t a n c e and c u r r e n t
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 V =240; // v o l t a g e i n v o l t s
7 r1 =2; // r e s i s t a n c e i n ohm

12

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

r2 =3; // r e s i s t a n c e i n ohm
r3 =8.8; // r e s i s t a n c e i n ohm
r4 =10; // r e s i s t a n c e i n ohm
r5 =3; // r e s i s t a n c e i n ohm
R1 =( r1 * r2 ) /( r1 + r2 ) ; // e q u i v a l e n t r e s i s t a n c e o f
p a r a l l e l branch
R2 = R1 + r3 ; // e q u i v a l e n t r e s i s t a n c e o f s e c t i o n ABC
R3 =( R2 * r4 ) /( R2 + r4 ) ;
R = R3 + r5 ; // t o t a l r e s i s t a n c e o f s e c t i o n AD
I=V/R;
V1 = I * r5 ; // v o l t a g e d r o p a c r o s s r 5
V2 =V - V1 ; // v o l t a g e d r o p a c r o s s s e c t i o n ABC
I1 = V2 / r4 ; // c u r r e n t f l o w i n g t h r o u g h r 4 r e s i s t a n c e
I2 =I - I1 ; // c u r r e n t i n r 3 r e s i s t a n c e
V3 = I2 * r3 ; // v o l t a g e d r o p a c r o s s r 3 r e s i s t a n c e ,
s e c t i o n ABC
V4 = V2 - V3 ; // v o l t a g e d r o p b e t w e e n s e c t i o n AB
I3 = V4 / r1 ; // c u r r e n t f l o w i n g t h r o u g h r 1 r e s i s t a n c e
I4 = V4 / r2 ; // c u r r e n t f l o w i n g t h r o u g h r 2 r e s i s t a n c e
disp ( I3 , c u r r e n t f l o w i n g t h r o u g h r 1 ( 2 ohms )
r e s i s t a n c e , I 3 (A) = )
disp ( I4 , c u r r e n t f l o w i n g t h r o u g h r 2 ( 3 ohms )
r e s i s t a n c e , I 4 (A) = )
disp (R , t o t a l r e s i s t a n c e , R( ohm ) = )
disp ( V1 , v o l t a g e d r o p a c r o s s r 5 ( 3 ohms ) r e s i s t a n c e ,
V1 (V) = )
disp ( V2 , v o l t a g e d r o p a c r o s s s e c t i o n ABC, V2 (V) = )
disp ( V3 , v o l t a g e d r o p a c r o s s r 3 r e s i s t a n c e ( 8 . 8 ohms )
, V3 (V) = )
disp ( V4 , v o l t a g e d r o p b e t w e e n s e c t i o n AB, V4 (V) = )

Scilab code Exa 3.10 current


1 // Example 3 . 1 0 // c u r r e n t
2 clc ;

13

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

clear ;
close ;
// g i v e n d a t a :
I =44; // c u r r e n t i n A
r1 =6; // r e s i s t a n c e i n ohm
r2 =12; // r e s i s t a n c e i n ohm
r3 =18; // r e s i s t a n c e i n ohmr1
a =(1/ r1 ) +(1/ r2 ) +(1/ r3 ) ;
R =1/ a ;
V=I*R;
i1 = V / r1 ;
i2 = V / r2 ;
i3 = V / r3 ;
disp ( i1 , c u r r e n t i n 6 ohm r e s i s t a n c e , i 1 (A) = )
disp ( i2 , c u r r e n t i n 12 ohm r e s i s t a n c e , i 2 (A) = )
disp ( i3 , c u r r e n t i n 18 ohm r e s i s t a n c e , i 3 (A) = )

Scilab code Exa 3.11.a unknow resistance


// Example 3 . 1 1 . A // RESISTANCE
clc ;
clear ;
close ;
t =15; //TOTAL CURRENT IN AMPERES
i1 =2; //CURRENT THROUGH UNKNOWN RESISTANCE
R1 =15; // i n ohms
R2 =50/2; // i n ohms
x =( t - i1 ) *(( R1 * R2 ) /( R1 +2* R2 ) ) ; // unknown r e s i s t a n c e i n
ohms )
10 disp (x , unknown r e s i s t a n c e i n ohms )
1
2
3
4
5
6
7
8
9

Scilab code Exa 3.11.b potential drop


14

1
2
3
4
5
6
7
8
9
10
11

// Example 3 . 1 1 . B // p o t e n t i a l d r o p a c r o s s t h e
circuit
clc ;
clear ;
close ;
t =15; //TOTAL CURRENT IN AMPERES
i1 =2; //CURRENT THROUGH UNKNOWN RESISTANCE
R1 =15; // i n ohms
R2 =50/2; // i n ohms
x =( t - i1 ) *(( R1 * R2 ) /( R1 +2* R2 ) ) ; // unknown r e s i s t a n c e i n
ohms
PD = i1 * x ; // i n v o l t s
disp ( PD , p o t e n t i a l d r o p a c r o s s t h e c i r c u i t i n v o l t s
i s )

Scilab code Exa 3.11.c current


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

// Example 3 . 1 1 . C // CURRENT IN EACH RESISTANCE


clc ;
clear ;
close ;
t =15; //TOTAL CURRENT IN AMPERES
i1 =2; //CURRENT THROUGH UNKNOWN RESISTANCE
R1 =15; // i n ohms
R2 =50/2; // i n ohms
x =( t - i1 ) *(( R1 * R2 ) /( R1 +2* R2 ) ) ; // unknown r e s i s t a n c e i n
ohms
PD = i1 * x ; // i n v o l t s
i5 = PD /(2* R2 ) ; // c u r r e n t i n 5 ohms r e s i s t a n c e
i15 = PD / R1 ; // c u r r e n t i n 15 ohms r e s i s t a n c e
disp ( i5 , c u r r e n t i n 5 ohms r e s i s t a n c e i n ampere )
disp ( i15 , c u r r e n t i n 15 ohms r e s i s t a n c e i n ampere )

15

Scilab code Exa 3.11.d total resistance


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

// Example 3 . 1 1 . d // t o t a l r e s i s t a n c e
clc ;
clear ;
close ;
t =15; //TOTAL CURRENT IN AMPERES
i1 =2; //CURRENT THROUGH UNKNOWN RESISTANCE
R1 =15; // i n ohms
R2 =50/2; // i n ohms
x =( t - i1 ) *(( R1 * R2 ) /( R1 +2* R2 ) ) ; // unknown r e s i s t a n c e i n
ohms
PD = i1 * x ; // i n v o l t s
RX =((1/ R1 ) +(1/(2* R2 ) ) +(1/ x ) ) ; //
R =1/ RX ; //
disp (R , 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 i n ohms )

16

Chapter 4
Work power and energy

Scilab code Exa 4.1.b power lost


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

// Example 4 . 1 . b // power l o s t
clc ;
clear ;
close ;
// g i v e n d a t a :
I =11; // c u r r e n t i n A
V1 =55; // v o l t a g e i n V
V2 =220; // v o l t a g e i n V
V = V2 - V1 ;
R=V/I;
P = I ^2* R ;
disp (P , power l o s t , P(W) = )

Scilab code Exa 4.1 resistance


1 // Example 4 . 1 . a // r e s i s t a n c e
2 clc ;
3 clear ;

17

4
5
6
7
8
9
10
11

close ;
// g i v e n d a t a :
I =11; // c u r r e n t i n A
V1 =55; // v o l t a g e i n V
V2 =220; // v o l t a g e i n V
V = V2 - V1 ;
R=V/I;
disp (R , r e s i s t a n c e , R( ohm ) = )

Scilab code Exa 4.2 resistance


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

// Example 4 . 2 : r e s i s t a n c e o f e a c h c o i l
clc ;
clear ;
close ;
// g i v e n d a t a :
V =300; // v o l t a g e i n v o l t s
W =360; // power l o s t i n one c o i l i n w a t t
I =6; // c u r r e n t i n A
R1 = V / I ;
R = V ^2/ W ;
a =(1/ R1 ) -(1/ R ) ;
r2 =1/ a ;
disp (R , r e s i s t a n c e o f 360W c o i l 1 , R( ohm ) = )
disp ( r2 , r e s i s t a n c e o f s e c o n d c o i l 2 , r 2 ( ohm ) = )

Scilab code Exa 4.3 resistance


1 // Example 4 . 3 :
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :

resistance

18

6
7
8
9
10
11
12
13

W1 =100; // i n w a t t
E =110; // i n v o l t s
W2 =60; // i n w a t t
I1 = W1 / E ; // c u r r e n t t a k e n by 100 w lamp
I2 = W2 / E ; // c u r r e n t t a k e n by 60W lamp
I = I1 - I2 ;
R=E/I;
disp (R , r e s i s t a n c e , R( ohm ) = )

Scilab code Exa 4.4.a power taken in parallel case


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

// Example 4 . 4 . a : power i n c a s e o f p a r a l l e l
clc ;
clear ;
close ;
// g i v e n d a t a :
w =100; // i n w a t t
V =220; // v o l t a g e i n v o l t s
R1 = V ^2/ w ;
R = R1 /2; // 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
I=V/R;
W = I ^2* R ;
disp (W , power i n c a s e o f p a r a l l e l ,W( w a t t ) = )

Scilab code Exa 4.4.b power taken in series case


1 // Example 4 . 4 . b : power i n c a s e o f
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 w =100; // i n w a t t
7 V =220; // v o l t a g e i n v o l t s

19

series

8
9
10
11
12
13

R1 = V ^2/ w ;
R2 = V ^2/ w ;
R = R1 + 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
I=V/R;
W = I ^2* R ;
disp (W , power i n c a s e o f s e r i e s ,W( w a t t ) = )

Scilab code Exa 4.5.a total load


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

// Example 4 . 5 . a : t o t a l l o a d
clc ;
clear ;
close ;
// g i v e n d a t a :
l =300; // number o f lamps
w1 =60; // i n w a t t
W1 = w1 * l ; // w a t t a g e r e q u i r e d f o r 300 lamps , 60 w a t t
each
w2 =40; // i n w a t t
f =100; // number o f f a n
W2 = w2 * f ; // w a t t a g e r e q u i r e d f o r 100 f a n s , 40 w a t t
each
W =( W1 + W2 ) *10^ -3;
disp (W , t o t a l l o a d ,W( k i l o w a t t ) = )

Scilab code Exa 4.5.b current taken


1 // Example 4 . 5 . b : c u r r e n t t a k e n by l o a d
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 V =220; // v o l t a g e i n v o l t s

20

7
8
9
10
11
12
13
14
15

l =300; // number o f lamps


w1 =60; // i n w a t t
W1 = w1 * l ;
w2 =40; // i n w a t t
f =100; // number o f f a n
W2 = w2 * f ;
W =( W1 + W2 ) *10^ -3;
I =( W *1000) / V ;
disp (I , c u r r e n t , I (A) = )

Scilab code Exa 4.6 total cots of electric energy and total charges of bill
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

// Example 4 . 6 // t o t a l c o s t o f e l e c r i c c h a r g e
clc ;
clear ;
close ;
nl =12; // no . o f lamps
wl =100; // w a t t a g e o f lamps
hl =6; // e a c h lamps work 6 h o u r s a d a y s
w12 = wl * nl * hl ; // w a t t a g e o f 12 lamps i n Wh
nf =6; // no . o f f a n s
wf =60; // w a t t a g e o f f a n s
hf =5; // e a c h f a n s work 5 h o u r s a d a y s
w6 = wf * nf * hf ; // w a t t a g e o f 12 f a n s i n Wh
nc =2; // no . o f e l e c t r i c c o o k e r s
wc =1500; // w a t t a g e o f e l e c t r i c c o o k e r s
hc =4; // e a c h e l e c t r i c c o o k e r s work 4 h o u r s a d a y s
w2 = wc * nc * hc ; // w a t t a g e o f 2 e l e c t r i c c o o k e r s i n Wh
ng =2; // no . o f g y s e r s
wg =1000; // w a t t a g e o f e a c h g y s e r
hg =3; // e a c h g y s e r w o r k s 3 h o u r s a day
w21 = wg * hg * ng ; // t o t a l w a t t a g e o f g y s e r s i n Wh
tcg =( w12 + w6 ) *10^ -3; //TOTAL WATTAGE OF LAMPS AND FANS
Ccg =40; // IN PAISA
Ecg = ( tcg * Ccg *30) /100; //TOTAL ENERGY CHARGES @40
21

24
25
26
27
28
29
30

PAISA PER UNIT


tcg1 =( w2 + w21 ) *10^ -3; //TOTAL WATTAGE OF COOKERS AND
GYSERS
Ccg1 =35; // IN PAISA
Ecg1 = ( tcg1 * Ccg1 *30) /100; //TOTAL ENERGY CHARGES @35
PAISA PER UNIT
tc = Ecg + Ecg1 ; // IN RUPPES
disp ( Ecg , t o t a l c o s t o f e l e c t r i c c h a r g e @40 p a i s a
per unit in rupees )
disp ( Ecg1 , t o t a l c o s t o f e l e c t r i c c h a r g e @35 p a i s a
per unit in rupees )
disp ( tc , t o t a l c h a r g e f o r l i g h and power i n r u p e e s )

Scilab code Exa 4.7 voltage current power and bill amount
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

// Example 4 . 7 // t o t a l c o n s u m p t i o n o f f a c t o r y i n
k i l l o watts
clc ;
clear ;
close ;
nl =400; // no . o f lamps
wl =100; // w a t t a g e o f lamps
w400 = wl * nl ; // w a t t a g e o f 400 lamps i n W
nf =100; // no . o f f a n s
wf =40; // w a t t a g e o f f a n s
w6 = wf * nf ; // w a t t a g e o f 100 f a n s i n W
nc =200; // no . o f w a l l s c o k e t s
wc =60; // w a t t a g e o f w a l l s c c k e t s
w2 = wc * nc ; // w a t t a g e o f 200 w a l l s o c k e t s i n Wh
tc = w400 + w6 + w2 ; // t o t a l c o n s u m p t i o n i n kW
tc = w400 + w6 + w2 ; // t o t a l c o n s u m p t i o n i n kW
h =5; // h o u r s
ll = tc *10^ -3* h ; // l i g h t n i n g l o a d i n kWh
V =250; // i n v o l t s
I =20; // i n a m p e r e s
22

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

Ml = V * I *10^ -3; // m i s c e l l a n e o u s l o a d s i n kW
Ml = V * I *10^ -3; // m i s c e l l a n e o u s l o a d s i n kW
hm =2; // h o u r s
hl =50; // h e a t i n g l o a d i n kW
Mhp =40; //BNHP
Mo = ((50*80*746) /(100*1000) ) ; //MOTOR AT 80% LOAD IN
Kw
tl = tc *10^ -3+ Ml + hl + Mo ; // t o t a l l o a d i n kW
disp ( tl , t o t a l l o a d i s , (kW)= )
It = ( tl *10^3) / V ; // t o t a l c u r r e n t t a k e n buy t h e
f a c t o r y i n amperes
disp ( It , t o t a l c u r r e n t t a k e n by t h e f a c t o r y i s , ( A)=
)
r =0.03; // IN OHMS
Vc = It * r ; // v o l t a g e d r o p i n t h e c a b l e
Vs = Vc + V ; // v o l t a g e a t t h e s e n d i n g end o f t h e f e e d e r
in volts
disp ( Vs , v o l t a g e a t t h e s e n d i n g end o f t h e f e e d e r i s
, ( V) )
r =0.03; // IN OHMS
Vc = It * r ; // v o l t a g e d r o p i n t h e c a b l e
Pw = It ^2* r ; // power w a s t e d i n kW
disp ( Pw *10^ -3 , power w a s t e d i s , (kW) )
Mlh = Ml * hm ; // m i s c e l l a n e o u s l o a d i n kWh
te = Mlh + ll ; //TOTAL ENERGY COSNUMED PER DAY
Nu = te *6; //NO. OF UNITS
Ec =( Nu *30) /100; // ENERGY CHARGE @30 PAISA PER UNIT
eCM = Ec +2+34.80; //TOTAL CHARGE AFTER TAX AND RENT IN
RUPEES
hl =50; // h e a t i n g l o a d i n kW
hlh =50*4; // h e a t i n g l o a d i n kWh
Moh = Mo *8; //MOTOR LOAD IN kWh
TEP = hlh + Moh ; // t o t a l e n e r g y p e r day
tepl = TEP *6; // t o t a l e n e r g y i n 6 d a y s
tepc =( tepl *35) /100; // e n e r g y c h a r g e s @35 p a i s a p e r
unit in rupees
tepcl = tepc +50+78.96; // t o t a l c h a r g e s i n r u p e s s
disp ( eCM , t o t a l l i g h t n i n g c h a r g e s i n c l u d i n g m e t e r
23

r e n t and e l e c t r i c y t a x i s , ( Rs )= )
51 disp ( tepcl , t o t a l power c h a r g e s i n c l u d i n g m e t e r r e n t
and e l e c t r i c y t a x i s , ( Rs )= )
52 gt = tepcl + eCM ; //
53 disp ( gt , g r a n d t o t a l o f b i l l s i s , ( Rs )= )

Scilab code Exa 4.8 current taken


1
2
3
4
5
6
7
8
9
10
11

// Example 4 . 8 : c u r r e n t t a k e n by l o a d
clc ;
clear ;
close ;
// g i v e n d a t a :
V =250; // v o l t a g e i n v o l t s
L =5*746; // 1 hp=746 w a t t
eta =80; // e f i c i e n c y o f motor i n %
Input =( L *100) /80;
I = Input / V ;
disp (I , c u r e e n t , I (A) = )

Scilab code Exa 4.9 amount of bills


1
2
3
4
5
6
7
8
9
10
11

// Example 4 . 9 // t o t a l o f b i l l s
clc ;
clear ;
close ;
p =30; // h o r s e power o f motor
r =24; // r u p e e s p e r kWh
ec =35; // p a i s a p e r u n i t
n =80; // p e r c e n t a g e o f l o a d
t =8; // i n h o u r s
d =25; // t o t a l d a y s
ne =96; // e f f i c i e n c y o f motor i n p e r c e n t a g e
24

mo =( n * p ) /100; // o u t p u t o f motor a t 80% o f l o a d


mi =( mo *100*746) /( ne ) ; // i n p u t o f motor i n w a t t s
ecm = mi *10^ -3* t * d ; // e n e r g y consumed i n a month
ecu =( ecm *35) /100; // e n e r g y c h a r g e s
mid =(30*100*746) /( ne *1000) ; // i n p u t o f motor i n kW a t
demanded
17 ecud =( mid *24) ; // demanded c o n n e c t i o n i n r u p e e s
18 ta = ecu + ecud ; // t o t a l b i l l i n r u p e e s
19 disp ( ta , t o t a l b i l l i n r u p e e s i s )

12
13
14
15
16

Scilab code Exa 4.10.a total load of light and fans


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

// Example 4 . 1 0 . a // t o t a l l o a d o f l i g h t s and f a n s
clc ;
clear ;
close ;
lp =50; // no . o f l i g h t p o i n t s
lw =60; // w a t t a g e o f l i g h t p o i n t s
fp =20; // no . o f f a n p o i n t s
fw =100; // w a t t a g e o f f a n p o i n t s
wpp =10; // no . o f w a l l p l u g p o i n t s
wppw =60; // w a t t a g e o f w a l l p l u g p o i n t s
bp =5; // no . o f b e l l p o i n t s
bpw =40; // w a t t a g e o f b e l l p o i n t s
ppp =8; // power p l u g p o i n t s
pppw =5000; // w a t t a g e o f power p l u g p o i n t s
lpw = lp * lw ; // w a t t a g e o f 50 lamps
fpw = fp * fw ; // w a t t a g e o f 20 f a n s
wpppw = wpp * wppw ; // w a t t a g e o f w a l l p l u g p o i n t s
bpww = bp * bpw ; // w a t t a g e o f b e l l p o i n t s
tl = lpw + fpw + wpppw + bpww ; // t o t a l w a t t a g e
disp ( tl , t o t a l w a t t a g e o f l i g h t n i n g l o a d i s i n w a t t s
)

25

Scilab code Exa 4.10.b total load current


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

// Example 4 . 1 0 . b // t o t a l l o a d o f power c o n n e c t i o n
clc ;
clear ;
close ;
V =400; // t h r e e p h a s e v o l t a g e
lp =50; // no . o f l i g h t p o i n t s
lw =60; // w a t t a g e o f l i g h t p o i n t s
fp =20; // no . o f f a n p o i n t s
fw =100; // w a t t a g e o f f a n p o i n t s
wpp =10; // no . o f w a l l p l u g p o i n t s
wppw =60; // w a t t a g e o f w a l l p l u g p o i n t s
bp =5; // no . o f b e l l p o i n t s
bpw =40; // w a t t a g e o f b e l l p o i n t s
ppp =8; // power p l u g p o i n t s
pppw =500; // w a t t a g e o f power p l u g p o i n t s
lpw = lp * lw ; // w a t t a g e o f 50 lamps
fpw = fp * fw ; // w a t t a g e o f 20 f a n s
wpppw = wpp * wppw ; // w a t t a g e o f w a l l p l u g p o i n t s
bpww = bp * bpw ; // w a t t a g e o f b e l l p o i n t s
tl = lpw + fpw + wpppw + bpww ; // t o t a l w a t t a g e
ppppw = ppp * pppw ; // w a t t a g e o f power p l u g p o i n t s
tw = tl + ppppw ; // t o t a l w a t t a g e
Il =( tl / V ) ; // CURRENT THROUGH LIGHTNING LOAD
Ip = ppppw / V ; // c u r r e n t t h r o u g h power l o a d
ttl = Il + Ip ; // t o t a l l o a d c u r e n t
disp ( ttl , t o t a l l o a d c u r r e n t i n a m p e r e s )

Scilab code Exa 4.11 horsepower of the motor


1

// Example 4 . 1 1 : h o r s e power
26

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

clc ;
clear ;
close ;
// g i v e n d a t a :
h =30; // i n m
Fl =10; // f r i c t i o n l o s s i n %
Hl =( Fl /100) * h ;
total_H = h + Hl ;
eta =90; // e f i c i e n c y o f pump
w =1000; // w a t e r w e i g h t i n kg
flow_rate =243; // i n p e r h o u r
W_done =( flow_rate * w * total_H ) /60; // i n kgm/ min
output = W_done /4500; // o u t p u t o f pump i n hp
in =( output *100) / eta ;
O = in ;
disp (O , o u t p u t o f t h e motor , O( hp ) = )

Scilab code Exa 4.12.a Bhp of the motor


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

// Example 4 . 1 2 . a : BHP o f t h e motor


clc ;
clear ;
close ; n =80; // e f f i c i e n c y
l =7.5; // l o a d i n t o n n e s
h =135; // h e i g h t i n m e t e r s
c =0.5; // c g e w e i g h t i n t o n n e s
b =3; // b a l a n c e w e i g h t i n t o n n e s
td =90; // t i m e i n s e c o n d s
onet =1000; // i n kg
onehp =746; // w a t t
wl = l +c - b ; // w e i g h t l i f t e d d u r i n g upward j o u r n e y i n
tonnes
14 wld =b - c ; // w e i g h t l i f t e d d u r i n g downward j o u r n e y i n
tonnes
27

15 wdu =( wl *10^3* h *60) / td ; // work done by t h e

l i f t per

m i n u t e d u r i n g upward j o u r n e y
16 wdd =( wld *10^3* h *60) / td ; // work done by t h e
17
18
19
20
21
22

l i f t per

m i n u t e d u r i n g downward j o u r n e y
mou = wdu /4500; // i n hp
miu =( mou *100*746) /( n *1000) ; // i n p u t o f motor i n kW
mod = wdd /4500; // i n hp
mid =( mod *100*746) /( n *1000) ; // i n p u t o f motor i n kW
disp ( mou , BHP o f t h e motor i n upward j o u r n e y i n hp )
disp ( mod , BHP o f t h e motor i n downward j o u r n e y i n hp
)

Scilab code Exa 4.12.b cost of the energy


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

// Example 4 . 1 2 . b : c o s t o f t h e e n e r g y
clc ;
clear ;
close ; n =80; // e f f i c i e n c y
l =7.5; // l o a d i n t o n n e s
h =135; // h e i g h t i n m e t e r s
c =0.5; // c g e w e i g h t i n t o n n e s
b =3; // b a l a n c e w e i g h t i n t o n n e s
td =90; // t i m e i n s e c o n d s
onet =1000; // i n kg
onehp =746; // w a t t
wl = l +c - b ; // w e i g h t l i f t e d d u r i n g upward j o u r n e y i n
tonnes
wld =b - c ; // w e i g h t l i f t e d d u r i n g downward j o u r n e y i n
tonnes
wdu =( wl *10^3* h *60) / td ; // work done by t h e l i f t p e r
m i n u t e d u r i n g upward j o u r n e y
wdd =( wld *10^3* h *60) / td ; // work done by t h e l i f t p e r
m i n u t e d u r i n g downward j o u r n e y
mou = wdu /4500; // i n hp
miu =( mou *100*746) /( n *1000) ; // i n p u t o f motor i n kW
28

18
19
20
21
22
23
24

mod = wdd /4500; // i n hp


mid =( mod *100*746) /( n *1000) ; // i n p u t o f motor i n kW
tc = miu + mid ; // t o t a l e n e r g y c o n s u m p t i o n i n kW
Eh = tc *10; // t o t a l e n e r g y c o n s u p t i o n p e r h o u r
rate =40; // r a t e i n p a i s a
ce = Eh *( rate /100) ; // c o s t o f e n e r g y i n r u p e e s
disp ( ce , c o s t o f e n e r g y i n r u p e e s i s )

29

Chapter 5
effects of electric current

Scilab code Exa 5.1 ECE of silver


1
2
3
4
5
6
7
8
9
10

// Example 5 . 1 : E . C . E
clc ;
clear ;
close ;
// g i v e n d a t a :
t =200; // t i m e i n s e c
M =111.83; // s i l v e r i n mg
I =0.5; // c u r r e n t i n A
Z =( M /( I * t *1000) ) *1000; // e l e c t r o c h e m i c a l e q u i v a l e n t
disp (Z , E . C . E , Z (mg/C) = )

Scilab code Exa 5.2 thickness of coper


1 // Example 5 . 2 :
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :

thickness

30

6
7
8
9
10
11
12
13

Z =0.329*10^ -3; // IN g /C
I =1; // i n a m p e r e s
t =90*60; // i n s e c o n d s
M = Z * I * t ; // i n grams
A =200; // a r e a i n c e n t i m e t e s q u a r e
S =8.9; // d e n s i t y i n g / c c
T =( M ) /(2* A * S ) ; // t h i c k n e s s i n cm
disp (T , t h i c k n e s s o f c o p p e r i n cm i s )

Scilab code Exa 5.3 resistance


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

// Example 5 . 3 // r e s i s t a n c e o f t h e h e a t e r e l e m e n t
clc ;
clear ;
close ;
w =15; // i n kg
t1 =15; // i n d e g r e e c e l s i u s
t2 =100; // i n d e g r e e c e l s i u s
t =25; // t i m e i n m i n u t e s
I =10; // i n ampere
n =85; // e f f i c i e n c y o f c o n v e r s i o n i n p e r c e n t a g e
ho = w *( t2 - t1 ) ; // o u t p u t h e a t r e q u i r e d i n k c a l
R =(( ho *4187*100) /( I ^2* t *60* n ) ) ; // r e s i s t a n c e i n ohms
disp (R , r e s i s t a n c e i n ohms )

Scilab code Exa 5.4 potential difference


1
2
3
4
5

// Example 5 . 4 // p o t e n t i a l d i f f e r e n c e a c r o s s t h e
heater element
clc ;
clear ;
close ;
w =20; // i n kg
31

6
7
8
9
10
11
12
13

t1 =10; // i n d e g r e e c e l s i u s
t2 =90; // i n d e g r e e c e l s i u s
t =2*3600+19*60+34; // t i m e i n s e c o n d s
I =4; // i n ampere
n =80; // e f f i c i e n c y o f c o n v e r s i o n i n p e r c e n t a g e
ho = w *( t2 - t1 ) ; // o u t p u t h e a t r e q u i r e d i n k c a l
V =(( ho *4187*100) /( I * t * n ) ) ; // POTENTIAL DROP IN VOLTS
disp (V , p o t e n t i a l d r o p a c r o s s h e a t e r e l e m e n t i n
v o l t s i s )

32

Chapter 6
magnetism and
electromagnetism

Scilab code Exa 6.1 field strength


1
2
3
4
5
6
7
8
9

// Example 6 . 1 // f i e l d s t r e n g t h
clc ;
clear ;
close ;
I =1.5; // i n a m p e r e s
n =50; // t u r n s
l =0.25; // l e n g t h o f c o i l i n m e t e r
H =( I * n ) / l ; // f i e l d s t r e n g t h i n amperet u r n s /m
disp (H , f i e l d s t r e n g t h i n amperet u r n s /m )

Scilab code Exa 6.2 force


1 // Example 6 . 2 // f o r c e
2 clc ;
3 clear ;
4 close ;

33

5
6
7
8
9

I =70; // i n a m p e r e s
B =0.4; // f l u s d e n s i t y i n Wb/m2
n =1; // t u r n s
F = B * n * I ; // i n newton
disp (F , f o r c e i n n e w t o n s i s )

Scilab code Exa 6.3 emf induced


1
2
3
4
5
6
7
8
9
10
11

// Example 6 . 3 // emf i n d u c e d
clc ;
clear ;
close ;
b =2; // i n Wb/m2
l =6; // i n cm
s =0.75; // i n m s
alpha =90; //
emf = b * l * s *( sind ( alpha ) ) ; //
disp ( emf , emf i n d u c e d i n v o l t s i s )

34

Chapter 7
DC generators

Scilab code Exa 7.1.a emf induced


// Example 7 . 1 . a : e .m. f
clc ;
clear ;
close ;
// g i v e n d a t a :
p =8; // number o f p o l e s
a = p ; // i n l a p w i n d i n g
fi =15*10^ -3; // i n wb
N =500; // r e v / min
Z =800; // number o f c o n d u c t o r s on a r m a t u r e
emf =( fi * Z * N * p ) /(60* a ) ; // when t h e a r m a t u r e i s l a p
wound
12 disp ( emf , emf (V) = )
1
2
3
4
5
6
7
8
9
10
11

Scilab code Exa 7.1.b emf generated


1 // Example 7 . 1 . b : e .m. f
2 clc ;

i f t h e a r m a t u r e i s wave wound

35

3
4
5
6
7
8
9
10
11

clear ;
close ;
// g i v e n d a t a :
p =8; // number o f p o l e s
a =2; // i n wave w i n d i n g
fi =15*10^ -3; // i n wb
N =500; // r e v / min
Z =800; // number o f c o n d u c t o r s on a r m a t u r e
emf =( fi * Z * N * p ) /(60* a ) ; // when t h e a r m a t u r e i s wave
wound
12 disp ( emf , emf (V) = )

Scilab code Exa 7.2.a total armature current


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

// Example 7 . 2 . a : t o t a l a r m a t u r e c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
Vt =200; // t e r m i n a l v o l t a g e i n v o l t s
Rsh =100; // s h u n t f i e l d r e s i s t a n c e
i n ohm
Ra =0.1; // a r m a t u r e r e s i s t a n c e i n ohm
l =60; // number o f lamps
w =40; // i n w a t t
total_l = l * w ; // i n w a t t
Il = total_l / Vt ; // l o a d c u r r e n t
Ish = Vt / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = Il + Ish ;
disp ( Ia , a r m a t u r e c u r r e n t , I a (A) = )

Scilab code Exa 7.2.b current per armature path


1

// Example 7 . 2 . b : c u r r e n t p e r a r m a t u r e p a t h
36

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

clc ;
clear ;
close ;
// g i v e n d a t a :
Vt =200; // t e r m i n a l v o l t a g e i n v o l t s
Rsh =100; // s h u n t f i e l d r e s i s t a n c e
i n ohm
Ra =0.1; // a r m a t u r e r e s i s t a n c e i n ohm
l =60; // number o f lamps
w =40; // i n w a t t
total_l = l * w ; // i n w a t t
Il = total_l / Vt ; // l o a d c u r r e n t
Ish = Vt / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = Il + Ish ;
N =4; // number o f p o l e s
I = Ia / N ;
disp (I , c u r r e n t p e r p a t h i n a a r m a t u r e , I (A) = )

Scilab code Exa 7.2.c emf generated


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

// Example 7 . 2 . c : emf
clc ;
clear ;
close ;
// g i v e n d a t a :
Vt =200; // t e r m i n a l v o l t a g e i n v o l t s
Rsh =100; // s h u n t f i e l d r e s i s t a n c e
i n ohm
Ra =0.1; // a r m a t u r e r e s i s t a n c e i n ohm
l =60; // number o f lamps
w =40; // i n w a t t
total_l = l * w ; // i n w a t t
Il = total_l / Vt ; // l o a d c u r r e n t
Ish = Vt / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = Il + Ish ;
N =4; // number o f p o l e s
I = Ia / N ;
37

17 Va = Ia * Ra ; // a r m a t u r e v o l t a g e d r o p
18 Vb =1+1; // b r u s h c o n t a c t d r o p f o r 2 p a i r
19 E = Vt + Va + Vb ;
20 disp (E , emf , E( v ) = )

Scilab code Exa 7.3.a terminal voltage


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

// Example 7 . 3 . a : t e r m i n a l v o l t a g e
clc ;
clear ;
close ;
// g i v e n d a t a :
W =10; // o u t p u t o f t h e g e n e r a t o r i n kw
V =250; // v o l t a g e i n v o l t s
R =0.07; // i n ohm
Il =( W *1000) / V ; // l o a d c u r r e n t i n A
Vf = Il * R ; // v o l t a g e d r o p i n f e e d e r
Vt = V + Vf ;
disp ( Vt , t e r m i n a l v o l t a g e , Vt (V) = )

Scilab code Exa 7.3.b emf generated


1
2
3
4
5
6
7
8
9
10
11

// Example 7 . 3 . b : emf
clc ;
clear ;
close ;
// g i v e n d a t a :
W =10; // o u t p u t o f t h e g e n e r a t o r i n kw
V =250; // v o l t a g e i n v o l t s
R =0.07; // i n ohm
Il =( W *1000) / V ; // l o a d c u r r e n t i n A
Vf = Il * R ; // v o l t a g e d r o p i n f e e d e r
Vt = V + Vf ; // t e r m i n a l v o l t a g e
38

of poles

12
13
14
15
16
17
18
19

Rsh =63.2; // s h u n t r e s i s t a n c e i n ohm


Ra =0.05; // a r m a t u r e r e s i s t a n c e i n ohm
Vb =2; // b r u s h c o n t a c t d r o p
Ish = Vt / Rsh ;
Ia = Il + Ish ;
Vd = Ia * Ra ; // v o l t a g e d r o p i n t h e a r m a t u r e
E = Vt + Vd + Vb ;
disp (E , emf , E(V) = )

Scilab code Exa 7.4.a terminal voltage


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

// Example 7 . 4 . a : t e r m i n a l v o l t a g e
clc ;
clear ;
close ;
// g i v e n d a t a :
W =20000; // i n w a t t
V =200; // i n v o l t s
R =0.08; // i n ohm
Rs =0.02; // s e r i e s f i e l d r e s i s t a n c e i n ohm
I = W / V ; // i n A
Vf = I * R ;
Vs = I * Rs ;
V1 = Vf + Vs ; // v o l t a g e d r o p o f f e e d e r and s e r i e s
Vg = V + V1 ;
disp ( Vg , t e r m i n a l v o l t a g e , Vg (V) = )

Scilab code Exa 7.4.b emf generated


1 // Example 7 . 4 . b : emf g e n e r a t e d
2 clc ;
3 clear ;
4 close ;

39

field

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

// g i v e n d a t a :
W =20000; // i n w a t t
V =200; // i n v o l t s
R =0.08; // i n ohm
Rs =0.02; // s e r i e s f i e l d r e s i s t a n c e
I = W / V ; // i n A
Rsh =42; // s h u n t i e l d r e s i s t a n c e i n
Ra =0.04; // a r m a t u r e r e s i s t a n c e i n
Vf = I * R ;
Vs = I * Rs ;
V1 = Vf + Vs ; // v o l t a g e d r o p o f f e e d e r
Vg = V + V1 ; // t e r m i n a l v o l t a g e
Ish = Vg / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
Vd = Ia * Ra ;
emf = Vg + Vd ;
disp ( emf , emf (V) = )

i n ohm
ohm
ohm

and s e r i e s

field

// Example 7 . 4 . c : c o p p e r l o s s e s
clc ;
clear ;
close ;
// g i v e n d a t a :
W =20000; // e l e c t r i c a l o u t p u t i n w a t t
V =200; // i n v o l t s
R =0.08; // i n ohm
Rs =0.02; // s e r i e s f i e l d r e s i s t a n c e i n ohm
I = W / V ; // i n A
Rsh =42; // s h u n t i e l d r e s i s t a n c e i n ohm
Ra =0.04; // a r m a t u r e r e s i s t a n c e i n ohm
Vf = I * R ;
Vs = I * Rs ;
V1 = Vf + Vs ; // v o l t a g e d r o p o f f e e d e r and s e r i e s

field

Scilab code Exa 7.4.c copper losses


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

40

16
17
18
19
20
21
22
23

Vg = V + V1 ; // t e r m i n a l v o l t a g e
Ish = Vg / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
Vd = Ia * Ra ;
emf = Vg + Vd ;
Ed = emf * Ia ; // i n w a t t
copper_losses = Ed - W ;
disp ( copper_losses , c o p p e r l o s s e s ( Watt ) = )

Scilab code Exa 7.4.d Bhp metric of the primemover


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

// Example 7 . 4 . d : bhp m e t r i c o f t h e primemover


clc ;
clear ;
close ;
// g i v e n d a t a :
W =20000; // e l e c t r i c a l o u t p u t i n w a t t
V =200; // i n v o l t s
R =0.08; // i n ohm
Rs =0.02; // s e r i e s f i e l d r e s i s t a n c e i n ohm
I = W / V ; // i n A
Rsh =42; // s h u n t i e l d r e s i s t a n c e i n ohm
Ra =0.04; // a r m a t u r e r e s i s t a n c e i n ohm
iron_losses =309.5; // i r o n and f r i c t i o n l o s s e s
Vf = I * R ;
Vs = I * Rs ;
V1 = Vf + Vs ; // v o l t a g e d r o p o f f e e d e r and s e r i e s
Vg = V + V1 ; // t e r m i n a l v o l t a g e
Ish = Vg / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
Vd = Ia * Ra ;
emf = Vg + Vd ;
Ed = emf * Ia ; // i n w a t t
copper_losses = Ed - W ;
mech_in = W + copper_losses + iron_losses ;
41

field

25 Bhp = mech_in /735.5;


26 disp ( Bhp , bhp m e t r i c o f t h e primemover , Bhp = )

Scilab code Exa 7.4.e commercial efficiency


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

// Example 7 . 4 . d : bhp m e t r i c o f t h e primemover


clc ;
clear ;
close ;
// g i v e n d a t a :
W =20000; // e l e c t r i c a l o u t p u t i n w a t t
V =200; // i n v o l t s
R =0.08; // i n ohm
Rs =0.02; // s e r i e s f i e l d r e s i s t a n c e i n ohm
I = W / V ; // i n A
Rsh =42; // s h u n t i e l d r e s i s t a n c e i n ohm
Ra =0.04; // a r m a t u r e r e s i s t a n c e i n ohm
iron_losses =309.5; // i r o n and f r i c t i o n l o s s e s
Vf = I * R ;
Vs = I * Rs ;
V1 = Vf + Vs ; // v o l t a g e d r o p o f f e e d e r and s e r i e s f i e l d
Vg = V + V1 ; // t e r m i n a l v o l t a g e
Ish = Vg / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
Vd = Ia * Ra ;
emf = Vg + Vd ;
Ed = emf * Ia ; // i n w a t t
copper_losses = Ed - W ;
mech_in = W + copper_losses + iron_losses ; // m e c h a n i c a l
power i n o p u t
26 Bhp = mech_in /735.5;
27 efficiency =( W / mech_in ) *100;
28 disp ( efficiency , e f f i c i e n c y (%) = )

42

Scilab code Exa 7.5.a total armature current


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

// Example 7 . 5 . a : t o t a l a r m a t u r e c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
i =30; // c u r r e n t i n A
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
disp ( Ia , t o t a l a r m a t u r e c u r r e n t , I a (A) = )

Scilab code Exa 7.5.b current


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

// Example 7 . 5 . b : c u r r e n t i n e a c h p a t h
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
43

15 I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
16 disp ( I1 , c u r r e n t i n e a c h path , I 1 (A) = )

Scilab code Exa 7.5.c emf generated


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

// Example 7 . 5 . c : e .m. f
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
disp (E , emf , E(V) = )
// a n s w e r i s wrong i n a book

Scilab code Exa 7.5.d power developed


// Example 7 . 5 . d :
armature
2 clc ;
3 clear ;
4 close ;
1

e l e c t r i c a l power d e v e l o p e d i n t h e

44

// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
E_power = E * Ia ;
W = V * I ; // i n w a t t
M_power = Bhp *746; // assume Bhp=746 W
disp ( E_power , e l e c t r i c a l power d e v e l o p e d i n w a t t =
)
24 // a n s w e r i s wrong i n a book

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

Scilab code Exa 7.5.e copper losses


1
2
3
4
5
6
7
8
9
10
11

// Example 7 . 5 . e : c o p p e r l o s s e s
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
45

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

Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
E_power = E * Ia ;
W = V * I ; // i n w a t t
M_power = Bhp *746; // assume Bhp=746 W
Copper_losses = E_power - W ;
disp ( Copper_losses , c o p p e r l o s s e s (W) = )

Scilab code Exa 7.5.f stray losses


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

// Example 7 . 5 . f : s t r a y l o s s e s
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
46

20 E_power = E * Ia ;
21 W = V * I ; // i n w a t t
22 M_power = Bhp *746; // assume Bhp=746 W
23 Copper_losses = E_power - W ;
24 S_loses = M_power - E_power ;
25 disp ( S_loses , s t r a y l o s s e s (W) = )

Scilab code Exa 7.5.g.1 electrical efficiency


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

// Example 7 . 5 . g . i : e l e c t r i c a l e f f i c i e n c y
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
E_power = E * Ia ;
W = V * I ; // i n w a t t
M_power = Bhp *746; // assume Bhp=746 W
Copper_losses = E_power - W ;
S_loses = M_power - E_power ;
eta_e =( W / E_power ) *100;
disp ( eta_e , e l e c t r i c a l e f f i c i e n c y , e t a e (%) = )
47

Scilab code Exa 7.5.g.2 commercial efficiency


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

// Example 7 . 5 . g . i : c o m m e r c i a l e f f i c i e n c y
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
E_power = E * Ia ;
W = V * I ; // i n w a t t
M_power = Bhp *746; // assume Bhp=746 W
Copper_losses = E_power - W ;
S_loses = M_power - E_power ;
eta_c =( W / M_power ) *100;
disp ( eta_c , c o m m e r c i a l e f f i c i e n c y , e t a c (%) = )

Scilab code Exa 7.5.g.3 mechanical efficiency

48

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

// Example 7 . 5 . g . i : e l e c t r i c a l e f f i c i e n c y
clc ;
clear ;
close ;
// g i v e n d a t a :
n =3; // number o f m o t o r s
n1 =4; // number o f p a r a l l e l p a t h i n w i n d i n g
i =30; // c u r r e n t i n A
Bhp =65; // i n hp
I = i * n ; // c u r r e n t t a k e n by t h r e e m o t o r s
Rsh =44; // s h u n t f i e l d r e s i s t a n c e
Ra =0.08; // a r m a t u r e r e s i s t a n c e i n ohm
V =440; // v o l t a g e i n V
Ish = V / Rsh ; // s h u n t f i e l d c u r r e n t
Ia = I + Ish ;
I1 = Ia / n1 ; // c u r r e n t i n e a c h p a t h
Va = Ia * Ra ; // a r m a t u r e d r o p
Vb =2; // we know , b r u s h c o n t a c t d r o p s
E = V + Va + Vb ;
E_power = E * Ia ;
W = V * I ; // i n w a t t
M_power = Bhp *746; // assume Bhp=746 W
Copper_losses = E_power - W ;
S_loses = M_power - E_power ;
eta_m =( E_power / M_power ) *100;
disp ( eta_m , m e c h a n i c a l e f f i c i e n c y , e t a m (%) = )

49

Chapter 8
DC motors

Scilab code Exa 8.1 speed


1
2
3
4
5
6
7
8
9
10

// Example 8 . 1 // s p e e d
clc ;
clear ;
close ;
// g i v e n d a t a :
pi =22/7;
s =22; // s h a f t o f t h e motor i n hp
Tsh =210; // t o r u e i n hp
N =( s *60*746) /(2* pi * Tsh ) ;
disp (N , s p e e d , N( rpm ) = )

Scilab code Exa 8.2.a Bhp


1 // Example 8 . 2 . a : bhp
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :

50

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

V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
disp ( bhp , bhp = )

Scilab code Exa 8.2.b copper losses


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

// Example 8 . 2 . b : c o p p e r l o s s e s
clc ;
clear ;
close ;
// g i v e n d a t a :
V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
c_losses =W - Dpd ;
disp ( c_losses , c o p p e r l o s s e s (W) = )
51

Scilab code Exa 8.2.c armature torque


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

// Example 8 . 2 . c : a r m a t u r e t o r q u e
clc ;
clear ;
close ;
// g i v e n d a t a :
N =955; // i n r . p .m
V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
c_losses =W - Dpd ;
Ta =(9.55* Eb * Ia ) / N ;
disp ( Ta , t o r q u e a r m a t u r e , Ta (Nm) = )

Scilab code Exa 8.2.d shaft torque


1 // Example 8 . 2 . d :
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :

shaft torque

52

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

pi =22/7;
N =955; // i n r . p .m
V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
c_losses =W - Dpd ;
Ta =(9.55* Eb * Ia ) / N ;
Tsh =( bhp *60*746) /(2* pi * N ) ;
disp ( Tsh , s h a f t t o r q u e , Tsh (Nm) = )

Scilab code Exa 8.2.e lost torque


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

// Example 8 . 2 . e : l o s t t o r q u e
clc ;
clear ;
close ;
// g i v e n d a t a :
pi =22/7;
N =955; // i n r . p .m
V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
53

15
16
17
18
19
20
21
22
23
24

Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
c_losses =W - Dpd ;
Ta =(9.55* Eb * Ia ) / N ;
Tsh =( bhp *60*746) /(2* pi * N ) ;
Tl = Ta - Tsh ;
disp ( Tl , l o s t t o r q u e , Tl (Nm) = )

Scilab code Exa 8.2.f commercial efficiency


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

// Example 8 . 2 . f : c o m m e r c i a l e f f i c i e n c y
clc ;
clear ;
close ;
// g i v e n d a t a :
pi =22/7;
N =955; // i n r . p .m
V =230; // v o l t a g e i n v o l t s
I =72; // c u r r e n t i n A
W=V*I;
s =968; // s t r a y l o s s e s
Rsh =115; // s h u n t f i e l d r e s i s t a n c e i n ohm
Ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohm
Ish = V / Rsh ; // s h u n t f i e l d r e s i s t a n c e
Ia =I - Ish ;
Eb =V -( Ia * Ra ) ; // back emf i n v o l t s
Dpd = Eb * Ia ; // d r i v i n g power d e v e l o p e d
Mpo = Dpd - s ;
bhp = Mpo /746;
c_losses =W - Dpd ;
Ta =(9.55* Eb * Ia ) / N ;
Tsh =( bhp *60*746) /(2* pi * N ) ;
54

23 Tl = Ta - Tsh ;
24 eta =( Mpo / W ) *100;
25 disp ( eta , c o m m e r c i a l

e f f i c i o e n c y , e t a (%) = )

Scilab code Exa 8.3 speed


1 // Example 8 . 3 // s p e e d
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =5; // i n a m p e r e s
7
rpm =914; // t u r n s
8
ra =0.5; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =115; // s h u n t f i e l d i n ohms
10
Il =30; // i n a m p e r e s
11
ar =10; // i n p e r c e n t
12
Ish = V / rsh ; // i n a m p e r e s
13
anl =I - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t no l o a d
14
al = Il - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t l o a d
15
Eb1 =( V - anl * ra ) ; // back emf a t no l o a d
16
Eb2 =( V - al * ra ) ; // back emf a t l o a d
17
ph1 =100; //
18
ph2 =90; //
19
Ns =( rpm * Eb2 * ph1 ) /( Eb1 * ph2 ) ; // s p e e d when l o a d e d i n
20

rpm
disp ( Ns , s p e e d when l o a d e d i n rpm )

Scilab code Exa 8.4.a stray losses


1 // Example 8 . 4 . a // s t r a y
2 clc ;
3 clear ;

losses

55

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

close ;
Il =83; // WHEN LOADED IN AMPERES
V =110; // i n v o l t s
I =5; // i n a m p e r e s w i t h o u t l o a d
ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohms
rsh =110; // s h u n t f i e l d i n ohms
Ish = V / rsh ; // i n ampere
anl =I - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t no l o a d
al = Il - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t l o a d
Eb1 =( V - anl * ra ) ; // back emf a t no l o a d
Eb2 =( V - al * ra ) ; // back emf a t l o a d
Dp = Eb1 * anl ; // d r i v i n g power a t no l o a d i n w a t t
Dpl = Eb2 * al ; // d r i v i n g power a t l o a d i n w a t t
mo = Dpl - Dp ; // o u t o f motor i n w a t t
disp ( Dp , s t r a y l o s s e s i n w a t t )

Scilab code Exa 8.4.b horsepower of the motor


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

// Example 8 . 4 . b // h o r s e power
clc ;
clear ;
close ;
Il =83; // WHEN LOADED IN AMPERES
V =110; // i n v o l t s
I =5; // i n a m p e r e s w i t h o u t l o a d
ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohms
rsh =110; // s h u n t f i e l d i n ohms
Ish = V / rsh ; // i n ampere
anl =I - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t no l o a d
al = Il - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t l o a d
Eb1 =( V - anl * ra ) ; // back emf a t no l o a d
Eb2 =( V - al * ra ) ; // back emf a t l o a d
Dp = Eb1 * anl ; // d r i v i n g power a t no l o a d i n w a t t
Dpl = Eb2 * al ; // d r i v i n g power a t l o a d i n w a t t
mo = Dpl - Dp ; // o u t o f motor i n w a t t
56

18
19

bhp = mo /746; // h o r s e power


disp ( bhp , h o r s e power i n ampere i s )

Scilab code Exa 8.4.c efficiency


// Example 8 . 4 . c // e f f i c i e n c y
clc ;
clear ;
close ;
Il =83; // WHEN LOADED IN AMPERES
V =110; // i n v o l t s
I =5; // i n a m p e r e s w i t h o u t l o a d
ra =0.5; // a r m a t u r e r e s i s t a n c e i n ohms
rsh =110; // s h u n t f i e l d i n ohms
Ish = V / rsh ; // i n ampere
anl =I - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t no l o a d
al = Il - Ish ; // a r m a t u r e c u r r e n t i n a m p e r e s a t l o a d
Eb1 =( V - anl * ra ) ; // back emf a t no l o a d
Eb2 =( V - al * ra ) ; // back emf a t l o a d
Dp = Eb1 * anl ; // d r i v i n g power a t no l o a d i n w a t t
Dpl = Eb2 * al ; // d r i v i n g power a t l o a d i n w a t t
mo = Dpl - Dp ; // o u t o f motor i n w a t t
bhp = mo /746; // h o r s e power
mi = V * al ; // i n p u t power i n w a t t
n =( mo / mi ) *100; // e f f i c i e n c y i n p e r c e n t a g e
disp (n , e f f i c i e n c y o f motor when i t i s work on f u l l
, load in percentage i s )
22 // a n s w e r i s wrong i n t h e t e x t b o o k

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

Scilab code Exa 8.5.a back emf


1 // Example 8 . 5 . a // back emf
2 clc ;

57

3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
disp ( Eb , back emf i n v o l t s )

Scilab code Exa 8.5.b copper losses


1 // Example 8 . 5 . b // c o p p e r l o s s e s
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s
14
mi = V * I ; // i n p u t power i n w a t t s
15
Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
16
disp ( Cl , c o p p e r l o s s e s i n w a t t s )

Scilab code Exa 8.5.c Bhp


58

1 // Example 8 . 5 . c // h o r s e power
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s
14
mi = V * I ; // i n p u t power i n w a t t s
15
Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
16
mo = Dp - sl ; // o u t p u t o f motor
17
bhp = mo /746; // h o r s e power i n bhp
18 disp ( bhp , h o r s e power
i s )

Scilab code Exa 8.5.d total torque


1 // Example 8 . 5 . d // t o t a l t o r q u e
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s
14
mi = V * I ; // i n p u t power i n w a t t s

59

15
16
17
18
19

Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
mo = Dp - sl ; // o u t p u t o f motor
bhp = mo /746; // h o r s e power i n bhp
Ta =(9.55* Eb * I ) / rpm ; // t o t a l t o r q u e i n Nm
disp ( Ta , t o t a l t o r q u e i n Nm )

Scilab code Exa 8.5.e shaft torque


1 // Example 8 . 5 . e // s h a f t t o r q u e
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s
14
mi = V * I ; // i n p u t power i n w a t t s
15
Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
16
mo = Dp - sl ; // o u t p u t o f motor
17
bhp = mo /746; // h o r s e power i n bhp
18
Ta =(9.55* Eb * I ) / rpm ; // t o t a l t o r q u e i n Nm
19
Ts =( bhp *60*746) /(2* %pi * rpm ) ; // s h a f t t o r q u e i n Nm
20 disp ( Ts , s h a f t t o r q u e i n Nm )

Scilab code Exa 8.5.f lost torque


1 // Example 8 . 5 . f // l o s t
2 clc ;

torque

60

3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s
14
mi = V * I ; // i n p u t power i n w a t t s
15
Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
16
mo = Dp - sl ; // o u t p u t o f motor
17
bhp = mo /746; // h o r s e power i n bhp
18
Ta =(9.55* Eb * I ) / rpm ; // t o t a l t o r q u e i n Nm
19
Ts =( bhp *60*746) /(2* %pi * rpm ) ; // s h a f t t o r q u e i n Nm
20
Tl = Ta - Ts ; // l o s t t o r q u e i n Nm
21 disp ( Tl , l o s t t o r q u e i n Nm )

Scilab code Exa 8.5.g commercial efficiency


1 // Example 8 . 5 . g // c o m m e r c i a l e f f i c i e n c y
2 clc ;
3 clear ;
4 close ;
5 V =230; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =955; // t u r n s
8
ra =0.2; // r e s i s t a n c e o f a r m a t u r e i n ihms
9
rsh =0.15; // s h u n t f i e l d i n ohms
10
sl =604; // s t r a y l o s s e s i n w a t t s
11
Rm = ra + rsh ; // i n ohms
12
Eb =( V - I * Rm ) ; // back emf i n v o l t s
13
Dp = Eb * I ; // d r i v i n g power i n w a t t s

61

14
15
16
17
18
19
20
21
22

mi = V * I ; // i n p u t power i n w a t t s
Cl = mi - Dp ; // c o p p e r l o s s e s i n w a t t s
mo = Dp - sl ; // o u t p u t o f motor
bhp = mo /746; // h o r s e power i n bhp
Ta =(9.55* Eb * I ) / rpm ; // t o t a l t o r q u e i n Nm
Ts =( bhp *60*746) /(2* %pi * rpm ) ; // s h a f t t o r q u e i n Nm
Tl = Ta - Ts ; // l o s t t o r q u e i n Nm
nc =( mo / mi ) *100; // c o m m e r c i a l e f f i c i e n c y i n p e r c e n t g e
disp ( nc , c o m m e r c i a l e f f i c i e n c y i n p e r c e n t g e )

Scilab code Exa 8.6 current taken


1 // Example 8 . 6 // c u r r e n t
2 clc ;
3 clear ;
4 close ;
5 V =220; // i n v o l t s
6
I =60; // i n a m p e r e s
7
rpm =728; // t u r n s
8
Ts =150; // s h a f t t o r q u e i n Nm
9
nc =80; // c o m m e r c i a l e f f i c i e n c y i n p e r c e n t g e
10
I =(( Ts *2* %pi * rpm *746) /(60*746*( nc /100) * V ) ) ; //

CURRENT TAKEN IN AMPERES


11 disp ( round ( I ) , c u r r e n t t a k e n i n a m p e r e s i s )

Scilab code Exa 8.7 speed


1 // Example 8 . 7 //SPEED
2 clc ;
3 clear ;
4 close ;
5 V =220; // i n v o l t s
6
rpm =2100; // t u r n s

62

7
8
9
10
11
12
13
14
15
16

ra =0.5; // r e s i s t a n c e o f a r m a t u r e i n ihms
rsh =220; // s h u n t f i e l d i n ohms
Il =21; // i n a m p e r e s
R1 =220; // i n ohms
Ish = V / rsh ; // i n a m p e r e s
Ifs = V /( rsh + R1 ) ; // s h u n t f i e l d c u r r e n t i n s e c o n d c a s e
i n ampere
ph1 =50; //
ph2 =100; //
n2 =( rpm * ph2 ) / ph1 ; // s p e e d i n rpm
disp ( n2 , s p e e d i n rpm i s )

63

Chapter 9
cells and batteries

Scilab code Exa 9.1 value of current flowing


1
2
3
4
5
6
7
8
9
10
11

// Example 9 . 1 // c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
n =20; // d r y c e l l s o f emf
E =1.5; // emf i n v o l t s
R =5; // e x t e r n a l r e s i s t a n c e i n ohm
r =0.5; // i n t e r n a l r e s i s t a n c e i n ohm
I =( n * E ) /( R +( n * r ) ) ;
disp (I , c u r r e n t f l o w i n g , I (A) = )

Scilab code Exa 9.2 value of current flowing


1 // Example 9 . 2 // c u r r e n t
2 clc ;
3 clear ;
4 close ;

64

5
6
7
8
9
10
11

// g i v e n d a t a :
n =10; // d r y c e l l s o f emf
E =1.5; // emf i n v o l t s
R =4.9; // r e s i s t a n c e i n ohm
r =1; // i n t e r n a l r e s i s t a n c e i n ohm
I =( n * E ) /(( n * R ) +( r ) ) ;
disp (I , c u r r e n t f l o w i n g , I (A) = )

Scilab code Exa 9.3 value of current flowing


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

// Example 9 . 3 // c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
m =3;
n =10; // d r y c e l l s o f emf
E =1.5; // emf i n v o l t s
R =2.5; // r e s i s t a n c e i n ohm
r =0.5; // i n t e r n a l r e s i s t a n c e i n ohm
I =( m * n * E ) /(( m * R ) +( n * r ) ) ;
disp (I , c u r r e n t f l o w i n g , I (A) = )

Scilab code Exa 9.4.a internal resistance


1
2
3
4
5
6
7
8

// Example 9 . 4 . a // i n t e r n a l r e s i s t a n c e o f e a c h c e l l
clc ;
clear ;
close ;
n =10; // no . o f c e l l s
Rl =4; // LOAD RESISTANCE
V =12; // i n v o l t s
Va =18; // IN VOLTS
65

9 r =(( Va - V ) * Rl ) /( n * V ) ; // i n t e r n a l r e s i s t a n c e
10 disp (r , i n t e r n a l r e s i s t a n c e i n ohms i s )

i n ohms

Scilab code Exa 9.4.b value of current flowing


1
2
3
4
5
6
7
8
9
10
11

// Example 9 . 4 . b // c u r r e n t
clc ;
clear ;
close ;
n =10; // no . o f c e l l s
Rl =4; // LOAD RESISTANCE
V =12; // i n v o l t s
Va =18; // IN VOLTS
r =(( Va - V ) * Rl ) /( n * V ) ; // i n t e r n a l r e s i s t a n c e i n ohms
Il = V / Rl ; // IN AMPERES
disp ( Il , l o a d c u r r e n t i n a m p e r e s i s )

Scilab code Exa 9.5 emf of each cell and its internal resistance
1
2
3
4
5
6
7
8
9
10
11
12

// Example 9 . 5 // emf and i n t e r n a l r e s i s t a n c e o f e a c h


cell
clc ;
clear ;
close ;
n =6; // no . o f c e l l s
Rl =3; // LOAD RESISTANCE
I =2.5; // IN AMPERES
r1 =9; // i n ohms
I2 =1.25; // om a m p e r e s
r =(( r1 * I2 ) -( Rl * I ) ) /( n *( I - I2 ) ) ; // i n t e r n a l r e s i s t a n c e
i n ohms
E =(( I *( Rl + n * r ) ) / n ) ; // emf o f e a c h c e l l i n v o l t s
disp (E , emf o f e a c h c e l l i n v o l t s i s )
66

13

disp (r , i n t e r n a l r e s i s t a n c e o f e a c h c e l l i n ohms )

Scilab code Exa 9.6 ampere hour capacity


1
2
3
4
5
6
7
8

// Example 9 . 6 // f i n d ampereh o u r c a p a c i t y o f a
batery
clc ;
clear ;
close ;
I =20; // i n a m p e r e s
t =15; // i n h o u r s
Ah = I * t ; // ampere h o u r c a p a c i t y o f t h e b a t t e r y
disp ( Ah , ampere h o u r c a p a c i t y o f t h e b a t t e r y i n Ah
)

Scilab code Exa 9.7.a ampere hour efficiency


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

// Example 9 . 7 . a // f i n d ampereh o u r e f f i c i e n c y
clc ;
clear ;
close ;
I =30; // i n a m p e r e s
t =6; // i n h o u r s
Vt =2; // t e r m i n a l v o l t a g e
Ic =40; // i n a m p e r e s
tc =5; // i n h o u r s
Vc =2.5; // i n v o l t s
Aho = I * t ; // ampere h o u r o u t p u t o f t h e b a t t e r y
Ahi = Ic * tc ; // ampere h o u r i n p u t o f t h e b a t t e r y
nAh =( Aho / Ahi ) *100; // ampere h o u r e f f i c i e n c y
disp ( nAh , ampere h o u r e f f i c i e n c y o f t h e b a t t e r y i n
percentage i s )
67

Scilab code Exa 9.7.b watt hour efficiency


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

// Example 9 . 7 . b // f i n d watth o u r e f f i c i e n c y
clc ;
clear ;
close ;
I =30; // i n a m p e r e s
t =6; // i n h o u r s
Vt =2; // t e r m i n a l v o l t a g e
Ic =40; // i n a m p e r e s
tc =5; // i n h o u r s
Vc =2.5; // i n v o l t s
Who = I * t * Vt ; // w a t t h o u r o u t p u t o f t h e b a t t e r y
Whi = Ic * tc * Vc ; // w a t t h o u r i n p u t o f t h e b a t t e r y
nWh =( Who / Whi ) *100; // ampere h o u r e f f i c i e n c y
disp ( nWh , w a t t h o u r e f f i c i e n c y o f t h e b a t t e r y i n
percentage i s )

Scilab code Exa 9.8.a initial charging current


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

// Example 9 . 8 . a // i n i t i a l c h a r g i n g c u r r e n t
clc ;
clear ;
close
n =50; // no . o f c e l l s
Vc =250; // i n v o l t s
Vd =1.8; // i n v o l t s
Vcs =2.2; // i n v o l t s
r =0.01; // i n t e r n a l r e s i s t a n c e o f e a c h c e l l i n ohms
rl =0.1; // l e a d r e s i s t a n c e i n ohms
Re =19.4; // e x t e r n a l r e s i t a n c e i n ohms
Ib = n * r ; // i n t e r n a l r e s i s t n c e o f b a t t e r y
68

13 Tb = rl + Ib ; // t o t a l r e s i s t a n c e o f b a t t e r y
14 Eb = Vd * n ; // t o t a l rmf o f b a t t e r y
15 I =( Vc - Eb ) /( Re + Tb ) ; // i n i t i a l c h a r g i n g c u r r e n t i n
16

amperes
disp (I , i n i t i a l c h a r g i n g c u r r e n t i n a m p e r e s i s )

Scilab code Exa 9.8.b final charging current


// Example 9 . 8 . b // f i n a l c h a r g i n g c u r r e n t
clc ;
clear ;
close
n =50; // no . o f c e l l s
Vc =250; // i n v o l t s
Vd =1.8; // i n v o l t s
Vcs =2.2; // i n v o l t s
r =0.01; // i n t e r n a l r e s i s t a n c e o f e a c h c e l l i n ohms
rl =0.1; // l e a d r e s i s t a n c e i n ohms
Re =19.4; // e x t e r n a l r e s i t a n c e i n ohms
Ib = n * r ; // i n t e r n a l r e s i s t n c e o f b a t t e r y
Tb = rl + Ib ; // t o t a l r e s i s t a n c e o f b a t t e r y
Eb = Vd * n ; // t o t a l rmf o f b a t t e r y
Ebf = Vcs * n ; // emf o f t h e b a t t e r y a t t h e end o f
charging
16 I =( Vc - Ebf ) /( Re + Tb ) ; // i n i t i a l c h a r g i n g c u r r e n t i n
amperes
17 disp (I , f i n a l c h a r g i n g c u r r e n t i n a m p e r e s i s )

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

Scilab code Exa 9.9.a value and direction of current


1 // Example 9 . 9 . a // v a l u e and d i r e c t i o n
2 clc ;
3 clear ;

69

of the current

4 close
5 V =230; // i n v o l t s
6 emf1 =122; // i n v o l t s
7 r =0.4; // i n t e r n a l r e s i s t a n c e i n ohms
8 emf2 =130; // i n v o l t s
9 r1 =0.5; // i n ohms
10 // a p l l y i n g k i r c h o f f s low
11 // x ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
12 // x1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y A
13 // xx1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
14
15
16
17
18
19
20
21
22
23
24

B
// 5 x +0.4 y=180 i s t h e e q u a t i o n i n mesh ABEF
// 5 . 5 x +0.5 y=100 e q u a t i o n i n t h e mesh CDEF
// e q u a t i o n 1 i s 25 x+2y=540 and e q u a t i o n 2 i s 22 x
2y=400
A =[25 2 ;22 -2]; // EQUATIONS
B =[540;400]; // VALUES
X = A \ B ; // UNKNOW VALUES
x = X (1 ,1) ; //TOTAL CURRENT IN AMPERES
x1 = X (2 ,1) ; // c u r r e n t t a k e n by b a t t e r y A
x2 =20 -20; //
disp ( x1 , c u r r e n t i n b a t t e r y A i n a m p e r e s (
d i s c h a r g i n g ) )
disp ( x2 , c u r r e n t i n b e t t e r y B i n a m p e r e s )

Scilab code Exa 9.9.b total current


1 // Example 9 . 9 . b // t o t a l c u r r e n t
2 clc ;
3 clear ;
4 close
5 V =230; // i n v o l t s
6 emf1 =122; // i n v o l t s
7 r =0.4; // i n t e r n a l r e s i s t a n c e i n ohms
8 emf2 =130; // i n v o l t s

70

9 r1 =0.5; // i n ohms
10 // a p l l y i n g k i r c h o f f s low
11 // x ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
12 // x1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y A
13 // xx1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
14
15
16
17
18
19
20
21
22
23

B
// 5 x +0.4 y=180 i s t h e e q u a t i o n i n mesh ABEF
// 5 . 5 x +0.5 y=100 e q u a t i o n i n t h e mesh CDEF
// e q u a t i o n 1 i s 25 x+2y=540 and e q u a t i o n 2 i s 22 x
2y=400
A =[25 2 ;22 -2]; // EQUATIONS
B =[540;400]; // VALUES
X = A \ B ; // UNKNOW VALUES
x = X (1 ,1) ; //TOTAL CURRENT IN AMPERES
x1 = X (2 ,1) ; // c u r r e n t t a k e n by b a t t e r y A
x2 =20 -20; //
disp (x , t o t a l c u r r e n t i n b a t t e r y A and B i n a m p e r e s
( charging ) )

Scilab code Exa 9.9.c power dissipated


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

// Example 9 . 9 . c // t p o w e r d i s s i p a t e d
clc ;
clear ;
close
R =5; // i n ohms
V =230; // i n v o l t s
emf1 =122; // i n v o l t s
r =0.4; // i n t e r n a l r e s i s t a n c e i n ohms
emf2 =130; // i n v o l t s
r1 =0.5; // i n ohms
// a p l l y i n g k i r c h o f f s low
// x ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
// x1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y A
// xx1 ampere i s t h e t o t a l c u r r e n t t a k e n by b a t t e r y
71

15
16
17
18
19
20
21
22
23
24
25

B
// 5 x +0.4 y=180 i s t h e e q u a t i o n i n mesh ABEF
// 5 . 5 x +0.5 y=100 e q u a t i o n i n t h e mesh CDEF
// e q u a t i o n 1 i s 25 x+2y=540 and e q u a t i o n 2 i s 22 x
2y=400
A =[25 2 ;22 -2]; // EQUATIONS
B =[540;400]; // VALUES
X = A \ B ; // UNKNOW VALUES
x = X (1 ,1) ; //TOTAL CURRENT IN AMPERES
x1 = X (2 ,1) ; // c u r r e n t t a k e n by b a t t e r y A
x2 =20 -20; //
p = x ^2* R ; // i n w a t t
disp (p , power d i s s i p a t e d i n w a t t s i s )

Scilab code Exa 9.10 direction of current and total resistance


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

// Example 9 . 1 0 // v a l u e and d i r e c t i o n o f t h e c u r r e n t
clc ;
clear ;
close
V =34; // i n v o l t s
emf1 =2; // i n v o l t s
r1 =6; // i n ohms
r2 =1; // i n ohms
r3 =2; // i n ohms
r4 =4; // i n ohms
// a p l l y i n g k i r c h o f f s low
// x ampere i s t h e c u r r e n t i n b r a n c h AB
// x1 ampere i s t h e c u r r e n t i n b r a n c h AC
// x2 ampere i s t h e c u r r e n t i n t h e Branch BD
// xx2 ampere i s t h e c u r r e n t i n t h e b r a n c h BC
// x1+x2 ampere i s t h e c u r r e n t i n t h e b r a n c h DC
// x6x1 +8 x2=2 i n mesh ABD
// 2 x4x1 14 x2=2 i n mesh BCD
// 10 x1 +4 x2 = 3 4 ; / / i n mesh ADCEF
72

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

A =[1 -6 8;2 -4 -14;0 10 4]; // EQUATIONS


B =[2; -2;34]; // VALUES
X = A \ B ; // UNKNOW VALUES
x = X (1 ,1) ; //TOTAL CURRENT IN AMPERES
x1 = X (2 ,1) ; // c u r r e n t t a k e n by b a t t e r y A
x2 = X (3 ,1) ; //
b1 =x - x2 ; // i n a m p e r e s
b2 = x1 + x2 ; // i n a m p e r e s
R =(( r1 * x1 + r4 *( x2 + x1 ) ) /( x + x1 ) ) ; // t o t a l r e s i s t a n c e i n
ohms
disp (x , c u r r e n t i n 1 ohms r e s i s t a n c e from A t o B i n
amperes )
disp ( x1 , c u r r e n t i n 6 ohms r e s i s t a n c e from A t o D
i n amperes )
disp ( x2 , c u r r e n t i n 8 ohms r e s i s t a n c e from B t o D
i n amperes )
disp ( b1 , c u r r e n t i n 2 ohm r e s i s t a n c e from B t o C i n
amperes )
disp ( b2 , c u r r e n t i n 4 ohm r e s i s t a n c e from D t o C i n
amperes )
disp (R , t o t a l r e i s t a n c e i n ohms i s )

73

Chapter 11
single phase AC circuits

Scilab code Exa 11.1 instantaneous emf


1 // Example 1 1 . 1 // i n s t a n t a n e o u s v a l u e
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 E_max =500; // emf i n v o l t s
7 thita =30; // i n d e g r e e
8 e = E_max * sind ( thita ) ;
9 disp (e , i n s t a n t a n e o u s v a l u e , e ( v ) = )

Scilab code Exa 11.2 rms value of alternating current


1 // Example 1 1 . 2 // rms v a l u e
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 I_max =1.414; // maximum v a l u e o f

74

current in A

7
8

I_rms = I_max *0.707;


disp ( round ( I_rms ) , rms v a l u e o f c u r r e n t , I r m s (A) )

Scilab code Exa 11.3 current drawn


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

// Example 1 1 . 3 // c u r r e n t drawn
clc ;
clear ;
close ;
// g i v e n d a t a :
f =50; // f r e q u e n c y i n Hz
L =0.2; // i n d u c t a n c e i n H
V =220; // v o l t a g e i n v o l t s
pi =22/7;
XL =2* pi * f * L ; // i n ohm
Z = XL ;
I=V/Z;
disp (I , c u r r e n t drawn , I (A) = )

Scilab code Exa 11.4 current


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

// Example 1 1 . 4 // c u r r e n t f l o w i n g
clc ;
clear ;
close ;
// g i v e n d a t a :
f =50; // f r e q u e n c y i n Hz
C =100*10^ -6; // c a p a c i t o r i n Farad
V =210; // v o l t a g e i n v o l t s
pi =22/7;
XC =(1/(2* pi * f * C ) ) ;
Z = XC ;
I=V/Z;
75

13

disp (I , c u r r e n t f l o w i n g , I (A) = )

Scilab code Exa 11.5.a value of current flowing


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

// Example 1 1 . 5 . a // c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
f =50; // f r e q u e n c y i n Hz
L =0.4; // i n d u c t a n c e i n H
V =220; // v o l t a g e i n v o l t s
pi =22/7;
XL =2* pi * f * L ;
I = V / XL ;
f1 =25; // when f r e q u e n c y i s h a l v e d
pi =22/7;
XL1 =2* pi * f1 * L ;
I1 = V / XL1 ;
disp (I , c u r r e n t f l o w i n g , I (A) = )
disp ( I1 , c u r r e n t when f r e q u e n c y i s h a l v e d , I (A) = )

Scilab code Exa 11.5.b value of current flowing


1 // Example 1 1 . 5 . b // c u r r e n t
2 clc ;
3 clear ;
4 close ;
5 // g i v e n d a t a :
6 // g i v e n d a t a :
7 f =50; // f r e q u e n c y i n Hz

76

i f frequency i s halved

8
9
10
11
12
13
14

L =0.4; // i n d u c t a n c e i n H
V =220; // v o l t a g e i n v o l t s
f2 =100; // when f r e q u e n c y i s d o u b l e d
pi =22/7;
XL =2* pi * f2 * L ;
I = V / XL ;
disp (I , c u r r e n t when f r e q u e n c y i s h a l v e d , I (A) = )

Scilab code Exa 11.6.a value of current flowing


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

// Example 1 1 . 6 . a // c u r r e n t
clc ;
clear ;
close ;
// g i v e n d a t a :
f =50; // f r e q u e n c y i n Hz
C =28*10^ -6; // c a p a c i t o r i n Farad
V =250; // v o l t a g e i n v o l t s
pi =22/7;
XC =1/(2* pi * f * C ) ;
I1 = V / XC ;
f =50; // f r e q u e n c y i n Hz
C =28*10^ -6; // c a p a c i t o r i n Farad
V =250; // v o l t a g e i n v o l t s
pi =22/7;
f1 =25; // when f r e q u e n c y i s h a l v e d
XC =1/(2* pi * f1 * C ) ;
I2 = V / XC ;
disp ( I1 , c u r r e n t f l o w i n g , I (A) = )
disp ( I2 , c u r r e n t f l o w i n g when f r e q u e n c y i s h a l v e d , I (
A) = )

Scilab code Exa 11.6.b value of current flowing


77

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

// Example 1 1 . 6 . b // c u r r e n t i f f r e q u e n c y i s h a l v e d
clc ;
clear ;
close ;
// g i v e n d a t a :
f =50; // f r e q u e n c y i n Hz
C =28*10^ -6; // c a p a c i t o r i n Farad
V =250; // v o l t a g e i n v o l t s
pi =22/7;
f2 =100; // when f r e q u e n c y i s d o u b l e d
XC =1/(2* pi * f2 * C ) ;
I = V / XC ;
disp (I , c u r r e n t f l o w i n g when f r e q u e n c y i s d o u b l e d , I
(A) = )

Scilab code Exa 11.7.a inductive reactance


1
2
3
4
5
6
7
8
9
10

// Example 1 1 . 7 . a // i n d u c t i v e r e a c t a n c e
clc ;
clear ;
close ;
R =40; // i n ohms
L =0.07; // IN HENRY
v =223; // IN VOLTS
F =50; // IN HERTS
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
disp ( round ( Xl ) , i n d u c t i v e r e a c t a n c e i n ohms i s )

Scilab code Exa 11.7.b impedance


1 // Example 1 1 . 7 . b // i m p e d e n c e
2 clc ;
3 clear ;

78

4
5
6
7
8
9
10
11

close ;
R =40; // i n ohms
L =0.07; // IN HENRY
v =223; // IN VOLTS
F =50; // IN HERTS
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+ Xl ^2) ; //IMPEDENCE IN OHMS
disp (Z , i m p e d e n c e i n ohms i s )

Scilab code Exa 11.7.c current


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

// Example 1 1 . 7 . c // c u r r e n t
clc ;
clear ;
close ;
R =40; // i n ohms
L =0.07; // IN HENRY
V =223; // IN VOLTS
F =50; // IN HERTS
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+ Xl ^2) ; //IMPEDENCE IN OHMS
I = V / Z ; // i n a m p e r e s
disp (I , c u r r e n t i n a m p e r e s i s )

Scilab code Exa 11.7.d angle of phase difference


1
2
3
4
5
6
7

// Example 1 1 . 7 . d // a n g l e o f p h a s e d i f f e r n c e
clc ;
clear ;
close ;
R =40; // i n ohms
L =0.07; // IN HENRY
V =223; // IN VOLTS
79

8
9
10
11
12
13
14
15
16

F =50; // IN HERTS
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+ Xl ^2) ; //IMPEDENCE IN OHMS
I = V / Z ; // i n a m p e r e s
csp = R / Z ; // p f
phi = acosd ( csp ) ; // a n g l e o f p h a s e d i f f e r n c e i n d e g r e e
x = floor ( phi ) ; //
y = phi - x ; //
disp ( a n g l e o f p h a s e d i f f e r e n c e i s + string ( x ) +
d e g r e e and + string ( y *60) + m i n u t e s )

Scilab code Exa 11.8 inductance and phase angle


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

// Example 1 1 . 8 // i n d u c t a n c e and p h a s e a n g l e b e t w e e n
v o l t a g e and c u r r e n t
clc ;
clear ;
close ;
V =200; // i n v o l t s
I =2.5; // i n a m p e r e s
Vo =250; // i n v o l t s
f =50; // i n h e r t z
R = V / I ; // i n ohms
Z = Vo / I ; // i n ohms
Xl = sqrt ( Z ^2 - R ^2) ; // i n d u c t i v e r e a c t a n c e i n ohms
L =( Xl /(2* %pi * f ) ) ; // i n d u c t a n c e i n h e n r y
pf = R / Z ; // power f a c t o r
phi = acosd ( pf ) ; // a n g l e o f p h a s e d i f f e r n c e i n d e g r e e
x = floor ( phi ) ; //
y = phi - x ; //
disp (L , i n d u c t a n c e i n h e n r y i s )
disp ( a n g l e o f p h a s e d i f f e r e n c e i s + string ( x ) +
d e g r e e and + string ( round ( y *60) ) + m i n u t e s )

80

Scilab code Exa 11.9 capacitance


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

// Example 1 1 . 9 // c a p a c i t a n c e
clc ;
clear ;
close ;
W =100; // i n w a t t s
V =110; // i n v o l t s
Vc =220; // i n v o l t s
f =50; // i n h e r t z
I = W / V ; // i n a m p e r e s
R = V / I ; // i n ohms
Z = Vc / I ; // i n ohms
Xc = sqrt ( Z ^2 - R ^2) ; // IN OHMS
C =(1/(2* %pi * f * Xc ) ) ; // i n f a r a d s
disp ( C *10^6 , c a p a c i t a n c e i n m i c r o f a r a d s i s )

Scilab code Exa 11.10.a impedance


// Example 1 1 . 1 0 . a // i m p e d e n c e
clc ;
clear ;
close ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =220; // IN VOLTS
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
11 Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
12 Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
1
2
3
4
5
6
7
8
9
10

81

13

disp ( round ( Z ) , i m p e d e n c e i n ohms i s )

Scilab code Exa 11.10.b current


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

// Example 1 1 . 1 0 . B // CURRENT
clc ;
clear ;
close ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =200; // IN VOLTS i t i s g i v e n wrong i n t h e book
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / round ( Z ) ; // i n a m p e r e s
disp (I , c u r r e n t i n a m p e r e s i s )

Scilab code Exa 11.10.c phase angles


1
2
3
4
5
6
7
8
9
10

// Example 1 1 . 1 0 . c // a n g l e o f p h a s e d i f f e n r c e
clc ;
clear ;
close ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =200; // IN VOLTS i t i s g i v e n wrong i n t h e book
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
82

11
12
13
14
15

Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms


Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / round ( Z ) ; // i n a m p e r e s
pf = R / round ( Z ) ; // power f a c t o r
disp ( pf , a n g l e o f p h a s e d i f f e n c e b e t w e e n v o l t a g e and
c u r r e n t i s )

Scilab code Exa 11.10.d voltage


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

// Example 1 1 . 1 0 . d // v o l t a g e a c r o s s t e c o i l
clc ;
clear ;
close ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =200; // IN VOLTS i t i s g i v e n wrong i n t h e book
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / round ( Z ) ; // i n a m p e r e s
pf = R / round ( Z ) ; // power f a c t o r
Zc = sqrt ( R ^2+ Xl ^2) ; // i m p e d e n c e o f t h e c o i l
Vl = I * Zc ; // v o l t a g e d r o p a c r o s s t h e c o i l
disp ( Vl , v o l t a g e a c r o s s t h e c o i l i n v o l t s i s )

Scilab code Exa 11.10.e voltage across the coil


1
2
3

// Example 1 1 . 1 0 . e // v o l t a g e a c r o s s t h e c a p a c i t o r
clear ;
close ;
83

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

clc ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =200; // IN VOLTS i t i s g i v e n wrong i n t h e book
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / round ( Z ) ; // i n a m p e r e s
pf = R / round ( Z ) ; // power f a c t o r
Vc = I * Xc ; // v o l t a g e d r o p a c r o s s t h e c a p a c i t o r
disp ( Vc , v o l t a g e a c r o s s c a p a c i t o r i n v o l t s i s )

Scilab code Exa 11.10.f total power taken


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

// Example 1 1 . 1 0 . f // t o t a l power t a k e n
clear ;
close ;
clc ;
R =5.94; // i n ohms
L =0.35; // IN HENRY
C =35; // i n m i c r o f a r a d s
V =200; // IN VOLTS i t i s g i v e n wrong i n t h e book
F =50; // IN HERTS
Xc =(1/(2* %pi * F * C *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e i n
ohms
Xl =2* %pi * F * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / round ( Z ) ; // i n a m p e r e s
W = I ^2* R ; // t o t a l power t a k e n i n w a t t s
disp (W , t o t a l power t a k e n i n w a t t s i s )

84

Scilab code Exa 11.11.a total impedance


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

// Example 1 1 . 1 1 . a // i m p e d e n c e
clc ;
clear ;
close ;
r1 =6; // i n ohms
r2 =3.95; // i n ohms
R = r1 + r2 ; // i n ohms
L1 =0.21; // IN HENRY
L2 =0.14; // i n h e n r y
C1 =30; // i n m i c r o f a r a d s
C2 =60; // i n m i c r o f a r a d s
V =220; // IN VOLTS
F =50; // IN HERTS
Xc1 =(1/(2* %pi * F * C1 *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e
i n ohms
Xc2 =(1/(2* %pi * F * C2 *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e
i n ohms
Xc = Xc1 + Xc2 ; // IN OHMS
Xl1 =2* %pi * F * L1 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl2 =2* %pi * F * L2 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl = Xl1 + Xl2 ; // i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
disp ( round ( Z ) , i m p e d e n c e i n ohms i s )

Scilab code Exa 11.11.b current taken


1 // Example 1 1 . 1 1 . b // c u r r e n t t a k e n
2 clc ;
3 clear ;
4 close ;

85

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

r1 =6; // i n ohms
r2 =3.95; // i n ohms
R = r1 + r2 ; // i n ohms
L1 =0.21; // IN HENRY
L2 =0.14; // i n h e n r y
C1 =30; // i n m i c r o f a r a d s
C2 =60; // i n m i c r o f a r a d s
V =200; // IN VOLTS
F =50; // IN HERTS
Xc1 =(1/(2* %pi * F * C1 *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e
i n ohms
Xc2 =(1/(2* %pi * F * C2 *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e
i n ohms
Xc = Xc1 + Xc2 ; // IN OHMS
Xl1 =2* %pi * F * L1 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl2 =2* %pi * F * L2 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl = Xl1 + Xl2 ; // i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / Z ; //
disp ( round ( I ) , c u r r e n t i n a m p e r e s i s )

Scilab code Exa 11.11.c power factor


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

// Example 1 1 . 1 1 . c // power f a c t o r
clc ;
clear ;
close ;
r1 =6; // i n ohms
r2 =3.95; // i n ohms
R = r1 + r2 ; // i n ohms
L1 =0.21; // IN HENRY
L2 =0.14; // i n h e n r y
C1 =30; // i n m i c r o f a r a d s
C2 =60; // i n m i c r o f a r a d s
V =200; // IN VOLTS
86

13 F =50; // IN HERTS
14 Xc1 =(1/(2* %pi * F * C1 *10^ -6) ) ; // c a p a c i t i v e
15
16
17
18
19
20
21
22
23

reactance
i n ohms
Xc2 =(1/(2* %pi * F * C2 *10^ -6) ) ; // c a p a c i t i v e r e a c t a n c e
i n ohms
Xc = Xc1 + Xc2 ; // IN OHMS
Xl1 =2* %pi * F * L1 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl2 =2* %pi * F * L2 ; // i n d u c t i v e r e a c t a n c e i n ohms
Xl = Xl1 + Xl2 ; // i n ohms
Z = sqrt ( R ^2+( Xl - Xc ) ^2) ; // i m p e d e n c e i n ohms
I = V / Z ; //
pf = R / Z ; // l e a d i n g power f a c t o r
disp ( pf , power f a c t o r ( l e a d i n g ) i s )

Scilab code Exa 11.12.a current taken


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

// Example 1 1 . 1 2 . a // c u r r e n t
clc ;
clear ;
close ;
V =200; // i n v o l t s
L =0.04; // i n h e n r y
C =100; // i n m i c r o f a r d s
f =50; // h e r t z
Xl =2* %pi * f * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Xc =(1/(2* %pi * f * C *10^ -6) ) ; //CAPACITIVE REACTANCE IN
OHMS
Z1 =10; // ohms
R1 =10; // i n ohms
X1 =0; // i n ohms
R2 =5; // i n ohms
Z2 = sqrt ( R2 ^2+ Xl ^2) ; // i n ohms
X2 = Xl ; //
R3 =15; // i n ohms
87

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

Z3 = sqrt ( R3 ^2+ Xc ^2) ; // IN OHMS


X3 = Xc ; //
g1 = R1 /( Z1 ) ^2; // c o n d u c t a n c e o f b r a n c h 1 i n
b1 = X1 /( Z1 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h
g2 = R2 /( Z2 ) ^2; // c o n d u c t a n c e o f b r a n c h 2 i n
b2 = X2 /( Z2 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h
g3 = R3 /( Z3 ) ^2; // c o n d u c t a n c e o f b r a n c h 3 i n
b3 = X3 /( Z3 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h
G = g1 + g2 + g3 ; // t o t a l c o n d u c t a n c e i n mho
B = b1 + b2 - b3 ; // t o t a l s u s c e p t a n c e i n mho
Y = sqrt ( G ^2+ B ^2) ; // i n ohms
I = V * Y ; // c u r e n t i n ampere
disp (I , c u r r e n t i n a m p e r e s i s )

mho
1
mho
2
mho
3

Scilab code Exa 11.12.b phase angle


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

// Example 1 1 . 1 2 . b // PHASE ANGLE OF CURRENT AND


VOLTAGE
clc ;
clear ;
close ;
V =200; // i n v o l t s
L =0.04; // i n h e n r y
C =100; // i n m i c r o f a r d s
f =50; // h e r t z
Xl =2* %pi * f * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Xc =(1/(2* %pi * f * C *10^ -6) ) ; //CAPACITIVE REACTANCE IN
OHMS
Z1 =10; // ohms
R1 =10; // i n ohms
X1 =0; // i n ohms
R2 =5; // i n ohms
Z2 = sqrt ( R2 ^2+ Xl ^2) ; // i n ohms
X2 = Xl ; //
88

R3 =15; // i n ohms
Z3 = sqrt ( R3 ^2+ Xc ^2) ; // IN OHMS
X3 = Xc ; //
g1 = R1 /( Z1 ) ^2; // c o n d u c t a n c e o f b r a n c h 1 i n mho
b1 = X1 /( Z1 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 1
g2 = R2 /( Z2 ) ^2; // c o n d u c t a n c e o f b r a n c h 2 i n mho
b2 = X2 /( Z2 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 2
g3 = R3 /( Z3 ) ^2; // c o n d u c t a n c e o f b r a n c h 3 i n mho
b3 = X3 /( Z3 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 3
G = g1 + g2 + g3 ; // t o t a l c o n d u c t a n c e i n mho
B = b1 + b2 - b3 ; // t o t a l s u s c e p t a n c e i n mho
Y = sqrt ( G ^2+ B ^2) ; // i n ohms
I = V * Y ; // c u r e n t i n ampere
theta = acosd ( G / Y ) ; //
x = round ( theta ) ; //
y = theta - x ; //
disp ( p h a s e a n g l e i s + string ( x ) + d e g r e e and +
string (60* y ) + munutes )
35 // a n s w e r i s wrong i n t h e t e x t b o o k
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

Scilab code Exa 11.12.c series equivalent arrangement of resistance and


reactance
1
2
3
4
5
6
7
8
9
10

// Example 1 1 . 1 2 . c // s e r i e s e q u i v a l e n t a r r a n g e m e n t
o f r e s i s t a n c e and r e a c t a n c e
clc ;
clear ;
close ;
V =200; // i n v o l t s
L =0.04; // i n h e n r y
C =100; // i n m i c r o f a r d s
f =50; // h e r t z
Xl =2* %pi * f * L ; // i n d u c t i v e r e a c t a n c e i n ohms
Xc =(1/(2* %pi * f * C *10^ -6) ) ; //CAPACITIVE REACTANCE IN
OHMS
89

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

Z1 =10; // ohms
R1 =10; // i n ohms
X1 =0; // i n ohms
R2 =5; // i n ohms
Z2 = sqrt ( R2 ^2+ Xl ^2) ; // i n ohms
X2 = Xl ; //
R3 =15; // i n ohms
Z3 = sqrt ( R3 ^2+ Xc ^2) ; // IN OHMS
X3 = Xc ; //
g1 = R1 /( Z1 ) ^2; // c o n d u c t a n c e o f b r a n c h 1 i n mho
b1 = X1 /( Z1 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 1
g2 = R2 /( Z2 ) ^2; // c o n d u c t a n c e o f b r a n c h 2 i n mho
b2 = X2 /( Z2 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 2
g3 = R3 /( Z3 ) ^2; // c o n d u c t a n c e o f b r a n c h 3 i n mho
b3 = X3 /( Z3 ) ^2; // s u s c e p t a n c e i n mho i n b r a n c h 3
G = g1 + g2 + g3 ; // t o t a l c o n d u c t a n c e i n mho
B = b1 + b2 - b3 ; // t o t a l s u s c e p t a n c e i n mho
I = V / Z3 ; // c u r e n t i n a m p e r e s
pf3 = R3 / Z3 ; // power f a c t o r
phi = acosd ( pf3 ) ; // a n g l e o f p h a s e d i f f e r n c e i n d e g r e e
x = floor ( phi ) ; //
y = phi - x ; //
tc3 = pf3 ; //
ts3 = sind ( phi )
pf1 = R1 / R1 ; //
tc1 = pf1 ; //
ts1 = sind ( acosd ( pf1 ) ) ; //
I1 = V / Z1 ; //
E1 = I1 * tc1 ; // e n e r g y component i n b r a n c h 1
EL1 = I1 * ts1 ; // i d e l c u r r e n t component i n b r a n c h 1
I2 = V / Z2 ; //
pf2 = R2 / Z2 ; //
tc2 = pf2 ; //
ts2 = sind ( acosd ( pf2 ) ) ; //
E2 = I2 * tc2 ; //ENERGY COMPONENT IN BRANCH2
EL2 = I2 * ts2 ; // i d e l e c u r r e n t component i n b r a n c h 2
E3 = I * tc3 ; // e n e r g y component i n b r a n c h 3
EL3 = I * ts3 ; // i d l e component o f c u r r e n t i n b r a n c h 3
90

49
50
51
52
53
54
55
56
57
58
59
60

E = E1 + E2 + E3 ; // sum o f e n e r g y component o f c u r r e n t
EL = EL1 + EL2 - EL3 ; // sum o f i d e l component o f c u r r e n t
It = sqrt ( E ^2+ EL ^2) ; // t o t a l c u r r e n t
pft = E / It ; // power f a c t o r o f t h e c o m p l e t e c i r c u i t
phi = acosd (0.95) ; // a n g l e o f p h a s e d i f f e r n c e i n d e g r e e
x = round ( phi ) ; //
y = phi - x ; //
Zt = V / It ; // i n ohms
R = Zt * pft ; // e q u i v a l e n t s e r i e s r e s i s t a n c e
X = Zt *( sind ( phi ) ) ; // e q u i v a l e n t s e r i e s r e a c t a n c e
disp (R , e q u i v a l e n t s e r i e s r e s i s t a n c e i n ohms i s )
disp (X , e u i v a l e n t s e r i e s r e a c t a n c e i n ohms i s )

91

Chapter 12
polyphase system

Scilab code Exa 12.1.a line current and phase current


// Example 1 2 . 1 . a // l i n e c u r r e n t
clc ;
clear ;
close ;
L =30; // l o a d i n kW
pf =0.8; // power f a c t o r
Vl =250; // l i n e v o l t a g e i n v o l t s
I =(( L *10^3) /( Vl * pf * sqrt (3) ) ) ; // l i n e c u r r e n t i n
ampers
9 Ip = I ; // i n s t a r c o n n e c t i o n
10 disp (I , l i n e c u r r e n t ( s t a r c o n n e c t i o n ) i n ampere i s
)
11 disp ( Ip , p a h s e c u r r e n t ( s t a r t c o n n e c t i o n ) i n ampere
i s )
1
2
3
4
5
6
7
8

Scilab code Exa 12.1.b line current and phase current


1

// Example 1 2 . 1 . b // p h a s e c u r r e n t
92

2
3
4
5
6
7
8
9
10
11
12

clc ;
clear ;
close ;
L =30; // l o a d i n kW
pf =0.8; // power f a c t o r
Vl =250; // l i n e v o l t a g e i n v o l t s
I =(( L *10^3) /( Vl * pf * sqrt (3) ) ) ; // l i n e c u r r e n t i n
ampers
Ip = I /( sqrt (3) ) ; // p h a s e c u r r e n t
Il = sqrt (3) * Ip ; // l i n e c u r r e n t i n a m p e r e s
disp ( Ip , p h a s e c u r r e n t i n ampere i s )
disp ( Il , l i n e c u r r e n t ( d e l t a c o n n e c t i o n ) i n a m p e r e s
i s )

Scilab code Exa 12.2.a line current and total power


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

// Example 1 2 . 2 . a // l i n e c u r r e n t and power a b o s r b e d


clc ;
clear ;
close ;
R =11.88; // c o i l r e s i s t a n c e i n ohms
L =0.07; // i n d u c t a n c e i n h e n r y
f =50; // i n h e r t z
pf =0.48; // power f a c t o r
Vl =433; // l i n e v o l t a g e i n v o l t s
Vp = Vl /( sqrt (3) ) ; // p h a s e v o l t a g e
Xl =(2* %pi * f * L ) ; // i n ohms
Zb = sqrt ( R ^2+ Xl ^2) ; // i n ohms
Ie = Vp / Zb ; // c u r r e n t i n e a c h w i n d i n g i n a m p e r e s
Il = Ie ; // l i n e c u r r e n t i n a m p e r e s
W = sqrt (3) * Vl * Il * pf ; // power i n w a t t s
disp ( Il , l i n e c u r r e n t i n ampere i s )
disp ( W *10^ -3 , power t a k e n i n c o n n e c t i o n i n kW )

93

Scilab code Exa 12.2.b line current and total power


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

// Example 1 2 . 2 . b // l i n e c u r r e n t and power a b o s r b e d


clc ;
clear ;
close ;
R =11.88; // c o i l r e s i s t a n c e i n ohms
L =0.07; // i n d u c t a n c e i n h e n r y
f =50; // i n h e r t z
pf =0.48; // power f a c t o r
Vl =433; // l i n e v o l t a g e i n v o l t s
Vp = Vl ; // p h a s e v o l t a g e
Xl =(2* %pi * f * L ) ; // i n ohms
Zb = sqrt ( R ^2+ Xl ^2) ; // i n ohms
Ie = Vp / Zb ; // c u r r e n t i n e a c h w i n d i n g i n a m p e r e s
Il = sqrt (3) * Ie ; // l i n e c u r r e n t i n a m p e r e s
W = sqrt (3) * Vl * Il * pf ; // power i n w a t t s
disp ( Il , l i n e c u r r e n t i n ampere i s )
disp ( W *10^ -3 , power t a k e n i n c o n n e c t i o n i n kW )

Scilab code Exa 12.3.a current in each phase of the motor


1
2
3
4
5
6
7
8
9
10

// Example 1 2 . 3 . a // motor c u r r e n t i n e a c h p h a s e
clc ;
clear ;
close ;
Vl =1100; // l i n e v o l t a g e i n v o l t s
n =99; // motor e f f i c i e n c y i n p e r c e n t a g e
Mo = n *735.5; // o u t p u t o f t h e motor
Mi =( Mo *100) /75; // INPUT OF THE MOTOR IN WATTS
pf = 0.8; // power f a c t o r
94

11
12
13
14
15
16
17
18

Il =( Mi ) /( sqrt (3) * Vl * pf ) ; // l i n e c u r r e n t i n a m p e r e s
Ip = Il /( sqrt (3) ) ; // p h a s e c u r r e n t i n a m p e r e s
Ipm = Il ; // p h a s e c u r e n t o f t h e motor
Ac = Ip * pf ; // a c t i v e component o f p h a s e c u r r e n t i n t h e
motor
Rc = Ip *( sqrt (1 - pf ^2) ) ; // r e a c t i v e component o f p h a s e
c u r r e n t o f motor
disp ( Ip , phae c u r r e n t o f motor i n a m p e r e s i s )
disp ( Ac , a c t i v e component o f p h a s e c u r r e n t i n t h e
motor i n a m p e r e s )
disp ( Rc , r e a c t i v e component o f p h a s e c u r r e n t i n t h e
motor i n a m p e r e s )

Scilab code Exa 12.3.b current in each phase of the generator


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

// Example 1 2 . 3 . b // motor g e n e r a t o r i n e a c h p h a s e
clc ;
clear ;
close ;
Vl =1100; // l i n e v o l t a g e i n v o l t s
n =99; // motor e f f i c i e n c y i n p e r c e n t a g e
Mo = n *735.5; // o u t p u t o f t h e motor
Mi =( Mo *100) /75; // INPUT OF THE MOTOR IN WATTS
pf = 0.8; // power f a c t o r
Il =( Mi ) /( sqrt (3) * Vl * pf ) ; // l i n e c u r r e n t i n a m p e r e s
Ip = Il /( sqrt (3) ) ; // p h a s e c u r r e n t i n a m p e r e s
Ipm = Il ; // p h a s e c u r e n t o f t h e motor
Ac = Ipm * pf ; // a c t i v e component o f p h a s e c u r r e n t i n t h e
generator
15 Rc = Ipm *( sqrt (1 - pf ^2) ) ; // r e a c t i v e component o f p h a s e
current of generator
16 disp ( Ipm , p h a s e c u r r e n t o f t h e g e n e r t o r i n ampere i s
)
17 disp ( Ac , a c t i v e component o f p h a s e c u r r e n t i n t h e
95

g e n e r a t o r i n amperes )
18 disp ( Rc , r e a c t i v e component o f p h a s e c u r r e n t i n t h e
g e n e r a t o r i n amperes )

Scilab code Exa 12.4 reading


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

// Example 1 2 . 4 // r e a d i n g
clc ;
clear ;
close ;
ni =74.6; // e f f i c i e n c y
Mo =40; //HP OF MOTOR
mo = Mo * ni ; // o u t p u t o f motor i n w a t t s
mi =( mo *100) /( ni *1000) ; // i n p u t o f motor i n kW
tw =40; // t o t a l i n kW
pf =0.8; // power f a c t o r
theta = acosd ( pf ) ; // i n d e g r e e
v = tand ( theta ) ; //
dw =( v * tw ) /( sqrt (3) ) ; //
w1 =( tw + dw ) /2; // FIRST READING IN kW
w2 = tw - w1 ; // s e c o n d r e a d i n g i n kW
disp ( w1 , f i r s t r e a d i n g i n kW )
disp ( w2 , s e c o n d r e a d i n g i n kW )

Scilab code Exa 12.5.a power factor when both readings are positive
1 // Example 1 2 . 5 . a // power f a c t o r
2 clc ;
3 clear ;
4 close ;
5 w1 =4.5; // f i r s t r e a d i n g i n kW
6 w2 =3; // s e c o n d r e a d i n g i n kW , t h i s

wrong i n q u e s t i o n
96

value i s given

tw = w1 + w2 ; // i n kW
dw = w1 - w2 ; // i n kW
pfa = atand ( sqrt (3) *( dw / tw ) ) ;
pf = cosd ( pfa ) ; // // power f a c t o r when b o t h t h e e a d i n g s
are p o s i t i v e
11 disp ( pf , power f a c t o r when b o t h t h e r e a d i n g s a r e
p o s i t i v e )
7
8
9
10

Scilab code Exa 12.5.b power factor


1 // Example 1 2 . 5 . b // power f a c t o r
2 clc ;
3 clear ;
4 close ;
5 w1 =4.5; // f i r s t r e a d i n g i n kW
6 w2 = -3; // s e c o n d r e a d i n g i n kW , t h i s
7
8
9
10
11

value i s given
wrong i n q u e s t i o n
tw = w1 + w2 ; // i n kW
dw = w1 - w2 ; // i n kW
pfa = atand ( sqrt (3) *( dw / tw ) ) ;
pf = cosd ( pfa ) ; // // power f a c t o r when s e c o n d r e a d i n g i s
o b t a i n e d by r e v e r s i n g t h e c o n n e c t i o n
disp ( pf , power f a c t o r when s e c o n d r e a d i n g i s
o b t a i n e d by r e v e r s i n g t h e c o n n e c t i o n s )

97

You might also like