Photovoltaic Solar Cell Modeling
كود برنامج الماتلاب :
clear; clc;
syms V I
Is = 1e-6; %reverse saturation current set to 1u A (10^-6)
Ip = 5; %photo generated current
Rs = 0.01; %series resistance
Rsh = inf; %open circuit
Vt = 0.025; %thermal voltage set to 25mV @25ْC
n = 1.5; %ideality factor
f(V, I) = Ip - Is*(exp((V+I*Rs)/(n*Vt))-1) - (V+I*Rs)/Rsh - I;
figure(1);
h = fimplicit(f , [0 0.7 0 6]); %plot the equation with the volt and current ranges
V = get(h,'Xdata') ; %get voltage values from the figure
I = get(h,'Ydata') ; %get current values from the figure
P = V .*I;
hold on;
plot(V, P); %plot current verses power
xlabel('V'); legend('Current','Power');
Pm = max(P) %maximum power of pv cell
Isc = max(I) %short circuit current of pv cell
Voc = max(V) %open circuit voltage of pv cell
Im = I(P==Pm) %pv cell current of maximum power
Vm = V(P==Pm) %pv cell voltage of maximum power
%if there is problem with "fimplicit" use "ezplot"
%ezplot(f(I,V), [0 0.7 0 6]);
%xlim([0 0.7]); ylim([0 6]);