Inductor in periodic steady state

An inductor $L$ is connected between two sources as shown below If the inductor is in cyclic steady state, find $V_m$.
In [1]:
from IPython.display import Image
Image(filename =r'misc_6_fig_1.png', width=650)
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

Vm_sin = 100*np.pi
Vm_sqr = 80.0 # to be changed by user
T_sqr = 10.0e-3
T_sin = 2.0*T_sqr
omg = 2.0*np.pi/T_sin
D = 0.8

n_div = 2000
t = np.linspace(0.0, T_sin, (n_div+1))
DT = D*T_sqr

l_sin = []
l_sqr = []
for i, u in enumerate(t):
    t_sqr = u % T_sqr
    t_sin = u % T_sin
    if t_sqr < DT:
        V_sqr = Vm_sqr
    else:
        V_sqr = 0.0
    if t_sin < 0.5*T_sin:
        V_sin = Vm_sin*np.sin(omg*t_sin)
    else:
        V_sin = 0.0

    l_sqr.append(V_sqr)
    l_sin.append(V_sin)

x_sqr = np.array(l_sqr)
x_sin = np.array(l_sin)

x_net = x_sin-x_sqr

l_x_net = calc.avg_rms_2(t, x_net, 0.0, T_sin, 1.0e-5*T_sin)
t_net = np.array(l_x_net[0])

if abs(l_x_net[1][0]) > (1.0e-4*Vm_sin):
    print('average value:', "%11.4E"%l_x_net[1][0])
    print('Vm_sqr =', Vm_sqr, 'is not correct')
else:
    print('Vm_sqr =', Vm_sqr, 'is correct')

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=T_sin*1e3)
    ax[k].grid(color='#CCCCCC', linestyle='solid', linewidth=0.5)

ax[0].set_ylabel('$v_1$',fontsize=13)
ax[1].set_ylabel('$v_2$',fontsize=13)
ax[2].set_ylabel('$v_{net}$',fontsize=13)

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

ax[0].plot(t*1e3, x_sin, color=color1, linewidth=1.0, label="$v_1$")
ax[1].plot(t*1e3, x_sqr, color=color2, linewidth=1.0, label="$v_2$")
ax[2].plot(t*1e3, x_net, color=color3, linewidth=1.0, label="$v_{net}$")

ax[2].plot(t_net*1e3, l_x_net[1], color=color3, linewidth=1.0, label="$v_{net}^{avg}$", linestyle='-.')

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()
average value:  3.6000E+01
Vm_sqr = 80.0 is not correct
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 [ ]: