In [2]:

```
import math
#case a
f=150
p=2
#assume the diameter of the stator bore is d meter
n=120*50/2 #where n is rotor speed
print "n=",round(n,0),"rpm"
pi=3.14
d=(120*60)/(pi*3000)
print "D=",round(d,3),"m"
#case b
k=2
l=1
o=k*d**2*n*l
print "output of the alternator=",round(o,3),"KVA"
```

In [3]:

```
import math
#The total number of cycles the clock should perform in 24 hours for correct time is
t=24*60*60*50
print "The total number of cycles the clock should perform in 24 hours for correct time is=",round(t,0)
#The number of cycles the clock performs from 8am to 7pm is
n=(6*49.95+5*49.90)*60*60
print "The number of cycles clock performs from 8am to 7pm is=",round(n,0)
#the number of cycles required in remaining 13 hours is t-n that is 2342.88*10**3
a=(2342.88*10**3)/(13*60*60)
print "The desired average frequency for correct time for remaining 13 hours is=",round(a,5)
#The shortfall in number of cycles from 8am to 7pm
s=0.05*6+0.10*5
print "s=",round(s,3)
#The time by which the clock is incorrect at 7pm
time=(0.8*60*60)/50
print "time=",round(time,5)
```

In [5]:

```
import math
#given
n=500 #speed to rotation
p=12 #poles
#case a
f=n*p/120 #frequency
print "frequency=",round(f,0),"Hz"
#case b
kp=1 #kp is the winding at full pitch
#kd is the distribution factor where kd=sin[mk/2]/msin(k/2) where k is a gama function
#m=108/12*3
m=3
#gama or k=180/slots per pole=9 k=20
#after substituting above values in kd we get kd=0.96
#z=108*12/3 = 432
ep=2.22*1*0.96*432*50*50*10**-3
print "Phase emf=",round(ep,3),"v"
#case c
vl=3**0.5*ep
print "The line voltage is=",round(vl,3),"v"
```

In [6]:

```
import math
#given
f=50 #frequency
p=10 #number of poles
#case a
n=120*f/p
print "n=",round(n,0),"rpm"
#case b
#the pitch factor kp=0.966
#m=2 and gama=180/slots per pole and it is obtained as 30
#kd=sin[(mgama)/2]/msin(gama/2)=0.966
z=6*2*10
ep=z*2.22*0.966*0.966*50*0.15
print "phase emf=",round(ep,5),"v"
#case c
el=3**0.5*ep
print "the line voltage=",round(el,3),"v"
```

In [7]:

```
import math
#given
vt=1905.26 #at angle 0
angle=36.87
ia=43.74 #at angle -36.87
zs=3.51 #at angle 85.91
#e=vt+ia*zs
#(1905.26+43.74*3.51angle(85.91-36.87))
#1905.26+153.35angle(49.04)
#1905.26+153.35*(0.6558+j0.7551)
#=2009.03 angle(3.31)
p=((2009.03-1905.26)/1905.26)*100
print p
```

In [8]:

```
import math
#given
zs=4 # at angle 84.26
xs=3.98
impangle=84.26
#case a
#vt=2200+j0
#ia=120
#e=vt+ia*zs
#on substituting and calculating we get the value of e as 2298.17 at 12 degrees
p=((2298.17-2200)/2200)*100
print p
#case b
#performing same functions as above for pf leading 0.8 we get e=1994.63 at 12 degrees
p=((1994.63-2200)/2200)*100
print p
#case c
#same as above but pf lags by 0.707 and on calculating generates e as 2589.53
p=((2589.53-2200)/2200)*100
print p
```

In [1]:

```
import math
#From the circuit diagram of the figure we can obtain tha following equations based on which the problems are solved
#eqn 1..........vl=(i1+i2)*zl....the load voltage
#eqn 2..........vl=e1-i1*z1=e2-i2*z2
#eqn 3..........i1=(e1-vl)*y1 and i2=(e2-vl)*y2
#eqn 4..........vl=(e1*y1+e2+y2)/(y1+y2+yl)
#load voltage case a
#vl=209.26-j*9.7 in x+iy form and angle is calculated
vl=(209.26**2+9.7**2)**0.5
print "load voltage=",round(vl,5),"v"
#using eqn 3 the following generator currents are generated
#i1=7.45-j5.92 for which i1=9.52 at angle -38.45 is generated
#i2=8.91-j7.17 for which i2=11.43 at angle -38.83 is generated
#case b
#the load current il=i1+i2 is obtained as 20.95 at angle -38.65
print "the load current is 20.95 at angle -38.65"
#case c
g1=220*9.52
g2=220*11.43
print "The output of generator1=",round(g1,3),"VA"
print "The output of generator2=",round(g2,4),"VA"
```

In [2]:

```
import math
#case a
#case 1
v=6600 #voltage
ir=200 #armature current
xs=8 #reactance
e=(v**2+(ir*xs))**0.5
print "E=",round(e,5),"V"
#case 2
#from triangle in the firgure the power angle is obtained as 13.63
print "The power angle=13.63"
#case b
#due to excitation we obtain ix=217.10A
#case 3
ix=217.10
i=((ir**2+ix**2))**0.5
print "Armature current=",round(i,5),"A"
#case 4
#power factor cos(angle)=ir/i=0.68
print "power factor=0.68"
```

In [1]:

```
import math
#this problem has few notations and values taken from problem above
#case a
#the generator output becomes 1.5*6600*200
o=1980 #generator output
#the power angle is obtaimed as 16.42
#applying cosine to the triangle in the problem gives ixs=2853.02
#hence armature current is
i=2853.02/8
print "armature current=",round(i,5),"A"
#case b
pf=1980000/(6600*356.63) #power factor=o/(V*I)
print "power factor=",round(pf,5)
```

In [2]:

```
import math
#case a
vl=11000
il=50
pf=0.85 #powerfactor
p=vl*il*pf
print "Power supplied to the motor is=",round(p,5),"kW"
#case b
vt=6350.85 #at angle 0
zs=25.02 #at angle 0
#subcase 1 powerfactor at 0.85 lag
#e=vt-ia*zs
#e=6350.85-50(at angle -31.79)*25.02(at angle 87.71)
#substituting and solving as in x+iy form we get 5744.08 at angle -10.39 as the value of e
print "emf induced=5744.08 at angle -10.39"
#subcase 2
#for a 0.85 lead same process as above is followed except angles are considered positive due to lead
print "emf induced=7051.44 at angle -8.88"
```

In [3]:

```
import math
#given and calculted using regular formulas
p=14.38
q=10.78 #reactive power component
pm=8.95 #mechanical load driven by motor
#In order to make pf of the circuit load to improve to unity the motor must supply power to the circuit equalling q
#hence total input power s to the motor maybe written as s=(pm/n)+jQ
#on sustituting values we get s=10.53+j10.78 KVA
i=((10.53**2+10.78**2)**0.5)
print "input KVA to the motor is=",round(i,3)
#from the triangle the angle is obtained as 45.67
#hence the power factor is cos(45.67)=0.70
print "the power factor=0.70"
```

In [ ]:

```
```