In [1]:

```
import math
from __future__ import division
#variable declaration
T_min=40 # minimum temperature rise in degree Celsius
T_r=15 # temperature rise when the load is declutched continously in degree Celsius
t_c=10 # time for which the motor is clutched to its load in sec
t_d=20 # time for which the motor is declutched to run on no-load in sec
C= 60 # time constants for both heating and cooling
#calculation
x=math.exp(-t_d/C)
y=math.exp(-t_c/C)
theta2= (T_min-T_r*(1-x))/x #since T_min=T_r(1-x)+theta2*x
theta_ss=(theta2-T_min*y)/(1-y) #since theta2=theta_ss(1-y)+T_min*y
#results
print"\n maximum temperature during the duty cycle :",round(theta2,1),"°C"
print"\n temperature when the load is clutched continously :",round(theta_ss,1),"°C"
```

In [3]:

```
import math
from __future__ import division
#variable declaration
N=200 #full speed of the motor in rpm
Tc=25000 #constant torque in N-m
J=10000 #moment of inertia referred to te motor shaft in Kg-m2
#duty cycles
t1=10 #rolling at full speed and at constant torque
t2=1 #no load operation at full speed
t3=5 #speed reversal from N to -N
t4=1 #no load operation at full speed
T5=20000 #torque in N-m
t5=15 #rolling at full speed and at a torque T1
t6=1 #no operation at full speed
t7=5 #speed reversal from -N to N
t8=1 #no load operation
#calculation
Tr=J*(N-(-N))*2*math.pi/60/5 #torque during reversal
x=Tc**2*t1+Tr**2*t3+T5**2*t5+Tr**2*t7
t=t1+t2+t3+t4+t5+t6+t7+t8 #total time
Trms=math.sqrt(x/t) #rms torque
Trated=Trms #rated torque is equal to the rms torque
Pr=Trated*2*math.pi*200/60 #power rating
ratio=Tr/Trms #ratio of reversal torque to the rms torque
#results
#answer in the book is wrong
print"\n motor torque is :Trms=",round(Trms),"N-m"
if ratio<2:
print" motor can be rated as equal to Trms"
print" Power rating : P=",round(Pr*1e-3,3),"kW"
```

In [4]:

```
import math
import scipy
from scipy import integrate
#variable declaration
P1=400 #load in kW
P2=500 #load in KW
Pmax=P2
#duty cycles in minutes
t1=5 #load rising from 0 to P1
t2=5 #uniform load of P2
t3=4 #regenerative power equal to P1
t4=2 #motor remains idle
#calculation
a = lambda x: (P1/5*x)**2
t=integrate.quad(a,0,t1)
P11=math.sqrt(t[0]/t1)
x=P11**2*t1+P2**2*t2+P1**2*t3
t=t1+t2+t3+t4 #total time
Prms=math.sqrt(x/t)
#results
y=2*Prms
if P2<y:
print " Hence Pmax:",Pmax,"kW is less than twice Prms:",2*round(Prms,1),"kW"
print"\n Hence Motor rating is: ",round(Prms),"kW"
```

In [5]:

```
import math
from __future__ import division
#variable declaration
Cr=60 #heating time constant in minutes
Cs=90 #cooling time constant in minutes
P=20 #full load in kW
#calculation
#part(i)
alpha=0 #constant copper losses are assumed to be proportional to Power**2 which is zero
tr=10 #time for the load motor to deliver in minutes
x=math.exp(-tr/Cr)
K=math.sqrt(1/(1-x))
P1=K*P #permitted load
#part(ii)
alpha=0 #constant copper losses are assumed to be proportional to Power**2 which is zero
tr=10 #intermittent load period allowed in minutes
ts=10 #shutdown period in minutes
x=math.exp(-(tr/Cr+ts/Cs))
y=math.exp(-tr/Cr)
K=math.sqrt((1-x)/(1-y))
P2=K*P #permitted load
#results
print"\ni)required permitted load:",round(P1),"kW"
print"\nii)required permitted load:",round(P2,2),"kW"
```

In [12]:

```
import math
from sympy import Symbol
from __future__ import division
#variable declaration
P=100 #Half hour rating of the motor
Cr=80 #heating time constant in minutes
n=0.7 #maximum efficiency at full load
#calculation
Pc = Symbol('Pc') #constant loss
Pcu=Pc/n**2 #coppper loss
alpha=Pc/Pcu
K=math.sqrt((1+alpha)/(1-math.e**(-30/Cr))-alpha)
Pco=P/K
print"Therefore continous rating is:",round(Pco,2),"kW"
```

In [5]:

```
import math
from __future__ import division
#variable declaration
I=500 #rated armature current in A
Ra=0.01 #armature resistance in ohm
P=1000 #core loss in W
B=0.5
#duty cycles
tst=10 #interval for accelaration at twice the rated current
tr=10 #interval for running at full load
tb=10 #inteval fordecelaration at twice the rated armature current
#calculations
Es=tst*(2*I)**2*Ra+P
Eb=Es
p1s_tr=(I**2*Ra+P)*tr
p1r=I**2*Ra+P
gamma=(1+B)/2
x=(Es+p1s_tr+Eb)/p1r
y=gamma*tst+tr+gamma*tb
ts=(x-y)/B #idling interval
fmax=3600/(tst+tr+tb+ts) #maximum frequency of drive operation
#results
#answer in the book is wrong
print"\nmaximum frequency of drive operation: fmax = ",round(fmax,2),"per hour"
```