plotting I-V curves
29 views (last 30 days)
Show older comments
Hello,
I am fairly new to MATLAB, and I am trying to plot I-V curves with temperature as a variable. With a changing temperature Voc has multiple answers, and so does Ipv. I would like to plot multiple curves that start at Isc (y axis) and end at Voc (x axis), but when I go to plot the two using the plot comand I get one straight line starting from the origin. The Code I used is below. Any help firguring this out would be greatly appreciated!
Isc = 8.7 % short circuit current
S = 1000 % apparent power
ns = 30
np = 40
n = 1.95 %Ideality factor
K0 = 0.0017
Tr = 300 % refrence temperature
Is = 1.2*10^-7 % diode reverse saturated current
q = 1.602*10^-19 % electron charge
K = 1.38*10^-23 %Boltzmann constant
Rs = 0.013
Rp = 3.5
Vd = Isc*Rs
T = [233.15, 253.15, 273.15, 293.15, 313.15, 333.15] % Absolute temperature
Id = Is*(exp((q*Vd)./(1.95*K*T))-1)
Voc = ((n.*K.*T)./q).*log((Isc./Id)+1)
Ipv = np.*((Isc+K0.*(T-Tr))./(100)).*S-(np.*Is.*(exp((q.*Voc)./(n.*K.*T.*ns))-1)-((np.*Voc)./ns.*Rp))
plot(Voc,Ipv)
9 Comments
Answers (1)
Joel Van Sickel
on 2 Feb 2023
The problem is this. You have a set of equations that answer this question: given a short circuit current, what is my open circuit voltage? What you want is an equation that answers this question, given a load (o ohms being short circuit) what is my circuit load current and voltage? You could then sweep the load from short circuit to open circuit to generate the operating curve. While that equation probably is somewhere in literature, the more common approach is to use circuit simulation to get the results as shown here:
0 Comments
See Also
Categories
Find more on Renewables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!