3-phase controlled rectifier

The three-phase thyristor-controlled converter given below is fed from a balanced three-phase AC source. If the rectifier is operated at a firing angle of $30^{\circ}$, determine
  1. the peak-to-peak voltage ripple at the DC terminal voltage $v_o(t)$
  2. the average value of $v_o$
  3. RMS thyristor and line currents
  4. THD of line current
  5. input power factor
In [1]:
from IPython.display import Image
Image(filename =r'controlled_rectifier_3ph_8_fig_1.png', width=420)
Out[1]:
No description has been provided for this image
In [2]:
# run this cell to view the circuit file.
%pycat controlled_rectifier_3ph_8_orig.in

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

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

s_alpha = "30"

VL = 400.0
A_sin = VL*np.sqrt(2/3)

s_A_sin = ("%11.4E"%(A_sin)).strip()

l = [
  ('$alpha', s_alpha),
  ('$A_sin', s_A_sin),
]
calc.replace_strings_1("controlled_rectifier_3ph_8_orig.in", "controlled_rectifier_3ph_8.in", l)
print('controlled_rectifier_3ph_8.in is ready for execution')
controlled_rectifier_3ph_8.in is ready for execution
Execute the following cell to run GSEIM on controlled_rectifier_3ph_8.in.
In [4]:
import os
import dos_unix
# uncomment for windows:
#dos_unix.d2u("controlled_rectifier_3ph_8.in")
os.system('run_gseim controlled_rectifier_3ph_8.in')
Circuit: filename = controlled_rectifier_3ph_8.in
main: calling solve_trns
Transient simulation starts...
i=0
i=1000
i=2000
i=3000
GSEIM: Program completed.
Out[4]:
0

The circuit file (controlled_rectifier_3ph_8.in) is created in the same directory as that used for launching Jupyter notebook. The last step (i.e., running GSEIM on controlled_rectifier_3ph_8.in) creates data files called controlled_rectifier_3ph_8_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 gseim_calc as calc

calc.print_avg(
   infile='controlled_rectifier_3ph_8.in', i_slv=0, i_out=0,
   var_name="v_o", t_start=0, t_end=40e-3,
   s_format="%11.4E", s1="average value of v_o:", s2="V")

calc.print_ptop(
   infile='controlled_rectifier_3ph_8.in', i_slv=0, i_out=0,
   var_name="v_o", t_start=0, t_end=40e-3,
   s_format="%11.4E", s1="ripple in v_o:", s2="V")

n_plots = 2
l_n_curves = [6, 8]
plot_multi = calc.gseim_plot_multi(n_plots, l_n_curves)

for i in range(6):
    plot_multi.plot_all[0].l_plots[i].i_slv = 0
    plot_multi.plot_all[0].l_plots[i].i_out = 3
    plot_multi.plot_all[0].l_plots[i].plot_type = "X-time"

plot_multi.plot_all[0].l_plots[0].var_name = "g1"
plot_multi.plot_all[0].l_plots[0].label = "$g_1$"
plot_multi.plot_all[0].l_plots[0].color = "tomato"
plot_multi.plot_all[0].l_plots[0].y_offset = 0.0

plot_multi.plot_all[0].l_plots[1].var_name = "g2"
plot_multi.plot_all[0].l_plots[1].label = "$g_2$"
plot_multi.plot_all[0].l_plots[1].color = "dodgerblue"
plot_multi.plot_all[0].l_plots[1].y_offset = -1.5

plot_multi.plot_all[0].l_plots[2].var_name = "g3"
plot_multi.plot_all[0].l_plots[2].label = "$g_3$"
plot_multi.plot_all[0].l_plots[2].color = "olive"
plot_multi.plot_all[0].l_plots[2].y_offset = -3.0

plot_multi.plot_all[0].l_plots[3].var_name = "g4"
plot_multi.plot_all[0].l_plots[3].label = "$g_4$"
plot_multi.plot_all[0].l_plots[3].color = "darkcyan"
plot_multi.plot_all[0].l_plots[3].y_offset = -4.5

plot_multi.plot_all[0].l_plots[4].var_name = "g5"
plot_multi.plot_all[0].l_plots[4].label = "$g_5$"
plot_multi.plot_all[0].l_plots[4].color = "grey"
plot_multi.plot_all[0].l_plots[4].y_offset = -6.0

plot_multi.plot_all[0].l_plots[5].var_name = "g6"
plot_multi.plot_all[0].l_plots[5].label = "$g_6$"
plot_multi.plot_all[0].l_plots[5].color = "goldenrod"
plot_multi.plot_all[0].l_plots[5].y_offset = -7.5

for i in range(8):
    plot_multi.plot_all[1].l_plots[i].i_slv = 0
    plot_multi.plot_all[1].l_plots[i].i_out = 0

for i in range(7):
    plot_multi.plot_all[1].l_plots[i].plot_type = "X-time"

plot_multi.plot_all[1].l_plots[0].var_name = "Vab"
plot_multi.plot_all[1].l_plots[0].label = "$V_{ab}$"
plot_multi.plot_all[1].l_plots[0].color = "tomato"
plot_multi.plot_all[1].l_plots[0].linestyle = "solid"

plot_multi.plot_all[1].l_plots[1].var_name = "Vab"
plot_multi.plot_all[1].l_plots[1].label = "$V_{ba}$"
plot_multi.plot_all[1].l_plots[1].color = "tomato"
plot_multi.plot_all[1].l_plots[1].linestyle = "dashed"
plot_multi.plot_all[1].l_plots[1].line_tuple = (3, 2)
plot_multi.plot_all[1].l_plots[1].y_mlt = -1.0

plot_multi.plot_all[1].l_plots[2].var_name = "Vbc"
plot_multi.plot_all[1].l_plots[2].label = "$V_{bc}$"
plot_multi.plot_all[1].l_plots[2].color = "dodgerblue"
plot_multi.plot_all[1].l_plots[2].linestyle = "solid"

plot_multi.plot_all[1].l_plots[3].var_name = "Vbc"
plot_multi.plot_all[1].l_plots[3].label = "$V_{cb}$"
plot_multi.plot_all[1].l_plots[3].color = "dodgerblue"
plot_multi.plot_all[1].l_plots[3].linestyle = "dashed"
plot_multi.plot_all[1].l_plots[3].line_tuple = (3, 2)
plot_multi.plot_all[1].l_plots[3].y_mlt = -1.0

plot_multi.plot_all[1].l_plots[4].var_name = "Vca"
plot_multi.plot_all[1].l_plots[4].label = "$V_{ca}$"
plot_multi.plot_all[1].l_plots[4].color = "olive"
plot_multi.plot_all[1].l_plots[4].linestyle = "solid"

plot_multi.plot_all[1].l_plots[5].var_name = "Vca"
plot_multi.plot_all[1].l_plots[5].label = "$V_{ac}$"
plot_multi.plot_all[1].l_plots[5].color = "olive"
plot_multi.plot_all[1].l_plots[5].linestyle = "dashed"
plot_multi.plot_all[1].l_plots[5].line_tuple = (3, 2)
plot_multi.plot_all[1].l_plots[5].y_mlt = -1.0

plot_multi.plot_all[1].l_plots[6].var_name = "v_o"
plot_multi.plot_all[1].l_plots[6].label = "$V_o$"
plot_multi.plot_all[1].l_plots[6].color = "blue"
plot_multi.plot_all[1].l_plots[6].linestyle = "solid"

plot_multi.plot_all[1].l_plots[7].var_name = "v_o"
plot_multi.plot_all[1].l_plots[7].label = "$V_o^{avg}$"
plot_multi.plot_all[1].l_plots[7].plot_type = "AVG"
plot_multi.plot_all[1].l_plots[7].color = "blue"
plot_multi.plot_all[1].l_plots[7].linestyle = "dashed"
plot_multi.plot_all[1].l_plots[7].line_tuple = (3, 2)

plot_multi.plot_all[0].y_label = r'$g_x$'
plot_multi.plot_all[0].legend_flag = True
plot_multi.plot_all[0].legend_position = 'lower right'
plot_multi.plot_all[0].show_ytics = False

plot_multi.plot_all[1].y_label = ""
plot_multi.plot_all[0].legend_position = 'upper right'
plot_multi.plot_all[1].legend_flag = True

calc.plot_multi_time(
   infile='controlled_rectifier_3ph_8.in',
   t_mult=1e3,
   x_size=6.5,
   y_size=7.0,
   x_label='time (msec)',
   label_font_size=11,
   legend_fontsize=10,
   t_start=0.0,
   t_end=20.0e-3,
   t_offset=0.0,
   plot_multi=plot_multi)
average value of v_o:  4.6781E+02 V
ripple in v_o:  2.8280E+02 V
filename: controlled_rectifier_3ph_8_4.dat
filename: controlled_rectifier_3ph_8_1.dat
No description has been provided for this image
In [6]:
calc.print_rms(
   infile='controlled_rectifier_3ph_8.in', i_slv=0, i_out=1,
   var_name="IT1", t_start=0.0, t_end=40e-3,
   s_format="%11.4E", s1="rms value of thyristor current:", s2="Amp")

calc.print_rms(
   infile='controlled_rectifier_3ph_8.in', i_slv=0, i_out=2,
   var_name="ISa", t_start=0.0, t_end=40e-3,
   s_format="%11.4E", s1="rms value of line current:", s2="Amp")

n_plots = 7
l_n_curves = [1, 1, 1, 1, 1, 1, 1]
plot_multi = calc.gseim_plot_multi(n_plots, l_n_curves)

plot_multi.plot_all[0].l_plots[0].i_slv = 0
plot_multi.plot_all[0].l_plots[0].i_out = 1
plot_multi.plot_all[0].l_plots[0].var_name = "IT1"
plot_multi.plot_all[0].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[0].l_plots[0].color = "blue"

plot_multi.plot_all[1].l_plots[0].i_slv = 0
plot_multi.plot_all[1].l_plots[0].i_out = 1
plot_multi.plot_all[1].l_plots[0].var_name = "IT2"
plot_multi.plot_all[1].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[1].l_plots[0].color = "blue"

plot_multi.plot_all[2].l_plots[0].i_slv = 0
plot_multi.plot_all[2].l_plots[0].i_out = 1
plot_multi.plot_all[2].l_plots[0].var_name = "IT3"
plot_multi.plot_all[2].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[2].l_plots[0].color = "blue"

plot_multi.plot_all[3].l_plots[0].i_slv = 0
plot_multi.plot_all[3].l_plots[0].i_out = 1
plot_multi.plot_all[3].l_plots[0].var_name = "IT4"
plot_multi.plot_all[3].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[3].l_plots[0].color = "blue"

plot_multi.plot_all[4].l_plots[0].i_slv = 0
plot_multi.plot_all[4].l_plots[0].i_out = 1
plot_multi.plot_all[4].l_plots[0].var_name = "IT5"
plot_multi.plot_all[4].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[4].l_plots[0].color = "blue"

plot_multi.plot_all[5].l_plots[0].i_slv = 0
plot_multi.plot_all[5].l_plots[0].i_out = 1
plot_multi.plot_all[5].l_plots[0].var_name = "IT6"
plot_multi.plot_all[5].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[5].l_plots[0].color = "blue"

plot_multi.plot_all[6].l_plots[0].i_slv = 0
plot_multi.plot_all[6].l_plots[0].i_out = 2
plot_multi.plot_all[6].l_plots[0].var_name = "ISa"
plot_multi.plot_all[6].l_plots[0].plot_type = "X-time"
plot_multi.plot_all[6].l_plots[0].color = "red"

plot_multi.plot_all[0].y_label = r'$I_{T1}$'
plot_multi.plot_all[1].y_label = r'$I_{T2}$'
plot_multi.plot_all[2].y_label = r'$I_{T3}$'
plot_multi.plot_all[3].y_label = r'$I_{T4}$'
plot_multi.plot_all[4].y_label = r'$I_{T5}$'
plot_multi.plot_all[5].y_label = r'$I_{T6}$'
plot_multi.plot_all[6].y_label = r'$I_{Sa}$'

for i in range(6):
   plot_multi.plot_all[i].ymin = -2.0
   plot_multi.plot_all[i].ymax = 12.0
    
plot_multi.plot_all[6].rel_height = 2.0

calc.plot_multi_time(
   infile='controlled_rectifier_3ph_8.in',
   t_mult=1e3,
   x_size=6.5,
   y_size=8.0,
   x_label='time (msec)',
   label_font_size=12,
   legend_fontsize=10,
   t_start=0.0,
   t_end=40.0e-3,
   t_offset=0.0,
   plot_multi=plot_multi)
rms value of thyristor current:  5.7736E+00 Amp
rms value of line current:  8.1650E+00 Amp
filename: controlled_rectifier_3ph_8_2.dat
filename: controlled_rectifier_3ph_8_3.dat
No description has been provided for this image
In [7]:
calc.print_power_factor(infile='controlled_rectifier_3ph_8.in',
    i_slv=0, i_out=2, i_name='ISa', v_name='VSa', p_name='P_Vsa',
    t_start=20e-3, t_end=40e-3, s_format='%6.3f', s1='input power factor: ')

calc.plot_single_fourier(infile='controlled_rectifier_3ph_8.in',
    i_slv=0, i_out=2, var_name='ISa', color='red', bar_width=0.3,
    n_fourier=20, compute_thd=True, x_size=6.0, y_size=2.0,
    x_div_minor=1,x_div_major=5,
    y_label=r'$I_{Sa}$',label_font_size=12,
    t_start=20e-3, t_end=40e-3)
input power factor:   0.827
filename: controlled_rectifier_3ph_8_3.dat
ISa fundamental (RMS value): 7.7970E+00
THD in ISa: 31.08 %
No description has been provided for this image

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

In [ ]: