0% found this document useful (0 votes)
4 views2 pages

MPPT Algorithm for Solar Power Optimization

This function takes in the current (Ipv) and voltage (Vpv) from a photovoltaic panel and calculates the maximum power point (MPP) - the voltage (Vmpp) and current (Impp) at which the panel produces maximum power (Pmax). It does this by: 1) Calculating power (P) at each voltage-current data point. 2) Finding the MPP as the point just before power starts decreasing. 3) Outputting Vmpp, Impp, and Pmax.

Uploaded by

A patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

MPPT Algorithm for Solar Power Optimization

This function takes in the current (Ipv) and voltage (Vpv) from a photovoltaic panel and calculates the maximum power point (MPP) - the voltage (Vmpp) and current (Impp) at which the panel produces maximum power (Pmax). It does this by: 1) Calculating power (P) at each voltage-current data point. 2) Finding the MPP as the point just before power starts decreasing. 3) Outputting Vmpp, Impp, and Pmax.

Uploaded by

A patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

function [Vmpp,Impp,Pmax] = MPPT(Ipv,Vpv,G)

ind=find(Ipv<0,1,'first');

if(isempty(ind))
ind=length(Ipv);
end;

I=Ipv(1:ind(1)-1);
V=Vpv(1:ind(1)-1);

% I=Ipv;
% V=Vpv;

I(end)=0;
% Powe Calculations

P=(I.*V)*(G/100);

L=length(P);

MPP=L;
Pmax=P(L);
Impp=I(L);
Vmpp=V(L);

for i=2:L
P_prv=P(i-1);
P_curr=P(i);

D=P_curr-P_prv;
if(D<0)
Pmax=P_curr;
MPP=i;
break;
end;

end;

Vmpp=V(MPP);
Impp=I(MPP);
Pmax;
% figure(3)
subplot(2,2,3)
plot(V,I),title('IV Plot');
xlabel('Volatage(V)');
ylabel('Current(A)');
hold on

plot(Vmpp,Impp,'r*')
hold off;

% figure(4)
subplot(2,2,4)
plot(V,P),title('PV Plot');
xlabel('Volatage(V)');
ylabel('Power(W)');
hold on
plot(Vmpp,Pmax,'r*')
hold off;

%%
D=0.5;
Dt=zeros(1,L);
for i=2:L
dV=V(i)-V(i-1);
dI=I(i)-I(i-1);

if(dV==0)
if(dI==0)
Dt(i)=D;
else
if(dI>0)
D=D+0.005;
Dt(i)=D;
else
D=D-0.005;
Dt(i)=D;
end

end;

else
if((dI/dV)==(-(I(i)/V(i))))
Dt(i)=D;

else
if((dI/dV)>(-(I(i)/V(i))))
D=D+0.005;
Dt(i)=D;
else
D=D-0.005;
Dt(i)=D;
end;
end;

end;
end;
DC=Dt(MPP);

You might also like