Dual active bridge DC-DC converter
The dual active bridge DC-DC converter shown in the figure is operated in phase shift modulation with a switching frequency of $50\,$kHz. The other parameters of the converter are $V_s = 50\,$V, $N_1:N_2 = 1:10$, $L_{LK} = 20\,\mu$H, $C_{out} = 22\,\mu$F, $R = 100\,\Omega$.- Plot the output voltage $V_o$ versus $\phi$ for $0 < \phi < 0.5$.
- Determine $\phi$ for which the output power is maximum.
In [1]:
from IPython.display import Image
Image(filename =r'bridge_dcdc_4_fig_1.png', width=900)
Out[1]:
In [2]:
# run this cell to view the circuit file.
%pycat bridge_dcdc_4_orig.in
In [3]:
import numpy as np
import gseim_calc as calc
import os
import dos_unix
import matplotlib.pyplot as plt
from setsize import set_size
s_Vdc = "50"
s_LLK = "20e-6"
s_R = "100"
s_C = "22e-6"
s_N1 = "1"
s_N2 = "10"
f_hz = 50.0e3
T = 1/f_hz
s_Tend = "120e-3"
Tend = float(s_Tend)
T1 = Tend - 2.0*T
s_T1 = ("%12.5E"%(T1)).strip()
l_phi = [
0.025,
0.050,
0.075,
0.100,
0.125,
0.150,
0.175,
0.200,
0.225,
0.250,
0.275,
0.300,
0.325,
0.350,
0.375,
0.400,
0.425,
0.450,
0.475,
]
l_v_out_all = []
l_P_R_all = []
for phi in l_phi:
s_phi = "%11.4E"%phi
t0 = phi*T
s_t0 = ("%11.4E"%(t0)).strip()
l = [
('$Vdc', s_Vdc),
('$LLK', s_LLK),
('$R', s_R),
('$C', s_C),
('$N1', s_N1),
('$N2', s_N2),
('$Tend', s_Tend),
('$T1', s_T1),
('$t0', s_t0),
]
print('phi:', phi)
calc.replace_strings_1("bridge_dcdc_4_orig.in", "bridge_dcdc_4.in", l)
# uncomment for windows:
#dos_unix.d2u("bridge_dcdc_4.in")
os.system('run_gseim bridge_dcdc_4.in')
slv = calc.slv("bridge_dcdc_4.in")
i_slv = 0
i_out = 0
filename = slv.l_filename_all[i_slv][i_out]
u = np.loadtxt(filename)
t = u[:, 0]
t0 = t[0]
t = t - t0
col_v_out = slv.get_index(i_slv,i_out,"v_out")
col_P_R = slv.get_index(i_slv,i_out,"P_R")
l_v_out = calc.avg_rms_2(t, u[:,col_v_out], 0.0, 2.0*T, 1.0e-4*T)
l_P_R = calc.avg_rms_2(t, u[:,col_P_R ], 0.0, 2.0*T, 1.0e-4*T)
v_out_avg = l_v_out[1][0]
P_R_avg = l_P_R[1][0]
l_v_out_all.append(v_out_avg)
l_P_R_all.append(P_R_avg)
print('v_out_avg:', "%5.1F"%v_out_avg, 'V')
print('P_R_avg:', "%5.1F"%P_R_avg, 'W')
color1='red'
color2='blue'
fig, ax = plt.subplots(2, sharex=False)
plt.subplots_adjust(wspace=0, hspace=0.0)
set_size(5.5, 4, ax[0])
for i in range(2):
ax[i].grid(color='#CCCCCC', linestyle='solid', linewidth=0.5)
ax[0].set_ylabel(r'$V_{out}$', fontsize=12)
ax[1].set_ylabel(r'$P_R$' , fontsize=12)
ax[0].tick_params(labelbottom=False)
ax[0].plot(l_phi, l_v_out_all, color=color1, linewidth=1.0, label="$V_{out}$")
ax[1].plot(l_phi, l_P_R_all , color=color2, linewidth=1.0, label="$P_R$")
ax[1].set_xlabel(r'$\phi$', fontsize=12)
#plt.tight_layout()
plt.show()
phi: 0.025 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 11.9 V P_R_avg: 1.4 W phi: 0.05 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 22.5 V P_R_avg: 5.1 W phi: 0.075 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 31.8 V P_R_avg: 10.1 W phi: 0.1 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 39.9 V P_R_avg: 16.0 W phi: 0.125 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 46.8 V P_R_avg: 21.9 W phi: 0.15 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 52.4 V P_R_avg: 27.5 W phi: 0.175 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 56.7 V P_R_avg: 32.3 W phi: 0.2 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 59.8 V P_R_avg: 35.9 W phi: 0.225 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 61.7 V P_R_avg: 38.2 W phi: 0.25 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 62.3 V P_R_avg: 38.9 W phi: 0.275 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 61.7 V P_R_avg: 38.2 W phi: 0.3 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 59.8 V P_R_avg: 35.9 W phi: 0.325 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 56.7 V P_R_avg: 32.2 W phi: 0.35 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 52.3 V P_R_avg: 27.5 W phi: 0.375 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 46.7 V P_R_avg: 21.9 W phi: 0.4 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 39.9 V P_R_avg: 15.9 W phi: 0.425 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 31.8 V P_R_avg: 10.1 W phi: 0.45 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 22.4 V P_R_avg: 5.0 W phi: 0.475 Circuit: filename = bridge_dcdc_4.in main: i_solve = 0 main: calling solve_trns Transient simulation starts... i=0 i=100000 GSEIM: Program completed. v_out_avg: 11.8 V P_R_avg: 1.4 W
This notebook was contributed by Prof. Nakul Narayanan K, Govt. Engineering College, Thrissur. He may be contacted at nakul@gectcr.ac.in.