3-phase induction motor drive

A $400\,$V, $50\,$Hz, 4-pole induction motor has the following parameters: $R_s=1.79\,\Omega$, $R_r=1.05\,\Omega$, $X_{ls}=5.25\,\Omega$, $X_{lr}=4.57\,\Omega$, $X_m=139\,\Omega$, $J=0.015\,$kg-m$^2$. The motor is fed from a 3-phase voltage source inverter with a DC link voltage of $800\,$V. The inverter uses sine-triangle PWM with a switching frequency of $10\,$kHz to apply the rated voltage at rated frequency. If the slip is $s=0.01$, determine the following.

  1. amplitude $m$ of the modulating signal
  2. electromagnetic torque produced
  3. motor speed
In [1]:
from IPython.display import Image
Image(filename =r'indmc_1_fig_1.png', width=650)
Out[1]:
In [2]:
# run this cell to view the circuit file.
%pycat indmc_1_orig.in

We now replace the strings such as \\$Vdcby2, \\$m1, with the values of our choice by running the python script given below. It takes an existing circuit file indmc_1_orig.in and produces a new circuit file indmc_1.in, after replacing \\$Vdcby2, \\$m1, etc. with values of our choice.

In [3]:
import gseim_calc as calc
import numpy as np

s_Vdcby2 = "400"
s_f_carrier = "10e3"
s_f1 = "50"
s_m1 = "0.9" # to be changed by user
s_TL = "9" # to be changed by user
s_dt_min = "0.01e-6"
s_dt_nrml = "1e-6"
s_Poles = "4"
s_Rs = "1.79"
s_Rr = "1.05"
s_J = "0.015"

s_f1 = "50"
f1 = float(s_f1)
T = 1/f1

omg = 2.0*np.pi*f1

Xls = 5.25
Xlr = 4.57
Xm = 139.0

Lls = Xls/omg
Llr = Xlr/omg
Lm = Xm/omg

s_Lls = ("%11.4E"%(Lls)).strip()
s_Llr = ("%11.4E"%(Llr)).strip()
s_Lm = ("%11.4E"%(Lm)).strip()

s_Tend = "2.0"
delt1 = T
Tend = float(s_Tend)
T1 = Tend - delt1
s_T1 = ("%11.4E"%(T1)).strip()

l = [
  ('$Vdcby2', s_Vdcby2),
  ('$f_carrier', s_f_carrier),
  ('$f1', s_f1),
  ('$m1', s_m1),
  ('$TL', s_TL),
  ('$dt_min', s_dt_min),
  ('$dt_nrml', s_dt_nrml),
  ('$Poles', s_Poles),
  ('$Rs', s_Rs),
  ('$Rr', s_Rr),
  ('$J', s_J),
  ('$Lls', s_Lls),
  ('$Llr', s_Llr),
  ('$Lm', s_Lm),
  ('$T1', s_T1),
  ('$Tend', s_Tend),
]
calc.replace_strings_1("indmc_1_orig.in", "indmc_1.in", l)
print('indmc_1.in is ready for execution')
indmc_1.in is ready for execution

Execute the following cell to run GSEIM on indmc_1.in.

In [4]:
import os
import dos_unix
# uncomment for windows:
#dos_unix.d2u("indmc_1.in")
os.system('run_gseim indmc_1.in')
Circuit: filename = indmc_1.in
main: calling solve_trns
Transient simulation starts...
i=0
i=100000
i=200000
i=300000
i=400000
i=500000
i=600000
i=700000
i=800000
i=900000
i=1000000
i=1100000
i=1200000
i=1300000
i=1400000
i=1500000
i=1600000
i=1700000
i=1800000
i=1900000
i=2000000
i=2100000
i=2200000
GSEIM: Program completed.
Out[4]:
0

The circuit file (indmc_1.in) is created in the same directory as that used for launching Jupyter notebook. The last step (i.e., running GSEIM on indmc_1.in) creates data files called indmc_1_1.dat, etc. in the same directory. We can now use the python code below to compute/plot the various quantities of interest.

In [5]:
import math
import numpy as np
import matplotlib.pyplot as plt 
import gseim_calc as calc
from setsize import set_size

f_hz = 50.0
T = 1.0/f_hz

slv = calc.slv("indmc_1.in")

i_slv = 0
i_out = 0
filename = slv.l_filename_all[i_slv][i_out]
print('filename:', filename)
u1 = np.loadtxt(filename)
t1a = u1[:, 0]
t1 = t1a - t1a[0]

ia = slv.get_array_double(i_slv,i_out,"ia",u1)
ib = slv.get_array_double(i_slv,i_out,"ib",u1)
ic = slv.get_array_double(i_slv,i_out,"ic",u1)
Vab = slv.get_array_double(i_slv,i_out,"Vab",u1)
tem = slv.get_array_double(i_slv,i_out,"tem",u1)
wrm = slv.get_array_double(i_slv,i_out,"wrm",u1)

i_slv = 0
i_out = 2
filename = slv.l_filename_all[i_slv][i_out]
print('filename:', filename)
u2 = np.loadtxt(filename)
t2a = u2[:, 0]
t2 = t2a - t2a[0]

iqr = slv.get_array_double(i_slv,i_out,"iqr",u2)

# get fundamental component of Vab:

t_start = 0.0
t_end = T

n_fourier = 5

coeff_Vab, thd_Vab, coeff_a_Vab, coeff_b_Vab = calc.fourier_coeff_2A(
  t1, Vab, t_start, t_end, 1.0e-6, n_fourier)

t_Vab, y_Vab = calc.construct_fourier_component(1, coeff_a_Vab, coeff_b_Vab, 0.0, T, 1, 200)
print("Vab fundamental: RMS value: ", "%11.4E"%(coeff_Vab[1]/np.sqrt(2.0)))

l_tem = calc.avg_rms_3a(t1, tem, 0.0, T, 1.0e-5*T)
print('average value of Tem:', "%11.4E"%(l_tem[0]))

l_wrm = calc.avg_rms_3a(t1, wrm, 0.0, T, 1.0e-5*T)
print('average value of wrm:', "%11.4E"%(l_wrm[0]))

l_ia = calc.avg_rms_3a(t1, ia, 0.0, T, 1.0e-5*T)
print('rms value of ia:', "%11.4E"%(l_ia[1]))

ia_r = iqr

l_ia_r = calc.avg_rms_3a(t2, ia_r, 0.0, T, 1.0e-5*T)
print('rms value of ia_r:', "%11.4E"%(l_ia_r[1]))

color1='green'
color2='crimson'
color3='cornflowerblue'
color4='blue'
color5='goldenrod'
color6='red'
color7='olive'
color8='lightsalmon'

fig, ax = plt.subplots(4, sharex=False, gridspec_kw={'height_ratios': [1, 1, 1, 1]})
plt.subplots_adjust(wspace=0, hspace=0.0)

set_size(5, 8, ax[0])

for i in range(4):
    ax[i].set_xlim(left=0.0, right=T*1e3)
    ax[i].grid(color='#CCCCCC', linestyle='solid', linewidth=0.5)

for i in range(3):
    ax[i].tick_params(labelbottom=False)

ax[0].set_ylim(bottom=0.0, top=200.0)
ax[0].plot(t1*1e3, wrm, color=color1, linewidth=1.0, label=r"$\omega_{rm}$")

ax[1].plot(t1*1e3, tem, color=color3, linewidth=1.0, label=r"$\tau_{em}$")
ax[1].axhline(y=l_tem[0], color=color4, linewidth=1.0, label=r"$\tau_{em}^{avg}$", linestyle='--', dashes=(5,3))

ax[2].plot(t1*1e3, Vab, color=color8, linewidth=0.7, label=r"$V_{ab}$")
ax[2].plot(t_Vab*1e3, y_Vab, color=color2, linewidth=1.0, linestyle='--', dashes=(5,3), label=r"$V_{ab}\,(1)$")

ax[3].plot(t1*1e3, ia, color=color7, linewidth=1.0, label=r"$i_a$")
ax[3].plot(t1*1e3, ib, color=color2, linewidth=1.0, label=r"$i_b$")
ax[3].plot(t1*1e3, ic, color=color4, linewidth=1.0, label=r"$i_c$")

ax[3].set_xlabel('time (msec)', fontsize=12)

for i in range(4):
    ax[i].legend(loc = 'lower right',frameon = True, fontsize = 10, title = None,
      markerfirst = True, markerscale = 1.0, labelspacing = 0.5, columnspacing = 2.0,
      prop = {'size' : 12},)

#plt.tight_layout()
plt.show()
filename: indmc_1_1.dat
filename: indmc_1_3.dat
Vab fundamental: RMS value:   4.3978E+02
average value of Tem:  8.9989E+00
average value of wrm:  1.5574E+02
rms value of ia:  2.6618E+00
rms value of ia_r:  1.9537E+00

This notebook was contributed by Prof. Nakul Narayanan K, Govt. Engineering College, Thrissur. He may be contacted at nakul@gectcr.ac.in.