```
In [1]:
```%pylab notebook

```
```

For the motor of Problem 6-5.

- How much additional resistance (referred to the stator circuit) would it be necessary to add to the rotor circuit to make the maximum torque occur at starting conditions (when the shaft is not moving)?
- Plot the torque-speed characteristic of this motor with the additional resistance inserted.

```
In [2]:
```R1 = 0.10 # [Ohm]
R20 = 0.07 # [Ohm]
Xm = 10.0 # [Ohm]
X1 = 0.21 # [Ohm]
X20 = 0.21 # [Ohm]
Pmech = 500 # [W]
Pmisc = 0 # [W]
Pcore = 400 # [W]
Vphi = 120 # [V]
n_sync = 1800 # [r/min]
w_sync = n_sync * 2*pi/60.0 # [rad/s]

To get the maximum torque at starting, the $s_\text{max}$ must be 1.00. Therefore,

$$s_\text{max} = \frac{R_2}{\sqrt{R_{TH}^2+(X_{TH}+X_2)^2}}$$$R_2$ and $X_2$ are given which means we still need to determine $R_{TH}$ and $X_{TH}$ from:

$$Z_{TH} = \frac{jX_M(R_1+jX_1)}{R_1 + j(X_1+X_M)}$$```
In [3]:
```Zth = (Xm*1j * (R1 + X1*1j)) / (R1 + (X1+Xm)*1j)
Rth = real(Zth)
Xth = imag(Zth)

```
In [4]:
```s_max = 1.0
R2 = s_max * sqrt(Rth**2 + (Xth + X20)**2)
print('R2 = {:.3f} Ω'.format(R2))

```
```

```
In [5]:
```dR2 = R2 - R20
print('''
dR2 = {:.3f} Ω
============='''.format(dR2))

```
```

```
In [6]:
```s = linspace(0,50,51) / 50 # generate an array with 51 values between 0 and 50
s[0] = 0.001 # avoid division by zero

Calculate the Thevenin voltage and impedance:

```
In [7]:
```Vth = Vphi * ( Xm / sqrt(R1**2 + (X1 + Xm)**2) )
Zth = ((Xm*1j) * (R1 + X1*1j)) / (R1 + (X1 + Xm)*1j)
Rth = Zth.real
Xth = Zth.imag

```
In [8]:
```n_m = (1 - s) * n_sync
tau_ind= (3 * Vphi**2 * R2/s) / (w_sync * ((Rth + R2/s)**2 + (Xth + X20)**2) )

```
In [9]:
```rc('text', usetex=True) # enable LaTeX commands for plot
title(r'\bf Induction Motor Torque-Speed Characteristic')
xlabel(r'$n_m$ [r/min]')
ylabel(r'$\tau_{ind}$ [Nm]')
plot(n_m, tau_ind, linewidth = 2)
grid()

```
```