#calculate the Total annual cost in both cases
#Initialization of variables
C_g=60000.;#in Rs
C_id=18750*10;#in Rs
E_c=75000;#in kWh
E_a=60000;#in kWh
#Calculations
D=0.12*C_g;#in Rs
C_e=4*E_c;#in Rs
C_t=D+C_e;#in Rs
AD=0.15*C_id;#in Rs
C_ea=4*E_a;#in Rs
C_total=AD+C_ea;#in Rs
#Results
print 'Total annual cost in case of group drive (in Rs)=',C_t
print 'Total annual cost in case of individual drive (in Rs)=',C_total
#calculate the stable operating point
import math
#Initialization of variables
a=1;
b=1;
c=-30;
#Calculations
w_m=(-b+math.sqrt((b**2)-4*a*c))/(2*a);#speed of the drive
t_l=0.5*(w_m**2);#motoring torqe
#Results
print 'stable operating point=',w_m,t_l
#calculate the power developed by the motor
#Initialization of variables
import math
J_m=0.4;#motor inertia(in Kg-m2)
J_l=10.;#load inertia(in Kg-m2)
a=0.1;#Teeth ratio of gear
i=1./a;
N=1400.;
pi=22./7.;
n=0.90;#efficency of motor
T_l=50.;#Torque(N-m)
#Calculations
J=J_m+J_l/(i**2);#Total moment of inertia referred to the motor shaft
T_L=T_l/(i*n);#total equivalent torque referref to motor shaft
P=T_L*2*pi*N/60.;#power developed by motor
#Results
print 'power developed by motor(in Watt)=',math.ceil(P)
#calculate the total torque and power developed
#Initialization of variables
import math
J_m=0.4;#motor inertia(in Kg-m2)
J_l=10;#load inertia(in Kg-m2)
a=0.1;#Teeth ratio of gear
N=1500.;
n_t=0.88;
m=600.;#weight
g=9.81;
#Calculations
f_r=m*g;#force
w_m=2*math.pi*N/60.;#motor speed
w=2.;#uniform speed of weight lifting
n=0.9;#efficency of motor
T_l=50;#Torque(N-m)
J=J_m+(a**2)*J_l+m*((w/w_m)**2);#Total moment of inertia referred to the motor shaft
T_L=(a*T_l/n)+f_r*w/(n_t*w_m) ;#total equivalent torque referred to motor shaft
p=T_L*w_m;#power developed by motor(in Watt)
P=p/1000.;#power developed by motor(in kWatt)
#Results
print 'Total torque referred to motor shaft(in kg-m2)=',round(J,2)
print 'Total equivalent Torque referred to motor shaft(in N-m)=',round(T_L,2)
print 'power developed by motor(in kWatt)=',round(P,2)
print 'The answers are a bit different from textbook due to rounding off error'
#calculate the Motor Speed
#Initialization of variables
import math
from math import ceil
V=220.;#in volts
V_1=200.;#in volts
N=1000.;#in rpm
I=100.;#in amperes
R_a=0.1;#in ohms
#Calculations
E_b=V-I*R_a;#in volts
I_1=I;#in amperes
E_b1=V_1-I_1*R_a;#in volts
N_1=N*E_b1/E_b;
#Results
print 'Motor Speed (in rpm)=',ceil(N_1)
#calculate the full load Speed and Torque
#Initialization of variables
import math
from math import ceil
V=230;#in volts
R_sh=230;#in ohms
R_a=0.5;#in ohms
I_sh=V/R_sh;#in amperes
#Calculations
I_lo=3;#in amperes
I_ao=I_lo-I_sh;#in amperes
E_bo=V-I_ao*R_a;#in volts
N_o=1000;#in rpm
I_lf=23;#in amperes
I_af=I_lf-I_sh;#in amperes
E_bf=V-I_af*R_a;#in volts
Phy_ratio=0.98;
N_f=N_o*(E_bf/E_bo)/Phy_ratio;
T_f=9.55*E_bf*I_af/N_f;
#Results
print 'Full Load Speed (in rpm)=',ceil(N_f)
print 'Full load Torque (in Newton-meter)=',round(T_f,2)
#calculate the Armature voltage drop at full load
#Initialization of variables
V=440.;#in volts
N_o=2000.;#in rpm
E_bo=440.;#in volts
N_f=1000.;#in rpm
N_h=1050.;#in rpm
#Calculations
E_bf=E_bo*N_f/N_o#in volts
E_b=E_bo*N_h/N_o;#in volts
v=(E_b-E_bf)*2;
#Results
print 'Armature voltage drop at full load (in volts)=',v
#calculate the Speed
#Initialization of variables
V=230.;#in volts
N1=750.;#in rpm
R=10.;#in ohms
I_a=30.;#in amperes
#Calculations
N2=N1*((V+I_a*R)/V)**-1;
#Results
print'Speed (in rpm)=',int(N2)
#calculate the Speed in both cases
import math
from math import ceil
#Initialization of variables
V=200.;#in volts
I_1=20.#in amperes
R_a=0.5;#in ohms
#Calculations
E_b1=V-I_1*R_a;#in volts
N1=700;#in rpm
I_2=math.sqrt(1.44)*I_1;#in amperes
E_b2=V-I_2*R_a;#in volts
N2=N1*(E_b2/E_b1)*(I_1/I_2);
I_3=10;#in amperes
E_b3=V-I_3*R_a;#in volts
N3=N1*(E_b3/E_b1)*(I_1/I_3);
#Results
print '(a) Speed (in rpm)=',round(N2,1)
print '(b) Speed (in rpm)=',ceil(N3)
#calculate the Torque and Speed
#Initialization of variables
import math
from math import ceil
V=230.;#in volts
I_1=90.;#in amperes
R_a=0.08;#in ohms
R_se=0.05;#in ohms
E_2=180.;#in volts
N2=700.;#in rpm
R=1.5;#in ohms
#Calculations
R_m=R_a+R_se;#in ohms
E_b1=V-I_1*(R_m+R);#in volts
N1=N2*(E_b1/E_2);
T=9.55*E_b1*I_1/N1;
#Results
print 'Speed (in rpm)=',ceil(N1)
print 'Torque (in Newton-meter)=',round(T,0)
#calculate the torque developed and Terminal Voltage
#Initialization of variables
import math
P=4.;#no. of poles
f=50.;#in hertz
N_s=120.*f/P;#in rpm
V=400/math.sqrt(3.);#in volts
R2=4;#in ohms
R1=1.5;#in ohms
X1=4.;#in ohms
X2=4.;#in ohms
N=1350.;#in rpm
#Calculations
s=(N_s-N)/N_s;#slip
T=(3*V**2*4./s)/((((R1+(R2/s))**2)+((X1+X2)**2))*(2*math.pi*N_s/60.));#in newton-meter
N1=900.;#in rpm
s1=(N_s-N1)/N_s;#slip
T1=T*(N1/N)**2;
V1=V*math.sqrt((N1/N)**2*(s1/s)*((((R1+(R2/s1))**2)+((X1+X2)**2)))/(((R1+(R2/s))**2)+((X1+X2)**2)));
#Results
print 'Torque developed (in Newton-meter)=',round(T1,2)
print 'Terminal Voltage (in volts)=',round(V1,2)
print 'Answer given in the textbook is worng as the torque equation is not multiplied by R2'
#calculate the RMS Voltage
#Initialization of variables
import math
P=4.;#no. of poles
f=50.;#in hertz
N_s=120.*f/P;#in rpm
s_f=0.05;#slip
V=415;#in volts
s_m=0.1;#slip corresponding to maximum slip
N1=1350.;#in rpm
#Calculations
N=N_s*(1-s_f);#in rpm
s_fn=(N_s-N1)/N_s;#full load slip
V1=V*math.sqrt((N1/N)*(s_f/s_m)*(8./5.));
#Results
print ' RMS Voltage (in volts)=',round(V1,1)
#calculate the slip Frequency
#Initialization of variables
import math
f1=2;#in hertz
f=50;#in hertz
s_m=0.1;
V=400;#in volts
s1=0.04;#slip
#Calculations
s2=(0.2095-math.sqrt((0.2095)**2-s1))/2.;
f_n=s2*40;
#Results
print 'Slip Frequency (in Hertz)=',round(f_n,2)
#calculate the maximum torque
#Initialization of variables
import math
R1=0.02;#in ohms
X1=0.1;#in ohms
X2=X1;#in ohms
#T_ratio is defined as the ratio of maximum torque at one-half load and 25Hz frequency to maximum torque at rated voltage and frequency
#Calculations
T_ratio=(R1+math.sqrt(R1**2+(X1+X2)**2))/(2*(R1+math.sqrt(R1**2+((X1+X2)**2)/4)));
#Results
print ' maximum torque at one-half load and 25Hz frequency =',round(T_ratio,4)
print' times the maximum torque at rated voltage and frequency (T_max)'
#calculate the starting torque, slip and ratio
#Initialization of variables
import math
s_f=0.04;#full load slip
I_ratio=6.;#Ratio of Starting current to full load current
#Calculations
T_ratio=I_ratio**2*s_f;#Ratio of Starting torque to full load torque
s_max=math.sqrt((I_ratio**2-1)/(625.-I_ratio**2.));
T_rm=(1./2.)*((s_f/s_max)+(s_max/s_f));
#Results
print '(a) Starting Torque =',T_ratio
print ' times the full load torque (T_f)'
print'(b) Slip at which Maximum torque occurs=',round(s_max,3)
print'(c) Ratio of maximum torque to full load torque=',round(T_rm,3)
#calculate the starting torque in all cases
#Initialization of variables
import math
I_ratio=8.;#Ratio of short circuit current to full load current
s_f=0.04;#full load slip
#Calculations
T_r1=I_ratio**2*s_f;
T_r2=I_ratio**2*s_f/3.;
K=math.sqrt(3./8.);# transformation ratio of transformer
T_st=K**2*I_ratio**2*s_f;
#Results
print '(a) Starting Torque when started by means of direct switching=',T_r1
print(' times the full load torque');
print '(b) Starting Torque when started by star-delta starter=',round(T_r2,3)
print(' times the full load torque');
print '(C) Starting Torque =',T_st
print(' times the full load torque');
#calculate the Ratio of starting current to full load current
#Initialization of variables
import math
P=10.*7355;#in watts
V=400.;#in volts
pf=0.8#power factor
Eff=0.9;#efficiency in per unit
#Calculations
I_f=P/(math.sqrt(3.)*V*pf*Eff);#in amperes
I_sc=7.2;#in amperes
I_sc1=I_sc*400./160;#in amperes
I_st=I_sc1/3.;#Starting current (in amperes)
I_r=I_st/I_f;
#Results
print'Ratio of starting current to full load current=',round(I_r,4)
#calculate the tap Position of auto transformer and Ratio of Starting torque to full load torque
#Initialization of variables
import math
P_o=50.*1000;#in VA
s_f=0.05;#slip
V=400.;#in volts
#Calculations
I_f=P_o/(math.sqrt(3.)*V);#in amperes
Z=0.866;#in ohms/phase
I_sc=V/(math.sqrt(3)*Z);#Short Circuit current (in amperes)
I_st=100;#Supply current at start (in amperes)
K=math.sqrt(I_st/I_sc);
I_ratio=I_sc/I_f;
T_r=K**2*I_ratio**2*s_f;
#Results
print 'Tap Position of auto transformer(in %)=',round(K*100,2)
print 'Ratio of Starting torque to full load torque =',round(T_r,3)
#calculate the Starting current and Torque of the motor
#Initialization of variables
import math
from math import sqrt
V=440./sqrt(3);#in volts
R_s=2.;#in ohms
R_r=2.;#in ohms
f=50.;#in hertz
X_s=3.;#in ohms
P=4.;#no. of poles
X_r=3.;#in ohms
#Calculations
R_o1=R_s+R_r;#Equivalent resistance of motor as referred to stator (in ohms)
X_o1=X_s+X_r;##Equivalent reactance of motor as referred to stator (in ohms)
I_st=V/(sqrt(R_o1**2+X_o1**2));#Starting current (in amperes)
P_cu=3*I_st**2*R_r;#Copper loss (in watts)
P2=7446;#in watts
N_s=120*f/P;#Synchronous Speed (in rpm)
T_st=9.55*P2/N_s;#Starting Torque (in Newton-meter)
V1=V*10/50;#in volts
X_o2=X_o1*10/50;#in ohms
I_st1=V1/(sqrt(R_o1**2+X_o2**2));#Starting current (in amperes)
P_2=3*I_st1**2*R_r;#Copper loss (in watts)
N_s1=120*10./P;#Synchronous Speed (in rpm)
T_st2=9.55*P_2/N_s1;#Starting Torque (in Newton-meter)
#Results
print'Starting Current of motor at 50 Hertz (in amperes)=',round(I_st,2)
print 'Starting Torque of motor at 50 hertz (in Newton-meters)=',round(T_st,2)
print 'Starting Current of motor at 10 Hertz (in amperes)=',round(I_st1,3)
print 'Starting Torque of motor at 10 hertz (in Newton-meters)=',round(T_st2,3)
#calculate the Moment of inertia of drive
import math
#Initialization of variables
T_m=100;#Motor Torque (in Newton-meter)
T_l=30;#Load Torque (in Newton-meter)
#Calculations
alpha=2*math.pi*10;#in angular acceleration (in rad/sec**2)
J=(T_m-T_l)/alpha;
#Results
print'Moment of inertia of drive (in Kg-m^2)',round(J,3)
#calculate the time required
#Initialization of variables
import math
P_o=37.5*1000;#in watts
N=500.;#in rpm
#Calculations
T_l=P_o*60/(2*math.pi*N);#Full load torque (in Newton-meter)
T_st=(1.1+1.4)*T_l/2;# Average Starting Torque (in Newton-meters)
T_a=T_st-T_l;#total available torque for acceleration
J=20;#Moment of Inertia (in Kg-m**2)
t1=J*2*math.pi*N/(60*T_a);
#Results
print 'Time in attaining full load speed (in seconds)=',round(t1,2)
#calculate the starting Period
#Initialization of variables
import math
P_o=37.5*1000.;#in watts
N=500.;#in rpm
#Calculations
T_l=P_o*60/(2*math.pi*N);#Full load torque (in Newton-meter)
T_m=2*T_l;# Torque developed by motor during starting
T_a=T_m-T_l;#total available torque for acceleration
E=37.5*660*9.81;#Stored energy of machine
J=E*2/(2*math.pi*N/60)**2;#Moment of inertia (in Kg-m**2)
alpha=T_a/J;#angular acceleration (in rad/sec**2)
t=(2*math.pi*N/60)/alpha;
#Results
print 'Starting Period (in seconds)=',round(t,2)
#calculate the Energy Dissipated
#Initialization of variables
V=220.;#in volts
I=20.;#in ampers
R=1;#in ohms
#Calculations
P_o=V*I-I**2*R;#Motor Output (in watts)
w=200;#in radians/second
T_l=P_o/w;#Load Torque (in N-m)
J=5;#kg-m**2
t_st=2.5;#in seconds
alpha=w/t_st;#angular acceleration (in rad/second**2)
K=(J*alpha+T_l)/I**2;
W_st=(J*R*w/K)+(T_l*R*t_st/K);
#Results
print 'Energy Dissipated (in watts)=',W_st
#calculate the Value of additional resistance
#Initialization of variables
I_l1=22.;#in amperes
V=220.;#in volts
R_sh=100.;#in ohms
R_a=0.1;#in ohms
#Calculations
I_sh=V/R_sh;#in amperes
I_a1=I_l1-I_sh;#armatur current (in amperes)
E_b1=V-I_a1*R_a;#Back Emf (in volts)
N1=1000;#in rpm
I_a2=0.8*19.8;#in amperes
R=(218.416-(800*218.02/1000))/I_a2;
I_a3=0.64*I_a1;#in amperes
R3=(218.7328-(800*218.02/1000))/I_a3;
#Results
print 'Value of additional resistance (in ohms)=',round(R,3)
print 'Value of additional resistance (in ohms)=',round(R3,3)
#calculate the Value of additional resistance
#Initialization of variables
import math
I_1=50;#in amperes
V=500;#in volts
N_ratio=0.5;#Speed Ratio
#Calculations
E_b1=V;#Back Emf (in volts)
T_ratio=N_ratio**3;#Torque ratio
I_2=I_1*math.sqrt(T_ratio);#in amperes
R=(E_b1-(I_2*N_ratio*E_b1/I_1))/I_2;
#Results
print 'Value of additional resistance (in ohms)=',round(R,3)
#calculate the value of Diverter resistance and Series field resistance
#Initialization of variables
#Calculations
#Results
N_ratio=1.2;#Speed Ratio
#From Saturation Curve
I_ratio=0.65;#feild current ratio corresponding to 83.3% of full load value of flux to 65% of full load value of flux
I_a_ratio=N_ratio;#Armature current ratio corresponding to 83.3% of full load value of flux to 65% of full load value of flux
R_ratio=I_ratio/(I_a_ratio-I_ratio);
print 'Value of Diverter resistance (in ohms)=',round(R_ratio,3)
print ' times the Series Field Resistance (R_se)'
#calculate the Armature current
#Initialization of variables
I_ab=800;#Armature current (in amperes)
N1=1000;#in rpm
N2=500.;#in rpm
#Calculations
I=I_ab*N1/N2;
#Results
print ' Armature Current at 1000 rpm (in amperes)=',I
#calculate the Value of additional resistance
#Initialization of variables
f=50;#in hertz
P=4.;#No.of poles
N_s=120*f/P;#Synchronous Speed (in rpm)
N=1440;#Full load speed (in rpm)
#Calculations
s1=(N_s-N)/N_s;#Full load Slip
N2=1200;#in rpm
s2=(N_s-N2)/N_s;#slip
R2=0.25;#ohms per phase
R=(s2*R2/s1)-R2;
#Results
print 'Value of additional resistance (in ohms)=',R
#calculate the Frequency of rotor current of 6-pole and 4 pole motor and slip referred
#Initialization of variables
f=50.;#in hertz
P1=6.;#No. of poles
P2=4.;#No.of poles
#Calculations
N_sc=120*f/(P1+P2);#Synchronous Speed (in rpm)
s=0.02;#slip
N=N_sc*(1-s);#Actual Speed (in rpm)
N_s=120*f/P1;#Synchronous Speed of 6-pole motor
s1=(N_s-N)/N_s;
f1=s1*f;
N_s2=120*f1/P2;#Synchronous Speed of 4-pole motor
s2=(N_s2-N)/N_s2;
f2=s2*f1;
#Results
print 'Frequency of rotor current of 6-pole motor (in Hertz)=',f1
print 'Slip referred to 6-pole stator field=',s1
print 'Frequency of rotor current of 4-pole motor (in Hertz)=',f2
print 'Slip referred to 4-pole stator field=',round(s2,4)
#calculate the Available speeds and Maximum load which can be delievered
#Initialization of variables
f=50.;#in hertz
P1=6.;#No. of poles
P2=4.;#No.of poles
P_o=15.;#in HP
#Calculations
N_s1=120*f/P1;#Synchronous Speed of 6-pole motor
N_s2=120*f/P2;#Synchronous Speed of 4-pole motor
N_sc1=120*f/(P1+P2);#Concantenated Speed of set when cumulatively compounded (in rpm)
N_sc2=120*f/(P1-P2);#Concantenated Speed of set when differentially compounded (in rpm)
r=P1/P2;
#Results
print(' Available Speeds (in rpm) are :');
print N_s1,N_s2,N_sc1,N_sc2
print 'Maximum Load which can be delievered (in HP)=',P_o
print 'Ratio of Mechanical Power Output',r
#calculate the resistance to be added
#Initialization of variables
import math
from math import sqrt
f=50.;#in hertz
V=440.;#in volts
P_o=110.*1000;#in watts
P=24.;#No.Of Poles
#Calculations
N_s=120*f/P;#Synchronous Speed (in rpm)
N=245;#in rpm
s_f=(N_s-N)/N_s;#Full load Speed
T_f=P_o/(2*math.pi*N/60);#Full load Torque (in N-m)
R=0.04;#in ohms
R2=R/2;#Rotor resistance per phase (in ohms)
K=1.25;# ratio of stator turns to rotor turns
R_2=R2*K**2;#Rotor resistance reffered to stator (in ohms)
X_2=sqrt(((V**2*R_2*1.2/(T_f*500*math.pi))-R_2**2)*(1/R2)**2);#in ohms
s=(N_s-175)/N_s;#slip at 175 rpm
T=T_f*175**2/N**2;#Torque at 175 rpm (in N-m)
b=-(V**2*s*60/(T*2*math.pi*N_s));
a=1;
c=(s*X_2)**2;
R_n=(-b+sqrt(b**2-4*a*c))/(2*a)
R_ext=(R_n-R_2)/K**2;
#Results
print'Resistance to be added to each slip ring (in ohms)=',round(R_ext,4)
#calculate the value of external resistance and Initial braking torque
#Initialization of variables
import math
I_f=100.;#in amperes
V=220.;#in volts
N=1000.;#in rpm
#Calculations
T_f=V*I_f/(2*math.pi*N/60);#Full load torque (N-m)
E_bf=V;#Back emf (in volts)
V_a=V+E_bf;# Voltage across armature (in volts)
I_b=2*I_f;#braking current
R=(V_a/I_b);#in ohms
T_b=T_f*I_b/I_f;
E_b1=E_bf*500/N;#in volts
I_b1=(V+E_b1)/R;#in amperes
T_b1=T_f*I_b1/I_f;
#Results
print 'Value of external resistance (in ohms)=',R
print 'Initial Braking Torque (in N-m)=',round(T_b,0)
print 'Braking Torque when speed reduced to 500 rpm (in N-m)=',round(T_b1,0)
#calculate the Value of external resistance and braking torque
#Initialization of variables
import math
P_o=17.6*1000;#in watts
Eff=0.8;#Efficiency
V=220.;#in volts
#Calculations
I_f=P_o/(V*Eff);#in amperes
I_af=I_f;#in amperes
R_a=0.1;#in ohms
N=1200;#in rpm
T_f=P_o/(2*math.pi*N/60);#Full load torque (N-m)
E_bf=V-I_af*R_a;#Back emf (in volts)
V_a=V+E_bf;# Voltage across armature (in volts)
I_b=2*I_f;#braking current
R=(V_a/I_b)-R_a;#in ohms
E_b1=E_bf*400/N;#in volts
I_b1=(V+E_b1)/(R+R_a);#in amperes
T_b1=T_f*I_b1/I_f;
#Results
print'Value of external resistance (in ohms)=',round(R,2)
print'Braking Torque when speed reduced to 400 rpm (in N-m)=',round(T_b1,2)
#calculate the Current Drawn and Value of additional resistance
#Initialization of variables
V=220;#in volts
P_o=400*9.81*2.5;#(in watts)
Eff=0.85;#efficiency of motor
Eff_h=0.8
#Calculations
P_in=P_o/(Eff*Eff_h);#in watts
I=P_in/V;#in amperes
P_out=P_o*Eff*Eff_h;#in watts
R=V**2/P_out;
#Results
print 'Current Drawn (in amperes)=',round(I,1)
print 'Value of additional resistance (in ohms)=',round(R,3)
#calculate the Externalm resistance to be inserted
#Initialization of variables
import math
T=245.;#in N-m
N=250.;#in rpm
#Calculations
P_in=T*2*math.pi*N/60;#in watts
#Corresponding to the value of P_in we found I=27.5A and E=233 V from the given curve shown in fig.1.102
E=233;#in volts
I=27.5;#in amperes
r=E/I;#resistance of the circuit
R=r-1;#External Resistance to be inserted (in ohms)
#Results
print'External Resistance to be inserted (in ohms)=',round(R,2)
#calculate the Speed under regenerative braking and plugging
#Initialization of variables
P_o=45*1000;#in watts
R_a=0.2;#in ohms
V=500;#in volts
Eff=0.9;#Efficiency
R_sh=200;#in ohms
#Calculations
I_lf=P_o/(V*Eff);#Rated Line current (in amperes)
I_sh=V/R_sh;#Shunt feild Current (in amperes)
I_af=I_lf-I_sh;#Armature current on full load (in Amperes)
E_f=V-I_af*R_a;#emf induced (in volts)
N_f=600;#in rpm
E1=V+I_af*R_a;#in volts
N1=E1*N_f/E_f;
E2=I_af*(5.5+R_a)-V;#in volts
N2=E2*N_f/E_f;
E3=I_af*(2.6+R_a);#in volts
N3=E3*N_f/E_f;
#Results
print'Speed under regenerative braking(in rpm)=',round(N1,1)
print 'Speed under plugging (in rpm)=',round(N2,1)
print 'Speed under dynamic braking(in rpm)=',round(N3,1)
#calculate the Speed
#Initialization of variables
import math
V=230.;#in volts
I_a=100.;#in amperes
R_a=0.05;#in ohms
N=870.;#in rpm
#Calculations
E_b=V-I_a*R_a;#in volts
T=E_b*I_a/(2*math.pi*N/60);#torque developed (in N-m)
T_l=400;#in N-m
I_an=I_a*T_l/T;#in amperes
E=V+I_an*R_a;#in volts
N1=N*E/230;
#Results
print'Speed (in rpm)=',round(N1,0)
#calculate the flux and speed
#Initialization of variables
import math
I_a1=100;#in Amperes
V=230;#in volts
R_a=0.1;#in ohms
E_b1=V-I_a1*R_a;#in volts
N1=500;#in rpm
N2=800;#in rpm
#Calculations
x=(V-math.sqrt((V**2)-4*10*352))/(2*10);
I_a2=I_a1*x;#in amperes
E_b2=V-I_a2*R_a;#in volts
T_2=E_b2*I_a2*60/(2*math.pi*N2);#in N-m
T_3=800;#in N-m
I_a3=I_a2*T_3/T_2;#in Amperes
E_b3=V+I_a3*R_a;#in amperes
N3=E_b3*N2/E_b2;
#Results
print'Flux is reduced by',round(x**-1,4)
print('times to get motor speed of 800 rpm');
print 'Speed (in rpm)=',math.ceil(N3)
#calculate the plugging Torque
#Initialization of variables
import math
f=50.;#in hertz
P=4.;#Number of poles
s_f=0.05;#Full load Slip
#Calculations
N_s=120*f/P;#Synchronous Speed (in rpm)
N_f=N_s*(1-s_f);#Full load speed (in rpm)
P_d=30*1000;#in watts
T_f=P_d/(2*math.pi*N_f/60.);#In N-m
s_2=2-s_f;#Slip at plugging
T_p=(s_2/s_f)*T_f*(1+16*s_f**2)/(1+16*s_2**2);
#Results
print'Plugging Torque (in N-m)=',round(T_p,2)
#calculate the Initial braking Torque and during dc dynamic
#Initialization of variables
import math
from math import sqrt
R2=0.5;#in ohms
X2=2.4;#in ohms
a=0.5;#ratio
s_f=0.05;#slip
f=50.;#in hertz
P=8.;#Number of Poles
#Calculations
R_2=R2*a**2;#in ohms
X_2=X2*a**2;#in ohms
s=2-s_f;#Slip during Plugging
N_s=120*f/P;#in rpm
V=400/sqrt(3);#in volts
R_L=2;#in ohms
R_1=0.1;#in ohms
X_1=0.6;#in ohms
I_2=V/sqrt(((R_1+(R_2+R_L)/s)**2)+(X_1+X_2)**2);#in amperes
T_b=3*60*I_2**2*(R_2+R_L)/(2*math.pi*N_s*s);
E_2=V*sqrt(((R_2/s_f)**2+(X_2**2))/(((R_2/s_f)+R_1)**2)+1.2**2)/sqrt(3.);
S=1-s_f;#Slip during breaking
I_2b=E_2/sqrt((X_2**2)+((R_L+R_2)/S)**2);
T_bn=3*60.*I_2b**2*(R_2+R_L)/(2*math.pi*N_s*S);
#Results
print 'Initial Braking Torque (in N-m)=',int(T_b)
print'Initial Braking Torque during dc dynamic braking(in N-m)=',round(T_bn,1)
#calculate the Time taken and no. of revolutions made
#Initialization of variables
import math
J=630.;#in kg-m**2
T_f=1.4*9.81;#in N-m
T_e=165*9.81;#in N-m
t2=45.3
n2=90
#Calculations
T_b=T_e+T_f;#in N-m
Beta=T_b/J;#in rad/sec**2
f=50.;#in hertz
P=8.;#no of poles
N_s=120.*f/P;#in rpm
w_1=2*math.pi*N_s/60.;#in rad/sec
t=w_1/Beta;
n=w_1**2/(2*math.pi*Beta*2);
#Results
print 'case 1'
print 'Time taken to stop the motor (in seconds)=',round(t,1)
print'Number of revolutions made=',round(n,0)
print 'case 2'
print 'Time taken to stop the motor (in seconds)=',round(t2,1)
print'Number of revolutions made=',round(n2,0)
#calculate he time taken and no. of Revolutions
#Initialization of variables
import math
P_o=37.5*1000;#in Watts
N=750.;#in rpm
Eff=0.9;#Efficiency
V_L=400.;#in Volts
pf=0.85;#Power Factor
R_b=2.5;#in ohms
#Calculations
T_f=P_o*60/(2*math.pi*N);#in N-m
I_L=P_o/(math.sqrt(3)*V_L*pf*Eff);#in Amperes
I_b=V_L/(math.sqrt(3)*R_b);#in Amperes
T_E=T_f*I_b/I_L;#in N-m
T_i_total=T_f+T_E;#in N-m
w=2*math.pi*N/60;#in rad/sec
K=T_E/w;
J=20;#kg-m**2
t=(J/K)*math.log((T_f+K*w)/T_f);
n=(1/(2*math.pi*K))*(((J/K)*(T_f+K*w)*(1-math.exp(-K*t/J)))-T_f*t);
#Results
print'Time taken (in Seconds)=',round(t,1)
print'Number of Revolutions Made=',round(n,2)
#calculate the time taken in both cases
#Initialization of variables
import math
E=240.;#in volts
R=15.;#in ohms
N=1500.;#in rpm
#Calculations
P=E**2/R;#in Watts
T_b=P*60/(2*math.pi*N);#in N-m
T_e=T_b;
w_1=2*math.pi*N/60;#in rad/sec
K=T_e/w_1;
J=20;#kg-m^2
t=(J/K)*math.log(w_1/62.832);
T_f=1.5*9.81;#in N-m
t_o=(J/K)*math.log((T_f+T_e)/(T_f+(T_e*600/1500)));
#Results
print'Time taken to bring motor from 1500 rpm to 600 rpm (in seconds)=',round(t,1)
print 'Time taken for fall of speed if there exist frictional torque (in seconds)=',round(t_o,1)
#calculate the final temperature rise and Heating time constant
#Initialization of variables
import math
d=0.65;#in meters
l=1.;#in meters
P_o=12.*735.5;#in watts
Eff=0.9;#Efficiency
m=400.;#in kg
C_p=700.;#in J/Kg/Celcius
alpha=12.;#in watts/m^2/Celcius
#Calculations
P_in=P_o/Eff;#in watts
P_L=P_in-P_o;#in watts
S=math.pi*d*l;#in m^2
Theta=P_L/(S*alpha);#in Celcius
t=m*C_p/(S*alpha);
#Results
print'Final temperature rise (in degree celcius)=',round(Theta,0)
print 'Heating time constant (in seconds)=',math.ceil(t)
#calculate the Final steady state temperature and Heating time constant
#Initialization of variables
import matplotlib
from matplotlib import pyplot
t=([.2,.4,.6,1,1.5,2,3])
temp=([7,13.5,19.3,29.1,39.1,46.7,57.3])
#Calculations
tf=74 #C
tff=tf*.632
time=2
#Results
print 'Final steady state temperature = ',tf
print 'Heating time constant = ',time
#calculate the Heating time constant and Final steady state temperature
theta_1=20.;#in degree celcius
theta_2=34.;#in degree celcius
import math
t=-1./math.log((theta_2/theta_1)-1.);#in hours
theta_F=theta_1/(1-math.exp(-1./t));
theta_f=theta_F/(1-math.exp(-1./t));
x=math.sqrt(2*(theta_f/theta_F)-1);
print 'Final steady temperature rise (in degree celcius)=',round(theta_F,2)
print 'Heating time constant (in hours)=',round(t,1)
print 'one hour rating of motor is'
print 'times full load rating',round(x,2)
#calculate the Half hour rating of a 25 KW Motor
#Initialization of variables
import math
P=25.;#in KW
t=1.5;#in hours
#Calculations
P_L=math.sqrt((((1/(1-math.exp(-0.5/t)))*1.9)-0.9)*P**2);
#Results
print 'Half hour rating of a 25KW Motor (in KW)=',round(P_L,1)
#calculate the Time of operation
#Initialization of variables
import math
t=60.;#in minutes
theta_F=20.;#in degree celcius
P_L1=2.5625;#Total losses at P KW
P_L2=7.25;#Total losses at 2P KW
#Calculations
theta_f=theta_F*P_L2/P_L1;#in degree celcius
t_o=t*math.log(1/(1.-(theta_F/theta_f)));
#Results
print'Time of operation (in minutes)=',round(t_o,2)
#calculate the Continuous Rating of Motor
#Initialization of variables
import math
Eff=0.8;#Efficiency
P1=400.;#in watts
t1=60.;#in minutes
t2=15.;#in minutes
#Calculations
P=math.sqrt((((2.5625/(1-math.exp(-t2/t1)))-1)**(-1))*(P1/Eff)**2);
#Results
print 'Continuous Rating of Motor (in Watts)=',round(P,1)
#calculate the Steady state temperature rise and time taken
#Initialization of variables
import math
theta_1=50.;#in degree Celcius
theta_F=80.;#in degree celcius
t=0.75;#in hours
#Calculations
theta=theta_F*(1-math.exp(-1./t));
theta_f=theta_F/(1-math.exp(-1/t));
T=-t*math.log(1-(theta_1/theta_f));
print 'Temperature rise after 1 hour (in degree celcius)=',theta_F
print'Steady state temperature rise at 1 hour rating (in degree celcius)=',round(theta_f,2)
#Results
print 'Time taken to increase temperature from 50 to 80 degree celcius (in minutes)=',round(60-T*60,2)
#calculate the Value of load in kW during load period
#Initialization of variables
import math
P_cont=100.;#in KWs
Eff=0.8;#Efficiency
T_1=50.;#in minutes
T_2=70.;#in minutes
t_1=10.;#in minutes
t_2=10.;#in minutes
#Calculations
r=(1-math.exp(-((t_1/T_1)+(t_2/T_2))))/(1.-math.exp(-t_1/T_1));# r=theta_f/theta_F
P_L=2.5625;#Losses at 100 KW Load
P_L1=Eff*P_cont;#in Kws
P=math.sqrt(((P_L*r)-1)*P_L1**2);
#Results
print'Value of Load in KW during load period=',round(P,2)
#calculate the Heating time constant and Final Temperature rise
#Initialization of variables
import math
theta_1=20.;#in degree celcius
theta_2=30.;#in degree celcius
t_1=30.;#in minutes
t_2=60.;#in minutes
#Calculations
t=-(t_2-t_1)/math.log((theta_2/theta_1)-1);#in minutes
theta_F=theta_1/(1-math.exp(-t_1/t));
#Results
print 'Heating Time Contant (in minutes)=',round(t,2)
print 'Final Temperature Rise (in Degree Celcius)=',theta_F
#calculate the Maximum Overload
#Initialization of variables
import math
theta_1=30.;#in degree celcius
theta_2=40.;#in degree celcius
t_1=1.;#in hours
t_2=2.;#in hours
#Calculations
x=(theta_2/theta_1)-1;
theta_F=theta_1/(1-x);#in degree celcius
theta_f=50./(1-x);#in degree celcius
P_L=25.;#in KWs
P=P_L*math.sqrt(theta_f/theta_F);
#Results
print'Maximum Overload (in KWs)=',round(P,1)
#calculate the Temperature rise in both cases
#Initialization of variables
import math
theta_1=20.;#in degree celcius
theta_2=35.;#in degree celcius
t_1=1/2.;#in hours
t_2=1.;#in hours
#Calculations
t=-(t_2-t_1)/math.log((theta_2/theta_1)-1);#in minutes
theta_F=theta_1/(1-math.exp(-t_1/t));
theta=theta_F*(1-math.exp(-2/t));
theta_F1=theta_F*0.8;#in Degree Celcius
t_o=0.8*t;#in hours
theta_o=theta_F1*(1-math.exp(-1/t_o));
#Results
print'Temperature Rise After 2 hrs (in Degree Celcius)=',round(theta,1)
print'Temperature Rise from cold After 1 hr at full load (in Degree Celcius)=',round(theta_o,1)
#calculate the rating of motor
#Initialization of variables
import math
P_1=100.;#in KWs
P_2=50.;#in KWs
t_1=10.;#in minutes
t_2=8.;#in minutes
t_3=5.;#in minutes
t_4=4.;#in minutes
#Calculations
P=math.sqrt(((t_1*P_1**2)+(t_2*P_2**2))/(t_1+t_2+t_3+t_4));
#Results
print'Rating Of Continuously Rated Motor (in KWs)=',round(P,2)
print'Adequate rating of motor=70 Kws'
#calculate the Power rating of Motor
#Initialization of variables
import math
T_1=240.;#in N_m
T_2=140.;#in N-m
T_3=300.;#in N-m
T_4=200.;#in N-m
t_1=20.;#in minutes
t_2=10.;#in minutes
t_3=10.;#in minutes
t_4=20.;#in minutes
#Calculations
T=math.sqrt(((t_1*T_1**2)+(t_2*T_2**2)+(t_3*T_3**2)+(t_4*T_4**2))/(t_1+t_2+t_3+t_4));
N=720.;#in rpm
P=T*2*math.pi*N/60.;
#Results
print'Power rating of Motor(in KWs)=',round(P,0)
#calculate the Power Rating of Motor
import math
#Initialization of variables
t=90.;#in seconds
#Calculations
T_eq=math.sqrt(40750./t);#in Kg-m
N=750.;#in rpm
P=T_eq*9.81*2*math.pi*N/60.;
#Results
print'Power Rating Of Motor (in Kws)=',round(P,0)
print 'The answers are a bit different from textbook due to rounding off error'
#Initialization of variables
import math
t1=15.
t2=0.
t3=85.
t4=15.
t5=95.
t6=83.
#Calculations
Hpx=4900./3 *(t1**3-t2**3) + 360000*(t3-t4) + 400./3 *((t5-t3)**3 - (t6-t3)**3)
Hp=math.sqrt(Hpx/120.)
#Results
print 'Hp rating of motor (in hp) = ',round(Hp,0)
#calculate the speed at the end of deceleration period
#Initialization of variables
import math
T_l=100*9.81;#in N-m
t=10;#in seconds
J=1000;#kg-m^2
f=50;#in hertz
P=4;#no.of poles
s=0.06;#slip
#Calculations
N_s=120*f/P;#synchronous speed (in rpm);
w_s=s*N_s*2*math.pi/60;#slip speed (in rad/sec)
K=w_s/(50*9.81);
T_m=T_l-T_l*math.exp(-t/(K*J));
N_sn=K*T_m*60/(2*math.pi);#in rpm
N=N_s-N_sn;
#Results
print'Speed at the end of deceleration period (in rpm)=',round(N,0)
#calculate the Moment of Inertia
#Initialization of variables
import math
P_o=500*735.5;#in watts
N_o=40.;#in rpm
s_f=0.12;
#Calculations
N_f=N_o*(1-s_f);#full load speed (in rpm)
T_f=P_o/(2*math.pi*N_f/60);#Full load torque (N-m)
T_m=2*T_f;#Motor torque (in N-m)
T_l=41500*9.81;#Load torque (in N-m)
t=10;#seconds
w_s=s_f*N_o*2*math.pi/60;#slip speed (in rad/sec)
K=w_s/T_f;
J=-t/(K*math.log(1-(T_m/T_l)));
#Results
print '%s %.3e' %('Moment of Inertia (in Kg-m^2)=',J)
#calculate the weight of flywheel and time taken
#Initialization of variables
import math
P_o=50*1000.;#in watts
f=50.;#in hertz
s_f=0.04;#slip
P=6.;#no.of poles
t1=300. #N-m
t2=1500. #N-m
r=.9
T_x=700.
#Calculations
N_s=120.*f/P;#Synchronous Speed (in rpm)
N_f=N_s*(1.-s_f);
T_f=P_o/(2*math.pi*N_f/60.)
T_m=2*T_f
T_L=t1+t2
T0=t1
t=10 #sec
SS=s_f*1000/60.*2*math.pi
K=SS/T_f
J=-t/K/math.log((T_L-T_m)/(T_L-T0))
w=J/r**2
tx=K*J*math.log((T_m-T0)/(T_x-T0))
#Results
print 'Weight of flywheel (in kg) = ',round(w,0)
print 'Time required (in sec) = ',round(tx,3)
#calculate the Moment of Inertia of Flywheel
#Initialization of variables
import math
T_L=600.;#in N-m
T_m=450.;#in N-m
N=600.;#in rpm
#Calculations
w_o=2*math.pi*N/60.;#in rad/sec
s=0.08;#slip
w=s*w_o;#in rad/sec
K=w/T_m;#Torque constant
J=(-10./K)/math.log(0.25);#in Kg-m^2
J_m=10;#in Kg-m^2
J_F=J-J_m;
#Results
print 'Moment Of Inertia Of Flywheel (in Kg-m^2)=',round(J_F,1)
#calculate the weight of flywheel and time taken
#Initialization of variables
import math
P_o=100*1000.;#in watts
f=50.;#in hertz
N=960. #rpm
s_f=0.04;#slip
P=6.;#no.of poles
t1=600. #N-m
t2=2400. #N-m
r=.9
T_x=700.
t=10 #s
J_M=200.
#Calculations
N_s=120.*f/P;#Synchronous Speed (in rpm)
SS=(N_s-N)*math.pi*2/60.
T_f=P_o/(2*math.pi*N/60.)
T_m=2*T_f
T_L=t1+t2
T0=t1
K=SS/T_f
J=-t/K/math.log((T_L-T_m)/(T_L-T0))
J_F=J-J_M
#Results
print 'Moment of Inertia of flywheel (in kg-m^2) = ',round(J_F,1)