<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Excercises Electric Machinery Fundamentals
Chapter 9
Problem 9-3
Step1:  Description
Suppose that the motor in Problem 9-1 is started and the auxiliary winding fails open while the rotor is accelerating through 400 r/min. 
How much induced torque will the motor be able to produce on its main winding alone? 
Assuming that the rotational losses are still 51 W, will this motor continue accelerating or will it slow down again? Prove your answer.
Step2:  SOLUTION
At a speed of 400 r/min, the slip is
Step3:  The impedances $Z_F$ and $Z_B$ are
Step4:  $$Z_B = \frac{(R_2/(2-s) + jX_2)(jX_M)}{R_2/(2-s) + jX_2 + jX_M}$$
Step5:  The input current is
Step6:  The air-gap power is
Step7:  The power converted from electrical to mechanical form is
Step8:  The output power is
Step9:  The induced torque is
$$\tau_\text{ind} = \frac{P_\text{AG}}{\omega_\text{sync}}$$
<ASSISTANT_TASK:>
Python Code:
%pylab notebook
%precision %.4g
Explanation: Excercises Electric Machinery Fundamentals
Chapter 9
Problem 9-3
End of explanation
V  = 120   # [V]
p  =   4
R1 =   2.0  # [Ohm]
R2 =   2.8  # [Ohm]
X1 =   2.56 # [Ohm]
X2 =   2.56 # [Ohm]
Xm =  60.5  # [Ohm]
n  = 400    # [r/min]
Prot = 51   # [W]
n_sync = 1800 # [r/min]
Explanation: Description
Suppose that the motor in Problem 9-1 is started and the auxiliary winding fails open while the rotor is accelerating through 400 r/min. 
How much induced torque will the motor be able to produce on its main winding alone? 
Assuming that the rotational losses are still 51 W, will this motor continue accelerating or will it slow down again? Prove your answer.
End of explanation
s = (n_sync - n) / n_sync
s
Explanation: SOLUTION
At a speed of 400 r/min, the slip is:
$$s = \frac{n_\text{sync} - n}{n_\text{sync}}$$
End of explanation
Zf = ((R2/s + X2*1j)*(Xm*1j)) / (R2/s + X2*1j + Xm*1j)
Zf
Explanation: The impedances $Z_F$ and $Z_B$ are:
$$Z_F = \frac{(R_2/s + jX_2)(jX_M)}{R_2/s + jX_2 + jX_M}$$
End of explanation
Zb = ((R2/(2-s) + X2*1j)*(Xm*1j)) / (R2/(2-s) + X2*1j + Xm*1j)
Zb
Explanation: $$Z_B = \frac{(R_2/(2-s) + jX_2)(jX_M)}{R_2/(2-s) + jX_2 + jX_M}$$
End of explanation
I1 = V / (R1 +X1*1j + 0.5*Zf + 0.5*Zb)
I1_angle = arctan(I1.imag/I1.real)
print('I1 = {:.2f} V ∠{:.1f}°'.format(abs(I1), I1_angle/pi*180))
Explanation: The input current is:
$$\vec{I}_1 = \frac{\vec{V}}{R_1 + jX_1 + 0.5Z_F + 0.5Z_B}$$
End of explanation
Pag_f = abs(I1)**2 * 0.5*Zf.real
Pag_f
Pag_b = abs(I1)**2 * 0.5*Zb.real
Pag_b
Pag = Pag_f - Pag_b
print('Pag = {:.1f} W'.format(Pag))
Explanation: The air-gap power is:
End of explanation
Pconv_f = (1-s)*Pag_f
Pconv_f
Pconv_b = (1-s)*Pag_b
Pconv_b
Pconv = Pconv_f - Pconv_b
print('Pconv = {:.1f} W'.format(Pconv))
Explanation: The power converted from electrical to mechanical form is:
End of explanation
Pout = Pconv - Prot
print('Pout = {:.1f} W'.format(Pout))
Explanation: The output power is:
End of explanation
w_sync = n_sync * (2.0*pi/1.0) * (1.0/60.0)
tau_ind = Pag / w_sync
print('''
τ_ind = {:.3f} Nm
================'''.format(tau_ind))
Explanation: The induced torque is
$$\tau_\text{ind} = \frac{P_\text{AG}}{\omega_\text{sync}}$$
End of explanation
<END_TASK>