Solar module I-V
The parameters of a solar panel are given in the table below.Parameter | Value |
---|---|
$P_{max}$ (W) | 320 |
Voltage at $P_{max}$ (V) | 33.4 |
Current at $P_{max}$ (A) | 9.59 |
$V_{OC}$ at STC (V) | 40.9 |
$I_{SC}$ at STC (A) | 10.15 |
Temperature coefficient for $I_{SC}$ ($\%/^oC$) | 0.058 |
Temperature coefficient for $V_{OC}$ ($\%/^oC$) | -0.32 |
Number of cells in series ($N_C$) | 60 |
In a PV plant, ten such panels, along with bypass diodes (assumed to be ideal), are connected in series as shown in the figure. The irradiation for panels PV1-PV9 is $1000\,$W/m$^2$ and that for PV10 is $500\,$W/m$^2$ because of shading.
- Plot the $P$-$V$ curve of the PV plant.
- What is the maximum power delivered by the plant to the reistor load?
from IPython.display import Image
Image(filename =r'solar_6_fig_1.png', width=500)
# run this cell to view the circuit file.
%pycat solar_6_orig.in
We now replace the strings such as \$Voc_ref with the values of our choice by running the python script given below. It takes an existing circuit file solar_6_orig.in and produces a new circuit file solar_6.in, after replacing \$Voc_ref, etc. with values of our choice.
import gseim_calc as calc
s_g_rad_1 = '1000'
s_g_rad_2 = '500'
s_t_C = '25'
s_Nc = '60'
s_Voc_ref = '40.9'
s_Isc_ref = '10.15'
s_Vm_ref = '33.4'
s_Im_ref = '9.59'
s_coef_Isc = '0.058'
s_coef_Voc = '-0.32'
l = [
('$g_rad_1', s_g_rad_1),
('$g_rad_2', s_g_rad_2),
('$t_C', s_t_C),
('$Nc', s_Nc),
('$Voc_ref', s_Voc_ref),
('$Isc_ref', s_Isc_ref),
('$Vm_ref', s_Vm_ref),
('$Im_ref', s_Im_ref),
('$coef_Isc', s_coef_Isc),
('$coef_Voc', s_coef_Voc),
]
calc.replace_strings_1("solar_6_orig.in", "solar_6.in", l)
print('solar_6.in is ready for execution')
solar_6.in is ready for execution
import os
import dos_unix
# uncomment for windows:
#dos_unix.d2u("solar_6.in")
os.system('run_gseim solar_6.in')
Circuit: filename = solar_6.in main: i_solve = 0 GSEIM: Program completed.
0
The circuit file (solar_6.in) is created in the same directory as that used for launching Jupyter notebook. The last step (i.e., running GSEIM on solar_6.in) creates a data file called solar_6.dat in the same directory. We can now use the python code below to compute/plot the various quantities of interest.
import numpy as np
import matplotlib.pyplot as plt
import gseim_calc as calc
from setsize import set_size
slv = calc.slv("solar_6.in")
i_slv = 0
i_out = 0
filename = slv.l_filename_all[i_slv][i_out]
print('filename:', filename)
u = np.loadtxt(filename)
t = u[:, 0]
col_i1 = slv.get_index(i_slv,i_out,"i1")
col_i10 = slv.get_index(i_slv,i_out,"i10")
col_ID1 = slv.get_index(i_slv,i_out,"ID1")
col_ID10 = slv.get_index(i_slv,i_out,"ID10")
col_p1 = slv.get_index(i_slv,i_out,"p1")
col_p10 = slv.get_index(i_slv,i_out,"p10")
col_v_p = slv.get_index(i_slv,i_out,"v_p")
col_P_R1 = slv.get_index(i_slv,i_out,"P_R1")
v_p = u[:,col_v_p]
p_max = (u[:,col_P_R1]).max()
print('Maximum power:', "%6.1f"%p_max, "W")
color1 = 'green'
color2 = 'crimson'
color3 = 'blue'
color4 = 'royalblue'
color5 = 'goldenrod'
color6 = 'red'
fig, ax = plt.subplots(4, sharex=False, gridspec_kw={'height_ratios': [1.5, 1.5, 2, 2]})
plt.subplots_adjust(wspace=0, hspace=0.0)
set_size(5.5, 9, ax[0])
ax[0].plot(v_p, u[:,col_i1 ], color=color1, linewidth=1.0, label="$I_{PV1}$")
ax[0].plot(v_p, u[:,col_i10 ], color=color5, linewidth=1.0, label="$I_{PV10}$")
ax[1].plot(v_p, u[:,col_ID1 ], color=color1, linewidth=1.0, label="$I_{D1}$")
ax[1].plot(v_p, u[:,col_ID10], color=color5, linewidth=1.0, label="$I_{D10}$")
ax[2].plot(v_p, u[:,col_p1 ], color=color1, linewidth=1.0, label="$P_{PV1}$")
ax[2].plot(v_p, u[:,col_p10 ], color=color5, linewidth=1.0, label="$P_{PV10}$")
ax[3].plot(v_p, u[:,col_P_R1], color=color2, linewidth=1.0, label="$P_{total}$")
ax[0].set_ylabel(r'$I_{module}$ (A)', fontsize=12)
ax[1].set_ylabel(r'$I_{diode}$ (A)' , fontsize=12)
ax[2].set_ylabel(r'$P_{module}$ (W)', fontsize=12)
ax[3].set_ylabel(r'$P_{total}$ (W)' , fontsize=12)
for i in range(3):
ax[i].tick_params(labelbottom=False)
for i in range(4):
ax[i].grid(color='#CCCCCC', linestyle='solid', linewidth=0.5)
ax[i].set_xlim(left=0.0)
ax[0].legend(loc = 'upper 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 = 'upper 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 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()
filename: solar_6.dat Maximum power: 2882.9 W
This notebook was contributed by Prof. Nakul Narayanan K, Govt. Engineering College, Thrissur. He may be contacted at nakul@gectcr.ac.in.