Info

此问题已关闭。 请重新打开它进行编辑或回答。

I'm trying to simulate PV characteristics and wrote the code , but I don't know where the problem is .

1 次查看(过去 30 天)
Here is the code
clc;
clear all;
q = 1.602e-19;
K = 1.38065e-23;
vocr=32.9;
Iscr=8.21;
Rs=0.221;
Ki=0.0032;
Kv=-0.123;
Ns=54;
T=35+273;
Tr=25+273;
Gr=1000;
G=800;
a=1.3;
Rsh=415.405;
pg=1.12;
vtr= Ns*(K*Tr/q);
Ior= Iscr/((exp(vocr/(a*vtr)))-1);
Io= Ior*((Tr/T)^3)*exp((q*pg/(a*K))*((1/Tr)-(1/T)));
Ipvr=Iscr;
Ipv= (G/Gr)*(Ipvr+Ki*(T-Tr));
vt= Ns*(K*T/q);
I= zeros(330,1);
i=1;
I(1,1)=0;
for v=32.9:-0.05:0;
Ical= Io*(exp((v+(I(i,1)*Rs))/(vt*a))-1)+((v+(Rs*I(i,1))/Rsh));
I(i+1)= Ipv-Ical;
v1(i)=v;
p(i)=v*I(i);
i=i+1;
end
v1(i)= v1(i-1);
p(i)=p(i-1);
v1=transpose(v1);
plot(v1,I,'r')
grid on
  2 个评论
John D'Errico
John D'Errico 2017-5-29
Why do YOU think there is a problem? How are we supposed to guess what you think is wrong? The crystal ball is so foggy.
shrik kader
shrik kader 2017-5-29
编辑:shrik kader 2017-5-29
John D'Errico, when I run the code, the graph is not what it suppose to be, I am still new on Matlab, so I don't know where the issue is

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by