Switching
The gate voltage and the inductor current for the circuit shown in the the figure are given for one period, where $I_1 = 10\,$A, $t_1 = 2.5\,\mu$s, $t_2 = 5\,\mu$s, $T = 10\,\mu$s. The diode has an on-state drop of $1\,$V. The MOSFET has an on-state resistance of $0.3\,\Omega$. What is the conduction loss in the MOSFET (in Watts)?In [1]:
from IPython.display import Image
Image(filename =r'switching_10_fig_1.png', width=650)
Out[1]:
In [2]:
import numpy as np
import matplotlib.pyplot as plt
import gseim_calc as calc
from setsize import set_size
I1 = 10.0
t1 = 2.5e-6
t2 = 5.0e-6
T = 10.0e-6
Rd = 0.3
Vd = 1.0
n_div = 4000
t = np.linspace(0.0, T, (n_div+1))
l_ID = []
l_IT = []
slope_IT = I1/t1
slope_ID = I1/(t2-t1)
VG = np.where(t < t1, 1, 0.0)
for i, tx in enumerate(t):
if tx < t1:
ID = 0.0
IT = slope_IT*tx
elif tx < t2:
ID = I1 - slope_IT*(tx-t1)
IT = 0.0
else:
ID = 0.0
IT = 0.0
l_ID.append(ID)
l_IT.append(IT)
ID = np.array(l_ID)
IT = np.array(l_IT)
IL = ID + IT
P_T = IT*IT*Rd
P_D = ID*Vd
P = P_T + P_D
PT_avg = np.trapz(P_T, t)/T
PD_avg = np.trapz(P_D, t)/T
P_avg = np.trapz(P, t)/T
print('PT_avg:', "%11.4E"%PT_avg, 'W')
print('PD_avg:', "%11.4E"%PD_avg, 'W')
print('P_avg:', "%11.4E"%P_avg, 'W')
plot_min_P, plot_max_P = calc.delta_plot_1(P , 0.1)
plot_min_I, plot_max_I = calc.delta_plot_1(IT, 0.2)
color1='darkcyan'
color2='red'
color3='dodgerblue'
color4='tomato'
fig, ax = plt.subplots(5, sharex=False, gridspec_kw={'height_ratios': [1, 1, 1, 1, 3]})
plt.subplots_adjust(wspace=0, hspace=0.0)
set_size(5, 7, ax[0])
for i in range(5):
ax[i].set_xlim(left=0.0, right=T*1e6)
ax[i].grid(color='#CCCCCC', linestyle='solid', linewidth=0.5)
ax[0].set_ylim(bottom=-0.2, top=1.2)
ax[1].set_ylim(bottom=plot_min_I, top=plot_max_I)
ax[2].set_ylim(bottom=plot_min_I, top=plot_max_I)
ax[3].set_ylim(bottom=plot_min_I, top=plot_max_I)
ax[4].set_ylim(bottom=plot_min_P, top=plot_max_P)
ax[0].set_ylabel(r'$V_G$', fontsize=12)
ax[1].set_ylabel(r'$i_T$', fontsize=12)
ax[2].set_ylabel(r'$i_D$', fontsize=12)
ax[3].set_ylabel(r'$i_L$', fontsize=12)
ax[4].set_ylabel(r'$P$' , fontsize=12)
for k in range(4):
ax[k].tick_params(labelbottom=False)
ax[0].plot(t*1e6, VG, color=color1, linewidth=1.0, label="$V_G$")
ax[1].plot(t*1e6, IT, color=color2, linewidth=1.0, label="$i_T$")
ax[2].plot(t*1e6, ID, color=color2, linewidth=1.0, label="$i_T$")
ax[3].plot(t*1e6, IL, color=color2, linewidth=1.0, label="$i_L$")
ax[4].plot(t*1e6, P_D, color=color3, linewidth=1.0, label="$P_D$")
ax[4].plot(t*1e6, P_T, color=color4, linewidth=1.0, label="$P_T$")
ax[4].set_xlabel(r'time ($\mu$sec)', fontsize=12)
ax[4].legend(loc = 'upper left',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()
PT_avg: 2.4963E+00 W PD_avg: 1.2512E+00 W P_avg: 3.7475E+00 W
This notebook was contributed by Prof. Nakul Narayanan K, Govt. Engineering College, Thrissur. He may be contacted at nakul@gectcr.ac.in.
In [ ]: