I am working on the file "Chapman/Ch1-Problem_1-16.ipynb".
The first task is:
The resulting voltage is plotted below:
Can you write Python code for it?

T = [0, dt[0], dt[0], dt[0]+dt[1], dt[0]+dt[1],
     dt[0]+dt[1]+dt[2], dt[0]+dt[1]+dt[2], dt[0]+dt[1]+dt[2]+dt[3]]
e = [e_ind[0], e_ind[0], e_ind[1], e_ind[1],
     e_ind[2], e_ind[2], e_ind[3], e_ind[3]]

plot(array(T)*1000, array(e)/1000)
title('Plot of Voltage vs Time')
xlabel('Time (ms)')
ylabel('Induced Voltage (kV)')
axis([0,8,-4,6]) # set the axis range
grid()


I am working on the file "Chapman/Ch1-Problem_1-18.ipynb".
The first task is:
(b)
This is a capacitive load.
(c)
The power factor of this load is leading and:
Can you write Python code for it?

PF = cos(S_angle)
print('PF = {:.3f} leading'.format(PF))
print('==================')


I am working on the file "Chapman/Ch1-Problem_1-18.ipynb".
The first task is:
(d)
This load supplies reactive power to the source. The reactive power of the load is:
$$ Q = VI\sin\theta = S\sin\theta$$
Can you write Python code for it?


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
(b)
The real, reactive, and apparent power consumed by Load 1 and by Load 2 respectively are:
Can you write Python code for it?

S1o = V*conj(I1)
S1o

S2o = V*conj(I2)
S2o


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
(d)
The real, reactive, and apparent power consumed by Load 1, Load 2 and by Load 3 respectively are:
Can you write Python code for it?


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
Answer the following questions about this power system.
(a)

Assume that the switch shown in the figure is initially open, and calculate the current I , the power factor, and the real, reactive, and apparent power being supplied by the source.

(b)

How much real, reactive, and apparent power is being consumed by each load with the switch open?

(c)

Assume that the switch shown in the figure is now closed, and calculate the current I , the power factor, and the real, reactive, and apparent power being supplied by the source.

(d)

How much real, reactive, and apparent power is being consumed by each load with the switch closed?

(e)

What happened to the current flowing from the source when the switch closed? Why?

SOLUTION
(a)
With the switch open, only loads 1 and 2 are connected to the source. The current $\vec{I}_1$ in Load 1 and the current $\vec{I}_2$ in Load 2 are:
Can you write Python code for it?

I1 = V/Z1
I2 = V/Z2
I1_angle = arctan(I1.imag/I1.real)
I2_angle = arctan(I2.imag/I2.real)
print('''I1 = {:.1f} A ∠{:.1f}°
I2 = {:.1f} A ∠{:.1f}°'''.format(
        abs(I1), I1_angle/pi*180,
        abs(I2), I2_angle/pi*180))


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
As expected, the real and reactive power supplied by the source are equal to the sum of the
real and reactive powers consumed by the loads.
(c)
With the switch closed, all three loads are connected to the source. The current in Loads 1 and 2 is the same as before. The current $\vec{I}_3$  in Load 3 is:
Can you write Python code for it?

I3 = V/Z3
I3_angle = arctan(I3.imag/I3.real)
print('I3 = {:.1f} A ∠{:.1f}°'.format(abs(I3), I3_angle/pi*180))


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
Let's pretty-print that:
Can you write Python code for it?


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
The power factor supplied by the source is:
Can you write Python code for it?


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
lagging (because current laggs behind voltage).
Note that the angle $\theta$ used in the power factor and power calculations is the impedance angle, which is the negative of the current angle as long as voltage is at $0^\circ$.
The real, reactive, and apparent power supplied by the source are
$$S = VI^* \quad P = VI\cos\theta = real(S) \quad Q = VI\sin\theta = imag(S)$$
Can you write Python code for it?

So = V*conj(I)    # I use index "o" for open switch
So


I am working on the file "Chapman/Ch1-Problem_1-19.ipynb".
The first task is:
lagging (because current laggs behind voltage).
The real, reactive, and apparent power supplied by the source are
$$S = VI^* \quad P = VI\cos\theta = real(S) \quad Q = VI\sin\theta = imag(S)$$
Can you write Python code for it?

Sc = V*conj(I)    # I use index "c" for closed switch
Sc


I am working on the file "Chapman/Ch2-Example_2-05.ipynb".
The first task is:
Calculate voltage regulation:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Example_2-05.ipynb".
The first task is:
Plot the voltage regulation:
Can you write Python code for it?

rc('text', usetex=True)   # enable LaTeX commands for plot
plot(amps,VR[0,])
plot(amps,VR[1,])
plot(amps,VR[2,])
title(r'\textbf{Voltage Regulation Versus Load}');
xlabel(r'\textbf{Load (A)}');
ylabel(r'\textbf{Voltage Regulation (\%)}');
legend(('0.8 PF lagging','1.0 PF','0.8 PF leading'), loc=2);
grid()


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
Calculate angular velocity for 60 Hz:
Can you write Python code for it?

freq = 60              # Freq (Hz)
w = 2 * pi * freq


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
Calculate the magnetization current:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
Calculate the mmf corresponding to a given flux using the interpolation function:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
Calculate the rms value of the current:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
Resultant rms values are:
Can you write Python code for it?

print('The rms current at 60 Hz is {:.3f} A.'.format(irms60))
print('The rms current at 50 Hz is {:.3f} A.'.format(irms50))


I am working on the file "Chapman/Ch2-Example_2-10.ipynb".
The first task is:
The magnetization curve for this transformer is shown in Figure 2-45, and can be found in mag_curve_1.dat at this book's web site.
<img src="figs/FigC_2-45.jpg" width="66%">
Can you write Python code for it?

# import the pandas library which provides useful data processing functions
import pandas as pd
# The data file is stored in the "data/" subfolder
fileUrl = 'data/mag_curve_1.dat'
# Now we read the file in:
data = pd.read_csv(fileUrl,     # the address where to download the datafile from
                   sep=' ',     # our data source uses a blank space as separation
                   comment='%', # ignore lines starting with a "%"
                   skipinitialspace = True,  # ignore intital spaces
                   header=None, # we don't have a header line defined...
                   names=['mmf_data','flux_data'] # ...instead we define the names here
                   )


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
<img src="figs/Problem_2-01c.jpg" width="70%">
And the transformer is supplying rated load at 277V and 0.85PF lagging.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
Description
A 100-kVA 8000/277-V distribution transformer has the following resistances and reactances:
$R_P = 5\,\Omega \qquad  R_S = 0.005\,\Omega$
$X_P = 6\,\Omega \qquad X_S = 0.006\,\Omega$
$R_C = 50\,k\Omega  \qquad X_M = 10\,k\Omega$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
So the rated current $I_\text{base}$ in the secondary side is:
Can you write Python code for it?

I_base = S_base / V_base
print('I_base = {:.0f} A'.format(I_base))


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
The excitation branch impedances are given referred to the high-voltage side of the transformer.
(a)

Find the equivalent circuit of this transformer referred to the low-voltage side.

(b)

Find the per-unit equivalent circuit of this transformer.

(c)
Assume that this transformer is supplying rated load at 277 V and 0.85 PF lagging.

What is this transformer’s input voltage?
What is its voltage regulation?

(d)

What are the copper losses and core losses in this transformer under the conditions of part (c)?

(e)

What is the transformer’s efficiency under the conditions of part (c)?

SOLUTION
(a)
The turns ratio $a$ of this transformer is
Can you write Python code for it?

a = V_high/V_low
print('a = {:.2f}'.format(a))


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
The resulting equivalent circuit is:
<img src="figs/Problem_2-01a.jpg" width="70%">
(b)
The rated kVA of the transformer is 100 kVA, and the rated voltage on the secondary side is 277 V
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
The voltage regulation $VR$ of the transformer under these conditions is:
Can you write Python code for it?

VR = (abs(V_P)-abs(VS))/abs(VS) * 100
print('VR = {:.2f} %'.format(VR))


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
Therefore, the base impedance on the primary side is:
$$Z_{base} = \frac{V_{base}}{I_{base}}$$
Can you write Python code for it?

Z_base = V_base / I_base
print('Z_base = {:.3f} Ω'.format(Z_base))


I am working on the file "Chapman/Ch2-Problem_2-01.ipynb".
The first task is:
Therefore, the primary impedances referred to the low voltage (secondary) side are:
$$R_P' = \frac{R_P}{a^2}$$
$$X_P' = \frac{X_P}{a^2}$$
Can you write Python code for it?

R_P = RP / a**2
X_P = XP / a**2
print('R_P = {:.3f} Ω'.format(R_P))
print('X_P = {:.4f} Ω'.format(abs(X_P)))


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
(e)
The efficiency of this transformer is:
$$\eta = \frac{P_{OUT}}{P_{OUT}+P_{CU}+P_\text{core}} \cdot 100\,\%$$
Can you write Python code for it?

eta = P_out/ (P_out + P_cu + P_core) * 100
print('η = {:.1f} %'.format(eta))


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
<img src="figs/Problem_2-01c.jpg" width="70%">
And the transformer is supplying rated load at 277V and 0.85PF lagging.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
Description
A 100-kVA 8000/283-V distribution transformer has the following resistances and reactances:
$R_P = 5\,\Omega \qquad  R_S = 0.005\,\Omega$
$X_P = 6\,\Omega \qquad X_S = 0.006\,\Omega$
$R_C = 50\,k\Omega  \qquad X_M = 10\,k\Omega$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
Since $Z_{pu} = Z_\text{actual} / Z_\text{base}$
The resulting per-unit equivalent circuit is as shown below (!!!Values in the figure are not corrected!!!):
<img src="figs/Problem_2-01b.jpg" width="70%">
(c)
To simplify the calculations, use the simplified equivalent circuit referred to the secondary side of the transformer:
Can you write Python code for it?

Req = RP/a**2 + RS          #[Ohm]
Xeq = XP/a**2 + XS          #[Ohm]
print('Req = {:.3f} Ω'.format(Req))
print('Xeq = {:.4f} Ω'.format(Xeq))


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
So the rated current $I_\text{base}$ in the secondary side is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
The resulting equivalent circuit is (!!!Values in the figure are not corrected!!!):
<img src="figs/Problem_2-01a.jpg" width="70%">
(b)
The rated kVA of the transformer is 100 kVA, and the rated voltage on the secondary side is 283 V
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
The secondary current $I_S$ in this transformer is:
Can you write Python code for it?

Is = S / abs(VS)                            # absolute value of IS [A]
IS_angle = -arccos(PF)                      # angle of IS [rad]
IS = Is*cos(IS_angle) + Is*sin(IS_angle)*1j # value of IS [A]
print('IS = {:.0f} A ∠{:.1f}°'.format(abs(IS), degrees(IS_angle)))


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
The voltage regulation $VR$ of the transformer under these conditions is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
Therefore, the base impedance on the primary side is:
$$Z_{base} = \frac{V_{base}}{I_{base}}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
Therefore, the primary impedances referred to the low voltage (secondary) side are:
$$R_P' = \frac{R_P}{a^2}$$
$$X_P' = \frac{X_P}{a^2}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-01_corrected.ipynb".
The first task is:
Therefore, the primary voltage on this transformer (referred to the secondary side) is:
$$V_P' = V_S + (R_{EQ}+jX_{EQ})I_S$$
Can you write Python code for it?

V_P = VS + (Req + Xeq)*IS
print('V_P = {:.0f} V ∠{:.1f}°'.format(abs(V_P), angle(V_P, deg=True)))


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
(b)
To find the voltage regulation of the transformer, we must find the voltage at the primary side of the transformer (referred to the secondary side) under these conditions:
$$\vec{V}P' = \vec{V}_S + \vec{I}_SZ\text{EQ}$$
Can you write Python code for it?

VP = VS + IS*Zeq
VP_angle = arctan(VP.imag/VP.real)   # angle of VP [rad]
print('VP = {:.1f} V ∠{:.1f}°'.format(abs(VP), degrees(VP_angle)))


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
(c)
The overall efficiency of the power system will be the ratio of the output power to the input power. The output power supplied to the load is $P_\text{OUT} = 90\,kW$. The input power supplied by the source is:
$$P_\text{IN} = P_\text{OUT} + P_\text{LOSS} = P_\text{OUT} + I^2R$$
Can you write Python code for it?

R = Z_line.real + Zeq.real
Pin = Pout + abs(IS)**2 * R               # [W]
print('Pin = {:.2f} kW'.format(Pin/1000)) # [kW]


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
The feeder’s impedance referred to the secondary side is:
$$Z'\text{line} = \left(\frac{1}{a}\right)^2Z\text{line}$$
Can you write Python code for it?

Z_line = (1/a)**2 * Zline
print('Z_line = {:.2f} Ω'.format(Z_line))


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
The phasor current is:
Can you write Python code for it?

IS = Is * (cos(IS_angle)  + sin(IS_angle)*1j)
print('IS = {:.2f} A ∠{:.2f}°'.format(abs(IS), degrees(IS_angle)))


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
The power factor is 0.80 lagging, so the impedance angel $\theta = \arccos(PF)$ is:
Can you write Python code for it?

IS_angle = - arccos(PF)  # negative because lagging PF
print('θ = {:.2f}°'.format(degrees(IS_angle)))


I am working on the file "Chapman/Ch2-Problem_2-02.ipynb".
The first task is:
Therefore, the efficiency of the power system is:
Can you write Python code for it?

eta = Pout/Pin * 100  # [%]
print('η = {:.1f} %'.format(eta))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
(a)
Assume that the transformers are not present in the circuit.

What is the load voltage and efficiency of the system?

(b)
Assume that transformer 1 is a 1:5 step-up transformer, and transformer 2 is a 5:1 step-down transformer.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
(b)
The equivalent circuit of this power system is shown below:
<img src="figs/Problem_2-03b.jpg" width="70%">
The line impedance referred to primary side of $T_1$ is:
$$Z'\text{line} = a^2Z\text{line}$$
Can you write Python code for it?

Z_line_b = a_b**2 * Zline
print('Z_line_b = {:.2f} Ω'.format(Z_line_b))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
(c)
Since the power in a resistor is given by $P = I^2R$, the total power consumed in the line resistance will be directly proportional to the ratio of the line resistance to the total resistance in the circuit. The load resistance is $30\,\Omega$, and that must be $99\,\%$ of the total resistance in order for the efficient to be $1\,\%$.
Therefore, the referred line resistance must be:
$$\frac{R'\text{line}}{R\text{load}} = \frac{0.01}{0.99}$$
Can you write Python code for it?

Rload = Zload.real
R_line_c = 0.01/0.99 * Rload
print('R_line_c = {:.3f} Ω'.format(R_line_c))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
Description
Consider a simple power system consisting of an ideal voltage source, an ideal step-up transformer, a transmission line, an ideal step-down transformer, and a load.
The voltage of the source is $\vec{V}S = 480 \angle 0° V$ . The impedance of the transmission line is $Z\text{line} = 3 + j4 \,\Omega$, and the impedance of the load is $Z_\text{load} = 30 + j40\,\Omega$ .
Can you write Python code for it?

VS = 480.0 * exp(0j)  # [Ohm] using polar syntax
Zline = 3.0 + 4.0j    # [Ohm] using cartesian syntax
Zload = 30.0 + 40.0j  # [Ohm] using cartesian syntax


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
Since the referred line resistance is
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The efficiency of the power system is:
$$\eta = \frac{P_\text{OUT}}{P_\text{IN}} \cdot 100\% = \frac{P_\text{load}}{P_\text{load}+P_\text{line}} \cdot 100\%$$
Can you write Python code for it?

eta_a = Pload_a / (Pload_a + Pline_a) * 100  # [%]
print('η_a = {:.1f} %'.format(eta_a))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The efficiency of the power system is:
Can you write Python code for it?

eta_b = Pload_b / (Pload_b+Pline_b) * 100  # [%]
print('η_b = {:.1f} %'.format(eta_b))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The load impedance referred to primary side of $T_1$ is the same as the actual impedance, since the turns ratios of the step-up and step-down transformers undo each other’s changes.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The load voltage is:
$$\vec{V}\text{load} = \vec{I}\text{load}Z_\text{load}$$
Can you write Python code for it?

Vload_a = Iload_a * Zload
print('Vload_a = {:.1f} V ∠{:.0f}°'.format(
            abs(Vload_a), angle(Vload_a, deg=True)))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The power consumed by the load is:
Can you write Python code for it?

R_load_b = Z_load_b.real
Pload_b = abs(Iload_b)**2 * R_load_b
print('Pload_b = {:.1f} W'.format(Pload_b))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The power consumed by the transmission line is:
Can you write Python code for it?

R_line_b = Z_line_b.real
Pline_b = abs(Iload_b)**2 * R_line_b
print('Pline_b = {:.1f} W'.format(Pline_b))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
The resulting equivalent circuit referred to the primary side of $T_1$ is:
<img src="figs/Problem_2-03b2.jpg" width="70%">
The load current in this system is:
$$\vec{I}\text{load} = \frac{\vec{V}_S}{Z'\text{line}+Z'_\text{load}}$$
Can you write Python code for it?

Iload_b = VS / (Z_line_b+Z_load_b)
Iload_b_angle = arctan(Iload_b.imag/Iload_b.real) # angle of Iload_b [rad]
print('Iload_b = {:.3f} A ∠{:.2f}°'.format(
          abs(Iload_b), degrees(Iload_b_angle)))


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
and the actual line resistance is
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-03.ipynb".
The first task is:
the turns ration must be:
$$a^2 = \frac{R'\text{line}}{R\text{line}}$$
Can you write Python code for it?

Rline = Zline.real
a_c = sqrt(R_line_c/ Rline)
print('a = {:.3f}'.format(a_c))


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The excitation current of this transformer is:
$$\vec{I}_{EX} = \vec{I}_C + \vec{I}_M$$
Can you write Python code for it?

IC = VP / Rc
IM = VP / (Xm*1j)
Iex = IC + IM
Iex_angle = arctan(Iex.imag/Iex.real)
print('Iex = {:.2f} A ∠{:.1f}°'.format(
            abs(Iex), Iex_angle/pi*180))  # angle in [deg]


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The input power to this transformer is:
$$P_{IN} = V_PI_P\cos\theta$$
Can you write Python code for it?

Pin = abs(VP) * abs(IP) * cos(VP_angle - IP_angle)
print('Pin = {:.0f} W'.format(Pin))


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The output power from this transformer is:
$$P_{OUT} = V_SI_S\cos\theta$$
Can you write Python code for it?

Pout = abs(VS) * abs(IS) * cos(VS_angle - IS_rad)
print('Pout = {:.0f} W'.format(Pout))


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The primary circuit voltage is given by:
$$\vec{V}P = \vec{V}'_S + \vec{I}'_S(R{eq} + jX_{eq})$$
Can you write Python code for it?

VP = VSp + ISp * (Req + Xeq*1j)
VP_angle = arctan(VP.imag/VP.real)
print('VP = {:.1f} V ∠{:.1f}°'.format(
            abs(VP), degrees(VP_angle)))


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The secondary current referred to the primary side is:
$$\vec{I}'_S = \frac{\vec{I}_S}{a}$$
Can you write Python code for it?

ISp = IS / a
print('ISp = {:.1f} A ∠{:.2f}°'.format(
            abs(ISp), IS_deg))  # the turns ratio has no effect on the angle


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The secondary voltage referred to the primary side is:
$$\vec{V}'_S = a\vec{V}_S$$
Can you write Python code for it?

VSp = a * VS
print('VSp = {:.1f} V ∠{:.0f}°'.format(
            abs(VSp), VS_angle)) # the turns ratio has no effect on the angle


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
The voltage regulation of the transformer at this load is:
$$VR = \frac{V_P - aV_S}{aV_S} \cdot 100\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
Therefore, the total primary current of this transformer is:
$$\vec{I}P = \vec{I}'_S + \vec{I}{EX}$$
Can you write Python code for it?

IP = ISp + Iex
IP_angle = arctan(IP.imag/IP.real)
print('VS = {:.1f} V ∠{:.1f}°'.format(
            abs(IP), IP_angle/pi*180)) # angle in [deg]
print('===================')


I am working on the file "Chapman/Ch2-Problem_2-04.ipynb".
The first task is:
Therefore, the transformer's efficiency is:
$$\eta = \frac{P_{OUT}}{P_{IN}} \cdot 100\,\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
(b)
When this transformer is connected to a 240-V 50 Hz source, the flux in the core will be given by
the equation
$$\phi(t) = - \frac{V_M}{\omega N_S}\cos(\omega t)$$
Calculate the angular velocity $\omega$:
Can you write Python code for it?

w50 = 2 * pi * freq50
print('w = {:.4f} rad/s'.format(w50) )


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Calculate flux versus time $\phi(t)$ (saved as a vector):
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Calculate the magnetization current $\text{i}_\text{m}$:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Calculate the maximum voltage $V_M$:
Can you write Python code for it?

VM60 = Vrms60 * sqrt(2)
print('VM = {:.4f} V'.format(VM60) )


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Calculate the maximum voltage $\text{V}_\text{M}$:
Can you write Python code for it?

VM50 = Vrms50 * sqrt(2)
print('VM = {:.4f} V'.format(VM50) )


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Calculate the rms value of the current $i_\text{rms}$:
Can you write Python code for it?

irms50 = sqrt(sum(im50**2) / im50.size)
print('The rms current at 120 V and 50 Hz is {:.5f} A'.format(irms50))


irms60 = sqrt(sum(im60**2) / im60.size)
print('The rms current at 120 V and 60 Hz is {:.4f} A'.format(irms60))


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
Sketch the magnetization current $i_m$ that would flow in the transformer:
Can you write Python code for it?

rc('text', usetex=True)   # enable LaTeX commands for plot
title(r'\bf Magnetization current at 60 Hz')
xlabel(r'\bf Time (s)')
ylabel(r'$\mathbf{I_m}$ \textbf{(A)}')
axis([0,0.04,-0.5,0.5])   #set the axis range
plot(time,im60)
legend(('$60 Hz,\,I_{{RMS}} = {:.3f}\,A$'.format(irms60),), loc=4);
grid()


rc('text', usetex=True)   # enable LaTeX commands for plot
title(r'\bf Magnetization current at 50 Hz')
xlabel(r'\bf Time (s)')
ylabel(r'$\mathbf{I_m}$ \textbf{(A)}')
axis([0,0.04,-0.5,0.5])   #set the axis range
plot(time,im50)
legend(('$50 Hz,\,I_{{RMS}} = {:.3f} A$'.format(irms50),), loc=4);
grid()


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
The magnetization current required for a given flux $\phi(t)$ can be found from Figure P2-2 or from the equivalent table in file p22_mag.dat by using the interpolation function:
Can you write Python code for it?

mmf60 = interp(flux60, data['flux_data'], data['mmf_data'])


mmf50 = interp(flux50, data['flux_data'], data['mmf_data'])


I am working on the file "Chapman/Ch2-Problem_2-05.ipynb".
The first task is:
The magnetization curve for this transformer is shown in Figure P2-2, and can be found in p22_mag.dat at this book's Web site.
<img src="figs/FigC_P2-2.jpg" width="100%">
Can you write Python code for it?

#Load the magnetization curve data
import pandas as pd
# The data file is stored in the repository
fileUrl = 'data/p22_mag.dat'
data = pd.read_csv(fileUrl,     # the address where to download the datafile from
                   sep=' ',     # our data source uses a blank space as separation
                   comment='%', # ignore lines starting with a "%"
                   skipinitialspace = True,  # ignore intital spaces
                   header=None, # we don't have a header line defined...
                   names=['mmf_data', 'flux_data'] # ...instead we define the names here
                   )


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
(a)

Find the equivalent circuit of this transformer referred to the low-voltage side.

(b)

Find the transformer’s voltage regulation at rated conditions and
for 0.8 PF lagging
for 1.0 PF
for 0.8 PF leading.

(c)

Determine the transformer’s efficiency at rated conditions and 0.8 PF lagging.

SOLUTION
(a)
Solution based on active and reactive power:
Open-circuit test results (ignore $R_{EQ}$ and $X_{EQ}$ and all values referred to the secondary side):
Can you write Python code for it?

Rc = Voc**2/Poc
Rc

Soc = Voc*Ioc
Qoc = sqrt(Soc**2 - Poc**2)
Xm = Voc**2/Qoc
Xm


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
(c)
At rated conditions and 0.8 PF lagging, the output power of this transformer is:
$$ P_\text{OUT} = V_s I_s \cos(\theta) =  V_s I_s \cdot PF  $$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
2) 1.0 PF
Can you write Python code for it?

PF = 1.0
theta = arccos(PF)
Is = Is_amp *exp(1j*theta)
print('Is = {:.1f} A ∠{:.1f}°'.format(
            abs(Is), angle(Is, deg=True)))

Vps = Vs + (Reqs + 1j*Xeqs)*Is
Vps_angle = arctan(imag(Vps)/real(Vps))
print('Vps = {:.1f} V ∠{:.2f}°'.format(
            abs(Vps), Vps_angle/pi*180))


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
And the voltage regulation with:
$$ VR = \frac{V_P/a-V_S}{V_S} = \frac{V_P'-V_S}{V_S} $$
is therefore:
Can you write Python code for it?

VR = (abs(Vps_lagg) - abs(Vs)) / abs(Vs) * 100  # in percent
print('VR = {:.2f} %'.format(VR))
print('===========')


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
And the voltage regulation with:
$VR = \frac{V_P/a-V_S}{V_S} = \frac{V_P'-V_S}{V_S}$
is therefore:
Can you write Python code for it?

VR = (abs(Vps) - abs(Vs)) / abs(Vs) * 100  # in percent
print('VR = {:.2f} %'.format(VR))
print('===========')


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
And the voltage regulation with: $VR = \frac{V_P/a-V_S}{V_S} = \frac{V_P'-V_S}{V_S}$ is therefore:
Can you write Python code for it?

VR = (abs(Vps_lead) - abs(Vs)) / abs(Vs) * 100  # in percent
print('VR = {:.2f} %'.format(VR))
print('============')


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
Description
A 1000-VA 230/115-V transformer has been tested to determine its equivalent circuit. The results of the
tests are shown below:
| Open-circuit test   | Short-circuit test |
|---------------------|--------------------|
| (on secondary side) | (on primary side)  |
| $V_{OC} = 115\,V$   | $V_{SC} = 17.1\,V$ |
| $I_{OC} = 0.11\,A$  | $I_{SC} = 8.7\,A$ (should really be 4.35 A) |
| $P_{OC} = 3.9\,W$   | $P_{SC} = 38.1\,W$ |

Note: As was correctly pointed out in the lecture, the current $I_{sc}$ is actually to large by a factor of 2.
I assume it simply being an oversight an the correct value given should be $I_{SC} = 4.35\,A = I_n$ (i.e., equal to the nominal current which can be calculated from $I_n = \frac{1000\,VA}{230\,V}$).
The following solution is based on the incorrectly given current of $I_{SC} = 8.7\,A$ but you can simply set the value of Isc below to 4.35 and run "Cell → Run all" to recaculate all values based on the correct $I_{SC}$.
See also Example 2-2 in the book which is similar to this problem but where the correct values were used.

Can you write Python code for it?

Voc = 115.0  # [V]
Ioc =   0.11 # [A]
Poc =   3.9  # [W]
Vsc =  17.1  # [V]
Isc =   8.7  # [A]   replace with 4.35 so see alternative(correct solutions)
Psc =  38.1  # [W]


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
Short-circuit test results (ignore $R_C$ and $X_M$ and all values referred to the primary side):
Can you write Python code for it?

Req = Psc/Isc**2
Req

Ssc = Vsc*Isc
Qsc = sqrt(Ssc**2 - Psc**2)
Xeq = Qsc/Isc**2
Xeq


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
The resulting equivalent circuit is:
To convert the equivalent circuit to the secondary side, divide each series impedance by the square of the
turns ratio ( a = 230/115 = 2). Note that the excitation branch elements are already on the secondary side.
The resulting equivalent circuit is shown below:
<img src="figs/FigC_2-18b.jpg" width="50%">
Can you write Python code for it?

a = 230/115
a

Rcs = Rc # measurements were already done on the secondary side
Rcs

Xms = Xm # measurements were already done on the secondary side
abs(Xms)

Reqs = Req/a**2
Reqs

Xeqs = Xeq/a**2
Xeqs


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
We will now calculate the primary voltage referred to the secondary side and use the voltage regulation equation for each power factor. The calulations are taking the secondary voltage $V_S = 115\,V\angle 0^\circ$ as a reference.
$$ \vec{V_P}' =  \vec{V_S} + Z_{EQ} \vec{I_S}$$
1) 0.8 PF lagging
Can you write Python code for it?

PF = 0.8
theta = -arccos(PF)
Is = Is_amp *exp(1j*theta)
print('Is = {:.1f} A ∠{:.1f}°'.format(
            abs(Is), theta/pi*180))

Vps_lagg = Vs + (Reqs + 1j*Xeqs)*Is
Vps_lagg_angle = arctan(imag(Vps_lagg)/real(Vps_lagg))
print('Vps = {:.1f} V ∠{:.2f}°'.format(
            abs(Vps_lagg), Vps_lagg_angle/pi*180))


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
watts. And the core losses are $P_\text{core} = V_P'^2/R_c$:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-06.ipynb".
The first task is:
watts. The copper and core losses of this transformer are $P_\text{CU} = I_s^2 \cdot R_{\text{EQ}_s}$:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
(b)
The easiest way to solve this problem is to refer all components to the primary side of the
transformer. The turns ratio is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
And the voltage regulation with $VR = \frac{V_P-V_S'}{V_S'}$ is therefore:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
The actual secondary voltage is thus
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
The referred secondary current is $I_s' = \frac{V_P}{Z_{EQ} Z_L'}$:
Can you write Python code for it?

Isp =  Vp/ (Zeq + Zloadp)
print('Isp = {:.3f} A ∠{:.2f}°'.format(
            abs(Isp), angle(Isp, deg=True)))


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
Thus the load impedance referred to the primary side is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-07.ipynb".
The first task is:
and the referred secondary voltage is $V_s' = I_s' X_L'$:
Can you write Python code for it?

Vsp =  Isp * Xloadp
print('Vsp = {:.2f} V ∠{:.2f}°'.format(
            abs(Vsp), angle(Vsp, deg=True)))


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
(a)

Find the equivalent circuit referred to the low-voltage side of this transformer.

(b)

Calculate the voltage regulation of this transformer for a full-load current at power factor of 0.8 lagging.

(c)

Calculate the copper and core losses in transformer at the conditions in (b).

(d)
Assume that the primary voltage of this transformer is a constant 15 kV.

Plot the secondary voltage as a function of load current for currents from no-load to full-load.
Repeat this process for power factors of 0.8 lagging, 1.0, and 0.8 leading.

SOLUTION
(a)
The base impedance $Z_\text{base}$ of this transformer referred to the primary (low-voltage) side is
$$Z_\text{base} = \frac{V_\text{base}^2}{S_\text{base}}$$
Can you write Python code for it?

Z_base = V_base**2 / S_base  # [Ω]
print('Z_base = {:.1f} Ω'.format(Z_base))


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
(b)
If the load on the secondary side of the transformer is 150 MVA at 0.8 PF lagging, and the referred
secondary voltage is 15 kV:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
Calculate the current calues for the three power factors.
The first array of I contains the lagging currents, the second array contains the unity currents, and the third array contains the leading currents.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
Description
A 150-MVA 15/200-kV single-phase power transformer
has a per-unit resistance of 1.2 percent
and a perunit reactance of 5 percent (data taken from the transformer’s nameplate).
The magnetizing impedance is $j80$ per unit.
Can you write Python code for it?

V_base =  15e3   # [V] primary voltage
S_base = 150e6   # [VA] apparent power
Req_0  =   0.012 # The per-unit resistance of power transformer
Xeq_0  =   0.05  # The per_unit reactance of power transformer
Xm_0   =  80.0   # The magnetizing impedance (per unit)


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
Plot the secondary voltage (in kV!) versus load:
Can you write Python code for it?

title('Secondary voltage vs load current')
xlabel('Load current [A]')
ylabel('Secondary voltage (kV)')
plot(amps,abs(VS[0,]/1000), 'b-', linewidth = 2)
plot(amps,abs(VS[1,]/1000), 'k--',linewidth = 2)
plot(amps,abs(VS[2,]/1000), 'r-.',linewidth = 2)
legend(('0.8 PF lagging', '1.0 PF', '0.8 PF leading'), loc=3);
grid()


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
So the resistance $R_\text{EQ}$, reactance $X_\text{EQ}$ and the magnetizing imoedance $X_M$ can be calculated:
Can you write Python code for it?

Req = Req_0 * Z_base      # [Ω]
Xeq = Xeq_0 * Z_base * 1j # [Ω], Xeq is not supposed to be a real value here.
Xm  = Xm_0  * Z_base      # [Ω]


I am working on the file "Chapman/Ch2-Problem_2-08.ipynb".
The first task is:
Then the referred secondary current is
$$I'S = \frac{S\text{LOAD}}{V_S} = \frac{P_\text{LOAD}}{V_S PF} $$
Can you write Python code for it?

Is = S_load / abs(VS)                        # The absolute value of I_S [A]
Is_angle = - arccos(PF_b)                    # The angle of I_S [rad]
IS = Is*cos(Is_angle) + Is*sin(Is_angle)*1j
print('I_s = {:.0f} A ∠{:.2f}°'.format(
                abs(IS), Is_angle/pi*180))  # Turn the angle from radian into degree


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
$\theta = \arccos\frac{P_{OC}}{V_{OC}I_{OC}}$
Can you write Python code for it?

theta = arccos(Poc/(Voc*Ioc))
print('theta = {:.2f}°'.format(theta/pi*180))  # print the angle in degrees

Yex = yex * (cos(theta) - sin(theta)*1j)
print('Yex = {:.7f} S'.format(Yex))


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
(a)

Find the equivalent circuit referred to the low-voltage side of this transformer.

(b)
If the voltage on the secondary side is 13.8 kV and the power supplied is 4000 kW at 0.8 PF lagging.

Find the voltage regulation of the transformer.
Find its efficiency.

SOLUTION
(a)
The open-circuit test was performed on the low-voltage side of the transformer, so it can be used to directly find the components of the excitation branch relative to the low-voltage side.
$$|Y_{EX}| = |G_{C} - jB_{M}| = \frac{I_{OC}}{V_{OC}}$$
Can you write Python code for it?

yex = Ioc / Voc
print('yex = {:.6f}'.format(yex))


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
The base impedance of this transformer referred to the secondary side is:
$$Z_\text{base} = \frac{V^2_\text{base}}{S_\text{base}}$$
Can you write Python code for it?

Vbase = Vs0
Zbase = Vbase**2 / Sbase
print('Zbase = {:.2f} Ω'.format(Zbase))


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
The resulting equivalent circuit is shown below:
<img src="figs/Problem_2-09.jpg" width="50%">
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
The transformer copper losses and core losses are:
$$P_{CU} = I^2_S R_{EQ,S}$$
$$P_{core} = \frac{(V'_P)^2}{R_C}$$
Can you write Python code for it?

Pcu = abs(IS_b)**2 * Req
Pcore = abs(V_P)**2 / Rc
print('Pcu   = {:.1f} kW'.format(Pcu/1000))
print('Pcore = {:.1f} kW'.format(Pcore/1000))


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
There is a voltage drop under these load conditions.
Therefore the voltage regulation of the transformer is:
$$VR = \frac{V'_P-V_S}{V_S} \cdot 100\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
Therefore the efficiency of this transformer at these conditions is:
$$\eta = \frac{P_{OUT}}{P_{OUT}+P_{CU}+P_{core}} \cdot 100\%$$
Can you write Python code for it?

Pout = Pload_b
eta = Pout / (Pout + Pcu +Pcore) * 100
print('η = {:.1f} %'.format(eta))
print('==========')


I am working on the file "Chapman/Ch2-Problem_2-09.ipynb".
The first task is:
Thus:
Can you write Python code for it?

Req = Req_pu * Zbase
Xeq = Xeq_pu * Zbase
print('Req = {:4.2f} Ω'.format(Req))
print('Xeq = {:4.2f} Ω'.format(Xeq))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
(a)
If this transformer supplies a load of 80 MVA at 0.8 PF lagging.

draw the phasor diagram of one phase of the transformer.

(b)

What is the voltage regulation of the transformer bank under these conditions?

(c)

Sketch the equivalent circuit referred to the low-voltage side of one phase of this transformer.
Calculate all the transformer impedances referred to the low-voltage side.

(d)

Determine the losses in the transformer and the efficiency of the transformer under the conditions of part (b).

SOLUTION
(a)
The transformer supplies a load of 80 MVA at 0.8 PF lagging. Therefore, the secondary line current of the transformer (referred to the secondary side) is:
$$I_{LS} = \frac{S_\text{load}}{\sqrt{3}V_{LS}}$$
Can you write Python code for it?

Sload = 80e6  # [VA]
PF    = 0.8
Vls_a = Vs0

Ils_a = Sload / (sqrt(3)*Vls_a)
print('Ils_a = {:.0f} A'.format(Ils_a))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
(c)
The secondary side of this transfer is Y-connected, so the base phase voltage of the low voltage (secondary) side of this transformer is:
$$V_{\phi S_\text{base}} = \frac{V_{LS_\text{base}}}{\sqrt{3}}$$
Can you write Python code for it?

Vphis_base = Vls_base / sqrt(3)
print('Vphi_base = {:.1f} kV'.format(Vphis_base/1000))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
(d)
The per-unit losses in the series resistance are:
$$P_\text{EQ} = I^2R_\text{EQ}$$
Can you write Python code for it?

Peq_pu = abs(ILS_pu_a)**2 *Req_pu
print('Peq_pu = {:.4f}'.format(Peq_pu))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
Description
A 100-MVA 230/115-kV $\Delta$-Y three-phase power transformer has a per-unit resistance of 0.015 pu and a per-unit reactance of 0.06 pu. The excitation branch elements are $R_C =100\,pu$ and $X_M = 20\,pu$.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
The base impedance of the transformer referred to the low-voltage side is:
$$Z_\text{base} = \frac{3V_{\phi S_\text{base}}^2}{S_\text{base}}$$
Can you write Python code for it?

Zbase = 3 * Vphis_base**2 / Sbase
print('Zbase = {:.0f} Ω'.format(Zbase))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
The per-unit losses in the excitation branch are:
$$P_{\text{EX}\text{pu}} = \frac{V^2}{R\text{EX}}$$
Can you write Python code for it?

Rex_pu = Rc_pu

Pex_pu = abs(VP_pu)**2 / Rex_pu
print('Pex_pu = {:.4f}'.format(Pex_pu))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
The per-unit phasor diagram is shown below:
<img src="figs/Problem_2-11a.jpg" width="50%">
(b)
The per-unit primary voltage of this transformer is:
$$\vec{V}P = \vec{V}_S + \vec{I}Z\text{EQ}$$
Can you write Python code for it?

VS_pu = 1.0
Zeq_pu = Req_pu + Xeq_pu*1j

VP_pu = VS_pu + ILS_pu_a*Zeq_pu
VP_pu_angle = arctan(VP_pu.imag/VP_pu.real)
print('VS_pu = {:.3f} ∠{:.1f}°'.format(
           abs(VP_pu), VP_pu_angle/pi*180))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
The per-unit power supplied to the load:
$$P_{\text{load}\text{pu}} = \frac{P\text{load}}{S_\text{base}}= \frac{PF  \cdot S \text{load}}{S\text{base}}$$
Can you write Python code for it?

Pload_pu = PF*Sload/Sbase
print('Pload_pu = {:.2f}'.format(Pload_pu))


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
and the actual losses in the excitation branch are:
$$P_{EX} = S_{base}P_{EX,pu}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
and the actual losses in the series resistance are:
$$P_\text{EQ} = S_\text{base}P_{\text{EQ}_\text{pu}}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-11.ipynb".
The first task is:
and the voltage regulation is:
$$VR = \frac{V_P - V_S}{V_S} \cdot 100\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
$$\theta = \arccos{\frac{P_{SC}}{V_{SC}I_{SC}}}$$
Can you write Python code for it?

theta = arccos(Pphi_SC / (Vphi_SC*Iphi_SC))
print('theta = {:.1f}°'.format(theta/pi *180))

ZEQ = Zeq * (cos(theta) + sin(theta)*1j)
print('ZEQ = {:.2f} Ω'.format(ZEQ))

Req = ZEQ.real
Xeq = ZEQ.imag
print('''
Req = {:.2f} Ω
Xeq = j{:.2f} Ω
'''.format(Req, Xeq))


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
(a)
If this Y-$\Delta$ transformer bank delivers rated kVA (300 kVA) at 0.8 power factor lagging while the secondary voltage is at rated value, then each transformer delivers 100 kVA at a voltage of 480 V and 0.8 PF lagging. Referred to the primary side of one of the transformers, the load on each transformer is equivalent to 100 kVA at 8314 V and 0.8 PF lagging. The equivalent current flowing in the secondary of one transformer referred to the primary side is:
Can you write Python code for it?

PF = 0.8
V_PHI_s = Vp_ph  # secondary phase voltage as referred by the primary side
I_phi_s = Sbase / abs(V_PHI_s)  # amplitude of current
I_PHI_s_angle = -arccos(PF)     # angle
I_PHI_s = I_phi_s * (cos(I_PHI_s_angle) + sin(I_PHI_s_angle)*1j) # complex vector
print('I_PHI_s = {:.2f} A ∠{:.2f}°'.format(
            abs(I_PHI_s), I_PHI_s_angle/pi * 180))


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
(b)
The voltage regulation of the transformer is:
$$VR = \frac{V_{\phi,P}-V'{\phi,S}}{V'{\phi,S}} \cdot 100\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
(c)
The base values of this transformer bank on the primary side are:
Can you write Python code for it?

Sbase_3 = 300e3  # [VA]
Vll_base = Vp_ll
Vll_base


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
(d)
This sort of repetitive operation is best performed with Python.
Calculate the voltage regulation:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
(e)
The base phase voltage on the primary side is given by:
$$V_{\phi P_\text{base}} = \frac{V_{LP}}{\sqrt{3}}$$
Can you write Python code for it?

Vlp = Vp_ll
Vphip_base = Vlp / sqrt(3)
print('Vphip_base = {:.3f} kV'.format(Vphip_base/1000))


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Calculate secondary phase voltage referred to the primary side for each current and power factor.
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Calculate the current values for the three power factors.
Can you write Python code for it?

re = 0.85
im = sin(arccos(re))
I = amps * array ([[re - im*1j],  # lagging
                   [1.0],         # unity
                   [re + im*1j]]) # leading


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Description
Correction! In the book a transformer ratio of 14,000/480-V is given. This should be 14,400/480-V which is also used in the following calculations.
A 14,400/480-V three-phase Y-$\Delta$-connected transformer bank consists of three identical 100-kVA 8314/480-V transformers. It is supplied with power directly from a large constant-voltage bus. In the short-circuit test, the recorded values on the high-voltage side for one of these transformers are:
$$V_{SC} = 510\,V \qquad I_{SC} = 12.6\,A \qquad P_{SC} = 3000\,W$$
Can you write Python code for it?

Sbase   = 100e3  # [VA]
Vp_ll   =  14400 # [V]  primary line-to-line volage of transformer bank
Vs_ll   =    480 # [V]  secondary line-to-line volage of transformer bank
Vp_ph   =   8314 # [V]  primary phase voltage of single transformer
Vs_ph   =    480 # [V]  secondary phase voltage of single transformer


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Plot the secondary voltage versus load:
Can you write Python code for it?

title('Secondary voltage vs load current')
xlabel('Load current [A]')
ylabel('Secondary voltage [V]')
plot(amps, abs(VSP[0,]), 'b-',
     amps, abs(VSP[1,]), 'k--',
     amps, abs(VSP[2,]), 'r-.',
     linewidth = 2)
legend(('0.8 PF lagging', '1.0 PF', '0.8 PF leading'), loc=3);
grid()


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Refer the secondary phase voltages back to the secondary side using the turns ratio. Because this is a delta-connected secondary, this is also the line voltage.
Can you write Python code for it?

a = Vp_ph/Vs_ph # turns ratio
VSP = aVSP / a


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
The voltage on the primary side of a single transformer is thus:
$$\vec{V}{\phi,P} = \vec{V}'{\phi,S} + \vec{I}'{\phi,S}Z{EQ,P}$$
Can you write Python code for it?

V_PHI_p = V_PHI_s + I_PHI_s*ZEQ
V_PHI_p_angle = arctan(V_PHI_p.imag/V_PHI_p.real)
print('V_PHI_p = {:.0f} V ∠{:.2f}°'.format(
            abs(V_PHI_p), V_PHI_p_angle/pi * 180))


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
This sort of repetitive operation is best performed with Python. Note that in this case, the problem is specifying a fixed primary phase voltage of 8314 V, and asking what the secondary voltage will be as a function of load. Therefore, we must subtract the voltage drop inside the transformer at each load, and convert the resulting voltage from the primary side to the secondary (low voltage) side.
Define values for this transformer:
Can you write Python code for it?

VL = Vp_ll                       # [V] primary line voltage
VP = VL / sqrt(3)                # [V] primary phase voltage
amps = linspace(0, Il_base, 100) # [A] phase current values
# Req is Equivalent R, which is already defined
# Xeq is Equivalent X, which is already defined


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
Thus the per-phase impedance is:
$$|Z_\text{EQ}| = |R_\text{EQ} + jX_\text{EQ}| = \frac{V_{\phi,SC}}{I_{\phi,SC}}$$
Can you write Python code for it?

Zeq = Vphi_SC / Iphi_SC
print('|Zeq| = {:.2f} Ω'.format(Zeq))


I am working on the file "Chapman/Ch2-Problem_2-13.ipynb".
The first task is:
and the power per phase is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-15.ipynb".
The first task is:
(a)

What must the $N_C / N _{SE}$ turns ratio be to accomplish this connection?

(b)

How much apparent power must the windings of each autotransformer handle?

(c)

What is the power advantage of this autotransformer system?

(d)

If one of the autotransformers were reconnected as an ordinary transformer, what would its ratings be?

SOLUTION
(a)
The transformer is connected Y-Y, so the primary and secondary phase voltages are the line
voltages divided by 3 . The turns ratio of each autotransformer is given by:
$$\frac{V_H}{V_L} = \frac{N_C + N_{SE}}{N_C}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-15.ipynb".
The first task is:
(c)
As determined in (b), the power advantage of this autotransformer system is:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-15.ipynb".
The first task is:
The voltage across the common winding ( $N_C$ ) is:
Can you write Python code for it?

Vnc = Vl_p
print('Vnc = {:.0f} V'.format(Vnc))


I am working on the file "Chapman/Ch2-Problem_2-15.ipynb".
The first task is:
Therefore, a single phase of the autotransformer connected as an ordinary transformer would be rated at:
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-17.ipynb".
The first task is:
(a)

Sketch the transformer connection that will do the required job.

(b)

Find the kilovoltampere rating of the transformer in the configuration.

(c)

Find the maximum primary and secondary currents under these conditions.

SOLUTION
(a)
For this configuration, the common winding must be the smaller of the two windings.
The transformer connection is shown below:
<img src="figs/Problem_2-17.jpg" width="40%">
(b)
The kVA rating of the autotransformer can be found from the equation:
$$S_{IO} = \frac{N_{SE} + N_C}{N_{SE}}S_W = \frac{4N_C + N_C}{4N_C}S_W$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-17.ipynb".
The first task is:
(c)
The maximum primary current for this configuration will be:
$$I_P = \frac{S}{V_P}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-17.ipynb".
The first task is:
and the maximum secondary current is:
$$I_S = \frac{S}{V_S}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-18.ipynb".
The first task is:
(c)
The maximum primary current for this configuration will be:
$$I_P = \frac{S}{V_P}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch2-Problem_2-18.ipynb".
The first task is:
Description
A 10-kVA 480/120-V conventional transformer is to be used to supply power from a 600-V source to a 480-V load. Consider the transformer to be ideal, and assume that all insulation can handle 600 V.
Can you write Python code for it?

Sw = 10e3  # [VA]
Vp = 600   # [V]

Vh = 480   # [V] which is also the load voltage
Vl = 120   # [V]


I am working on the file "Chapman/Ch2-Problem_2-18.ipynb".
The first task is:
and the maximum secondary current is:
$$I_S = \frac{S}{V_S}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseCurrents.ipynb".
The first task is:
Calculate a circle representing the expected maximum value of Itot:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseCurrents.ipynb".
The first task is:
Calculate neutral current $I_n$:
Can you write Python code for it?

# Its amplitude
In_amp = (I_ph[0] + I_ph[1] + I_ph[2])
# Its angle:
In_ang = angle(Itot)
In = In_amp * exp(1j*In_ang)   # combine to a complex In


I am working on the file "Chapman/Ch3-Animation_ThreePhaseCurrents.ipynb".
The first task is:
Generating  the animation:
Can you write Python code for it?

# First set up the figure, the axis, and the plot element we want to animate
from matplotlib import animation
fig = figure()
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2)
ax1.set_title('Space vectors in motion')
ax1.set_xlabel('Real')
ax1.set_ylabel('Imag')
ax1.set_xlim(-1.6, 1.6)
ax1.set_ylim(-1.6, 1.6)
ax1.set_aspect('equal')
ax2.set_title('Sinusoidal three-phase')
ax2.set_xlabel('wt [rad]')
ax2.set_xlim(0, 2*pi)
ax2.set_ylim(-1.6, 1.6)
# set up the different line colours
la, lb, lc, ltot, ctot, ln, cn = ax1.plot([], [], 'red',
                                [], [], 'green',
                                [], [], 'blue',
                                [], [], 'magenta',
                                [], [], 'magenta',
                                [], [], 'y',
                                [], [], 'y',
                                lw=2)

# set up the moving dots
da, db, dc, dn = ax2.plot([], [], 'ro',
                          [], [], 'go',
                          [], [], 'bo',
                          [], [], 'yo',
                          lw=2)

tight_layout()  # sometimes useful when sub-plots get a bit crowded

# initialization function: plot the background of each frame
def init():
    ax1.plot(real(circle), imag(circle), 'black');
    ax2.plot(wt, I_ph[0,], 'red',
             wt, I_ph[1,], 'green',
             wt, I_ph[2,], 'blue',
             wt, In_amp, 'y',
             lw=1);
    return

# animation function.  This is called sequentially
def animate(simData):
    i = simData - 1 # python index starts at 0
    re = [real(I[0,i]), real(I[1,i]), real(I[2,i])]
    im = [imag(I[0,i]), imag(I[1,i]), imag(I[2,i])]
    ren = real(In[i])
    imn = imag(In[i])
    la.set_data([0, re[0]],
                [0, im[0]])
    lb.set_data([0, re[1]],
                [0, im[1]])
    lc.set_data([0, re[2]],
                [0, im[2]])
    ltot.set_data([0, real(Itot[i])], [0, imag(Itot[i])])
    ctot.set_data(real(Itot[:i+1]),imag(Itot[:i+1]))
    ln.set_data([0,...


I am working on the file "Chapman/Ch3-Animation_ThreePhaseCurrents.ipynb".
The first task is:
The animation above might be a bit "skippy" due to the browser performance trying to cope with the inline animation.
The solution to a smooth animation is to the animation as a video and embed it right here:
Can you write Python code for it?

from IPython.display import HTML
HTML(anim.to_html5_video())


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes.ipynb".
The first task is:
Calculate a circle representing the expected maximum value of Btot:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes.ipynb".
The first task is:
Generating  the animation:
Can you write Python code for it?

# First set up the figure, the axis, and the plot element we want to animate
from matplotlib import animation
fig = figure()
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2)
ax1.set_title('Space vectors in motion')
ax1.set_xlabel('Real')
ax1.set_ylabel('Imag')
ax1.set_xlim(-1.6, 1.6)
ax1.set_ylim(-1.6, 1.6)
ax1.set_aspect('equal')
ax2.set_title('Sinusoidal three-phase')
ax2.set_xlabel('wt [rad]')
ax2.set_xlim(0, 2*pi)
ax2.set_ylim(-1.6, 1.6)
# set up the different line colours
la, lb, lc, ltot, circ = ax1.plot([], [], 'red',
                            [], [], 'green',
                            [], [], 'blue',
                            [], [], 'magenta',
                            [], [], 'magenta',
                            lw=2)

# set up the moving dots
da, db, dc = ax2.plot([], [], 'ro',
                      [], [], 'go',
                      [], [], 'bo',
                      lw=2)

tight_layout()  # sometimes useful when sub-plots get a bit crowded

# initialization function: plot the background of each frame
def init():
    ax1.plot(real(circle), imag(circle), 'black');
    ax2.plot(wt, B_ph[0,], 'red',
             wt, B_ph[1,], 'green',
             wt, B_ph[2,], 'blue',
             lw=1);
    return

# animation function.  This is called sequentially
def animate(i):
    re = [real(B[0,i]), real(B[1,i]), real(B[2,i])]
    im = [imag(B[0,i]), imag(B[1,i]), imag(B[2,i])]
    la.set_data([0, re[0]], [0, im[0]])
    lb.set_data([re[0], re[0]+re[1]], [im[0], im[0]+im[1]])
    lc.set_data([re[0]+re[1], re[0]+re[1]+re[2]], [im[0]+im[1], im[0]+im[1]+im[2]])
    ltot.set_data([0, real(Btot[i])], [0, imag(Btot[i])])
    circ.set_data(real(Btot[:i]),imag(Btot[:i]))
    da.set_data(wt[i], B_ph[0,i])
    db.set_data(wt[i], B_ph[1,i])
    dc.set_data(wt[i], B_ph[2,i])
    return la, lb, lc, ltot, da, db, dc

# call the animator:
anim = animation.FuncAnimation(fig, animate, init_func=init, frames=100, interval=50)


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes.ipynb".
The first task is:
The animation above might be a bit "skippy" due to the browser performance trying to cope with the inline animation.
The solution to a smooth animation is to the animation as a video and embed it right here:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
Calculate a circle representing the expected maximum value of Btot:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
Calculate total flux vector Btot:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
First, generate the three component magnetic fields
Can you write Python code for it?

# specify number of pole pairs = 2 * number of poles
pp = 2
# create the time vector
t = linspace(0, 2*pp/freq, 100*pp)   # 100 values for one period
wt = w*t   # we are going to use this quite often

# amplitudes (changed them to see effect of unsymmetry):
B_amp = [[1.0], [1.0], [1.0]]
# time variants
B_time = array([sin(wt),
                sin(wt-2*pi/3),
                sin(wt+2*pi/3)])
# time variants for pole pairs
Bpp_time = array([sin(wt/pp),
                sin((wt-2*pi/3)/pp),
                sin((wt+2*pi/3)/pp)])
# vectorial shifts
B_shift = [[cos(0) + 1j*sin(0)],
           [cos(2*pi/3) + 1j*sin(2*pi/3)],
           [cos(-2*pi/3) + 1j*sin(-2*pi/3)]]
# vectorial shifts for pole pairs
Bpp_shift = [[cos(0) + 1j*sin(0)],
           [cos(2*pi/3/pp) + 1j*sin(2*pi/3/pp)],
           [cos(-2*pi/3/pp) + 1j*sin(-2*pi/3/pp)]]
# all combined
B   = B_amp * B_time   * B_shift
Bpp = B_amp * Bpp_time * Bpp_shift


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
Generating  the animation:
Can you write Python code for it?

# First set up the figure, the axis, and the plot element we want to animate
from matplotlib import animation
fig = figure()
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2, sharey=ax1)
ax1.set_title('Flux for 2 pole machine')
ax1.set_xlabel('Real')
ax1.set_ylabel('Imag')
ax1.set_xlim(-1.6, 1.6)
ax1.set_ylim(-1.6, 1.6)
#ax1.set_aspect('equal', 'datalim')
ax1.set_aspect('equal')
ax2.set_title('Flux for {:.0f} pole machine'.format(2*pp))
ax2.set_xlabel('Real')
ax2.set_ylabel('Imag')
ax2.set_xlim(-1.6, 1.6)
ax2.set_ylim(-1.6, 1.6)
ax2.set_aspect('equal')
# set up the different line colours
la, lb, lc, ltot, circ = ax1.plot([], [], 'red',
                            [], [], 'green',
                            [], [], 'blue',
                            [], [], 'magenta',
                            [], [], 'magenta',
                            lw=2)
pa, pb, pc, ptot, pcirc = ax2.plot([], [], 'red',
                            [], [], 'green',
                            [], [], 'blue',
                            [], [], 'magenta',
                            [], [], 'magenta',
                            lw=2)

tight_layout()  # sometimes useful when sub-plots get a bit crowded

# initialization function: plot the background of each frame
def init():
    ax1.plot(real(circle), imag(circle), 'black', lw=0.1);
    ax2.plot(real(circle), imag(circle), 'black', lw=0.1);
    return

# animation function.  This is called sequentially
def animate(simData):
    i = simData - 1 # python index starts at 0
    re = [real(B[0,i]), real(B[1,i]), real(B[2,i])]
    im = [imag(B[0,i]), imag(B[1,i]), imag(B[2,i])]
    la.set_data([0, re[0]], [0, im[0]])
    lb.set_data([re[0], re[0]+re[1]], [im[0], im[0]+im[1]])
    lc.set_data([re[0]+re[1], re[0]+re[1]+re[2]], [im[0]+im[1], im[0]+im[1]+im[2]])
    ltot.set_data([0, real(Btot[i])], [0, imag(Btot[i])])
    circ.set_data(real(Btot[:i]),imag(Btot[:i]))
    pre = [real(Bpp[0,i]), real(Bpp[1,i]), real(Bpp[2,i])]
    pim = [imag(Bpp[0,i]), imag(Bpp[1,i]),...


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
Set up the basic conditions:
Can you write Python code for it?

bmax = 1           # Normalize bmax to 1
freq = 50          # [Hz]
w = 2*pi*freq      # [rad/s] angluar velocity


I am working on the file "Chapman/Ch3-Animation_ThreePhaseFluxes2and4poles.ipynb".
The first task is:
The animation above might be a bit "skippy" due to the browser performance trying to cope with the inline animation.
The solution to a smooth animation is to the animation as a video and embed it right here:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Example_3-01.ipynb".
The first task is:
Calculate Bnet:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Example_3-01.ipynb".
The first task is:
Calculate a circle representing the expected maximum value of Bnet:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Example_3-01.ipynb".
The first task is:
Set up the basic conditions:
Can you write Python code for it?

bmax = 1           # Normalize bmax to 1
freq = 60          # 60 Hz
w = 2*pi*freq      # angluar velocity (rad/s)


I am working on the file "Chapman/Ch3-Example_3-01.ipynb".
The first task is:
The animation above might be a bit "skippy" due to the browser performance trying to cope with the inline animation.
The solution to a smooth animation is to the animation as a video and embed it right here:
Can you write Python code for it?


I am working on the file "Chapman/Ch3-Problem_3-10.ipynb".
The first task is:
(a)

Develop a table showing the speed of magnetic field rotation in ac machines of 2, 4, 6, 8, 10, 12, and 14 poles operating at 25 Hz.
What was the fastest rotational speed available to these early motors?

(b)
For a given motor operating at a constant flux density B.

How would the core losses of the motor running at 25 Hz compare to the core losses of the motor running at 60 Hz?

(c)

Why did the early engineers provide a separate 60 Hz power system for lighting?

SOLUTION
(a)
The equation relating the speed of magnetic field rotation to the number of poles and electrical frequency is:
$$n_m = \frac{120f_e}{p}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Example_4-04.ipynb".
The first task is:
Calculate terminal voltage from the phase voltage:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Example_4-04.ipynb".
The first task is:
Now initialize all other values:
Can you write Python code for it?

#v_phase = zeros(1,21);
e_a = 277.0   # armature voltage
x_s = 1.0     # sychronous reactance
PF=0.8        # power factor

theta_rad = arccos(PF)                        # in radians
theta_lead = degrees(theta_rad)               # angle for leading power factor
theta_lagg = - degrees(theta_rad)             # angle for lagging power factor
theta = radians([[theta_lead], [theta_lagg]]) # combine both angles in an array
theta # let's see what it looks like

theta_lead   # let's see what the angles look like

theta_lagg   # let's see what the angles look like


I am working on the file "Chapman/Ch4-Example_4-04.ipynb".
The first task is:
Plot the terminal characteristic, remembering that the line current is the same as i_a:
Can you write Python code for it?

plot(i_a, v_t[0], i_a, v_t[1], lw=2)  # ATTENTION! Python starts array count at 0
xlabel('Line Current (A)')
ylabel('Terminal voltage (V)')
title ('Terminal characteristic for 0.8 PF lagging and leading load')
legend(('$PF = 0.8$ leading', '$PF = 0.8$ lagging'), loc=7) # loc=7 stands for centre right
grid()


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
$$P_{CU} = 3I^2_AR_A$$
Can you write Python code for it?

Pcu = 3 * abs(Ia)**2 * Ra
print('Pcu = {:.1f} MW'.format(Pcu/1e6))

Pin = Pout +Pcu + Pf_w + Pcore + Pstray
print('Pin = {:.1f} MW'.format(Pin/1e6))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
(a)

How much field current is required to make the terminal voltage $V_T$ (or line voltage $V_L$ ) equal to 13.8 kV when the generator is running at no load?

(b)

What is the internal generated voltage $E_A$ of this machine at rated conditions?

(c)

What is the phase voltage $V_\phi$ of this generator at rated conditions?

(d)

How much field current is required to make the terminal voltage $V_T$ equal to 13.8 kV when the generator is running at rated conditions?

(e)
Suppose that this generator is running at rated conditions, and then the load is removed without changing the field current.

What would the terminal voltage of the generator be?

(f)

How much steady-state power and torque must the generator’s prime mover be capable of supplying to handle the rated conditions?

(g)

Construct a capability curve for this generator.

SOLUTION
(a)
If the no-load terminal voltage is 13.8 kV, the required field current can be read directly from the open-circuit characteristic. It is $\underline{\underline{I_F = 3.50\,A}}$.
(b)
This generator is Y-connected, so $I_L = I_A$ . At rated conditions, the line and phase current in this generator is:
$$I_A = I_L = \frac{P}{\sqrt{3}V_L}$$
Can you write Python code for it?

ia = P / (sqrt(3) * Vl)
Ia_angle = -arccos(PF)
Ia = ia * (cos(Ia_angle) + sin(Ia_angle)*1j)
print('Ia = {:.0f} A ∠{:.1f}°'.format(abs(Ia), Ia_angle/pi *180))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
(c)
The phase voltage of the machine at rated conditions is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
(d)
The equivalent open-circuit terminal voltage corresponding to an $E_A$ of the value calculated in (b) is:
Can you write Python code for it?

Vt_oc = sqrt(3) * abs(Ea)
print('Vt_oc = {:.0f} kV'.format(Vt_oc/1000))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
(e)
The rotor current limit of the capability curve would be drawn from an origin of:
$$Q = -\frac{3V^2_\phi}{X_S}$$
Can you write Python code for it?

Q = - (3 * V_phase**2) / Xs
print('Q = {:.2f} Mvar'.format(Q/1e6))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
Get points for stator current limit:
Can you write Python code for it?

theta = arange(-95,95) # angle in degrees
rad = theta * pi/180   # angle in radians
s_curve = S * ( cos(rad) + sin(rad)*1j)


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
Plot the capability diagram:
Can you write Python code for it?

fig= figure()
ax=fig.add_subplot(1, 1, 1)
ax.plot(real(s_curve/1e6),imag(s_curve/1e6),'b')
ax.plot(real(r_curve/1e6),imag(r_curve/1e6),'r--')
ax.set_title('Synchronous Generator Capability Diagram')
ax.set_xlabel('Power (MW)')
ax.set_ylabel('Reactive Power (Mvar)')
ax.set_aspect('equal', 'datalim')
ax.legend(('stator current limit', 'rotor current limit'), loc=3);
ax.grid()


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
The corresponding terminal voltage would be $\underline{\underline{V_T = 20\,kV}}$.
(f)
The input power to this generator is equal to the output power plus losses. The rated output power is:
Can you write Python code for it?

Pout = P*PF
print('Pout = {:.0f} MW'.format(Pout/1e6))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
The internal generated voltage of the machine is:
$$\vec{E}A = \vec{V}\phi + R_A\vec{I}_A + jX_S\vec{I}_A$$
Can you write Python code for it?

Ea = V_phase + Ra*Ia + Xs*1j*Ia
Ea_angle = arctan(Ea.imag/Ea.real)
print('''
Ea = {:.0f} V ∠{:.1f}°
=================='''.format(abs(Ea), Ea_angle/pi*180))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
The phase voltage of this machine is:
$$V_\phi = V_T / \sqrt{3}$$
Can you write Python code for it?

V_phase = Vl / sqrt(3)
print('V_phase = {:.0f} V'.format(V_phase))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
The radius of the rotor current limit is:
$$D_E = \frac{3V_\phi E_A}{X_S}$$
Can you write Python code for it?

De = (3 * V_phase * abs(Ea)) / Xs
print('De = {:.0f} Mvar'.format(De/1e6))


I am working on the file "Chapman/Ch4-Problem_4-02.ipynb".
The first task is:
Therefore the prime mover must be capable of supplying $P_{in}$. Since the generator is a four-pole 60 Hz machine, to must be turning at 1800 r/min. The required torque is:
$$\tau_{app} = \frac{P_{in}}{\omega_m}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
$$P_\text{CU} = 3I^2_AR_A$$
Can you write Python code for it?

Pcu = 3 * abs(Ia)**2 * Ra
print('Pcu = {:.1f} kW'.format(Pcu/1e3))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
(b)
Armature current is $I_A = 1004\,A\angle -25°$ , and the phase voltage is $V_\phi = 8032\,V\angle 0°$. Therefore, the internal generated voltage is:
$$\vec{E}A = \vec{V}\phi + R_A\vec{I}_A + jX_S\vec{I}_A$$
Can you write Python code for it?

EA = V_phase + Ra*Ia + Xs*1j*Ia
EA_angle = arctan(EA.imag/EA.real)
print('EA = {:.0f} V ∠{:.1f}°'.format(abs(EA), EA_angle / pi *180))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
(d)
To get the basic idea of what happens, we will ignore the armature resistance for the moment. If the field current and the rotational speed of the generator are constant, then the magnitude of $E_A( = K \phi\omega)$ is constant. The quantity $jX_S \vec{I}A$ increases in length at the same angle, while the magnitude of $\vec{E}_A$ must remain constant. Therefore, $\vec{E}_A$ “swings” out along the arc of constant magnitude until the new $jX_S \vec{I}_S$ fits exactly between $\vec{V}\phi$ and $\vec{E}_A$ .
<img src="figs/Problem_4-03c.jpg" width="60%">
(e)
The new impedance per phase will be half of the old value, so
Can you write Python code for it?

Znew = Z * 0.5
Znew_angle = arctan(Z.imag/Z.real)
print('Z = {:.0f} Ω ∠{:.0f}° '.format(abs(Znew), Znew_angle /pi*180))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
Description
Assume that the field current of the generator in Problem 4-2 has been adjusted to a value of $5\,A$.
(a)

What will the terminal voltage of this generator be if it is connected to a $\Delta$-connected load with an impedance of $24\,\Omega\angle 25°$?

(b)

Sketch the phasor diagram of this generator.

(c)

What is the efficiency of the generator at these conditions?

(d)
Now assume that another identical $\Delta$-connected load is to be paralleled with the first one.

What happens to the phasor diagram for the generator?

(e)

What is the new terminal voltage after the load has been added?

(f)

What must be done to restore the terminal voltage to its original value?
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
SOLUTION
(a)
If the field current is $5.0 A$, the open-circuit terminal voltage will be about $16,500\,V$, and the open-circuit phase voltage in the generator (and hence $E_A$ ) will be $\frac{16,500\,V}{\sqrt{3}}$ .
Can you write Python code for it?

Vl = 16.5e3 #[V]
ia = P / (sqrt(3) * Vl)
Ia_angle = -arccos(PF)
Ia = ia * (cos(Ia_angle) + sin(Ia_angle)*1j)

Ea = Vl / sqrt(3)
print('Ea = {:.0f} V'.format(Ea))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
The magnitude of the phase current flowing in this generator is:
$$I_A = \frac{E_A}{|R_A + jX_S +Z_\text{new}|}$$
Can you write Python code for it?

ia = Ea / (abs(Ra + Xs*1j + Znew))
print('ia = {:.1f} A'.format(ia))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
The resulting phasor diagram is shown below (not to scale and with some round-off errors):
<img src="figs/Problem_4-03b.jpg" width="70%">
(c)
The efficiency of the generator under these conditions can be found as follows:
$$P_\text{out} = 3 V_\phi I_A \cos{\theta}$$
Can you write Python code for it?

Pout = 3 * V_phase * abs(Ia) * cos(Ia_angle)
print('Pout = {:.1f} MW'.format(Pout/1e6))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
Therefore, the magnitude of the phase voltage is:
$$V_\phi = I_AZ$$
Can you write Python code for it?

V_phase = ia * abs(Z)
print('V_phase = {:.0f} V'.format(V_phase))


I am working on the file "Chapman/Ch4-Problem_4-03.ipynb".
The first task is:
and the terminal voltage is:
$$V_T = \sqrt{3}V_\phi$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-06.ipynb".
The first task is:
(b)
The phase current flowing in this generator can be calculated from:
$$\vec{E}A = \vec{V}\phi + jX_S\vec{I}A$$
$$\vec{I}_A = \frac{\vec{E}_A-\vec{V}\phi}{jX_S}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-06.ipynb".
The first task is:
(c)
The phasor diagram is:
<img src="figs/Problem_4-06.jpg" width="70%">
(d)
The induced torque is given by the equation:
$$P_\text{conv} = \tau_\text{ind} \omega_m$$
With no losses,
$$\tau_\text{app} = \tau_\text{ind} = \frac{P_\text{conv}}{\omega_m}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-06.ipynb".
The first task is:
Description
The internal generated voltage $E_A$ of a 2-pole, $\Delta$-connected, 60 Hz, three phase synchronous generator is $14.4\,kV$, and the terminal voltage $V_T$ is $12.8\,kV$. The synchronous reactance of this machine is $4\,\Omega$, and the armature resistance can be ignored.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
(a)

What are its synchronous reactance and armature resistance in ohms?

(b)

What is the magnitude of the internal generated voltage $E_A$ at the rated conditions?
What is its torque angle $\delta$ at these conditions?

(c)
Ignoring losses in this generator

What torque must be applied to its shaft by the prime mover at full load?

SOLUTION
The base phase voltage of this generator is:
Can you write Python code for it?

Vphase_base = Vl / sqrt(3)
print('Vphase_base = {:.0f} V'.format(Vphase_base))


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
(b)
The rated armature current is:
$$I_A = I_L = \frac{S}{\sqrt{3}V_T}$$
Can you write Python code for it?

Ia_amp = S / (sqrt(3) * Vl)
print('Ia_amp = {:.0f} A'.format(Ia_amp))


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
Description
A 100-MVA, 14.4-kV, 0.8-PF-lagging, 50-Hz, two-pole, Y-connected synchronous generator has a per-unit synchronous reactance of 1.1 and a per-unit armature resistance of 0.011.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
The power factor is 0.8 lagging, so:
Can you write Python code for it?

Ia_angle = -arccos(PF)
Ia = Ia_amp * (cos(Ia_angle) + sin(Ia_angle)*1j)
print('Ia = {:.0f} ∠{:.2f}° A'.format(abs(Ia), Ia_angle / pi *180))


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
and,
$$n_\text{sync} = \frac{120f_{se}}{P}$$
Can you write Python code for it?

n_sync = 120*fse / p
print('n_sync = {:.0F} r/min'.format(n_sync))


I am working on the file "Chapman/Ch4-Problem_4-07.ipynb".
The first task is:
the applied torque would be:
$$\tau_\text{app} = \tau_\text{ind} = \frac{P_\text{out}}{\omega_\text{sync}}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
(b)
The per-unit phase voltage at rated conditions is $\vec{v}_\phi = 1.0 \angle 0^\circ$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
(c)
The torque angle of the generator is:
Can you write Python code for it?

delta = ea_angle
print('''
δ = {:.1f}°
========='''.format(delta/pi *180))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
(d)
The base impedance of the generator is:
$$Z_\text{base} = \frac{3V^2_{\phi_\text{base}}}{S_\text{base}}$$
Can you write Python code for it?

Zbase = (3*Vphase_base**2) / S
print('Zbase = {:.2f} Ω'.format(Zbase))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
(e)
If the field current is held constant (and the armature resistance is ignored), the power out of this generator is given by:
$$P = \frac{3V_\phi E_A}{X_S}\sin{\delta}$$
The max power is given by:
$$P_\text{max} = \frac{3V_\phi E_A}{X_S}\sin{90°}$$
Can you write Python code for it?

Pmax = (3*Vphase_base*abs(EA)) / Xs * sin(pi/2)
print('''
Pmax = {:.0f} MW
============='''.format(Pmax/1e6))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
, so the per-unit internal generated voltage is:
$$\vec{e_A} = \vec{v_\phi} + r_A\vec{i_A} + jx_S\vec{I_A}$$
Can you write Python code for it?

ea = vphase + ra*ia + xs*1j*ia
ea_angle = arctan(ea.imag/ea.real)
print('ea = {:.2f} pu ∠{:.1f}°'.format(abs(ea), ea_angle/pi*180))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
Description
A 200-MVA, 12-kV, 0.85-PF-lagging, 50-Hz, 20-pole, Y-connected water turbine generator has a per-unit synchronous reactance of 0.9 and a per-unit armature resistance of 0.1. This generator is operating in parallel with a large power system (infinite bus).
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
Since the full load power is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
The base phase voltage is:
Can you write Python code for it?

Vphase_base = Vl / sqrt(3)
print('Vphase_base = {:.0f}V'.format(Vphase_base))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
Therefore the synchronous reactance is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
and the per-unit phase current $\vec{i}_A$ at rated conditions is
Can you write Python code for it?

ia_angle = -arccos(PF)  # negative because of lagging PF
ia = 1.0 * (cos(ia_angle) + sin(ia_angle)*1j)
print('ia = {:.1f} pu ∠{:.1f}°'.format(abs(ia), ia_angle/pi*180))


I am working on the file "Chapman/Ch4-Problem_4-08.ipynb".
The first task is:
percent of the maximum possible power at full load conditions.
(f)
At the maximum power possible, the torque angle $\delta =  90^\circ$, so the phasor $\vec{E}_A$ will be at an angle of 90°, and the current flowing will be:
$$\vec{E}A = \vec{V}\phi + R_A\vec{I}A + jX_S\vec{I}_A$$
$$\vec{I}_A = \frac{\vec{E}_A - \vec{V}\phi}{R_A + jX_S}$$
Can you write Python code for it?

EA_angle_f = pi / 2 # [rad]
EA_f = abs(EA) * (cos(EA_angle_f) + sin(EA_angle_f)*1j)
Ia_f = (EA_f - Vphase_base) / (Ra + Xs *1j)
Ia_angle_f = arctan(Ia_f.imag/Ia_f.real)
print('Ia_f = {:.0f} A ∠{:.1f}°'.format(abs(Ia_f), Ia_angle_f/pi*180))


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
(c)
The power supplied by generator 1 is:
$$P_1 = s_\text{P1}(f_\text{nl1} - f_\text{sys})$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
Description
A 480-V, 250-kVA, 0.8-PF-lagging, two-pole, three-phase, 60-Hz synchronous generator’s prime mover has a no-load speed of 3650 r/min and a full-load speed of 3570 r/min.
It is operating in parallel with a 480-V, 250-kVA, 0.85-PF-lagging, four-pole 60-Hz synchronous generator whose prime mover has a no-load speed of 1800 r/min and a full-load speed of 1780 r/min. The loads supplied by the two generators consist of 300 kW at 0.8 PF lagging.
(a)

Calculate the speed droops of generator 1 and 2.

(b)

Find the operating frequency of the power system.

(c)

Find the power being supplied by each of the generators in this system.

(d)

What must the generator's operators do to adjust the operating frequency to 60 Hz?

(e)

If the current line voltage is $460\,V$, what must the generator's operators do to correct for the low terminal voltage?
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
SOLUTION
The no-load frequency of generator 1 corresponds to a frequency of:
$$f_\text{nl1} = \frac{p_1 \cdot n_m}{120}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
The full load power supplied by generator 2 is:
$$P_\text{2,full load} = S\cos{\theta_2}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
The full-load frequency of generator 1 corresponds to a frequency of:
$$f_\text{fl1} = \frac{p_1 \cdot n_m}{120}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
The full-load frequency of generator 1 corresponds to a frequency of:
$$f_\text{fl2} = \frac{p_2 \cdot n_m}{120}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
The no-load frequency of generator 2 corresponds to a frequency of:
$$f_\text{nl2} = \frac{p_2 \cdot n_m}{120}$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-09.ipynb".
The first task is:
The total power that they must supply is 300 kW, so the system frequency can be found from the equations:
\begin{align}
P_\text{LOAD} &= P_1 + P_2\
P_\text{LOAD} &= s_\text{P1} (f_\text{nl1} - f_\text{sys}) + s_\text{P2} (f_\text{nl2} - f_\text{sys})\
\leadsto f_\text{sys} & = \frac{s_\text{P1} f_\text{nl1} + s_\text{P2} f_\text{nl2} - P_\text{LOAD}}{s_\text{P1} + s_\text{P2}}
\end{align}
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-10.ipynb".
The first task is:
MW.
On the other hand, Generator C gets into trouble as the total load is reduced. When the total load drops below
Can you write Python code for it?

interp(0, PC, Pload_plot)/1e6  # using the interpolate function to determine
                               # the exact crossover of PC and 0 @Pload


I am working on the file "Chapman/Ch4-Problem_4-10.ipynb".
The first task is:
Plot the power sharing versus load:
Can you write Python code for it?

title('Power Sharing Versus Total Load')
xlabel('Total Load [MW]')
ylabel('Generator Power [MW]')
plot(Pload_plot/1e6, PA/1e6, 'g--', linewidth = 2)
plot(Pload_plot/1e6, PB/1e6, 'b', linewidth = 2 )
plot(Pload_plot/1e6, PC/1e6, 'm.', linewidth = 2)
plot([0, 300], [Pn/1e6, Pn/1e6], 'r', linewidth = 2)
plot([0, 300], [0, 0], 'r:', linewidth = 2)
legend(('Generator A','Generator B','Generator C','upper power limit', 'lower power limit'), loc=4, framealpha=1);
grid()


I am working on the file "Chapman/Ch4-Problem_4-10.ipynb".
The first task is:
This plot reveals that there are power sharing problems both for high loads and for low loads. Generator B is the first to exceed its ratings as load increases. Its rated power is reached at a total load of
Can you write Python code for it?

interp(Pn, PB, Pload_plot)/1e6  # using the interpolate function to determine
                                # the exact crossover of PB and Pn @Pload


I am working on the file "Chapman/Ch4-Problem_4-10.ipynb".
The first task is:
and the slopes of the power-frequency curves are:
$$s_P = \frac{P}{f_\text{nl} - f_\text{fl}}$$
Can you write Python code for it?

sp_A = Pn / (f_nl_A - f_fl_A)
sp_B = Pn / (f_nl_B - f_fl_B)
sp_C = Pn / (f_nl_C - f_fl_C)
print('''
sp_A = {:.2f} MW/Hz
sp_B = {:.2f} MW/Hz
sp_C = {:.2f} MW/Hz
'''.format(sp_A/1e6, sp_B/1e6, sp_C/1e6))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
(c)
The saturated synchronous reactance at a field current of 475 A can be found from the OCC and the SCC. The OCC voltage at $I_F = 475 A$ is 15.2 kV, and the short-circuit current is 1550 A.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
(d)
The rated voltage of this generator is 12.2 kV, which requires a field current of 275 A.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
(e)
The internal generated voltage of this generator at rated conditions would be calculated using the saturated synchronous reactance.
Can you write Python code for it?

Xs_e = Xs_b
If_e = If_b
Ia_e = Il   # rated current as calculated in part d


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
(f)
If the internal generated voltage $E_A$ is
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
As you can see the impact of the armature resistance is negligible small. This is also the reason why $R_a$ is often simply ignored in calculations of the synchronous reactance. Especially for larger machines.
The base impedance of this generator is:
$$Z_\text{base} = \frac{3V^2_{\phi,\text{base}}}{S_\text{base}}$$
Can you write Python code for it?

Vphi_base = Vbase/sqrt(3)
Zbase = 3*Vphi_base**2 / Sbase
print('Zbase = {:.2f} Ω'.format(Zbase))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Description
A 25-MVA, 12.2-kV, 0.9-PF-lagging, three-phase, two-pole, Y-connected, 60-Hz synchronous generator
was tested by the open-circuit test, and its air-gap voltage was extrapolated with the following results:

Open-citcuit test

| Field current [A] | Line voltage [kV] | Extrapolated air-gap voltage [kV] |
|-------------------|-------------------|-----------------------------------|
| 275               | 12.2              | 13.3                              |
| 320               | 13.0              | 15.4                              |
| 365               | 13.8              | 17.5                              |
| 380               | 14.1              | 18.3                              |
| 475               | 15.2              | 22.8                              |
| 570               | 16.0              | 27.4                              |

Short-circuit test

| Field current [A] | Armature current [A] |
|-------------------|----------------------|
| 275               | 890                  |
| 320               | 1040                 |
| 365               | 1190                 |
| 380               | 1240                 |
| 475               | 1550                 |
| 570               | 1885                 |
The armature resistance is $0.6\,\Omega$ per phase.
(a)

Find the unsaturated synchronous reactance of this generator in ohms per phase and in per-unit.

(b)

Find the approximate saturated synchronous reactance $X_S$ at a field current of 380 A. Express the answer both in ohms per phase and in per-unit.

(c)

Find the approximate saturated synchronous reactance at a field current of 475 A. Express the answer both in ohms per phase and in per-unit.

(d)

Find the short-circuit ratio for this generator.

(e)

What is the internal generated voltage of this generator at rated conditions?

(f)

What field current is required to achieve rated voltage at rated load?
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
SOLUTION
(a)
The unsaturated synchronous reactance of this generator is the same at any field current, so we will look at it at a field current of 380 A.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Since this generator is Y-connected, the corresponding phase voltage is:
Can you write Python code for it?

Vphi_b = Vocc_b / sqrt(3)
print('Vphi_b = {:.0f} V'.format(Vphi_b))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Since this generator is Y-connected, the phase voltage is:
Can you write Python code for it?

Vphi_a = Vag_a / sqrt(3)
print('Vphi_a = {:.0f} V'.format(Vphi_a))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
The extrapolated air-gap voltage at this point is 18.3 kV, and the short-circuit current is 1240 A
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Therefore,
$$\vec{E}A = \vec{V}\phi + R_A\vec{I}_A + jX_S\vec{I}_A$$
Can you write Python code for it?

EA = Vphi_base + Ra*IA_e + Xs_e*IA_e*1j
EA_angle = arctan(EA.imag / EA.real)
print('''
EA = {:.0f} V ∠{:.1f}°
===================
'''.format(*(abs(EA), EA_angle/pi*180)))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Therefore, the per-unit unsaturated synchronous reactance is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Therefore, the saturated synchronous reactance is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
Therefore, the unsaturated synchronous impedance $Z_{s} = \sqrt{R_a^2 + X_s^2}$ is:
Can you write Python code for it?

Zsu_a = Vphi_a / Ia_a
print('Zsu_a = {:.2f} Ω'.format(Zsu_a))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
This would require a field current of about (determined by usind the two-point form of $y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1)$):
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
and the armature current is:
Can you write Python code for it?

Ia_b = isc_b
print('Ia_b = {:.0f} A'.format(Ia_b))


Ia_c = isc_c
print('Ia_c = {:.0f} A'.format(Ia_c))


Ia_a = isc_a
print('Ia_a = {:.0f} A'.format(Ia_a))


I am working on the file "Chapman/Ch4-Problem_4-13.ipynb".
The first task is:
and the per-unit unsaturated synchronous reactance is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-14.ipynb".
The first task is:
Description
During a short-circuit test, a Y-connected synchronous generator produces 100 A of short-circuit armature
current per phase at a field current of 2.5 A. At the same field current, the open-circuit line voltage is
measured to be 440 V.
(a)

Calculate the saturated synchronous reactance under these conditions.

(b)
If the armature resistance is $0.3\,\Omega$ per phase, and the generator supplies 60 A to a purely resistive Y-connected load ~~of 3 Ohms per phase at this~~ at a matching field current setting,

Determine the voltage regulation under these load conditions.

SOLUTION
(a)
The saturated synchronous reactance at a field current of 2.5 A can be found from the information
supplied in the problem. The open circuit line voltage at $I_F = 2.5\,A$ is 440 V, and the short-circuit current is 100 A.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-14.ipynb".
The first task is:
Since this generator is Y-connected, the corresponding phase voltage is:
Can you write Python code for it?

Vphi = Vocc / sqrt(3)
print('Vphi = {:.0f} V'.format(Vphi))


I am working on the file "Chapman/Ch4-Problem_4-14.ipynb".
The first task is:
The voltage regulation is:
$$VR = \frac{V_\text{T,nl} - V_\text{T,fl}}{V_\text{T,fl}} \cdot 100\%$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-14.ipynb".
The first task is:
This is also the phase voltage at no load conditions. The corresponding line voltage at no load conditions
would be:
Can you write Python code for it?

Vl_nl = abs(EA) * sqrt(3)
print('Vl_nl = {:.0f} V'.format(Vl_nl))


I am working on the file "Chapman/Ch4-Problem_4-14.ipynb".
The first task is:
and the armature current is $I_A = I_{SC}$ . Therefore, the saturated synchronous
reactance is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
(a)
At a given instant, the total system loads are 650 MW at a frequency of 60 Hz.

What are the no-load frequencies of each of the system’s generators?

(b)
If the system load rises to 725 MW and the generator’s governor set points do not change

What will the new system frequency be?

(c)

To what frequency must the no-load frequency of the swing generator be adjusted in order to restore the system frequency to 60 Hz?

(d)
If the system is operating at the conditions described in part (c)

What would happen if the swing generator were tripped off the line (disconnected from the power line)?

SOLUTION
(a)
The full-load power of these generators is:
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
(b)
The setpoints of generators 1, 2, 3, and 4 do not change, so the new system frequency will be:
$$P_\text{load} = s_{P1}(f_\text{nl,1} - f_{sys}) + s_{P2}(f_\text{nl,2} - f_{sys}) + s_{P3}(f_\text{nl,3} - f_\text{sys}) + s_{P4}(f_\text{nl,4} - f_\text{sys})$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
(d)
If the swing generator trips off the line, the other three generators would have to supply all 725 MW
of the load. Therefore, the system frequency will become:
$$P_\text{load} = s_{P1}(f_\text{nl,1} - f_\text{sys}) + s_{P2}(f_\text{nl,2} - f_\text{sys}) + s_{P3}(f_\text{nl,3} - f_\text{sys})$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
Description
A generating station for a power system consists of four 300-MVA, 15-kV, 0.85-PF-lagging synchronous
generators with identical speed droop characteristics operating in parallel. The governors on the
generators’ prime movers are adjusted to produce a 3-Hz drop from no load to full load. Three of these
generators are each supplying a steady 200 MW at a frequency of 60 Hz, while the fourth generator
(called the swing generator) handles all incremental load changes on the system while maintaining the
system's frequency at 60 Hz.
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
If generators 1, 2, and 3 are supplying 200 MW each, then generator 4 must be supplying 50 MW. The
no-load frequency of the first three generators is:
$$P = s_{P}(f_\text{nl} - f_\text{sys})$$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-28.ipynb".
The first task is:
and the droop from no-load to full-load is 3 Hz. Therefore, the slope of the power-frequency curve for these four generators is:
Can you write Python code for it?

sp = Pfl / f_drop
print('sp = {:.0f} MW/Hz'.format(sp/1e6))


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
$$\delta_2 = \arcsin\left(\frac{E_{A1}}{E_{A2}}\sin{\delta_1}\right)$$
Can you write Python code for it?

delta1 = EA_angle
delta2 = arcsin(Ea1/Ea2 * sin(delta1))
print('delta2 = {:.1f}°'.format(delta2/pi*180))
EA2 = Ea2 * exp(1j*delta2)


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
(b)
The rated armature current is:
$$I_A = I_F = \frac{S}{\sqrt{3}V_T}$$
Can you write Python code for it?

ia = Sbase / (sqrt(3)*Vbase)
print('ia = {:.0f} A'.format(ia))


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
(c)
From the above calculations
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
(d)
If $E_A$ is decreased by 5%, the armature current will change as shown below. Note that the infinite bus will keep $V_\phi$ and $\omega_m$ constant. Also, since the prime mover hasn’t changed, the power supplied by the generator will be constant.
<img src="figs/Problem_4-29.png" width="60%">
$P = \frac{3V_\phi E_A}{X_S}\sin{\delta} =$ constant, so: $E_{A1}\sin{\delta_1} = E_{A2}\sin{\delta_2}$
With a 5% decrease,
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
(f)
We are going to plot the magnitude of the armature current $I_A$ as a function of $E_A$ below.
Define values for this generator:
Can you write Python code for it?

Ea = linspace(0.55, 1.00, 46)  * abs(EA)
d1 = EA_angle


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
Calculate delta for each $E_A$
Can you write Python code for it?


I am working on the file "Chapman/Ch4-Problem_4-29.ipynb".
The first task is:
Description
A 100-MVA, 14.4-kV 0.8-PF-lagging, Y-connected synchronous generator has a negligible armature
resistance and a synchronous reactance of 1.0 per-unit. The generator is connected in parallel with a 60-
Hz, 14.4-kV infinite bus that is capable of supplying or consuming any amount of real or reactive power
with no change in frequency or terminal voltage.
Can you write Python code for it?