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 |
Two such panels, along with bypass diodes (assumed to be ideal), are connected in series as shown in the figure. The irradiation for PV1 is $1000\,$W/m$^2$ and that for PV2 is $500\,$W/m$^2$. The load is a current source with $I_S = I_{MPP}$ (the panel current at the maximum power point). Determine the following.
- currents through the panels PV1 and PV2.
- currents through the bypass diodes $D_1$ and $D_2$.
- power delivered to the current source load.
from IPython.display import Image
Image(filename =r'solar_5_fig_1.png', width=180)
# run this cell to view the circuit file.
%pycat solar_5_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_5_orig.in and produces a new circuit file solar_5.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_5_orig.in", "solar_5.in", l)
print('solar_5.in is ready for execution')
solar_5.in is ready for execution
import os
import dos_unix
# uncomment for windows:
#dos_unix.d2u("solar_5.in")
os.system('run_gseim solar_5.in')
Circuit: filename = solar_5.in main: i_solve = 0 GSEIM: Program completed.
0
The circuit file (solar_5.in) is created in the same directory as that used for launching Jupyter notebook. The last step (i.e., running GSEIM on solar_5.in) creates a data file called solar_5.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_5.in")
i_slv = 0
i_out = 0
filename = slv.l_filename_all[i_slv][i_out]
print('filename:', filename)
u = np.loadtxt(filename)
col_i1 = slv.get_index(i_slv,i_out,"i1")
col_i2 = slv.get_index(i_slv,i_out,"i2")
col_ID1 = slv.get_index(i_slv,i_out,"ID1")
col_ID2 = slv.get_index(i_slv,i_out,"ID2")
col_p1 = slv.get_index(i_slv,i_out,"p1")
col_p2 = slv.get_index(i_slv,i_out,"p2")
col_v_p = slv.get_index(i_slv,i_out,"v_p")
col_P_Is = slv.get_index(i_slv,i_out,"P_Is")
i1_0 = u[col_i1 ]
i2_0 = u[col_i2 ]
ID1_0 = u[col_ID1 ]
ID2_0 = u[col_ID2 ]
p1_0 = u[col_p1 ]
p2_0 = u[col_p2 ]
P_Is_0 = abs(u[col_P_Is])
print('IPV1:', "%7.3f"%i1_0, "A")
print('IPV2:', "%7.3f"%i2_0, "A")
print('ID1:', "%7.3f"%ID1_0, "A")
print('ID2:', "%7.3f"%ID2_0, "A")
print('P (PV1):', "%7.3f"%p1_0, "W")
print('P (PV2):', "%7.3f"%p2_0, "W")
print('P (Is):', "%7.3f"%P_Is_0, "W")
filename: solar_5.dat IPV1: 9.590 A IPV2: 5.075 A ID1: -0.000 A ID2: 4.515 A P (PV1): 320.307 W P (PV2): -0.000 W P (Is): 320.307 W
This notebook was contributed by Prof. Nakul Narayanan K, Govt. Engineering College, Thrissur. He may be contacted at nakul@gectcr.ac.in.