Hello,
I am Sridevi, I am trying to get a PV Curve and pmax for IEEE 30 bus test
system for few buses (example bus 7). The curve looks like a linear curve.
It does not look any close to a typical pv curve.
Could anyone look into it and assist. Here is the code.
clear all
close all
clc
%============Inputs====================================================
pf = 0.8;%power factor = 0.8 lagging
BUS_I=7;%change these bus numbers
mpc=loadcase('case30');%load case30 to mpc file
Po=mpc.bus(BUS_I,3);%reading the real load demand from bus data
i=1; %iterative variable
%======================================================================
%=====================To find out the range of P==========================
P=0;%load power is initialised to zero
P_old=0;
temp=1;
while (temp>0.5)
P_old(i)=P;
mpc.bus(BUS_I,3)=P;% modifying the real load demand
Q=((sqrt(1-pf^2))/pf)*P;%calculating the corresponding reactive load demand
mpc.bus(BUS_I,4)=Q;
results = runpf(mpc);%run the load flow and save the results
V(i)=results.bus(BUS_I,8);%read voltage from the updated values
temp=V(i);
P=P+1;% increase load real power
i=i+1;
end
%==========================================================================
P=P-1;
%=============To zero in on P more accurately with increased resolution====
% P=P+0.1;% we have decremented the increament of P to get accuracy on
maximum P
% temp=1;
% while (temp>0.5)
% P_old(i)=P;
% mpc.bus(BUS_I,3)=P;% modifying the real load demand
% Q=((sqrt(1-pf^2))/pf)*P;%calculating the corresponding reactive load
demand
% mpc.bus(BUS_I,4)=Q;
% results = runpf(mpc);%run the load flow and save the results
% V(i)=results.bus(BUS_I,8);%read voltage from the updated values
% temp=V(i);
% P=P+0.1;% increase load real power
% i=i+1;
% end
%==========================================================================
%=======To calculate the load flow for exact value of P found==============
mpc.bus(BUS_I,3)=P;
P_old(i)=P;
results=runpf(mpc);
V(i)=results.bus(BUS_I,8);
%==========================================================================
%===========To plot the PV curve======================
plot(P_old,V);%Plot P-V accordingly
xlabel('Power [MW]');
ylabel('Voltage [V]');
title('PV Curve');
axis([0 300 0.5 1])
deltaP=P-Po;%Determine loading margins
%====================================================
Kindly assist.
Thanks & Regards,
Sridevi Hosur