import math
# Variables
p = 4.
Z = 440.
theta = 0.07 # Wb
N = 900. # rpm
# calculations and results
E = theta*N*Z/60.
print "For lap wound : E = %.f V"%E
E = theta*N*Z*4/120.
print "For wave wound : E = %.f V"%E
# note : rounding off error.
import math
# Variables
Pole = 4.
phi = 21.*10**-3 #flux produced by each pole in webers
N = 1120. #Speed of armature in r.p.m
Coils = 42.
turns_per_coil = 8.
Turns = Coils * turns_per_coil
Z = 2*Turns #Number of armature conductors
# Calculations and Results
#Part(i)
A1 = Pole #no of parallel paths for lap winding
E1 = phi*N*Z*Pole/(60*A1)
print 'i) e.m.f generated is %.3f V'%(E1)
#Part(ii)
A2 = 2 #wave winding
E2 = E1 #as mentioned in the question
N2 = E2/(phi*Z*Pole/(60*A2)) #E = phi*N*Z*Pole/(60*A)
print 'ii) For wave-wound armature,above calculated e.m.f is generated at %.0f r.p.m'%(N2)
import math
# Variables
Pole = 4.
coils = 12.
commutator_segments = coils
coil_sides = coils*2
Z = coil_sides #No of conductors
pole_pitch = Z/Pole
# Calculations and Results
#for Simplex lap winding
y_f = pole_pitch-1
y_b = pole_pitch+1
y_c = 1 #Note that it's positive and it's progressive type of Simplex lap winding
print 'WINDING TABLE: 1<- 8-> 3<- 10-> 5<- 12-> 7<- 14-> 9<- 16-> 11<- 18->13<- 20-> 15<- 22-> 17<- 24->19<- 2-> 21<- 4-> 23<- 6-> 1 '
print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)
print 'Another form of winding table:'
print ' BACK CONNECTIONS FRONT CONNECTIONS'
print ' 1 to 1+7 = 8 -> 8 to 8-5 = 3'
print ' 3 to 3+7 = 10 -> 10 to 10-5 = 5'
print ' 5 to 5+7 = 12 -> 12 to 12-5 = 7'
print ' 7 to 7+7 = 14 -> 14 to 14-5 = 9'
print ' 9 to 9+7 = 16 -> 16 to 16-5 = 11'
print ' 11 to 11+7 = 18 -> 18 to 18-5 = 13'
print ' 13 to 13+7 = 20 -> 20 to 20-5 = 15'
print ' 15 to 15+7 = 22 -> 22 to 22-5 = 17'
print ' 17 to 17+7 = 24 -> 24 to 24-5 = 19'
print ' 19 to 19+7 = 26 = 26-24 = 2 -> 2 to 26-5 = 21'
print ' 21 to 21+7 = 28 = 28-24 = 4 -> 4 to 28-5 = 23'
print ' 23 to 23+7 = 30 = 30-24 = 6 -> 6 to 30-5 = 25 = 25-24 = 1'
import math
# Variables
Pole = 4.
Z = 18. #no of armature conductors
Y_A = (Z+2)/Pole #For progressive type wave winding,positive sign is used
Y_C = Y_A #For wave winding
# Calculations
#Since Y_A = (y_b+y_f)/2, we let y_b = Y_f
y_b = Y_A/2 #say
y_f = y_b
coils = Z/2
slots = coils
commutator_segments = coils
print commutator_segments
print 'WINDING TABLE: 1<- 6-> 11<- 16-> 3<- 8->13<- 18-> 5<- 10-> 15<- 2-> 7<- 12-> 17<- 4-> 9<- 14->1 '
print 'Another form of winding table:'
print ' BACK CONNECTIONS FRONT CONNECTIONS'
print ' 1 to 1+5 = 6 -> 6 to 6+5 = 11'
print ' 11 to 11+5 = 16 -> 16 to 16+5 = 21 -18 = 3'
print ' 3 to 3+5 = 8 -> 8 to 8+5 = 13'
print ' 13 to 13+5 = 18 -> 18 to 18+5 = 23 -18 = 5'
print ' 5 to 5+5 = 10 -> 10 to 10+5 = 15'
print ' 15 to 15+5 = 20 -18 = 2 -> 2 to 2+5 = 7'
print ' 7 to 7+5 = 12 -> 12 to 12+5 = 17'
print ' 17 to 17+5 = 22 -18 = 4 -> 4 to 4+5 = 9'
print ' 9 to 9+5 = 14 -> 14 to 14+5 = 19 -18 = 1'
import math
# Variables
Pole = 4.
Z = 480. #No of armature conductors
I_a = 144.
I = I_a/2 #For wave wound
theta_m = 10. #lead angle in DEGREES
# Calculations
amp_turns_PP_d = Z*I*theta_m/360 #demagnetising Ampere-turns per pole
amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) #cross-magnetising Ampere-turns per pole
# Results
print 'De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)
print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)
import math
# Variables
Pole = 10.
Z = 800. #No of armature conductors
A = Pole #For lap wound
ratio = 0.7 #ratio of pole arc to pole pitch
# Calculations
#amp_turns_PP = ratio*(I_a*Z)/(2*A*P)
turns_PP = ratio*(Z)/(2*A*Pole) #turns per pole
conductors_PP = turns_PP*2 #multiplied with 2 because 2 conductors form 1 turn
# Results
print 'Compensating conductors per pole = %.f'%(conductors_PP)
# Variables
I_L = 150.
A = 4.
N = 1800. #in rpm
W_b = 1.2 #Brush width
W_m = 0 #width of mica insulation
L = 0.06*10**-3 #Inducmath.tance
segments = 64.
n_s = 1800./60 #in rps and not rpm
v = n_s*segments #peripheral speed in segments per second
# Calculations and Results
T_c = (W_b-W_m)/v #Time of commutation
I = I_L/A #Current through a conductor
#Part(i)
E_l = L*2*I/T_c
print 'i) Reactive voltage using Linear commutation is %.1f V'%(E_l)
#Part(ii)
E_s = 1.11*L*2*I/T_c
print 'ii) Reactive voltage using Sinusoidal commutation is %.3f V'%(E_s)
# Variables
V_t = 250. #Terminal voltage
R_sh = 100. #resistance of shunt field winding
I_sh = V_t/R_sh #shunt current
R_a = 0.22 #Armature resistance
# Calculations
P = 5*10**3 #Load power
I_L = P/V_t #Load current
I_a = I_L+I_sh #armature current
E = V_t + I_a*R_a #Induced emf
# Results
print 'Induced e.m.f to supply the 5kW load is %.2f V'%(E)
# Variables
V_t = 250. #terminal voltage
P = 10.*10**3 #10kW power of generator
I_L = P/V_t #load current
I_a = I_L #As seperately excited
V_brush = 2.*2 # 2 * no of brushes
E = 255. #on full load
# Calculations
R_a = (E-V_t-V_brush)/I_a #Because E = V_t+ I_a*R_a + V_brush
# Results
print 'Armature resistance of generator is %.3f ohm'%(R_a)
import math
# Variables
R_a = 0.5
R_se = 0.03 #resimath.tance due to armature and series field winding
V_brush = 2. #brush drop
N = 1500. #generator speed in r.p.m
coils = 540.
turns_per_coil = 6.
# Calculations
total_turns = coils*turns_per_coil
Z = 2*total_turns #Total conductors
I_a = 50 #armature current
phi = 2*10**-3 #flux per pole in webers
E = phi*N*Z/(60) #A = P for lap-wound and they cancel out
V_t = E- (I_a*(R_a+R_se) + V_brush) #Because E = V_t+ I_a*R_a + V_brush
# Results
print 'Terminal voltage is %.1f V'%(V_t)
# Variables
V_t = 225. #voltage across winding
R_a = 0.04 #armature resistance
R_sh = 90 #shunt resistance
R_se = 0.02 #resistance of series field winding
I_L = 75. #load current
# Calculations
#E -I_a*R_a = V_t+I_L*R_se
I_sh = (V_t+I_L*R_se)/R_sh #current through shunt field winding
I_a = I_L + I_sh #armature current
E = V_t+ I_a*R_a+I_L*R_se #induced emf
# Results
print 'Generated voltage is %.1f V'%(E)
# Variables
R_sh = 53. #resistance of field winding
V_t = 100. #terminal voltage
I_sh = V_t/R_sh #shunt current
I_f = I_sh
R_a = 0.1 #armature resistance
E_o = 143. # for I_sh = I_f = 1.8867 as obtained from graph
# Calculations
I_a = (E_o-V_t)/R_a #Because E_o = V_t + I_a*R_a
I_L = I_a-I_sh #no load current
# Results
print 'Note: Open circuit voltage was obtained as followsE_o = R_sh*I_f # y = mx+c form with c = 0 and R_sh = 53Hence%( a line with slope 53 through origin is made to intersect OCC at 150 V'
print 'Therefore, Open circuit voltage is 150 V'
print 'No load current is %.4f A '%(I_L)
# Variables
#part(1)
E_o = 240. #on no-load
# Calculations and Results
#Draw horizontal line from 240 V, to intersect OCC at A. corresponding I_f is 2.25 A
#The slope pf OA is corresponding R_sh
I_f = 2.25 #Corresponds to 240 V when intersected OCC
R_sh = E_o/I_f #shunt resistance
print 'i)Field resistance that gives 240 V on no-load is %.2f ohms '%(R_sh)
#Part(ii)
N1 = 1000. #speed of shunt generator in rpm
I_f = 1.
#Draw line OP math.tangential to OCC at N1 = 1000 r.p.m.
#Select I_f = 1A i.e. point R
#Draw vertical from R to intersect OP at S and OA at T....this gives RT = 105 and RS = 159
#At critcal speed generator just fails to build up
RT = 105.
RS = 159.
N_C = N1*RT/RS #Critical speed
print 'ii)Critical speed is %.2f r.p.m '%(N_C)
# Variables
P = 4. #number of poles
A = 2. #because wave wound
Z = 792 #No of conductors
phi = 0.012 #flux per pole in weber
E_g = 240 #on no-load
# Calculations
#running speed
N = E_g*60*A/(phi*P*Z) #becuase E_g = phi*P*N*Z/(60*A)
# Results
print 'Required running speed is %.3f r.p.m'%(N)
import math
# Variables
#open circuit condition
I_L = 0. #because of open circuit
V_t = 127. #terminal voltage
E_g = V_t #because I_L = 0
# Calculations
#load condition
V_t = 120
R_sh = 15.
R_a = 0.02 #shunt and armature resistance
I_sh1 = V_t/R_sh #current through shunt winding in loaded condition
I_L = (E_g-V_t)/R_a - I_sh1 #because I_a1 = I_L+I_sh1 and E_g = V_t + I_a1*R_a
# Results
print 'Load current is %.0f A'%(I_L)
# Variables
V_t = 550. #Terminal voltage
R_lamp = 500. #Each lamp
I_lamp = V_t/R_lamp #each lamp ; V_t because all lamps are in parallel
# Calculations
I_L = 20*I_lamp #there exist 20 lamps
R_sh = 25.
R_a = 0.06
R_se = 0.04 #resistance of shunt winding,armature,series field
I_sh = V_t/R_sh #current throough shunt winding
I_a = I_L+I_sh #armature current
E = V_t + I_a*(R_a+R_se) #generated emf
# Results
print 'Armature current and generated e.m.f is %.0f A and %.1f V respectively '%(I_a,E )
# Variables
P = 4. #number of poles
A = P # because of lap wound
N = 750. #speed in rpm
Z = 720. #number of armature conductors
phi = 30.*10**-3 #flux per pole in weber
R_sh = 200.
R_a = 0.4
R_L = 15. #resistance of shunt winding,armature,series field
E = phi*P*N*Z/(60*A) #generated emf
# Calculations
#solving the following equations for V_t
#E = V_t + I_a*R_a
#E = V_t + (I_L + I_sh)*R_a
#E = V_t + ((V_t/R_L) + (V_t/R_sh))*R_a
V_t = E/(1+(R_a/R_L)+(R_a/R_sh))
# Results
print 'Terminal voltage = %.4f V'%(V_t)
# Variables
P = 6. #number of poles
A = 2. # because of wave wound
N_1 = 300. #speed of generator
Z = 600. #number of armature conductors
phi_1 = 0.06 #flux per pole in webers
# Calculations and Results
E_g1 = phi_1*P*N_1*Z/(60*A) #generated emf
print 'Emf generated is %.0f V'%(E_g1)
phi_2 = 0.055 #new flux per pole
E_g2 = 550. # new generated emf
N_2 = E_g2/(phi_2*P*Z/(60*A)) #new speed of generator
print 'Required speed is %.2f r.p.m'%(N_2)
import math
print 'Refer to code for explanation'
# Variables
N_1 = 300.
N_2 = 375. #generator speeds
#E_g2 = E_g1*(N_2/N_1)
#using this new table OCC at N_2 = 375 is made
#Draw a line with slope R_sh = 40 through origin which cuts this OCC at 248
#I_f_table = [0,2,3,4,5,6,7]
#Arm_vol_table = [9.375,115,165,202.5,228.75,237.5,265]
#part(i)
#at V = 200 volts, I_f = 3.9 from the graph
V = 200.
I_f = 3.9
# Calculations and Results
R_sh2 = V/I_f
R_sh = 40.
print 'Additional resistance required is %.3f ohms '%(R_sh2-R_sh)
#part(ii)
V_t = 200.
I_f = V_t/R_sh
E_g = 228.75 #For this I_f from the table
R_a = 0.4
I_a = (E_g-V_t)/R_a #Because E_g = V_t + I_a*R_a
I_L = I_a-I_f
print 'Load current supplied by the generator is %.3f A'%(I_L)
# Variables
I_a = 750. #full load current
Pole = 6.
A = Pole #lap winding
I = I_a/A #Full-load current per path
Z = 900. #no of conductors
lambda1 = 1.4 #leakage coefficient
theta_e = 21. #lead angle in degrees electrical
# Calculations
theta_m = theta_e/(Pole/2) #lead angle in degrees mechanical
amp_turns_PP_d = Z*I*theta_m/360 #demagnetising ampere turns per pole
amp_turns_PP_c = Z*I*(1./(2*Pole)-theta_m/360) #cross-magnetising ampere turns per pole
balance_turns = amp_turns_PP_d*lambda1/I_a #series turns required to balance demagnetising component
# Results
print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)
print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)
print 'iii)Turns required to balance demagnetising component is %.0f'%(balance_turns)
# Variables
Pole = 4.
Z = 32. #no of conductors
coil_sides = Z
segments = 16.
pole_pitch = Z/Pole
slots = 16.
slots_per_pole = slots/Pole
# Calculations
#for Simplex lap winding
y_b = pole_pitch+1 #back pitch
y_f = pole_pitch-1 #front pitch
y_c = 1 #Commutator pitch; Note that it is positive and it is progressive type of Simplex lap winding
# Results
print 'WINDING TABLE: 1<- 10-> 3<- 12-> 5<- 14-> 7<- 16-> 9<- 18-> 11<- 20->13<- 22-> 15<- 24-> 17<- 26->19<- 28-> 21<- 30-> 23<- 32->25<- 2-> 27<- 4-> 29<- 6->31<- 8->1 '
print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)
print 'Another form of winding table:'
print ' BACK CONNECTIONS FRONT CONNECTIONS'
print ' 1 to 1+9 = 10 -> 10 to 10-7 = 3'
print ' 3 to 3+9 = 12 -> 12 to 12-7 = 5'
print ' 5 to 5+9 = 14 -> 14 to 14-7 = 7'
print ' 7 to 7+9 = 16 -> 16 to 16-7 = 9'
print ' 9 to 9+9 = 18 -> 18 to 18-7 = 11'
print ' 11 to 11+9 = 20 -> 20 to 20-7 = 13'
print ' 13 to 13+9 = 22 -> 22 to 22-7 = 15'
print ' 15 to 15+9 = 24 -> 24 to 24-7 = 17'
print ' 17 to 17+9 = 26 -> 26 to 26-7 = 19'
print ' 19 to 19+9 = 28 -> 28 to 28-7 = 21'
print ' 21 to 21+9 = 30 -> 30 to 30-7 = 23'
print ' 23 to 23+9 = 32 -> 32 to 32-7 = 25'
print ' 25 to 25+9 = 34 = 34-32 = 2 -> 2 to 34-7 = 27'
print ' 27 to 27+9 = 36 = 36-32 = 4 -> 4 to 36-7 = 29'
print ' 29 to 29+9 = 38 = 38-32 = 6 -> 6 to 38-7 = 31'
print ' 31 to 31+9 = 40 = 40-32 = 4 -> 8 to 40-7 = 33 -32 = 1'
from numpy import array
# Variables
Z = 496. #no of conductors
P = 4. #poles
slots = 31.
coilsides_per_slot = 4.
coilsides = slots*coilsides_per_slot
coils = coilsides/2
turns = Z/2
turns_per_coil = turns/coils
# Calculations
y_c = array([(Z-2)/P, (Z+2)/P]) #commutator pitch
coils_active = (Z/(2*P))-1 # because y_c didnt turn out to be integer, 1 coil was made inactive/dummy
segments = coils_active #no of commutative segments
Y_A = [ (segments+1)/(P/2), (segments-1)/(P/2) ]
Y_A = Y_A[0] #Y_A(2) is discarded because of progressive wave winding
y_f = 29.
y_b = 33. #front and back pitch ; note that Y_A = (y_b+y_f)/2
resultant_pitch = 2*Y_A #because Y_A = (y_b+y_f)/2 and resultant pitch = y_b+ y_f
# Results
print 'i) Total number of coils = %.0f'%(coils)
print 'ii) Turns per coils = %.0f'%(turns_per_coil)
print 'iii) Commutator pitch = %.0f'%((y_c[0]+y_c[1])/2)
print 'iv) Back pitch = %.0f front pitch = %.0f total pitch = %.0f'%(y_b,y_f,resultant_pitch)
print 'v) No of commutator segments = %.0f'%(segments)
import math
# Variables
slots = 13.
Pole = 4.
conductors_per_slot = 2.
Z = conductors_per_slot*slots
Y_A = (Z+2)/Pole #For progressive type wave winding
# Calculations
#Since Y_A = (y_b+y_f)/2, we let y_b = y_f
y_b = Y_A
y_f = y_b #because y_b = Y_A/2
segments = 13. #commutator segments
# Results
print 'WINDING TABLE: 1<- 8-> 15<- 22-> 3<- 10->17<- 24-> 5<- 12-> 19<- 26-> 7<- 14-> 21<- 2-> 9<- 16->23<- 4-> 11<- 18-> 25<- 6->13<- 20-> 1 '
print 'Note that <- indicates back connection with y_back = %.0f and -> indicates front connection with y_front = %.0f'%(y_b,y_f)
print 'Another form of winding table:'
print ' BACK CONNECTIONS FRONT CONNECTIONS'
print ' 1 to 1+7 = 8 -> 8 to 8+7 = 15'
print ' 15 to 15+7 = 22 -> 22 to 22+7 = 29 -26 = 3'
print ' 3 to 3+7 = 10 -> 10 to 10+7 = 17'
print ' 17 to 17+7 = 24 -> 24 to 24+7 = 31 -26 = 5'
print ' 5 to 5+7 = 14 -> 12 to 12+7 = 19'
print ' 19 to 19+7 = 26 -> 26 to 26+7 = 33 -26 = 7'
print ' 7 to 7+7 = 14 -> 14 to 14+7 = 21'
print ' 21 to 21+7 = 28 -26 = 2 -> 2 to 2+7 = 9'
print ' 9 to 9+7 = 16 -> 16 to 16+7 = 23 '
print ' 23 to 23+7 = 30 -26 = 4 -> 4 to 4+7 = 11'
print ' 11to 11+7 = 18 -> 18 to 18+7 = 25'
print ' 25 to 25+7 = 32 -26 = 6 -> 6 to 6+7 = 13'
print ' 13 to`13+7 = 20 -> 20 to 20+7 = 27 -26 = 1'
import math
# Variables
P = 4.
I_L = 150.
N = 1500. #commutator speed in rpm
n_s = N/60. #commutator speed in r.p.s
W_b = 1.2 #Brush pitch
W_m = 0 #Pitch of mica insulation
L = 0.05*10**-3 #inducmath.tance of armature coils in henry
A = P #A = P for lap wound
segments = 64.
# Calculations
v = n_s*segments #peripheral speed in segments per second
T_c = (W_b-W_m)/v #Time of commutation
I = I_L/A #current through each conductor
E = L*2*I/T_c #Linear commutation
E2 = 1.11*L*2*I/T_c #Sinusoidal commutation
# Results
print 'Reactive voltage linear commutation) is %.0f V'%(E)
print 'Reactive voltage math.sinusoidal commutation) is %.2f V'%(E2)
# Variables
P = 4. #Pole
Z = 386. #no of wave connected conductors
A = 2. #Wave winding
R_a = 1.
R_sh = 100.
R_L = 40 #Armature ,shunt field and load resistance
phi = 25.*10**-3 #flux per pole in weber
N = 1000. #speed in rpm
# Calculations
E_g = (phi*P*N*Z)/(60*A) #generated emf
#Solving following equations for V_t
#E_g = V_t+I_a*R_a
#I_a = (I_L+I_sh) I_L = V_t/R_L I_sh = V_t/R_sj
#E_g = V_t(1 + (R_a/R_L) + (R_a/R_sh)
V_t = E_g/(1 + (R_a/R_L) + (R_a/R_sh))
I_L = V_t/R_L # load current
I_sh = V_t/R_sh # current through shunt field resistance
# Results
I_a = I_L+I_sh #armature current
print 'armature current is is %.4f A'%(I_a)
output_power = V_t*I_L
print 'output power is %.3f W'%(output_power)
# Note :answer obtained will not match with textbook answer because I_L = V_t/R_L = 310.79/40 = 7.77
#Awhile its taken as 8.045 A in textbook'
# Variables
I = 40. #current PER conductor
W_b = 3.
W_m = 0. #brush width and width of mica insulation
N = 600. #commutator speed in rpm
n_s = N/60 #commutator speed in rps
L = 0.15*10**-3 #self inducmath.tance in Henry
segments = 50.
v = n_s*segments #peripheral speed in segments per second
T_c = (W_b-W_m)/v #time of commutation
# Calculations
E = L*2*I/T_c #Linear commutation
E2 = 1.11*L*2*I/T_c #Sinusoidal commutation
# Results
print 'Reactive voltage linear commutation) is %.0f volts'%(E)
print 'Reactive voltage math.sinusoidal commutation) is %.2f volts'%(E2)
import math
# Variables
V = 400.
P = 6. #Poles
A = P #For lap wound
output_power = 250.*10**3
R_sh = 200. #shunt field circuit resistance
Z = 720. #number of lap wound conductors
theta_m = 2.5 #brush lead angle in degree mechanical
I_L = output_power/V
V_sh = V
# Calculations
I_sh = V_sh/R_sh #Current through shunt field circuit resistance
I_a = I_L+I_sh #armature currrent
I = I_a/P
#Part(i)
amp_turns_PP_d = Z*I*theta_m/360 #demagnetising ampere turns per pole
#Part(ii)
amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) #cross-magnetising ampere turns per pole
# Results
print 'i) De-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_d)
print 'ii) Cross-magnetising ampere-turns per pole is %.1f'%(amp_turns_PP_c)
# Variables
I_L = 100.
P = 4. #Poles
A = P #for lap wound armature
W_b = 1.4
W_m = 0. #Brush width and width of mica insulation
N = 1400. #armature speed in r.p.m
segments = 64. #no of commutator segments
L = 0.05*10**-3 #inducmath.tance of armature coil in henry
# Calculations
n_s = N/60 #speed in r.p.s
v = n_s*segments #Segments per second
T_c = (W_b-W_m)/v #time of commutation
I = I_L/A #Current through conductor
E = L*2*I/T_c #Linear commutation
# Results
print 'Reactive voltage considering linear commutation is %.2f volts'%(E)
import math
# Variables
P = 8. #Poles
A = 2. #Wave wound armature
Z = 480. #number of armature conductors
I_a = 200.
I = I_a/A
# Calculations and Results
#Part(i)
theta_m = 0. #Geometric nuetral axis
amp_turns_PP_d = Z*I*theta_m/360 #De-magnetising ampere-turns per pole
amp_turns_PP_c = Z*I*(1/(2*P)-theta_m/360) #Cross-magnetising ampere-turns per pole
print 'Parti)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d)
print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c)
#Part(ii)
theta_e2 = 6. #angle shift of brushes in degrees electrical
theta_m2 = theta_e2/(P/2) #angle shift of brushes in degrees mechanical
amp_turns_PP_d2 = Z*I*theta_m2/360 #De-magnetising ampere-turns per pole
amp_turns_PP_c2 = Z*I*(1/(2*P)-theta_m2/360) #Cross-magnetising ampere-turns per pole
print 'Partii)De-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_d2)
print 'Cross-magnetising ampere-turns per pole is %.0f'%(amp_turns_PP_c2)
# Variables
P_input = 7.46*10**3
V = 230.
Pole = 8.
Z = 188. #number of armature consuctors
I_L = P_input/V
theta_m = 7.5 #brush lead angle in degree mechanical
A = 2. # assumed wave wound because of low-current and high voltage
I = I_L/A
#Part(i)
amp_turns_PP_d = Z*I*theta_m/360 #De-magnetising ampere-turns per pole
#Part(ii)
amp_turns_PP_c = Z*I*(1/(2*Pole)-theta_m/360) #Cross-magnetising ampere-turns per pole
print 'De-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_d)
print 'Cross-magnetising ampere-turns per pole is %.2f'%(amp_turns_PP_c)
# note : The difference in answer occured because I is approximated to 16 in last 2 steps in book
# Variables
N_1 = 1200. #initial speed
I_L1 = 200. #initial load current
V_t1 = 125.
N_2 = 1000. #altered speed
R_a = 0.04 #armature resistance
V_brush = 2. #brush drop
# Calculations
# Initial Load
I_a1 = I_L1
E_g1 = V_t1+I_a1*R_a+V_brush #induced emf
E_g2 = E_g1*(N_2/N_1) #Because E_g proportional to N during constant flux
R_L = V_t1/I_L1 #Load resistance
#Solving for I_L2 as follows
#V_t2 = R_L*I_L2 #I_a2 = I_L2
#V_t2 = E_g2-(I_L2*R_2 + V_brush)
I_L2 = (E_g2-V_brush)/(R_L+R_a) #new current
# Results
print 'Load current at new speed is %.4f A'%(I_L2)