# chapter6, Control Of DC Drives¶

## Example 6_1 : page 173¶

In [1]:
from __future__ import division
from numpy import array, sqrt, nditer
#Given data:
hp=array([50,100,150,120,0]) #hp
t=array([20,20,10,20,15]) #seconds

#Solution :
def rms(hp,t):
it = nditer([hp,t,None])
for x,y,z in it:
z[...] = (x**2*y) #hp
return it.operands[2]
hp_rms_t = rms(hp,t)
hp_rms=sqrt(sum(hp_rms_t)/sum(t)) #hp
print "Required hp = %0.2f hp" %hp_rms
print "Motor size should be 100 hp"

Required hp = 94.74 hp
Motor size should be 100 hp


## Example 6_2 : page 174¶

In [2]:
from __future__ import division
import math
from sympy import symbols, simplify, solve, exp
#Given data:
P=30 #kW
theta1=30.0 #degree C
t1=40 #minutes
theta2=45 #degree C
t2=80 #minutes
t2=2*t1 #minutes
Loss_fl=2 #kW
Loss_Cu=2.5 #kW

#Solution :
#formula : theta1=theta_f*(1-exp(-t1/T))
T = symbols('T')
expr = theta1/theta2-(1-exp(-t1/T))/(1-exp(-t2/T))
expr = simplify(expr)
T = solve(expr, T)[0] # minutes
print "Thermal time constant = %0.2f minutes" %T
theta_f=theta1/(1-math.exp(-t1/T))
print "Final temperature rise = %0.f degrees" %theta_f
alfa=Loss_fl/Loss_Cu
t=20 #minutes
rating=P*math.sqrt((1+alfa)/(1-math.exp(-t/T))-alfa) #kW
print "20 minute rating of motor = %0.2f kW " %rating

Thermal time constant = 57.71 minutes
Final temperature rise = 60 degrees
20 minute rating of motor = 69.36 kW


## Example 6_3 : page 187¶

In [3]:
from __future__ import division
from math import sqrt, pi, acos, degrees
#Given data:
V=230 #V
f=50 #Hz
alfa=0 #degree
Rf=200 #ohm
Ra=0.3 #ohm
T=50 #N-m
N=900 #rpm
Kt=0.8 #N-m/A**2

#Solution :
Vm=V*sqrt(2) #V
Vf=2*Vm/pi #V
If=Vf/Rf #A
print "Field current = %0.4f A " %If
Ia=T/(Kt*If) #A
Eb=Kv*omega*If #V
Va=Eb+Ia*Ra #V
alfa_a=degrees(acos(Va/(Vm/pi)-1)) #degree
print "Firing angle of armature circuit = %0.3f degree" %alfa_a
Pout=Va*Ia #W

Field current = 1.0354 A