In [1]:

```
from __future__ import division
from math import *
#Variable declaration:
Vt=[128, 124] #Terminal voltage(V)
Ea=125 #Generated emf(V)
Ra=0.02 #Armature resistance(ohm)
n=3000 #rpm
#Calculations:
#For 128 V
Ia1=(Vt[0]-Ea)/Ra
Pin1=Vt[0]*Ia1
Pe1=Ea*Ia1
wm=3000*2*pi/60
Tmech1=Ea*Ia1/wm
#for 124 V
Ia2=(-Vt[1]+Ea)/Ra
Pin2=Vt[1]*Ia2
Pe2=Ea*Ia2
Tmech2=Ea*Ia2/wm
#Results:
print "(a) Armature current:",Ia1,"A","\n Terminal power:",Pin1/10**3,"kW"
print " Electromagnetic power:",round(Pe1/10**3,2),"kW"
print " Torque:",round(Tmech1,1),"Nm"
print "(b) Armature current:",Ia2,"A","\n Terminal power:",Pin2/10**3,"kW"
print " Electromagnetic power:",round(Pe2/10**3,2),"kW",
print "\n Torque:",round(Tmech2,1),"Nm"
```

In [3]:

```
from __future__ import division
#Variable declaration:
Vt=123 #terminal voltage(V)
Pt=21.9 #Terminal power(kW)
Ra=0.02 #ohm
Eao=125 #generated voltage(V) at 3000rpm
no=3000 #rpm
#calculations:
Ia=Pt*10**3/Vt
Ea=Vt-Ia*Ra
n=(Ea/Eao)*no
#Results:
print "Speed of motor:",round(n,0),"rpm"
```

In [4]:

```
from __future__ import division
#Variable declaration:
Il=400 #Armature current(A)
If=4.7 #Field current(A)
Ns=3 #series turns per pole
Nf=1000 #shunt field turns per pole
Eao=274 #at Ia=0,(V)
n=1150 #speed of motor(rpm)
no=1200 #rated speed(rpm)
Ra=0.025 #armature resistance(ohm)
Rs=0.005 #series field resistance(ohm)
#Calculations:
Is=Il+If
GM=If+(Ns/Nf)*Is #for graphical analysis
Ea=(n/no)*Eao
Vt=Ea-Is*(Ra+Rs)
#Results:
print "Terminal voltage at rated terminal current:",round(Vt,0),"V"
```

In [4]:

```
from __future__ import division
#Variable declaration:
Il=400 #Armature current(A)
If=4.7 #Field current(A)
Ns=3 #series turns per pole
Nf=1000 #shunt field turns per pole
Eao=261 #at Ia=400 A,(V)
n=1150 #speed of motor(rpm)
no=1200 #rated speed(rpm)
Ra=0.025 #armature resistance(ohm)
Rs=0.005 #series field resistance(ohm)
#Calculations:
Ea=(n/no)*Eao
Vt=Ea-(Il+If)*(Ra+Rs)
#Results:
print "Terminal voltage:", round(Vt,0), "V"
```

In [5]:

```
from __future__ import division
#Variable declaration:
Il=400 #Armature current(A)
If=4.7 #Field current(A)
Ns=3 #series turns per pole
Nf=1000 #shunt field turns per pole
Eao=269 #at Ia=400 A,(V)
n=1150 #speed of motor(rpm)
no=1200 #rated speed(rpm)
Ra=0.025 #armature resistance(ohm)
Rs=0.007 #series field resistance(ohm)
#Calculations:
Is=Il+If
GM=If+(Ns/Nf)*Is #for graphical analysis
Ea=(n/no)*Eao
Vt=Ea-Is*(Ra+Rs)
#Results:
print "Terminal voltage at rated terminal current:",round(Vt,0),"V"
```

In [2]:

```
from __future__ import division
from sympy import *
#Variable declaration:
Ns=4 #Series field turns
Nf=1000 #Shunt field turns
Vt=250 #Full load voltage(V)
#for part (a):
Ia=400 #Armature current(A)
Ra=0.025 #Armature resistance(ohm)
#for part (b):
Rs=0.005 #Added sries resistance(ohm)
Vo=250 #No load voltage(V)
If=5 #field current at full load(A)
#Calculations & Results:
#for part (a)
V1=Ia*Ra
#for part (b):
Ia1=Ia+If
Rs,Rd=symbols('Rs Rd') #Rd= diverter resistance(ohm)
Rp=Rs*Rd/(Rs+Rd) # -------(i)
Is=Ia1*(Rd/(Rs+Rd))
Inet=If+(Ns/Nf)*Is
Ea=Vt+Ia*(Ra+Rp) # -------(ii)
#from equation (ii)
Rp=Rs(Inet-5.0)/1.62
R_d=0.0082 #R_d=Rd(say), using (i)
print "(a) The operating terminal voltage = 205 V", Inet
print "(b) Rd =", R_d,"ohm"
print "\tHence, by this process, resistance across the series field"
print "\t(referred to as a series-field diverter) can be adjusted "
print "\tto produce the desired performance. "
```

In [6]:

```
from __future__ import division
#Variable declaration:
Ia=400 #Armature current(A)
n1=1200 #rpm
n2=1100 #rpm
Ra=0.025 #armature resistance(ohm)
Eo=250 #no load armature voltage(V)
del_n=1.5 #fractional winding added
N=1000 #Total windings
#Calculations:
#for part(a):
#point corresponding on the no load saturation curve is :
Eao=Eo*(n1/n2)
#using Eao value in curve, value of If is found to be:
If=5.90 #Field current(A)
Ea=Eo-Ia*Ra
#From Fig. 7.14
Ea1=261
n=n1*(Ea/Ea1)
Pe=Ea*Ia
Pl=2000 #No load Rotational loss(W)
Po=(Pe-Pl)/(1+0.01)
#for part (b):
If1=If+del_n/N
#From Fig. 7.14 the corresponding value of Ea at 1200 r/min would be 271 V.
Ea2=271 #volts
n22=n1*(Ea/Ea2)
#Results:
print "Part(a):"
print "Required speed =",round(n),"r/min"
print "Output power =", round((Po/746),1),"hp"
print "\nPart (b):"
print "Required speed =",round(n22),"r/min"
```

In [3]:

```
from __future__ import division
from math import *
#Variable declaration:
V1=50 #terminal voltage(V)
Ia=1.25 #Armature current(A)
Ra=1.03 #Armature resistance(ohm)
n1=2100 #speed at 50V(rpm)
V2=48 #terminal voltage at 1700 rpm (V)
n2=1700 #speed at 48 V(rpm)
#Calculations:
#for (a):
Ea1=V1-Ia*Ra
wm1=n1*2*pi/60
Km=round(Ea1/wm1,2)
#for part(b):
Prot=Ea1*Ia
#for part(c:)
wm2=n2*2*pi/60
Ea2=Km*wm2
Ia2=(V2-Ea2)/Ra
Pmech=Ea2*Ia2
Pshaft=Pmech-Prot
#Results:
print "(a) Torque constant:",round(Km,2),"V/(rad/s)"
print "(b) No-load rotational losses of the motor:",round(Prot,0),"W"
print "(c) The power output of the motor:",round(Pshaft,2),"W"
```