Waveforms

The voltage $v(t)$ across and the current $i(t)$ through a power electronic load is given below. Determine the average power delivered to the load.
In [1]:
from IPython.display import Image
Image(filename =r'waveforms_9_fig_1.png', width=500)
Out[1]:
No description has been provided for this image
In [2]:
import numpy as np
import matplotlib.pyplot as plt 
import gseim_calc as calc
from setsize import set_size

T = 10.0e-6
V0 = 50.0
I1 = 10.0
I2 = 15.0

T1 = T/2

slope = (I2-I1)/T1

n_div = 2000
t = np.linspace(0.0, 2*T, (n_div+1))

l_v = []
l_i = []

for k, t1a in enumerate(t):
    t1 = t1a % T
    if t1 < T1:
        v1 = V0
        i1 = I1 + slope*t1
    else:
        v1 = 0.0
        i1 = I2 - slope*(t1-T1)
    l_v.append(v1)
    l_i.append(i1)

v = np.array(l_v)
i = np.array(l_i)

p = v*i

l_v_1 = calc.avg_rms_2(t, v, 0.0, 2.0*T, 1.0e-5*T)
l_i_1 = calc.avg_rms_2(t, i, 0.0, 2.0*T, 1.0e-5*T)
l_p_1 = calc.avg_rms_2(t, p, 0.0, 2.0*T, 1.0e-5*T)

print('v: rms value:',     "%11.4E"%l_v_1[2][0])
print('i: rms value:',     "%11.4E"%l_i_1[2][0])
print('p: average value:', "%11.4E"%l_p_1[1][0])

v2 = np.array(l_v_1)
i2 = np.array(l_i_1)
p2 = np.array(l_p_1)

fig, ax = plt.subplots(3, sharex=False)
plt.subplots_adjust(wspace=0, hspace=0.0)
grid_color='#CCCCCC'

set_size(6, 6, ax[0])

color1 ='blue'
color2 ='olive'
color3 ='crimson'

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

ax[0].set_ylabel('$v$',fontsize=13)
ax[1].set_ylabel('$i$',fontsize=13)
ax[2].set_ylabel('$p$',fontsize=13)

ax[0].tick_params(labelbottom=False)
ax[1].tick_params(labelbottom=False)
ax[2].set_xlabel('$t$ ($\mu$sec)',fontsize=13)

ax[0].plot(t*1e6, v, color=color1, linewidth=1.0, label="$v$")
ax[1].plot(t*1e6, i, color=color2, linewidth=1.0, label="$i$")
ax[2].plot(t*1e6, p, color=color3, linewidth=1.0, label="$p$")

ax[0].plot(v2[0]*1e6, v2[2], color=color1, linewidth=1.0, label="$v_{rms}$", linestyle='-.')
ax[1].plot(i2[0]*1e6, i2[2], color=color2, linewidth=1.0, label="$i_{rms}$", linestyle='-.')
ax[2].plot(p2[0]*1e6, p2[1], color=color3, linewidth=1.0, label="$p_{avg}$", linestyle='-.')

ax[0].legend(loc = 'lower right',frameon = True, fontsize = 10, title = None,
   markerfirst = True, markerscale = 1.0, labelspacing = 0.5, columnspacing = 2.0,
   prop = {'size' : 12},)
ax[1].legend(loc = 'lower right',frameon = True, fontsize = 10, title = None,
   markerfirst = True, markerscale = 1.0, labelspacing = 0.5, columnspacing = 2.0,
   prop = {'size' : 12},)
ax[2].legend(loc = 'upper 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()
v: rms value:  3.5373E+01
i: rms value:  1.2583E+01
p: average value:  3.1275E+02
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 [ ]: